From e56ec3f142bfbc83f619f7e7eaf72abf03a3ef17 Mon Sep 17 00:00:00 2001 From: Arcturus Date: Thu, 5 Dec 2019 14:28:26 +0800 Subject: [PATCH] v37.0.0 (#6449) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Generated from 027c5530dd98ce87a84ba78c3e3cf8d2451d0c13 (#5569) Fixed the formatting * [AutoPR eventhub/resource-manager] Eventhub: added NetworkRuleSets list API (#5627) * Generated from 46cb463f5dbcd442661875e4eb9d963af3bd1225 added NetworkRuleSets list API * Generated from c09ca0cf8b2a8d98ee64b897e1858f4be8a67f95 added x-ms-pageable and formating * Generated from 8bc2a7edfeebb1a6bb30abbbb03d08bf1f8a8dbc update * Generated from 111d1bc1666fe89cebb960135cf2f5336bbcb35a (#5615) Removed rogue file * [AutoPR machinelearningservices/resource-manager] [NEED DESIGN REVIEW, DO NOT MERGE] Adding workspace level quota management APIs in version 2019-05-01 (#5641) * Generated from f5ddfe85225c2d4f86f7de8e99760b95d1dea6bf Merge branch 'master' into leizhao/workspaceQuotaManagementInVersion2019-05-01 * Generated from c89caf92470c4c334883662fd98e6bd07881807d migrate quota management from 2019-05-01 to 2019-06-01, no content changes * [AutoPR storagecache/resource-manager] Dev storagecache microsoft.storagecache 2019 06 01 preview (#5623) * Generated from 570b6f73542c34f1eb0ab0a85e44b4d929ff55b6 Fix output folder path for GO SDK and fix typo in Tag * Generated from 908e3cd2e18a38be0711e03035c7acdc7ab6d1f2 Fix version in the path of output folder for GO SDK * Generated from 10811b8f33c5e36350b618955cdd8edc9dd67c11 (#5673) Fix bad package name for storagecache in go sdk * Fix bad package name * Fix profile and fmt * Generated from 54eb3260d53865005eb6ccfdc9843e7ab10d9da5 (#5551) adding maintenanceConfiguration list and resourceId for updates * Generated from be2943341d08ab5972e4d2385b1860d34ee61f59 (#5675) Fix bad namespace in service maintenance * Fix wrong namespace * Fix profile and fmt * Generated from 3bcf3602288f763a70a2f3cb10100406e0e53257 (#5672) Addressed misspelled word and mode error * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b (#5651) Update review comments * [AutoPR datafactory/resource-manager] support Express Custom Setup (#5536) * Generated from 696212c605edef333cba0f0e86d42ba344f4fc42 address the comments * Generated from 4de64a2262df8e2e971620c95f7c3a2ba91d49d9 address comments * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * [AutoPR datafactory/resource-manager] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#5611) * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Fix CI failure and conflict * [AutoPR] compute/resource-manager (#5688) * [AutoPR compute/resource-manager] removing non-ascii character (#5325) * Generated from 090b727225320af61034c7278c3ccf51dcbef8a2 removing non-ascii character * Generated from 56ccb1151588cff87c1c92eee0e6c56e42c7f2f4 corrected the description * [AutoPR compute/resource-manager] Add terminate profile and scheduled events profile to Microsoft.Compute (#5310) * Generated from 9bb1d5b7f21a0e03e97ce3817554307244d45422 Correct definition format * Generated from 49bbc9237680dc7963f9d24f7cde1d05e8f14260 Merge branch 'master' into dev/szimmer/AddTerminateProfile * [AutoPR compute/resource-manager] Add missing Gallery Application API in 2019-07-01 version (#5354) * Generated from 01293ebd64fa96d11d30d9b0ef1391cbe8e62443 Add missing Gallery Application API in 2019-07-01 version * Generated from 6637309053b80e0b62b01f1c240d72749e30f1c2 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs * [AutoPR compute/resource-manager] add HyperVGeneation in GetVMImage (#5344) * Generated from 4b3b012a4c684afd2e931bb2ac4c01bbf894eec4 add HyperVGeneation in SharedVMImageVersion * Generated from c34793bd9910de785d31e7bf8e6da1fd7e30de8b reuse HyperVGenerationType * Generated from c34793bd9910de785d31e7bf8e6da1fd7e30de8b reuse HyperVGenerationType * compute/resource-manager] Swagger: Allowing for VMSS reference during VM creation (#5408) * Generated from 547a98bc34516d8788adff951ebd929d8d5125ae Swagger: Allowing for VMSS reference during VM creation * Generated from 2723517c6c29f1c6945bdf05b9c4e42f85159011 fixing typo * [AutoPR compute/resource-manager] [Do not merge yet] DiskRP Swagger changes for 2019-03-01 (#5398) * Generated from a308b6604cb4bfdb8085d78f998aa3718cf9ae36 adding unique id * Generated from b7b0ecc49d6694ea41c66ef9936f05da9bae38f3 fixing typo * Generated from 34c96075059bf06bf052835f6f405b2d0649d1b7 removing diskSizeBytes from snapshot\disk update properties and adding a unique id for disk properties * Generated from 1ad0c2e2dd85dad2a363072eb4cdcbe250e1522b pr comments * Generated from 4f5dbad04518d0674689ac2a2388ea823d28cadf pr comments * [AutoPR compute/resource-manager] Adding low priority and variable pricing feature for standalone VMs. Added priority, eviction policy and billing profile to VirtualMachineProperties. Also, adding optional billing profile to VMSS Create and Update APIs. (#5523) * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 9d5e30df16e3ea43cb3b21b5f5264373d8ed2397 (#5596) updating an incorrect description for uploadsizebytes * Generated from 79b1099e7cf1d0a077c2f5b38b4c83408b97a59b (#5652) Add missing $expand parameter to AvSet list by subscription API * [AutoPR] securityinsights/resource-manager (#5683) * Generated from 878390cbb0806c9194cc9ceaed923284d2d8f2ac (#5288) Fix mistake * [AutoPR securityinsights/resource-manager] SecurityInsights: Investigation swagger updates (#5292) * Generated from 27abe226e56bd1a6d13985c9bc8871148a8c34ad Merge branch 'master' into InvestigationSwagger * Generated from ebb1f1f5bdab7f12639fbee775adf16611d092ad removed cases changes (will be in another PR) * Generated from ab899e75a364a5b6dbf21370c1db65b769094ec8 removed bookmarkEntity from entities api (currently not supported) * [AutoPR securityinsights/resource-manager] Adding alertRuleTemplates swagger spec to securityInsight (#5504) * Generated from d731243f4645a2df9c8389e10e93be04ea78a620 Add alertRuleTemplates endpoint to securityInsight * Generated from d09f26c587fddd31fa13cb3d94d7a9bbe8d58ec8 fix merge conflict * Generated from efe14acff06c754692f29bffee877f29edb68b89 Bookmarks swagger updates * Generated from 07393c4915496b1768a08c5f408b05cdb2a27f10 fix typos * Generated from 98fdd0347934e59d39a7b6f803f170933c96d199 fix typo * Generated from e00e65896ca96c4c814528fa286e3f6e2d534122 (#5682) sort definitions and parameters by ABC * Resolved conflict manually * [AutoPR] network/resource-manager (#5692) * Generated from 3b992f9396f9c0bc7e34b11696efcffafa92575a (#5297) add network package-2019-06 to Go SDK * Generated from 36ba645d97091ead19fa04d57595069d73491c7e (#5511) Update PE/PLS * Generated from ec578e180c4515be63046f0b0991d7b9547e657d (#5522) Update description of "location" in serviceTags.json * [AutoPR network/resource-manager] chore: jsonfmt network (#5514) * Generated from 2c363ba11150b1894650db67b5d4a03166b95afd chore: jsonfmt network * Generated from 2c363ba11150b1894650db67b5d4a03166b95afd chore: jsonfmt network * Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#5637) Mark "provisioningState" as read-only * [AutoPR network/resource-manager] Add missing read-only property "outboundRules" in LoadBalancer specs (#5647) * Generated from 658cfc162acc76fd35b81aa42b29406d9ba013cb Add missing read-only property "outboundRules" in LoadBalancer specs * Generated from 658cfc162acc76fd35b81aa42b29406d9ba013cb Add missing read-only property "outboundRules" in LoadBalancer specs * [AutoPR] storage/resource-manager (#5695) * Generated from 3acbc3b4106db3097de5be5e4df47afb38d51ec0 (#5473) Use cors definition from blob.json * Generated from 94667089d429b4f1aca38e60f85b13f5c0039219 (#5580) Align File swagger with the Blob swagger * Generated from 8264dcc49e0bc239013cd76ce9664f83f1041967 (#5678) Update Kusto.json with TSVE data format * [AutoPR eventgrid/data-plane] Create KeyVault.json (#5546) * Generated from 66c76158ca650e8f4bf0ff082bc5428e2544c457 Update readme with KeyVault.json * Generated from 7d4a2513c50a216bfe9cbf6a6f769d460d7211f4 Revert "Update readme with KeyVault.json" This reverts commit 66c76158ca650e8f4bf0ff082bc5428e2544c457. * Generated from 44674ab5aabc591e8dd6b10d326071e8fa3ccd49 Update readme.md * [AutoPR] compute/resource-manager (#5706) * [AutoPR compute/resource-manager] removing non-ascii character (#5325) * Generated from 090b727225320af61034c7278c3ccf51dcbef8a2 removing non-ascii character * Generated from 56ccb1151588cff87c1c92eee0e6c56e42c7f2f4 corrected the description * [AutoPR compute/resource-manager] Add terminate profile and scheduled events profile to Microsoft.Compute (#5310) * Generated from 9bb1d5b7f21a0e03e97ce3817554307244d45422 Correct definition format * Generated from 49bbc9237680dc7963f9d24f7cde1d05e8f14260 Merge branch 'master' into dev/szimmer/AddTerminateProfile * [AutoPR compute/resource-manager] Add missing Gallery Application API in 2019-07-01 version (#5354) * Generated from 01293ebd64fa96d11d30d9b0ef1391cbe8e62443 Add missing Gallery Application API in 2019-07-01 version * Generated from 6637309053b80e0b62b01f1c240d72749e30f1c2 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs * [AutoPR compute/resource-manager] add HyperVGeneation in GetVMImage (#5344) * Generated from 4b3b012a4c684afd2e931bb2ac4c01bbf894eec4 add HyperVGeneation in SharedVMImageVersion * Generated from c34793bd9910de785d31e7bf8e6da1fd7e30de8b reuse HyperVGenerationType * Generated from c34793bd9910de785d31e7bf8e6da1fd7e30de8b reuse HyperVGenerationType * compute/resource-manager] Swagger: Allowing for VMSS reference during VM creation (#5408) * Generated from 547a98bc34516d8788adff951ebd929d8d5125ae Swagger: Allowing for VMSS reference during VM creation * Generated from 2723517c6c29f1c6945bdf05b9c4e42f85159011 fixing typo * [AutoPR compute/resource-manager] [Do not merge yet] DiskRP Swagger changes for 2019-03-01 (#5398) * Generated from a308b6604cb4bfdb8085d78f998aa3718cf9ae36 adding unique id * Generated from b7b0ecc49d6694ea41c66ef9936f05da9bae38f3 fixing typo * Generated from 34c96075059bf06bf052835f6f405b2d0649d1b7 removing diskSizeBytes from snapshot\disk update properties and adding a unique id for disk properties * Generated from 1ad0c2e2dd85dad2a363072eb4cdcbe250e1522b pr comments * Generated from 4f5dbad04518d0674689ac2a2388ea823d28cadf pr comments * [AutoPR compute/resource-manager] Adding low priority and variable pricing feature for standalone VMs. Added priority, eviction policy and billing profile to VirtualMachineProperties. Also, adding optional billing profile to VMSS Create and Update APIs. (#5523) * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 9d5e30df16e3ea43cb3b21b5f5264373d8ed2397 (#5596) updating an incorrect description for uploadsizebytes * Generated from 79b1099e7cf1d0a077c2f5b38b4c83408b97a59b (#5652) Add missing $expand parameter to AvSet list by subscription API * [AutoPR] storage/resource-manager (#5707) * Generated from 3acbc3b4106db3097de5be5e4df47afb38d51ec0 (#5473) Use cors definition from blob.json * Generated from 94667089d429b4f1aca38e60f85b13f5c0039219 (#5580) Align File swagger with the Blob swagger * [AutoPR storage/resource-manager] Add change feed properties to 2019-04-01 Storage. (#5621) * Generated from 774367438889ac553def1957b72b8ba63ad877e5 Add change feed properties to 2019-04-01 Storage. Add change feed properties to Storage Blob Services. * Generated from 774367438889ac553def1957b72b8ba63ad877e5 Add change feed properties to 2019-04-01 Storage. Add change feed properties to Storage Blob Services. * Generated from 34d744550227bee7b380604d38fc1de6c9af6397 (#5708) Update netapp.json * Merge pull request #5714 from Azure/restapi_auto_compute/resource-manager [AutoPR] compute/resource-manager * Update swagger_to_sdk_config.json Update autorest.go to new version * Generated from 5ea5da031f993e6dd8061f42abbea77d58e66020 Clarify KeyVault time as seconds since Unix epoch * Generated from b621ede227cd29651b1712782d964373fc2da6ec (#5717) Quick fix * Generated from 4eb71094207cc3188dfa1d604325731362a555a5 updating readmes * feature: support PutBlockFromURL API: https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url * Generated from 18efd73807c1182800e0521f67e1e5ae2ee70394 added missing packages to compute release * [AutoPR] compute/resource-manager (#5721) * [AutoPR compute/resource-manager] removing non-ascii character (#5325) * Generated from 090b727225320af61034c7278c3ccf51dcbef8a2 removing non-ascii character * Generated from 56ccb1151588cff87c1c92eee0e6c56e42c7f2f4 corrected the description * [AutoPR compute/resource-manager] Add terminate profile and scheduled events profile to Microsoft.Compute (#5310) * Generated from 9bb1d5b7f21a0e03e97ce3817554307244d45422 Correct definition format * Generated from 49bbc9237680dc7963f9d24f7cde1d05e8f14260 Merge branch 'master' into dev/szimmer/AddTerminateProfile * [AutoPR compute/resource-manager] Add missing Gallery Application API in 2019-07-01 version (#5354) * Generated from 01293ebd64fa96d11d30d9b0ef1391cbe8e62443 Add missing Gallery Application API in 2019-07-01 version * Generated from 6637309053b80e0b62b01f1c240d72749e30f1c2 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs * [AutoPR compute/resource-manager] add HyperVGeneation in GetVMImage (#5344) * Generated from 4b3b012a4c684afd2e931bb2ac4c01bbf894eec4 add HyperVGeneation in SharedVMImageVersion * Generated from c34793bd9910de785d31e7bf8e6da1fd7e30de8b reuse HyperVGenerationType * Generated from c34793bd9910de785d31e7bf8e6da1fd7e30de8b reuse HyperVGenerationType * compute/resource-manager] Swagger: Allowing for VMSS reference during VM creation (#5408) * Generated from 547a98bc34516d8788adff951ebd929d8d5125ae Swagger: Allowing for VMSS reference during VM creation * Generated from 2723517c6c29f1c6945bdf05b9c4e42f85159011 fixing typo * [AutoPR compute/resource-manager] [Do not merge yet] DiskRP Swagger changes for 2019-03-01 (#5398) * Generated from a308b6604cb4bfdb8085d78f998aa3718cf9ae36 adding unique id * Generated from b7b0ecc49d6694ea41c66ef9936f05da9bae38f3 fixing typo * Generated from 34c96075059bf06bf052835f6f405b2d0649d1b7 removing diskSizeBytes from snapshot\disk update properties and adding a unique id for disk properties * Generated from 1ad0c2e2dd85dad2a363072eb4cdcbe250e1522b pr comments * Generated from 4f5dbad04518d0674689ac2a2388ea823d28cadf pr comments * [AutoPR compute/resource-manager] Adding low priority and variable pricing feature for standalone VMs. Added priority, eviction policy and billing profile to VirtualMachineProperties. Also, adding optional billing profile to VMSS Create and Update APIs. (#5523) * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 10d72ee6c882c170c44d54928e192a421d1032a1 fixed typo * Generated from 9d5e30df16e3ea43cb3b21b5f5264373d8ed2397 (#5596) updating an incorrect description for uploadsizebytes * Generated from 79b1099e7cf1d0a077c2f5b38b4c83408b97a59b (#5652) Add missing $expand parameter to AvSet list by subscription API * [AutoPR compute/resource-manager] Add VMScaleSet ScaleIn Policy (#5606) * Generated from 5968c8d1d8f53fcce6b11bc71e4be3c6bc550617 Add VMScaleSet ScaleIn Policy Adds VMScaleSet ScaleIn policy that is supported with the 2019-03-01 header but not included in Swagger * Generated from 17a6aebc538afafffc9ce87f083fc07592a6b5c3 Update compute.json Fix indentation * [AutoPR] datafactory/resource-manager (#5730) * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b (#5651) Update review comments * [AutoPR datafactory/resource-manager] support Express Custom Setup (#5536) * Generated from 696212c605edef333cba0f0e86d42ba344f4fc42 address the comments * Generated from 4de64a2262df8e2e971620c95f7c3a2ba91d49d9 address comments * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * [AutoPR datafactory/resource-manager] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#5611) * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Fix CI failure and conflict * Generated from b07009df21da758efcb13fbbd25ce9e450751586 (#5729) [DataFactory] Update Databricks linked service swagger related to warm pools. * Generated from 4d7873fcb2eb980ac1eacad015893bd5634a5a37 (#5735) [ACR] Adding scopemap spec file for new SDK build For releasing ScopeMap and Token features, we need to retrieve models from the scopemap spec file. The existing SDK version doesn't incorporate changes from the scopemap spec file. Requesting a new SDK build. Please suggest changes if deemed necessary. * Generated from 68ccfd97b6bd4b29219d6988342451fff61b7031 (#5737) [Batch] Update documentation around app packages * [AutoPR servicebus/resource-manager] ServiceBus: added NetworkRuleSets list API (#5624) * Generated from 26fbb00e498d34206afb040c7c9eb7b79fa3fd5e added NetworkRuleSets list API * Generated from 87e06617e7103a97295b2fe25f4a47990371b397 added x-ms-pageable and formating * Generated from 2f83e3fb7917b9f6301fea15cf45e3e3fbeac7bb removed readonly for compatibilityLevel * [AutoPR cosmos-db/resource-manager] Add short url for all api resources (#5448) * Generated from 6b485b2047ec2cc073363b94a56778b108912940 Add short url for all api resources * Generated from d0f3adbb4578d7a5569d29a683663bf4772af38a Correct GremlinResources_ spell * Generated from a05be8787ab7cc8346e38c01ccbd45731ad95169 Add new api version * Generated from 72880ac9171c7118002c56eb2152265bb41442ba Fix spell error * Generated from 1ca1ae2151cd7248fac7b82624424ce63383a28a (#5745) fix: Double word "the" in datalake-analytics * [AutoPR] datafactory/resource-manager (#5751) * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b (#5651) Update review comments * [AutoPR datafactory/resource-manager] support Express Custom Setup (#5536) * Generated from 696212c605edef333cba0f0e86d42ba344f4fc42 address the comments * Generated from 4de64a2262df8e2e971620c95f7c3a2ba91d49d9 address comments * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * [AutoPR datafactory/resource-manager] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#5611) * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Fix CI failure and conflict * Generated from b07009df21da758efcb13fbbd25ce9e450751586 (#5729) [DataFactory] Update Databricks linked service swagger related to warm pools. * Generated from 5cc2c54ac1ba7f41fd2426ff39df46f785ce55f2 (#5748) Add a clearer description. * Generated from 94dbf0ac2518371373cf8f2eb74bba657b1e7b90 (#5414) Orphan property removed * Generated from 33d64b558114a9a861b82dc17518e359758d1688 (#5686) Fix SpellCheck Swagger Specification * Generated from 81fb55e8252598b44b1d5ee4db527eacba725546 (#5687) Fix Local Search Swagger * Generated from latest specs of network * Generated from af961540f808cb651ddb1dbac08619eafc06330e (#5789) Add 2019-07 version to network go code generation * Generated from 1baa9a51ee00db62b006b2081d2811297d48d3d4 (#5761) Updated 2019-02-01-preview api version to include operation.g * Generated from 7837d7e037f47c5a2414e0a241e1472c960ff055 (#5744) fix: Double word "the" in automation * [AutoPR datamigration/resource-manager] Correct the version (#5516) * Generated from 8de2c91a547e5ab394d4569aed0dda9b814c9cce Correct the version * Generated from 8de2c91a547e5ab394d4569aed0dda9b814c9cce Correct the version * Generated from 68427c1d0294d9f4acbe7355261c31cd407a2d95 (#5727) Add purge API details. * [AutoPR] frontdoor/resource-manager (#5784) * Generated from 27e7dd3c7e4a6b855c902cfaf35380e273760cde (#5462) Update readme.md files missed from previous commit * Generated from adca4cd9eac95f46998e3b35e1d5ae600498808f (#5508) add SocketAddr matchvariable * Generated from 88294366687bc74b0efc484eb8f0d08980de3804 (#5746) fix: Double word "the" in resources * [AutoPR] datafactory/resource-manager (#5795) * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b (#5651) Update review comments * [AutoPR datafactory/resource-manager] support Express Custom Setup (#5536) * Generated from 696212c605edef333cba0f0e86d42ba344f4fc42 address the comments * Generated from 4de64a2262df8e2e971620c95f7c3a2ba91d49d9 address comments * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * [AutoPR datafactory/resource-manager] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#5611) * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Fix CI failure and conflict * Generated from b07009df21da758efcb13fbbd25ce9e450751586 (#5729) [DataFactory] Update Databricks linked service swagger related to warm pools. * Generated from 5cc2c54ac1ba7f41fd2426ff39df46f785ce55f2 (#5748) Add a clearer description. * Generated from 9402dbf3fb3d5fffcb80f501b1fc857ff97ab723 (#5760) Fixing PR validation errors * Generated from 5927195a95dbda5a1729692d42a088b60c4a4a88 Adding new version of API * [AutoPR] datafactory/resource-manager (#5807) * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b (#5651) Update review comments * [AutoPR datafactory/resource-manager] support Express Custom Setup (#5536) * Generated from 696212c605edef333cba0f0e86d42ba344f4fc42 address the comments * Generated from 4de64a2262df8e2e971620c95f7c3a2ba91d49d9 address comments * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * [AutoPR datafactory/resource-manager] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#5611) * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Fix CI failure and conflict * Generated from b07009df21da758efcb13fbbd25ce9e450751586 (#5729) [DataFactory] Update Databricks linked service swagger related to warm pools. * Generated from 5cc2c54ac1ba7f41fd2426ff39df46f785ce55f2 (#5748) Add a clearer description. * [AutoPR reservations/resource-manager] [Hub Generated] Review request for Microsoft.Capacity to add version preview/2019-04-01 (#5766) * Generated from f19a2e5b7f384018b74b21b7b8b8782d95b456f9 fixed x-ms-enum value * Generated from 2f56008117d578bec6cc8b8c832926f45a0fe52e fixed catalog definition * Generated from cac978330e8c7b9583812a735cfeac97fb267056 reverted breaking operation id change * update README with info on customizing SendDecorators (#5832) * Generated from f3e85bf537e973832fd8b630394c4b951badce66 (#5798) Fix eligibility typo * Generated from d3620f1cf3fda9d30555c4b0e47a1ea521ca5404 (#5799) Review 1 + remove v3.0 preview * Generated from 67a8ba34e8eb3e3c0ffa6efdd019e46391b42571 (#5812) Update readme.go.md Updated output-folder (removed `stable`) * Generated from 96e53c8b30b238235fadb02b5ebf75533039ab91 (#5773) fix getting agent pool available versions api path * [AutoPR logic/resource-manager] [LogicApps] New Api version (#5834) * Generated from acf43615d58480cc7285f4a26b1108971162fc4a Fixed error * Generated from c2f47d91b77ffe997d38994cff32f7b410b1a308 Fixed model errors * Generated from 4f11b92d108f861c21411092dacd997a32bb7076 Fixed more errors in Logic json * Generated from 7c5619dfd675cc3af284d52337539ca861732528 Fixed resource reference issue * Generated from 56286b280dda0ebf76f171c8e4f7288e5ea5141b Fixed Resubmit trigger histories * [AutoPR] datafactory/resource-manager (#5830) * Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b (#5651) Update review comments * [AutoPR datafactory/resource-manager] support Express Custom Setup (#5536) * Generated from 696212c605edef333cba0f0e86d42ba344f4fc42 address the comments * Generated from 4de64a2262df8e2e971620c95f7c3a2ba91d49d9 address comments * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * Generated from fc0bdde313743dbbed8e8c506dd9e07107d04142 Merge branch 'master' into ivan/support-express-custom-setup-for-manged-ir * [AutoPR datafactory/resource-manager] [Data Factory]Add ORC Dataset/Copy Source/Copy Sink (#5611) * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Generated from 864a2b3827b7237d7cb60d77069b693dcbaf7001 [DataFactory]Add support for ORC dataset * Fix CI failure and conflict * Generated from b07009df21da758efcb13fbbd25ce9e450751586 (#5729) [DataFactory] Update Databricks linked service swagger related to warm pools. * Generated from 5cc2c54ac1ba7f41fd2426ff39df46f785ce55f2 (#5748) Add a clearer description. * Generated from 239e696db0a17997d3bc2a77c9670180e527fcfc (#5797) Update location in ManagedNetwork * Generated from 0e25b55ea7d548f56eada51b4065224e02eab5e7 (#5815) Restoring expandChildren changes * Generated from 3ff7f07c725255fe7a891687890dd1b928c772ee enum name must be fixed here as well * Generated from 91579252e6aa0e9aa0b00749c82755240e5f5282 (#5845) Add aad domain name for windows login migration support * Generated from 0d3d4d1b56bbbb9e001f971a9ab2c7df8749a9f3 (#5850) Stablize 2019-04 and 2019-05 for frontdoor * [AutoPR sql/resource-manager] Add new APIs (two List APIs) and update examples (#5728) * Generated from b5c48e4b89006ae465040001f67683dcec790b4b Update DatabaseAuditingSettingsList.json * Generated from b5c48e4b89006ae465040001f67683dcec790b4b Update DatabaseAuditingSettingsList.json * Generated from 3ff8cd57b4a86c753b773d2dba460f7e6a62f4c1 (#5864) remove additional property for data flow enitty * Generated from 8188f2ed896ed7f345c5a324f3c62aaca926a35b (#5867) Removed one property which won't be exposed to public for now * Generated from 1cac6227f3d809cbabebc0ca1140469c9d2a7030 (#5872) remove unnecessary additional property * Generated from ad2716208f8089dd2d768faf9e9f765660fafc9c (#5873) Fixed unknown words * Generated from 51020f68a1a7cd0fd66f44a493e8a8b2a23f1e2a (#5875) Add nextLink * Generated from 16c7d5f2a872e3b7cc01c7dd8af608a586776fe9 (#5862) lowercase the collection types * Generated from edb4eee278a0a531af70668fcc2a55e04396d5b1 (#5886) update operation id on list all * [AutoPR security/resource-manager] Jit api add justification (#5866) * Generated from 162213184e0652221884ff84f11c93fe935ec78d Merge branch 'master' into jit-api-add-justification * Generated from 162213184e0652221884ff84f11c93fe935ec78d Merge branch 'master' into jit-api-add-justification * Generated from 63d0bd0751dd12efb7a19fd63807a26919c02b11 (#5868) Add support for attached databases * Generated from ebaee7c36eb7db67a4e648374f69f26a654b444f (#5885) [SRP] Add new storage account property largeFileSharesState * v34.0.0 * [AutoPR network/resource-manager] Network September release (#5940) * Generated from 10dc6bc902a0884218d9d336da7d993839599645 Add reference to Connection Monitor specs in 2019-08-01 (#7218) * Generated from 40628938c2d43d66b4cc5a778e35d470f4299727 Move new props to the end to avoid breaking changes in SDK (#7387) * Generated from d16da2ae0ccb63bad6796ad92e9f5b3deff263a1 (#5856) Removed extra file * [AutoPR compute/resource-manager] vmss: support for passing a health probe to update (#5914) * Generated from 5b6736a9b79ace44f3c0080596a48a2c5072c739 vmss: support for passing a health probe to update * Generated from 5b6736a9b79ace44f3c0080596a48a2c5072c739 vmss: support for passing a health probe to update * Generated from 907e4904d4d23c9808b0e9a1e9d6feed24a85674 (#5997) Add api version 2019-07-01 for features * Generated from 13b301ffb122a22f7c7ef6372c606bc677ebc31e (#5952) chore: jsonfmt network * Generated from acbfeadd901b2bb09d4f187e1d7d7dcb68382f0c (#5944) Add purge API details + saved search fixes * [AutoPR cdn/resource-manager] Add two match condition for CDN RulesEngine. (#5926) * Generated from e00cb79da22b7321a0d965f6516440f359180cff Add two match condition for CDN RulesEngine. * Generated from 0ce67b311a2c58faeee1f54bad56afdacc51adeb remove transfrom from HttpVersion condition * [AutoPR peering/resource-manager] API Version 2019-09-01-preview Peering (#5924) * Generated from ec35a7cbfa909dda0ae507af5db9452de833da5f updated 2019-09-01-preview * Generated from 3641a535aab99c93ab35860408e57b105dd40350 updated examples. * Generated from 5f9b9fdd92c5c96b1cb39448b7654103e8913c93 fixed comments in json. * Generated from 2f943553eee21d4184695927da52acdb469b6b43 (#5931) add signin tenant property * Generated from 15e50a07198dcba64bae4c75b4a32969fb50a882 (#5932) Fixing incorrect output of the CheckOCIDriver task. * Generated from afa8ccf350ace9279c30bc5f7df053fa3f65a476 (#5930) fix modal * Generated from aa9913e0d2ece26504f653d3b30d22a4a35a0b38 (#5946) fixing typo and indentation * Generated from faa4da7ea6662be44a9719ba392ca645bc23197b (#5927) fix password1 description * Generated from 4b1813edb7a61c029f7036506b08398a7da69221 (#5971) Add packages for API version for different languages * Generated from 71a7c364618a7112eb2ec351eb0b9827172bc120 (#5976) chore: jsonfmt mysql * Generated from ed7d3540d4a170541423dcf299d305d975442d71 (#5977) chore: jsonfmt postgresql * [AutoPR security/resource-manager] Add aggregated alert top devices information (#5960) * Generated from 235fdb6f20c94a84cda7b52321f27336106cc5e5 fix time field * Generated from 83f1e75cc7e010cba6c566f089194374933a0889 fix time field * [AutoPR recoveryservicesbackup/resource-manager] Azure Backup Version 2019-05-13 addition (#5923) * Generated from 3212ec12fc1821b1b577b0d68951cd67370846d5 Lintdiff Failure fix * Generated from 2826bc70cf4d5fb7c329219e9877b4d74f8a4c45 Semantics Failure fix * Generated from c2fc52d415140376e70e64d0e3d4703c23ec0e2a Camel casing failure * Generated from 10b920e497dd60808ea1c9f89325bf3f366af79a Update bms.json Adding azure vm workload policy back and copying IaaSVMRestoreRequest to 2017-07-01 * Generated from a2315a7436ffff90c2187103294035a4377c5fec Merge branch 'users/adit/generated' * Generated from 2ed2ddce7a58909f89fc4cd728c4fe2efe1ca0d7 Incorporating PR comments * Generated from 7f2f8e3f5b57d9fb2ab8c6731f8699a84b21ef43 Moving Get and Patch on vaultconfig to version 2019-05-13 Moving Patch and Get of vault config to 2019-05-13 * Generated from 1673d919ce100fe910b2e950b5ac297e30eb1c6a Fixing validation errors * Generated from e868833c4c6499353c9c04bbbfd3de261b750a9c Updating vault config feature flag name * Generated from 4b7c0f58757b9f9d86be85357070788cb8881978 Taken care of Ryan's comment Policy comment is still pending * Generated from f0e79eff1574dd894d881bbf697f016b0f5e8a6e Moved all policy actions to 2019-05-13 version * Generated from 94fc988ab4cbee533fa8fca60f8773a387e7f857 Mark additionalDetail as readonly * Generated from 99b812e62e2d6cb1d7634bfd393a69cf5b85f2fa (#5965) Update go & ruby for 3.1 * Generated from d3a4f2d1674a63bc9a4a57015f956833c7d40f7b (#6004) Update LUIS-Authoring.json fix semantic bugs * Generated from 2128273966bce4b74889c8d94b5f3b2cb6592bd8 (#6007) fixed spellcheck * Generated from 55e842916abe83a008e4078b3cfb384c5a49ebf6 (#6010) Modify SecureString to SecretBase * Generated from 16ff787a51dc55db850a3486cccf7780722c1e41 (#6018) Revert changes in input-files to avoid errors * Generated from 0e60fa1cd6adba0b91d7c91ebaaa4fc65c110b4b (#6017) fixing the build * Generated from fecc99c28f9ff6521a2cce0d481429b2b4ab78b5 (#6050) include property in update as well * Generated from 470b9dc33f877037875aca6fcedbbd845b88ba78 (#6028) Update advisor.json * Generated from f639fa1a11578b5cad9c3a155da216117d6e0059 (#6036) chore: jsonfmt appplatform * Generated from c7ff553c30947fdc9a3e133cc8c1ec3740abc0ac (#6046) [SRP] Support Active Directory and regenerate kerb keys * Add Go 1.13 to CI (#6061) Updated Ubuntu image to 18.04. Removed travis CI file. * [AutoPR policyinsights/resource-manager] Adding a baseline folder for PolicyInsights 2019-10-01. Contents are same as prior version, I will make changes once this PR is complete. (#6041) * Generated from 551a94e578553160c7a3ef54b75a2cdff76acc5a fix go build error * Generated from 964ec2957f79ce66ce1f0010e15d774904c753c7 Added spec json files for other resources to be added to the package. Also updated policyStates.json as per latest API changes. * Generated from 33073abb10a1576efd929ed0344af26b4db6037a Added new columns in the examples. Also, Removed metadata path. * Generated from 89e4b3f2e4d5f61efd6d0a1bdacfc1db7a912c85 (#6067) [DataFactory]Add CompressionCodec property for ORC Dataset * Generated from 7face07707cee94abd393c81397c13c71a64c161 (#6070) Fix mistakes. * Generated from 92dd4e7a8d556480e7db4c970c5463b380dfc08f (#6055) Small change - Modify the description for grace period * Generated from 08ad8aa32278a0ffb8ef88220d87820e539e51a6 Add "Allocating","Upgrading" and "Compiling" enum into DeploymentResourceStatus. * [AutoPR appplatform/resource-manager] Rest API for the RP Microsoft.AppPlatform (#6027) * Generated from ca372100531fa406bab65736d59fbd6ffbb7eff4 Rest API for the RP Microsoft.AppPlatform * Generated from db71a1982bb8b1c6c26fd5008b2eb4c2e7924d12 Fix spellcheck. * Generated from b03312169035627c37a4aeaf8d8abe52b5e3d346 Resolve comment of changing operation "CheckNameAvailability" to "Services_CheckNameAvailability". * Generated from d2dd204e7e9c42c2fdfe3d1c11c253aeac06fa56 Add "Allocating","Upgrading" and "Compiling" enum into DeploymentResourceStatus. * Generated from b1da08951a0828c7f9e0678549b54d137e15961a (#6078) Removing contentions APIs from spec * [AutoPR cost-management/resource-manager] CostManagement RP- Introducing API Version 2019-10-01 plus adding Modern Commerce Account Scopes to Query and Dimension APIs. (#6026) * Generated from 2faed1c1199a8cecdfad39af476c06231bcb16ab Added new item for Go Package * Generated from a019ceb117fb91e8f279230976814e9a09da4bcb Fixed some minor issues * Generated from 79e2ea6d6989acb5ad53ba470c36112302b72ff3 Fixed some minor issues and also added missing description for properties * Generated from a1e3eb2f88e93b67dba788fe6abcd993658f8aae addressed some minor issues * Generated from fc698e277dbb465389999eacb1de8e633b1ee90f Resolved conflicts with DiskRP definition names for the DiskEncryptionSet (#7340) * updated swagger * updated swagger * Removed example files which are not relevant and added links to examples for newly added property * fixed the syntax error * updated swagger * fixed the sytax error * updated code * udpated swagger to create DiskEncryptionSet as new property to initiate * resolved conflicts and updated swagger due to conflict in the DiskRP definitions * Generated from a44cd8f82ea92dc521067dd93f772408bf735735 Disk 2019-07-01 version (#7280) * Copy compute.json and runCommands.json from 2019-03-01 to 2019-07-01 * changes to add publicIpAddressVersion field (#7173) * Add diskEncryptionSet in swagger compute-2019-07 * resolve semantic conflicts * Fix model conflicts * Resolve readme * Resolve readme * Resolve description conflicts * Improve description * Fix spell error * Add some examples. * fix model error * Generated from b2a86857b04fa5de515663f5fb4c500784ac3d16 (#6015) updating the description of storage account id * [AutoPR compute/resource-manager] Private temp (#6000) * Generated from 8e9ad09f3def46e2ce770b078bafc1d045f02666 Remove uniqueId in swagger * Generated from cbef264cc94187b8115c04c10d598383572b4eb0 Remove required for diskEncryptionSetId * Generated from cbef264cc94187b8115c04c10d598383572b4eb0 Remove required for diskEncryptionSetId * Generated from b95c1f587e09552c59e22558497befa04e739714 Update 2019-07 from latest 2019-03 update. * Generated from f9b0aa74ce36ad89f61118c811984f961d76e1b7 Update swagger (#7510) * Copy compute.json and runCommands.json from 2019-03-01 to 2019-07-01 * changes to add publicIpAddressVersion field (#7173) * Add diskEncryptionSet in swagger compute-2019-07 * resolve semantic conflicts * Fix model conflicts * Resolve readme * Resolve readme * Resolve description conflicts * Improve description * Fix spell error * Add some examples. * fix model error * Update examples * Remove uniqueId in swagger * Remove required for diskEncryptionSetId * Update principalId and tenantId to be readonly * small space fix * Generated from b70af9184bd96b16fb8430d8f495666c4e98566f Add default responses to new APIs. * Generated from 1175f21020d781bcd32041246ab560177fe3edcf Updating swagger spec to fix billing plans schema in catalogs response. * Generated from 032bb9b160526aab1a3ee4a5f876a1a987e399fe (#6108) Add 2019-06-01 in storage for golang * Generated from c0d6fb888aea1d3ed46becd97c9c427ac4bff5ec (#6058) Fix formatting. * [AutoPR containerservice/resource-manager] [WIP]add aks rotate-certs operation for 2019-08-01 (#6088) * Generated from 018a5faf169cc9f24c74a0e8c79587dce1171129 remove 200 return code * Generated from 965878ad7cb4fb6cb6d8cc7467ccbb000dc05a36 feat: use 204 instead of 200 * Generated from e08f7a3ba78fe8ab91efcdacde25ab986c6eca0f (#6104) updating sdk tags for 2019-10-01 api version (#7550) * updating sdk tags for 2019-10-01 api version * fixing ci errors * Generated from 6fe4f8016ca318dac93474cf69f5c111c0671454 (#6097) fix build * Generated from 90ee9c9a19e9c1aafce78f6232b9dbbed15434a8 (#5966) Refactory CognitiveServicesAccount model specification. * [AutoPR eventgrid/data-plane] update-event-schema-for-azure-storage-event-grid-notification-for-cr… (#6044) * Generated from 428c006d60546419a3b147a7fe9aa41d541ebe65 update-event-schema-for-azure-storage-event-grid-notification-for-create-delete-directory-and-rename-blob-directory * Generated from e1e58a72a322f6a32ebf891169674985771267f1 update according to pr reviews * Generated from 74a61c2feb1bc51623d2c11545aa52532ed20198 update according to pr reviews * [AutoPR eventgrid/resource-manager] EventGrid: New preview API version with support for additional destination types, CloudEvents 1.0, and batching support. (#6102) * Generated from 2f3e7dfe09d45258a6bd27be7fd4b7bbfb67a9bc Add new API version to README files. * Generated from 227d311a35e44441be395c70515641008f39942e Made a minor rename to one property (azureActiveDirectoryApplicationObjectId) based on feedback. * Generated from 3df959debc8a270d8f8c7af0de16d63938009fe3 (#6119) Fix error in luis runtime readme * Removed preview package for luis/runtime/v3.0 since it has been made stable * Fix profiles * Generated from b83db8b3bbb9c1a82591d08e46903a69c16a9334 (#6118) Change go sdk from tag 2019-07-01 to 2019-07 * Generated from 7fae08b6292f00a279b78836e707791df4aff421 (#6139) Changed to v3 * Generated from 41580d13b1a5ad6bccf689f546884361c988e98e (#6138) Update ResourceIdentity to EncryptionSetIdentity * Generated from e914f092dbc78e6d6319f88f5e59381c98cdd7ce (#6131) Add minimumTLSVersion field to CustomDomainHttpsParameters in latest CDN API * Generated from 60f4598fd519843b5b992024169d9af2eab5bdbe (#6089) Changed WebActivity and webhook activity auth to support both AKV and Secrets * Generated from c4bc95d6f727f0702a8b3a588c22dddf69d3ee1c (#6112) Update data set related documentation comments * Generated from 88d6a1d2d54b122af05cdeb24a995650dba91336 added missing part from 2019-08-01 * Generated from 05c0da669c2d1eda1061114132d86dab698bbbef adding swagger-to-sdk section * Generated from 980a4a36c65ce19efc0707a489f0c94e8e291455 1. Make PUT and PATCH against App resource supports async. 2. Remove "Processing" enum from DeploymentResourceProperties's status property. 3. Rename "Processing" enum to "Updating" for DeploymentResourceProperties's provisioningState. * Generated from dc469e5db850fadb8dc524f9b136ac262e1233cd (#6150) update readme * Generated from 2bf8ae41b02cc56508afee3fb34fc9e742d65776 (#6152) Update Db2LinkedServiceTypeProperties * Generated from 3a72ff129dfe06292f39bbfd2c98c414db71a41a (#6163) Update cache flush,start,stop and upgrade firmware examples to reflext 204 status code. * [AutoPR vmwarecloudsimple/resource-manager] [DO NOT MERGE] Update Microsoft.VMwareCloudSimple provider schema to Cloudsimple 44 release (#6033) * Generated from 5bf923e3f6c39ce577407eae30403dfe835c7542 Update Microsoft.VMwareCloudSimple provider schema to 44 release of Cloudsimple * Generated from fe16507aa9029e891a7286e4cf1eceeda1361063 Update Microsoft.VMwareCloudSimple provider schema to 44 release of Cloudsimple * Generated from 3569147399df87983f430b30bc5df237dad128ac Update Microsoft.VMwareCloudSimple provider schema to 44 release of Cloudsimple * Generated from 483ebc4c0b35d13b11df0de3369a94ba62923e31 Update Microsoft.VMwareCloudSimple provider schema to 44 release of Cloudsimple * [AutoPR cognitiveservices/data-plane/VisualSearch] Adding EU compliance not to description (#6133) * Generated from e8a4e07f183bfd751502cfbd4cae3dd09f033bdd Adding EU compliance not to description * Generated from 9cf846d5a6be1cc6628a67a33b1724983a7f3e47 fixed strong tag * Generated from edd3ba7afcbc2d1d338ccecd7c4e30549901a105 remove html tags for note * Generated from 2bb157c778ece564f26a975ba078b5fe6ff28e34 (#6173) Add 2019-10-01 * [AutoPR domainservices/resource-manager] Remove ReplicaSet Nested Resource (#6149) * Generated from 7dcde316dc95ae117ec71fdbfee6c8d52c7197a0 Remove ReplicaSet Nested Resource * Generated from a7ad4520230d029f214826fb7ca1f442e6c95e8e Fix readyonly properties * Generated from 0d43fb7bbb031d638118feb926c31f5314e47ed6 (#6176) update path for readme.go.md * Generated from latest swagger * Fix profile * Generated from d2f677ddddfe6d366ae1211824e8290a7f922d08 (#6193) Add examples with new SKUs * [AutoPR cognitiveservices/data-plane/LUIS/Authoring] Update LUIS Authoring v3.0-preview swagger (#6181) * Generated from 80df648593854cd3baa52059d3215a8dc42f4399 update swagger * Generated from 72db358677deccc675193fe7ffa90eddb8d3515d Change url * Generated from f2c66704326720f700ccc97eb1a8cff88dda7ccd Add missing field * Generated from ce4650ccf744b4c047d64f332e7f808f04f49706 Adding import changes * Generated from 6a69569b69d2d6187f8b5cf83a420dd71146ae4e Changes * [AutoPR cosmos-db/resource-manager] Cosmos DB patch and multi-api support (#5937) * Generated from 3b7573ec3a5b925233a621247469bdb58e1121f0 revert changes to old api swagger * Generated from b14e1323073f43c8e66e7ec59241def9f4ca1c96 rebasing and adding preview versions to sdk generation * Generated from 032d4a3bf0d9a3e2980c6fdce73b735deedd0a5c create or update method with guidance in the description * Generated from b278a4f58378d5a1acb4978aa7aced5a1fa85578 minor text changes * Generated from b278a4f58378d5a1acb4978aa7aced5a1fa85578 minor text changes * Generated from b278a4f58378d5a1acb4978aa7aced5a1fa85578 minor text changes * Generated from 97720b86a19cbb565b45d0093dbe6c4709b24d81 (#6187) Web activity changes for IR * [AutoPR serialconsole/resource-manager] Update serial console swagger (#5988) * Generated from 90f54203590d5ea2fdf89e7e0d9356e873cee4f9 Make operationId casing consistent * Generated from 4e3f06765eb98cfbcd2c60a58107674541d6bb97 Describe GetOperations output * Generated from 968a389fe7812e416c766ea135b59bffb053e7de Add x-ms-parameter-location * Generated from 36f34b427f92c73da8d76011a5c11c52fe8ea741 rename GetSerialConsoleDisabledResult to SerialConsoleStatus and update example accordingly * Generated from edb7b3d76a28d5d6212092de9dc63052f768d11b (#6183) Remove FailoverDatabaseReadableSecondary.json and include the extra parameter in FailoverDatabase.json instead * Generated from eb302b3cbd2722aec702778e5e597d28da25bd77 (#6148) [SRP] Add delete retention policy for blob container and file share * Generated from c606d0445f3b6135d1f59d222377566d29337f8f (#6165) Add Azure Security Center for IoT to productFilter enum * Generated from 68e8f31b27ce7a56c13ee87dfa1108997844e87b (#6185) Improve Network's descriptions * [AutoPR network/resource-manager] Fix the typo for actionsRequired in PrivateLinkServiceConnectionState. (#6195) * Generated from 91d1a252fb1849bfe991da44bfa0599d7324f3e4 Correct it for all example and for all other API versions. * Generated from 91d1a252fb1849bfe991da44bfa0599d7324f3e4 Correct it for all example and for all other API versions. * Generated from 02252f119ea54774c081750c905ba6ab1bdad99d (#6219) Fix wrong preview pacakge path * Remove wrong placed preview package * Generated from ccbae4f1c77f972fb8d3290f0ce3a64253d14bdf (#6161) updating with warm store features * Generated from 21bd41666567ed08878c3ee13e68c94cb0e0b987 (#6155) fix missing status code in SignalR * Generated from 11b24359ee5776d40b34555f12fab33a1bd1e5cb (#6208) Rename management.JSON to management.json * Generated from 4d767ed6efbd682422827b26374a2a331ccfc852 (#6202) Fix reference * Add back some legacy packages * Generated from latest swagger * Generated from a6daf4c9c7b1cfc18a382c62b4976f2e007a80ee (#6229) fix typo Diretory * Generated from 9b04684de70e634c8d4fa85d60138d4a1db84065 (#6238) Change type to object * Generated from 0210af2e5503488fd65957c1368f0794a7e782f0 (#6255) add PreferredIPVersion to ConnectivityCheck * Generated from 85d0f24f003c50b536c896138a30218c36cf310a (#6251) Addressing Spell check validation, changed the description * [AutoPR storage/resource-manager] [SRP][Fix Typo] DeleteRetentionPolicy is a common class that applies to both file and blob (#6250) * Generated from 6fdcf1e8098868c3b8216ac8e3babce62ad56d1e [SRP][Fix Typo] DeleteRetentionPolicy is a common class that applies to both file and blob * Generated from 6fdcf1e8098868c3b8216ac8e3babce62ad56d1e [SRP][Fix Typo] DeleteRetentionPolicy is a common class that applies to both file and blob * Generated from 1424fb90b9195f05229265d9b4147df55b3d5b6e (#6243) Fix * Generated from b6c83befb9732d44d75feb7ea12a8f198a853ec1 (#6260) Fix formatting * Generated from 3f60f47410cabe369be98ab8b7cd168756bfd5d9 (#6261) Add Microsoft.PolicyInsights/policyMetadata resource type spec * Generated from 84ce9e7f669adb50f2aaa62f3e12167edbea67e1 (#6269) Update spec and examples * Generated from 5384fe0c3361da843a2b55c9bb7aa55e494ab984 (#6263) [SRP] Remove a recent added property for container soft delete * Generated from 1e8bea7a181abb6181f79aa0319c293abbf95d7e (#6266) Updating examples * [AutoPR storage/resource-manager] [SRP] Add account sku to file/blob service response (#6267) * Generated from 4d9474e12075391cb75073fc6ae94ddd8eff4cdb Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into getservicesku * Generated from 4d9474e12075391cb75073fc6ae94ddd8eff4cdb Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into getservicesku * Generated from 041683be0cdb0426e8980f1a64cbce91241bee73 (#6247) [Datafactory] Enable SQL DW Copy Command * Generated from ce02bcef77b445fbe83c8bfdaa3fa15924efe56a (#6274) Merge branch 'master' into liran-dev-security-Microsoft.Security-2019-08-01 * Generated from 545db164471cc4f95bd68237971c43891a40d884 (#6277) remove locale from links * Generated from 0dc5634c5903bc4d13f936f6c39ccf0a6965de96 (#6278) remove locale from link * [AutoPR cdn/resource-manager] update description for UrlRewrite Action (#6268) * Generated from 2a23b07c8b2bfa82a1116c2c2280880c1241a8fc update comment * Generated from 9540dc91c52499e1c968bb715bffc9cc2577c557 update * Generated from 0cd1f96acaf7a73b29d816516c3b081b3f711799 (#6162) use secure link for documentation * Generated from 5fb6d44e6933230e3f88c488bdff8b22438b72cf (#6287) ANF-327 New swagger for 2019-08-01 API With upstream pull and rerun of prettier * Generated from f20be645a748cae6147290a5e091c348a9924902 (#6273) Code review fixes * [AutoPR sql/resource-manager] Update databaseVulnerabilityAssessments.json (#6272) * Generated from b2ff9bfa546b57e9905bb6f57322b1add1b29c17 Fixed documentation for storageAccountAccessKey parameter in SQL templates * Generated from b2ff9bfa546b57e9905bb6f57322b1add1b29c17 Fixed documentation for storageAccountAccessKey parameter in SQL templates * Generated from fa0523b043ef003c72ade04ddbf0a00f10d00c3b (#6307) Moving Priority and EvictionPolicy enum to the definitions section and adding 'Spot' priority * [AutoPR resources/resource-manager] Add new version for Microsoft.Solutions (#6253) * Generated from a91d692810c9a1298b0f6e5939659e5a5b0195e9 Fix PR comments. Remove update access since it should be internal only(used by PIM team) * Generated from 88ed32612d64850c82dd01b6980edcf7f0997c15 Capitalization to fix build. * Generated from 5be1da0610dd72272c94afd2c03601100de3b4df Read only properties * Generated from 98cefa2b437103affbcbfd6ce4c63061b24373ad Removed application definition artifact, which is internal and don't need a swagger. * [AutoPR cognitiveservices/data-plane/QnAMaker] [QnA Maker] Update API data fields. (#6289) * Generated from 10bb2e899dfa41564fa014275648f7e5daa17761 [QnA Maker] Update API data fields. * Generated from 670e771f95a96c8f9b94321fd499fba61bbba309 camel casing * Generated from 04ca3a88d31b7bda6982e2281216993545e61ff8 (#6313) Sql auditing swagger- update examples * Generated from cb0caf6c25ca5d28fdaeb005d6c9e53477176166 (#6296) Added enableCustomerAnalytics Flag to create SapMonitor * [AutoPR security/resource-manager] fix swagger completeness issue (#6311) * Generated from cd736d4605f25bafc1e210b4e83e6805863fe23f Merge pull request #2 from yibirnba2/swaggerCompletenessIssue Update operationId * Generated from e6e7573b8f17ee08d9ecc68eeaa525f51172f720 Merge pull request #3 from yibirnba2/swaggerCompletenessIssue Change operationId * Generated from cda6951d6e73baed7ab431b9a3c17aabfe7f2b02 (#6327) Fixing description for deleteEmptyServerFarm * Generated from 202c280ac47ce63c6d4480d4c271da833821378b (#6170) bump python sdk version to 0.3.0 * Generated from 59b008b02ef9d4b11bea303f3ba0a6d71c8985ad (#6333) Minor fix * Generated from 18dc9b0284cda48e71eea8526d1592ff7a44e985 (#6357) Add composite package for sql * Generated from 832cf0fea9b335b4b651208eabdfc01b80c274e0 (#6314) Update * [AutoPR compute/resource-manager] Adding "proximityPlacementGroup" property in "VirtualMachineScaleSetUpdateProperties". Adding "includeColocationStatus" optional flag as part of Get ProximityPlacementGroup URL (#6301) * Generated from 80c837ae06239705ae88dc34678c55b41be55334 making changes * Generated from eee3b6d1bddefc1777a676b10292593fdab97c3c making changes * [AutoPR containerservice/resource-manager] AKS: making the `count` field optiona; (#6302) * Generated from 2495a97b588dc0bef4afbae76f3df4461921073e 2019-10-01: allowing for `count` to be nil during updates * Generated from 27d03a14592691f08e01b1eb885a16cd74d9a9d5 kubernetes: removing the inclusiveMinumum since this is only applicable on creation * Generated from 1c3e1c696ee08a19ac689399f1b39dc4dd254780 (#6372) run prettier * [AutoPR compute/resource-manager] [Compute] Add patch spec for SharedImageGallery (#6320) * Generated from 861dd1bc2d11f46b781ac8e0ccd470bfe770125a change descriptions to updated * Generated from 50f8e2ff68772de9ca3bbd01baa59d1d8989a7b8 updateresource * Generated from c53057ddac2e6b3be44ff07da16ab09cdd77f936 Added example and id/type to UpdateResource * Generated from a5ef75d4927df2d8a8c967b993926766254cff30 add name * Generated from fd8f83b368a420de1057b009b7efeb5988d94cfb make gallery json pretty * Generated from 6be0dfe37350941e2f186d620c18a33615f0d72b (#6378) add AKS listClusterMonitoringUserCredential API * [AutoPR containerregistry/resource-manager] Panwang/taskruns (#6303) * Generated from 0aff28cdc236df42db680cf238d0d36f0c5ad5d3 Remove default response from swagger * Generated from c21bed5bdc9a77c0572d12e73faa3557c89b6cd9 add missing type * Generated from 9db43d8870a318c9ce12267b73aa4aac3f09b1b2 Revert changes for these two files. * Generated from 19671edd71bf89d2df6e25695e48d56b57d0ea98 Update error description * Generated from 6ac6e268eae9c51c39ffa3313ddd9f4fc4543487 (#6403) [SRP] Increase the max file share quota for LFS * Generated from e3a597fe31e3fe840445de05facd9a24b937fc9c (#6401) Merge remote-tracking branch 'upstream/master' * Generated from 732ab86bf2b6d48a82f71da16cda38426bd6f4e6 Maintenance: add readme.java.md with tags * Generated from f0e72d897029d6e7fccf7b99b696589864def0da removed resource conflict * Generated from 4dd708660b1fe07aa7ac0f08dc62d15ddc39d178 add version 2019-08-01 to preview * Generated from 7b90d52bfb2ef86c16b9ef23bec841feec127606 Merge branch 'master' into cosmos-python-afterscripts * Generated from 5084ecf452a19f4d2f40fc9f7ef1e823be81afcd rearranged tests * Generated from 9bf096e9a9c7322fd801364235daddd062879527 Updating the version to 2019-11-01 Updating the version to 2019-11-01 * Generated from 9bf096e9a9c7322fd801364235daddd062879527 Updating the version to 2019-11-01 Updating the version to 2019-11-01 * [AutoPR policyinsights/resource-manager] Fix Microsoft.policyInsights/policyMetadata query parameter (#6385) * Generated from a989d1c3759e3a241d2a3011c27b3988815a6300 Fix Microsoft.policyInsights/policyMetadata query parameter * Generated from b57d760f98cd19cd4164f61e976f61a9759b1860 Fix slim metadata properties * Generated from db239cc46757350995e9550c606b838278930d36 (#6343) customer lockbox preview swagger * Generated from aa17e4ecd833c5d63614fa55beb123bea03b37b4 (#6376) Adding MaxLength Validation to eventHubName * [AutoPR cdn/resource-manager] [CDN] Copy changes from API version 2019-04-15 into 2019-06-15-preview. (#6400) * Generated from 9eb5ce2a840c1c665d36a6da2a436ae5b0310435 Sync latest changes from CDN 2019-04-15 to 2019-06-15-preview * Generated from 05393216e4ed62e704d2a1dae890a3f9f1645ed5 Sync latest changes from CDN 2019-04-15 to 2019-06-15-preview * Generated from dcc8dc3f2f2654a45ef53be71368be83eaf44ebb (#6442) fix api method * [AutoPR datafactory/resource-manager] Update MySqlLinkedServiceTypeProperties and PostgreSqlLinkedServiceTy… (#6326) * Generated from 515979ad8a4a728feb04fcdcc61785c1f7895914 Update MySqlLinkedServiceTypeProperties and PostgreSqlLinkedServiceTypeProperties connectionString type object * Generated from a1ecfec4e43b84693ac05cf40b12edf707e13b28 Update * Generated from a1ecfec4e43b84693ac05cf40b12edf707e13b28 Update * [AutoPR resourcegraph/resource-manager] Microsoft.ResoureGraph/queries path typo fix (#6418) * Generated from 257f27fb2d50e20e7a0b899adc24123bb590cd62 typo fix * Generated from 658b7b9a0b033e3c3996847c45824546e4990c65 making validation pass * Generated from 469e1a6305c280790c34e2b09d6b4eaaebc6d5da (#6423) Adding incident info to GetBookmarks * Generated from latest swagger * v37.0.0 * Simple grammar fix * Generated from d62eb16808d56932d9ee52faec9af253d36b1f09 (#6471) Change the order of parameters in swagger to comply the convention in SDK * Generated from d62eb16808d56932d9ee52faec9af253d36b1f09 (#6471) Change the order of parameters in swagger to comply the convention in SDK * Generated from e728666e3d48dcd45bcc643b4e2e42ae4c48ada6 (#6474) Changed some orders that missed by previous commit * Generated from e728666e3d48dcd45bcc643b4e2e42ae4c48ada6 (#6474) Changed some orders that missed by previous commit * Generated from 0de57e1ab5e1425affd87fcd66931cdedd0aa7b6 (#6486) [Storage] Fix the share max quota to right value 102400 * Generated from 3786c70ea058829697c199f9d9c68264ed6e965e (#6469) fixes * Generated from f89b3577784d34e4da75467c09dc8dc036d959a8 (#6459) update swagger for public ip * [AutoPR datafactory/resource-manager] Update Salesforce LinkedService Add ApiVersion (#6455) * Generated from 9dde2e58adb477a3b8716ab374b9bd82c139e278 Update Salesforce LinkedService Add ApiVersion * Generated from 9dde2e58adb477a3b8716ab374b9bd82c139e278 Update Salesforce LinkedService Add ApiVersion * Generated from d23b8338e812c3eb4da964c1ad8ca7fe8efc97f4 (#6470) [DataFactory]Support partition of SAP HANA * Generated from 7badadb92e5ba5d471ed8b8158be54ea7b451ccd (#6476) Revert "Update Salesforce LinkedService Add ApiVersion (#7865)" This reverts commit 3b494714b0ef2ba3e720f97d09c97de89873066f. * [AutoPR servicefabric/data-plane] Swagger specification for Service Fabric runtime version 7.0 (#6407) * Generated from 6f31bc763a8f1b0aebacc3d263e4a30f714cd335 updated read me s. * Generated from fa67c1c55a4dd7d8acd3839f1113b9029622361a updated propery custom-words.txt * [AutoPR mysql/resource-manager] Support MySQL ServerVersion 8.0 (#6451) * Generated from 79969c14e7081ce9e76d370b33fe1f65cc20196e support mysql ServerVersion 8.0 * Generated from 880ac9bc1c136104465964cd4d21d3901abecf77 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into support-mysql-ver-8.0 * [AutoPR cosmos-db/resource-manager] Fix response structure (#6365) * Generated from 49871ca03fed5f6e6d5868c5fc779abb07f38e1d Fix response structure * Generated from ee13f8f1b953ef574227af8d0d6296aedad206a6 Add new properties and fix CI * Generated from c89a971a7edf5c22aa990089bc59f68a6c61747b Remove unrelated properties * Generated from 95419ab0fc19466e62f05035c84d4f6b7bc80cb9 Remove unrelated properties * Generated from 0a82cc765a42ef6b077b887d153075923fcc7f56 (#6481) Add resource layer in the throughput read response * Regenerate from latest swagger * v37.0.0 --- CHANGELOG.md | 49 + Gopkg.lock | 20 +- Gopkg.toml | 2 +- .../azurestack/mgmt/azurestack/models.go | 32 + .../latest/compute/mgmt/compute/models.go | 13 + .../cosmos-db/mgmt/documentdb/models.go | 37 + .../datafactory/mgmt/datafactory/models.go | 14 + profiles/latest/mysql/mgmt/mysql/models.go | 1 + .../mgmt/policyinsights/models.go | 30 + .../policyinsightsapi/models.go | 1 + .../mgmt/backup/backupapi/models.go | 2 +- .../recoveryservices/mgmt/backup/models.go | 2 +- .../mgmt/siterecovery/models.go | 115 +- .../siterecovery/siterecoveryapi/models.go | 5 +- .../managedapplicationsapi/models.go | 4 +- .../mgmt/managedapplications/models.go | 78 +- .../servicefabric/servicefabric/models.go | 144 +- .../servicefabric/servicefabricapi/models.go | 2 +- .../latest/storage/mgmt/storage/models.go | 14 + .../azurestack/mgmt/azurestack/models.go | 32 + .../preview/compute/mgmt/compute/models.go | 13 + .../containerregistryapi/models.go | 1 + .../mgmt/containerregistry/models.go | 25 + .../cosmos-db/mgmt/documentdb/models.go | 37 + .../datafactory/mgmt/datafactory/models.go | 14 + profiles/preview/mysql/mgmt/mysql/models.go | 1 + .../mgmt/policyinsights/models.go | 30 + .../policyinsightsapi/models.go | 1 + .../mgmt/azuredata/azuredataapi/models.go | 26 + .../azuredata/mgmt/azuredata/models.go | 113 + .../preview/preview/cdn/mgmt/cdn/models.go | 106 +- .../cosmos-db/mgmt/documentdb/models.go | 37 + .../customerlockboxapi/models.go | 25 + .../mgmt/customerlockbox/models.go | 117 + .../preview/mysql/mgmt/mysql/models.go | 11 + .../postgresql/mgmt/postgresql/models.go | 10 + .../preview/security/mgmt/security/models.go | 13 + .../mgmt/securityinsight/models.go | 14 + .../preview/preview/sql/mgmt/sql/models.go | 52 + .../preview/sql/mgmt/sql/sqlapi/models.go | 2 + .../mgmt/sqlvirtualmachine/models.go | 1 + .../mgmt/virtualmachineimagebuilder/models.go | 14 +- .../mgmt/backup/backupapi/models.go | 2 +- .../recoveryservices/mgmt/backup/models.go | 2 +- .../mgmt/siterecovery/models.go | 115 +- .../siterecovery/siterecoveryapi/models.go | 5 +- .../managedapplicationsapi/models.go | 4 +- .../mgmt/managedapplications/models.go | 78 +- .../servicefabric/servicefabric/models.go | 144 +- .../servicefabric/servicefabricapi/models.go | 2 +- .../preview/storage/mgmt/storage/models.go | 14 + .../2016-07-07/apimanagement/apioperations.go | 4 +- .../2016-07-07/apimanagement/apiproducts.go | 4 +- .../mgmt/2016-07-07/apimanagement/apis.go | 4 +- .../apimanagement/authorizationservers.go | 4 +- .../mgmt/2016-07-07/apimanagement/backends.go | 4 +- .../2016-07-07/apimanagement/certificates.go | 4 +- .../mgmt/2016-07-07/apimanagement/groups.go | 4 +- .../2016-07-07/apimanagement/groupusers.go | 4 +- .../mgmt/2016-07-07/apimanagement/loggers.go | 4 +- .../apimanagement/openidconnectproviders.go | 4 +- .../2016-07-07/apimanagement/productapis.go | 4 +- .../2016-07-07/apimanagement/productgroups.go | 4 +- .../mgmt/2016-07-07/apimanagement/products.go | 4 +- .../apimanagement/productsubscriptions.go | 4 +- .../mgmt/2016-07-07/apimanagement/property.go | 4 +- .../mgmt/2016-07-07/apimanagement/reports.go | 4 +- .../2016-07-07/apimanagement/subscriptions.go | 4 +- .../2016-07-07/apimanagement/usergroups.go | 4 +- .../mgmt/2016-07-07/apimanagement/users.go | 4 +- .../apimanagement/usersubscriptions.go | 4 +- .../2016-10-10/apimanagement/apioperations.go | 4 +- .../2016-10-10/apimanagement/apiproducts.go | 4 +- .../mgmt/2016-10-10/apimanagement/apis.go | 4 +- .../apimanagement/authorizationservers.go | 4 +- .../mgmt/2016-10-10/apimanagement/backends.go | 4 +- .../2016-10-10/apimanagement/certificates.go | 4 +- .../mgmt/2016-10-10/apimanagement/groups.go | 4 +- .../2016-10-10/apimanagement/groupusers.go | 4 +- .../mgmt/2016-10-10/apimanagement/loggers.go | 4 +- .../apimanagement/openidconnectproviders.go | 4 +- .../2016-10-10/apimanagement/productapis.go | 4 +- .../2016-10-10/apimanagement/productgroups.go | 4 +- .../mgmt/2016-10-10/apimanagement/products.go | 4 +- .../apimanagement/productsubscriptions.go | 4 +- .../2016-10-10/apimanagement/properties.go | 4 +- .../mgmt/2016-10-10/apimanagement/reports.go | 4 +- .../2016-10-10/apimanagement/subscriptions.go | 4 +- .../2016-10-10/apimanagement/usergroups.go | 4 +- .../mgmt/2016-10-10/apimanagement/users.go | 4 +- .../apimanagement/usersubscriptions.go | 4 +- .../mgmt/2017-03-01/apimanagement/api.go | 8 +- .../2017-03-01/apimanagement/apidiagnostic.go | 4 +- .../apimanagement/apidiagnosticlogger.go | 4 +- .../apimanagement/apiissueattachments.go | 4 +- .../apimanagement/apiissuecomments.go | 4 +- .../2017-03-01/apimanagement/apiissues.go | 4 +- .../2017-03-01/apimanagement/apioperation.go | 4 +- .../2017-03-01/apimanagement/apiproduct.go | 4 +- .../2017-03-01/apimanagement/apirelease.go | 4 +- .../2017-03-01/apimanagement/apirevisions.go | 4 +- .../2017-03-01/apimanagement/apiversionset.go | 4 +- .../apimanagement/authorizationserver.go | 4 +- .../mgmt/2017-03-01/apimanagement/backend.go | 4 +- .../2017-03-01/apimanagement/certificate.go | 4 +- .../2017-03-01/apimanagement/diagnostic.go | 4 +- .../apimanagement/diagnosticlogger.go | 4 +- .../2017-03-01/apimanagement/emailtemplate.go | 4 +- .../mgmt/2017-03-01/apimanagement/group.go | 4 +- .../2017-03-01/apimanagement/groupuser.go | 4 +- .../mgmt/2017-03-01/apimanagement/logger.go | 4 +- .../2017-03-01/apimanagement/notification.go | 4 +- .../apimanagement/openidconnectprovider.go | 4 +- .../2017-03-01/apimanagement/operation.go | 4 +- .../mgmt/2017-03-01/apimanagement/product.go | 4 +- .../2017-03-01/apimanagement/productapi.go | 4 +- .../2017-03-01/apimanagement/productgroup.go | 4 +- .../apimanagement/productsubscriptions.go | 4 +- .../mgmt/2017-03-01/apimanagement/property.go | 4 +- .../mgmt/2017-03-01/apimanagement/reports.go | 32 +- .../2017-03-01/apimanagement/subscription.go | 4 +- .../mgmt/2017-03-01/apimanagement/tag.go | 16 +- .../apimanagement/tagdescription.go | 4 +- .../2017-03-01/apimanagement/tagresource.go | 4 +- .../mgmt/2017-03-01/apimanagement/user.go | 4 +- .../2017-03-01/apimanagement/usergroup.go | 4 +- .../apimanagement/usersubscription.go | 4 +- .../mgmt/2018-01-01/apimanagement/api.go | 8 +- .../2018-01-01/apimanagement/apidiagnostic.go | 4 +- .../apimanagement/apidiagnosticlogger.go | 4 +- .../mgmt/2018-01-01/apimanagement/apiissue.go | 4 +- .../apimanagement/apiissueattachment.go | 4 +- .../apimanagement/apiissuecomment.go | 4 +- .../2018-01-01/apimanagement/apioperation.go | 4 +- .../2018-01-01/apimanagement/apiproduct.go | 4 +- .../2018-01-01/apimanagement/apirelease.go | 4 +- .../2018-01-01/apimanagement/apirevisions.go | 4 +- .../2018-01-01/apimanagement/apiversionset.go | 4 +- .../apimanagement/authorizationserver.go | 4 +- .../mgmt/2018-01-01/apimanagement/backend.go | 4 +- .../2018-01-01/apimanagement/certificate.go | 4 +- .../2018-01-01/apimanagement/diagnostic.go | 4 +- .../apimanagement/diagnosticlogger.go | 4 +- .../2018-01-01/apimanagement/emailtemplate.go | 4 +- .../mgmt/2018-01-01/apimanagement/group.go | 4 +- .../2018-01-01/apimanagement/groupuser.go | 4 +- .../mgmt/2018-01-01/apimanagement/logger.go | 4 +- .../2018-01-01/apimanagement/notification.go | 4 +- .../apimanagement/openidconnectprovider.go | 4 +- .../2018-01-01/apimanagement/operation.go | 4 +- .../mgmt/2018-01-01/apimanagement/product.go | 4 +- .../2018-01-01/apimanagement/productapi.go | 4 +- .../2018-01-01/apimanagement/productgroup.go | 4 +- .../apimanagement/productsubscriptions.go | 4 +- .../mgmt/2018-01-01/apimanagement/property.go | 4 +- .../mgmt/2018-01-01/apimanagement/reports.go | 32 +- .../2018-01-01/apimanagement/subscription.go | 4 +- .../mgmt/2018-01-01/apimanagement/tag.go | 16 +- .../apimanagement/tagdescription.go | 4 +- .../2018-01-01/apimanagement/tagresource.go | 4 +- .../mgmt/2018-01-01/apimanagement/user.go | 4 +- .../2018-01-01/apimanagement/usergroup.go | 4 +- .../apimanagement/usersubscription.go | 4 +- .../mgmt/2019-01-01/apimanagement/api.go | 8 +- .../2019-01-01/apimanagement/apidiagnostic.go | 6 +- .../mgmt/2019-01-01/apimanagement/apiissue.go | 4 +- .../apimanagement/apiissueattachment.go | 4 +- .../apimanagement/apiissuecomment.go | 4 +- .../2019-01-01/apimanagement/apioperation.go | 4 +- .../2019-01-01/apimanagement/apiproduct.go | 4 +- .../2019-01-01/apimanagement/apirelease.go | 4 +- .../2019-01-01/apimanagement/apirevision.go | 4 +- .../2019-01-01/apimanagement/apischema.go | 4 +- .../apimanagement/apitagdescription.go | 4 +- .../2019-01-01/apimanagement/apiversionset.go | 4 +- .../apimanagement/authorizationserver.go | 4 +- .../mgmt/2019-01-01/apimanagement/backend.go | 4 +- .../mgmt/2019-01-01/apimanagement/cache.go | 4 +- .../2019-01-01/apimanagement/certificate.go | 4 +- .../2019-01-01/apimanagement/diagnostic.go | 6 +- .../2019-01-01/apimanagement/emailtemplate.go | 4 +- .../mgmt/2019-01-01/apimanagement/group.go | 4 +- .../2019-01-01/apimanagement/groupuser.go | 4 +- .../mgmt/2019-01-01/apimanagement/issue.go | 4 +- .../mgmt/2019-01-01/apimanagement/logger.go | 4 +- .../2019-01-01/apimanagement/notification.go | 4 +- .../apimanagement/openidconnectprovider.go | 4 +- .../2019-01-01/apimanagement/operation.go | 4 +- .../mgmt/2019-01-01/apimanagement/product.go | 8 +- .../2019-01-01/apimanagement/productapi.go | 4 +- .../2019-01-01/apimanagement/productgroup.go | 4 +- .../apimanagement/productsubscriptions.go | 4 +- .../mgmt/2019-01-01/apimanagement/property.go | 4 +- .../mgmt/2019-01-01/apimanagement/reports.go | 32 +- .../2019-01-01/apimanagement/subscription.go | 4 +- .../mgmt/2019-01-01/apimanagement/tag.go | 16 +- .../2019-01-01/apimanagement/tagresource.go | 4 +- .../mgmt/2019-01-01/apimanagement/user.go | 4 +- .../2019-01-01/apimanagement/usergroup.go | 4 +- .../apimanagement/usersubscription.go | 4 +- .../azurestack/azurestackapi/interfaces.go | 3 + .../mgmt/2017-06-01/azurestack/models.go | 107 + .../mgmt/2017-06-01/azurestack/products.go | 261 + .../batch/2017-05-01.5.0/batch/account.go | 2 +- .../batch/2017-05-01.5.0/batch/application.go | 2 +- .../batch/2017-05-01.5.0/batch/certificate.go | 2 +- .../batch/2017-05-01.5.0/batch/computenode.go | 2 +- services/batch/2017-05-01.5.0/batch/file.go | 4 +- services/batch/2017-05-01.5.0/batch/job.go | 6 +- .../batch/2017-05-01.5.0/batch/jobschedule.go | 2 +- services/batch/2017-05-01.5.0/batch/pool.go | 4 +- services/batch/2017-05-01.5.0/batch/task.go | 2 +- .../batch/2018-03-01.6.1/batch/account.go | 4 +- .../batch/2018-03-01.6.1/batch/application.go | 2 +- .../batch/2018-03-01.6.1/batch/certificate.go | 2 +- .../batch/2018-03-01.6.1/batch/computenode.go | 2 +- services/batch/2018-03-01.6.1/batch/file.go | 4 +- services/batch/2018-03-01.6.1/batch/job.go | 6 +- .../batch/2018-03-01.6.1/batch/jobschedule.go | 2 +- services/batch/2018-03-01.6.1/batch/pool.go | 4 +- services/batch/2018-03-01.6.1/batch/task.go | 2 +- .../batch/2018-08-01.7.0/batch/account.go | 4 +- .../batch/2018-08-01.7.0/batch/application.go | 2 +- .../batch/2018-08-01.7.0/batch/certificate.go | 2 +- .../batch/2018-08-01.7.0/batch/computenode.go | 2 +- services/batch/2018-08-01.7.0/batch/file.go | 4 +- services/batch/2018-08-01.7.0/batch/job.go | 6 +- .../batch/2018-08-01.7.0/batch/jobschedule.go | 2 +- services/batch/2018-08-01.7.0/batch/pool.go | 4 +- services/batch/2018-08-01.7.0/batch/task.go | 2 +- .../batch/2018-12-01.8.0/batch/account.go | 4 +- .../batch/2018-12-01.8.0/batch/application.go | 2 +- .../batch/2018-12-01.8.0/batch/certificate.go | 2 +- .../batch/2018-12-01.8.0/batch/computenode.go | 2 +- services/batch/2018-12-01.8.0/batch/file.go | 4 +- services/batch/2018-12-01.8.0/batch/job.go | 6 +- .../batch/2018-12-01.8.0/batch/jobschedule.go | 2 +- services/batch/2018-12-01.8.0/batch/pool.go | 4 +- services/batch/2018-12-01.8.0/batch/task.go | 2 +- .../batch/2019-06-01.9.0/batch/account.go | 4 +- .../batch/2019-06-01.9.0/batch/application.go | 2 +- .../batch/2019-06-01.9.0/batch/certificate.go | 2 +- .../batch/2019-06-01.9.0/batch/computenode.go | 2 +- services/batch/2019-06-01.9.0/batch/file.go | 4 +- services/batch/2019-06-01.9.0/batch/job.go | 6 +- .../batch/2019-06-01.9.0/batch/jobschedule.go | 2 +- services/batch/2019-06-01.9.0/batch/pool.go | 4 +- services/batch/2019-06-01.9.0/batch/task.go | 2 +- .../batch/2019-08-01.10.0/batch/account.go | 4 +- .../2019-08-01.10.0/batch/application.go | 2 +- .../2019-08-01.10.0/batch/certificate.go | 2 +- .../2019-08-01.10.0/batch/computenode.go | 2 +- services/batch/2019-08-01.10.0/batch/file.go | 4 +- services/batch/2019-08-01.10.0/batch/job.go | 6 +- .../2019-08-01.10.0/batch/jobschedule.go | 2 +- services/batch/2019-08-01.10.0/batch/pool.go | 4 +- services/batch/2019-08-01.10.0/batch/task.go | 2 +- .../batch/mgmt/2017-09-01/batch/models.go | 2 +- .../batch/mgmt/2018-12-01/batch/models.go | 2 +- .../batch/mgmt/2019-04-01/batch/models.go | 2 +- .../batch/mgmt/2019-08-01/batch/models.go | 2 +- .../mgmt/2018-03-01/batchai/clusters.go | 4 +- .../mgmt/2018-03-01/batchai/fileservers.go | 4 +- .../batchai/mgmt/2018-03-01/batchai/jobs.go | 8 +- .../mgmt/2018-05-01/batchai/clusters.go | 2 +- .../mgmt/2018-05-01/batchai/experiments.go | 2 +- .../mgmt/2018-05-01/batchai/fileservers.go | 2 +- .../batchai/mgmt/2018-05-01/batchai/jobs.go | 6 +- .../mgmt/2018-05-01/batchai/workspaces.go | 4 +- services/cdn/mgmt/2019-04-15/cdn/models.go | 6 +- services/cognitiveservices/v1.0/face/face.go | 4 +- .../v1.0/face/largefacelist.go | 2 +- .../v1.0/face/largepersongroup.go | 2 +- .../v1.0/face/largepersongroupperson.go | 2 +- .../v1.0/face/persongroup.go | 2 +- .../v1.0/face/persongroupperson.go | 2 +- .../v2.0/computervision/client.go | 8 +- .../v2.0/luis/authoring/apps.go | 4 +- .../v2.0/luis/authoring/examples.go | 4 +- .../v2.0/luis/authoring/features.go | 12 +- .../v2.0/luis/authoring/model.go | 44 +- .../v2.0/luis/authoring/pattern.go | 8 +- .../v2.0/luis/authoring/versions.go | 4 +- .../v2.1/computervision/client.go | 8 +- .../v3.0/customvision/training/client.go | 6 +- .../v3.1/customvision/training/client.go | 6 +- .../v4.0/qnamaker/knowledgebase.go | 6 +- .../cognitiveservices/v4.0/qnamaker/models.go | 8 + .../compute/virtualmachinescalesets.go | 6 +- .../compute/virtualmachinescalesets.go | 6 +- .../compute/mgmt/2018-04-01/compute/models.go | 2 + .../compute/virtualmachinescalesets.go | 6 +- .../compute/mgmt/2018-06-01/compute/models.go | 2 + .../compute/virtualmachinescalesets.go | 6 +- .../compute/mgmt/2018-10-01/compute/models.go | 2 + .../compute/virtualmachinescalesets.go | 6 +- .../2019-03-01/compute/dedicatedhostgroups.go | 2 +- .../mgmt/2019-03-01/compute/dedicatedhosts.go | 2 +- .../compute/mgmt/2019-03-01/compute/models.go | 34 +- .../compute/virtualmachinescalesets.go | 6 +- .../compute/computeapi/interfaces.go | 8 +- .../2019-07-01/compute/dedicatedhostgroups.go | 2 +- .../mgmt/2019-07-01/compute/dedicatedhosts.go | 2 +- .../mgmt/2019-07-01/compute/galleries.go | 81 + .../2019-07-01/compute/galleryapplications.go | 85 + .../compute/galleryapplicationversions.go | 87 + .../mgmt/2019-07-01/compute/galleryimages.go | 84 + .../compute/galleryimageversions.go | 86 + .../compute/mgmt/2019-07-01/compute/models.go | 1048 +- .../compute/proximityplacementgroups.go | 11 +- .../2019-07-01/compute/virtualmachines.go | 3 +- .../virtualmachinescalesetextensions.go | 85 + .../compute/virtualmachinescalesets.go | 6 +- .../2017-11-30/consumption/usagedetails.go | 2 +- .../2018-01-31/consumption/marketplaces.go | 4 +- .../mgmt/2018-01-31/consumption/pricesheet.go | 4 +- .../2018-01-31/consumption/usagedetails.go | 4 +- .../2018-03-31/consumption/marketplaces.go | 4 +- .../marketplacesbybillingaccount.go | 4 +- .../consumption/marketplacesbydepartment.go | 4 +- .../marketplacesbyenrollmentaccounts.go | 4 +- .../mgmt/2018-03-31/consumption/pricesheet.go | 4 +- .../2018-03-31/consumption/usagedetails.go | 4 +- .../usagedetailsbybillingaccount.go | 4 +- .../consumption/usagedetailsbydepartment.go | 4 +- .../usagedetailsbyenrollmentaccount.go | 4 +- .../mgmt/2018-05-31/consumption/pricesheet.go | 4 +- .../2018-05-31/consumption/usagedetails.go | 16 +- .../2018-06-30/consumption/marketplaces.go | 16 +- .../mgmt/2018-06-30/consumption/pricesheet.go | 4 +- .../2018-06-30/consumption/usagedetails.go | 20 +- .../2018-08-31/consumption/marketplaces.go | 16 +- .../mgmt/2018-08-31/consumption/pricesheet.go | 4 +- .../2018-08-31/consumption/usagedetails.go | 20 +- .../2018-10-01/consumption/marketplaces.go | 20 +- .../mgmt/2018-10-01/consumption/pricesheet.go | 4 +- .../2018-10-01/consumption/usagedetails.go | 20 +- .../2019-01-01/consumption/marketplaces.go | 2 +- .../mgmt/2019-01-01/consumption/pricesheet.go | 4 +- .../2019-01-01/consumption/usagedetails.go | 2 +- .../2018-09-01/containerregistry/tasks.go | 2 +- .../2019-04-01/containerregistry/tasks.go | 2 +- .../2019-05-01/containerregistry/tasks.go | 2 +- .../containerregistryapi/interfaces.go | 11 + .../containerregistry/models.go | 526 + .../containerregistry/taskruns.go | 528 + .../containerregistry/tasks.go | 2 +- .../2019-02-01/containerservice/agentpools.go | 2 +- .../2019-04-30/containerservice/agentpools.go | 2 +- .../containerservice/managedclusters.go | 2 +- .../containerserviceapi/interfaces.go | 1 + .../containerservice/managedclusters.go | 90 +- .../2015-04-08/documentdb/databaseaccounts.go | 4 +- .../2019-08-01/documentdb/databaseaccounts.go | 4 +- .../2019-08-01/documentdb/gremlinresources.go | 2 +- .../mgmt/2019-08-01/documentdb/models.go | 129 +- .../2019-08-01/documentdb/sqlresources.go | 2 +- .../billingaccountdimensions.go | 2 +- .../costmanagement/resourcegroupdimensions.go | 2 +- .../costmanagement/subscriptiondimensions.go | 2 +- .../2019-01-01/costmanagement/dimensions.go | 2 +- .../2019-10-01/costmanagement/dimensions.go | 2 +- .../mgmt/2017-01-01/customerinsights/hubs.go | 4 +- .../mgmt/2017-04-26/customerinsights/hubs.go | 4 +- .../mgmt/2018-06-01/datafactory/models.go | 209 +- .../mgmt/2018-06-01/datafactory/pipelines.go | 2 +- .../2018-06-01/datafactory/reruntriggers.go | 2 +- .../2016-11-01-preview/catalog/catalog.go | 88 +- .../datalake/analytics/2016-11-01/job/job.go | 4 +- .../mgmt/2016-11-01/account/accounts.go | 18 +- .../2016-11-01/account/computepolicies.go | 4 +- .../account/datalakestoreaccounts.go | 4 +- .../2016-11-01/account/storageaccounts.go | 4 +- .../store/mgmt/2016-11-01/account/accounts.go | 8 +- .../mgmt/2019-11-01/datashare/models.go | 2 + .../2017-04-01/eventhub/consumergroups.go | 16 +- .../mgmt/2017-04-01/eventhub/eventhubs.go | 39 +- .../mgmt/2017-04-01/eventhub/namespaces.go | 4 +- .../2019-09-16/healthcareapis/services.go | 4 +- .../mgmt/2016-02-03/devices/iothubresource.go | 4 +- .../mgmt/2017-01-19/devices/iothubresource.go | 4 +- .../mgmt/2017-07-01/devices/iothubresource.go | 4 +- .../mgmt/2018-01-22/devices/iothubresource.go | 4 +- .../mgmt/2018-04-01/devices/iothubresource.go | 4 +- .../keyvault/2015-06-01/keyvault/client.go | 18 +- .../keyvault/2016-10-01/keyvault/client.go | 28 +- services/keyvault/v7.0/keyvault/client.go | 32 +- services/keyvault/v7.0/keyvault/models.go | 2 +- .../2017-01-01/webservices/webservices.go | 2 +- .../mgmt/2018-06-01/mariadb/servers.go | 2 +- .../mysql/mgmt/2017-12-01/mysql/models.go | 18 +- .../mysql/mgmt/2017-12-01/mysql/servers.go | 2 +- .../netapp/mgmt/2019-05-01/netapp/pools.go | 2 +- .../netapp/mgmt/2019-05-01/netapp/volumes.go | 2 +- .../netapp/mgmt/2019-06-01/netapp/pools.go | 2 +- .../netapp/mgmt/2019-06-01/netapp/volumes.go | 2 +- .../netapp/mgmt/2019-07-01/netapp/pools.go | 2 +- .../netapp/mgmt/2019-07-01/netapp/volumes.go | 2 +- .../netapp/mgmt/2019-08-01/netapp/pools.go | 2 +- .../netapp/mgmt/2019-08-01/netapp/volumes.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../network/expressroutecircuitpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../network/expressroutecircuitpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-01-01/network/applicationgateways.go | 2 +- .../network/expressroutecircuitpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-02-01/network/applicationgateways.go | 2 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-04-01/network/applicationgateways.go | 2 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-06-01/network/applicationgateways.go | 2 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-07-01/network/applicationgateways.go | 2 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-08-01/network/applicationgateways.go | 8 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-10-01/network/applicationgateways.go | 8 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-11-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2018-12-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2019-02-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2019-04-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2019-06-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../network/firewallpolicyrulegroups.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../2019-07-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../network/firewallpolicyrulegroups.go | 2 +- .../virtualnetworkgatewayconnections.go | 2 +- .../network/virtualrouterpeerings.go | 2 +- .../mgmt/2019-07-01/network/virtualrouters.go | 2 +- .../2019-08-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../network/firewallpolicyrulegroups.go | 2 +- .../network/mgmt/2019-08-01/network/models.go | 22 +- .../virtualnetworkgatewayconnections.go | 2 +- .../network/virtualrouterpeerings.go | 2 +- .../mgmt/2019-08-01/network/virtualrouters.go | 2 +- .../network/webapplicationfirewallpolicies.go | 4 +- .../2019-09-01/network/applicationgateways.go | 10 +- .../network/expressroutecircuitpeerings.go | 2 +- .../expressroutecrossconnectionpeerings.go | 2 +- .../network/firewallpolicyrulegroups.go | 2 +- .../network/mgmt/2019-09-01/network/models.go | 2 + .../virtualnetworkgatewayconnections.go | 2 +- .../network/virtualrouterpeerings.go | 2 +- .../mgmt/2019-09-01/network/virtualrouters.go | 2 +- .../network/webapplicationfirewallpolicies.go | 4 +- .../operationalinsights/savedsearches.go | 2 +- .../2018-04-04/policyinsights/policyevents.go | 16 +- .../2018-04-04/policyinsights/policystates.go | 32 +- .../mgmt/2019-10-01/policyinsights/models.go | 355 +- .../2019-10-01/policyinsights/policyevents.go | 16 +- .../policyinsightsapi/interfaces.go | 8 + .../policyinsights/policymetadata.go | 234 + .../2019-10-01/policyinsights/policystates.go | 32 +- .../policyinsights/policytrackedresources.go | 8 +- .../2019-10-01/policyinsights/remediations.go | 64 +- .../mgmt/2017-12-01/postgresql/servers.go | 2 +- .../ctrl/2017-03-01/apimanagement/api.go | 4 +- .../2017-03-01/apimanagement/apioperation.go | 4 +- .../2017-03-01/apimanagement/apiproduct.go | 4 +- .../apimanagement/authorizationserver.go | 4 +- .../ctrl/2017-03-01/apimanagement/backend.go | 4 +- .../2017-03-01/apimanagement/certificate.go | 4 +- .../2017-03-01/apimanagement/emailtemplate.go | 4 +- .../ctrl/2017-03-01/apimanagement/group.go | 4 +- .../2017-03-01/apimanagement/groupuser.go | 4 +- .../ctrl/2017-03-01/apimanagement/logger.go | 4 +- .../apimanagement/openidconnectprovider.go | 4 +- .../ctrl/2017-03-01/apimanagement/product.go | 4 +- .../2017-03-01/apimanagement/productapi.go | 4 +- .../2017-03-01/apimanagement/productgroup.go | 4 +- .../apimanagement/productsubscriptions.go | 4 +- .../ctrl/2017-03-01/apimanagement/property.go | 4 +- .../ctrl/2017-03-01/apimanagement/reports.go | 32 +- .../2017-03-01/apimanagement/subscription.go | 4 +- .../ctrl/2017-03-01/apimanagement/user.go | 4 +- .../2017-03-01/apimanagement/usergroup.go | 4 +- .../apimanagement/usersubscription.go | 4 +- .../2018-06-01-preview/apimanagement/api.go | 8 +- .../apimanagement/apidiagnostic.go | 6 +- .../apimanagement/apiissue.go | 4 +- .../apimanagement/apiissueattachment.go | 4 +- .../apimanagement/apiissuecomment.go | 4 +- .../apimanagement/apioperation.go | 4 +- .../apimanagement/apiproduct.go | 4 +- .../apimanagement/apirelease.go | 4 +- .../apimanagement/apirevisions.go | 4 +- .../apimanagement/apischema.go | 4 +- .../apimanagement/apiversionset.go | 4 +- .../apimanagement/authorizationserver.go | 4 +- .../apimanagement/backend.go | 4 +- .../2018-06-01-preview/apimanagement/cache.go | 4 +- .../apimanagement/certificate.go | 4 +- .../apimanagement/diagnostic.go | 6 +- .../apimanagement/emailtemplate.go | 4 +- .../2018-06-01-preview/apimanagement/group.go | 4 +- .../apimanagement/groupuser.go | 4 +- .../2018-06-01-preview/apimanagement/issue.go | 4 +- .../apimanagement/logger.go | 4 +- .../apimanagement/notification.go | 4 +- .../apimanagement/openidconnectprovider.go | 4 +- .../apimanagement/operation.go | 4 +- .../apimanagement/product.go | 8 +- .../apimanagement/productapi.go | 4 +- .../apimanagement/productgroup.go | 4 +- .../apimanagement/productsubscriptions.go | 4 +- .../apimanagement/property.go | 4 +- .../apimanagement/reports.go | 32 +- .../apimanagement/subscription.go | 4 +- .../2018-06-01-preview/apimanagement/tag.go | 16 +- .../apimanagement/tagdescription.go | 4 +- .../apimanagement/tagresource.go | 4 +- .../2018-06-01-preview/apimanagement/user.go | 4 +- .../apimanagement/usergroup.go | 4 +- .../apimanagement/usersubscription.go | 4 +- .../appplatform/appplatformapi/interfaces.go | 18 +- .../2019-05-01-preview/appplatform/apps.go | 50 +- .../appplatform/bindings.go | 18 +- .../appplatform/deployments.go | 46 +- .../appplatform/services.go | 39 +- .../azuredata/azuredataapi/interfaces.go | 53 + .../2017-03-01-preview/azuredata/client.go | 52 + .../2017-03-01-preview/azuredata/models.go | 774 + .../azuredata/operations.go | 148 + .../azuredata/sqlserverregistrations.go | 583 + .../azuredata/sqlservers.go | 408 + .../2017-03-01-preview/azuredata/version.go | 30 + .../2017-09-01-preview/batchai/clusters.go | 4 +- .../2017-09-01-preview/batchai/fileservers.go | 4 +- .../mgmt/2017-09-01-preview/batchai/jobs.go | 8 +- .../2017-02-27-preview/billing/invoices.go | 2 +- .../2017-04-24-preview/billing/invoices.go | 2 +- .../2017-04-24-preview/billing/periods.go | 2 +- .../2018-03-01-preview/billing/invoices.go | 2 +- .../2018-03-01-preview/billing/periods.go | 2 +- .../cdn/mgmt/2019-06-15-preview/cdn/models.go | 906 +- .../mgmt/2019-06-15-preview/cdn/policies.go | 2 +- .../v3.0/luis/authoring/apps.go | 4 +- .../v3.0/luis/authoring/examples.go | 4 +- .../v3.0/luis/authoring/features.go | 8 +- .../v3.0/luis/authoring/model.go | 44 +- .../v3.0/luis/authoring/pattern.go | 8 +- .../v3.0/luis/authoring/versions.go | 4 +- .../consumption/usagedetails.go | 2 +- .../containerregistry/buildtasks.go | 2 +- .../containerservice/managedclusters.go | 2 +- .../documentdb/databaseaccounts.go | 4 +- .../documentdb/gremlinresources.go | 2 +- .../2019-08-01-preview/documentdb/models.go | 129 +- .../documentdb/sqlresources.go | 2 +- .../costmanagement/alerts.go | 12 +- .../billingaccountdimensions.go | 2 +- .../costmanagement/resourcegroupdimensions.go | 2 +- .../costmanagement/subscriptiondimensions.go | 2 +- .../2019-03-01/costmanagement/dimensions.go | 12 +- .../customerlockbox/client.go | 49 + .../customerlockboxapi/interfaces.go | 39 + .../customerlockbox/models.go | 480 + .../customerlockbox/operations.go | 147 + .../customerlockbox/requests.go | 313 + .../customerlockbox/version.go | 30 + .../datafactory/pipelines.go | 2 +- .../analytics/2017-09-01-preview/job/job.go | 4 +- .../2018-11-01-preview/datashare/models.go | 2 + .../2018-01-01-preview/eventhub/namespaces.go | 4 +- .../2017-11-03-preview/hanaonazure/models.go | 8 +- .../2018-11-01-preview/hdinsight/job.go | 2 +- .../healthcareapis/services.go | 4 +- .../devices/iothubresource.go | 4 +- .../devices/iothubresource.go | 4 +- .../webservices/webservices.go | 2 +- .../compute/operationalizationclusters.go | 8 +- .../managednetwork/groups.go | 2 +- .../managednetwork/managednetworks.go | 4 +- .../managednetwork/models.go | 14 +- .../managednetwork/peeringpolicies.go | 2 +- .../managednetwork/scopeassignments.go | 6 +- .../insights/logprofiles.go | 2 +- .../mgmt/2018-03-01/insights/logprofiles.go | 2 +- .../mgmt/2018-09-01/insights/logprofiles.go | 2 +- .../insights/logprofiles.go | 2 +- .../mgmt/2019-03-01/insights/logprofiles.go | 2 +- .../mgmt/2019-06-01/insights/logprofiles.go | 2 +- .../mgmt/2017-12-01-preview/mysql/models.go | 55 +- .../mgmt/2017-12-01-preview/mysql/servers.go | 2 +- .../netapp/mgmt/2017-08-15/netapp/pools.go | 2 +- .../netapp/mgmt/2017-08-15/netapp/volumes.go | 2 +- .../operationalinsights/workspaces.go | 2 +- .../servicemap/clientgroups.go | 2 +- .../2015-11-01-preview/servicemap/machines.go | 2 +- .../policyinsights/policyevents.go | 16 +- .../policyinsights/policystates.go | 32 +- .../policyinsights/policytrackedresources.go | 8 +- .../policyinsights/remediations.go | 16 +- .../2017-12-01-preview/postgresql/models.go | 37 + .../2017-12-01-preview/postgresql/servers.go | 2 +- .../mgmt/2018-09-01/resourcegraph/client.go | 6 +- .../2018-09-01/resourcegraph/graphquery.go | 11 +- .../mgmt/2018-09-01/resourcegraph/models.go | 17 +- .../managementgroups/managementgroups.go | 2 +- .../managementgroups/managementgroups.go | 2 +- .../security/mgmt/v1.0/security/alerts.go | 255 +- .../security/mgmt/v1.0/security/models.go | 54 + .../v1.0/security/securityapi/interfaces.go | 6 +- .../security/mgmt/v2.0/security/alerts.go | 255 +- .../security/mgmt/v2.0/security/models.go | 54 + .../v2.0/security/securityapi/interfaces.go | 6 +- .../security/mgmt/v3.0/security/alerts.go | 255 +- .../security/mgmt/v3.0/security/models.go | 71 + .../v3.0/security/securityapi/interfaces.go | 6 +- .../securityinsight/bookmarks.go | 5 + .../securityinsight/models.go | 35 + .../servicefabric/clusters.go | 10 +- .../servicefabric/models.go | 2 +- .../servicefabric/clusters.go | 10 +- .../servicefabric/models.go | 6 +- .../sql/mgmt/2015-05-01-preview/sql/models.go | 5 +- .../sql/managedinstanceadministrators.go | 27 +- .../sql/mgmt/2017-03-01-preview/sql/models.go | 22 +- .../sql/sqlapi/interfaces.go | 6 +- .../sql/mgmt/2017-10-01-preview/sql/models.go | 2 +- .../sql/managedinstanceoperations.go | 159 + .../sql/mgmt/2018-06-01-preview/sql/models.go | 560 +- .../sql/serverazureadadministrators.go | 410 + .../sql/sqlapi/interfaces.go | 17 + services/preview/sql/mgmt/v3.0/sql/models.go | 780 +- .../v3.0/sql/serverazureadadministrators.go | 94 +- .../sql/mgmt/v3.0/sql/sqlapi/interfaces.go | 40 +- .../sql/mgmt/v3.0/sql/workloadclassifiers.go | 425 + .../sql/mgmt/v3.0/sql/workloadgroups.go | 420 + .../sqlvirtualmachine/models.go | 6 +- .../2018-06-17/storagedatalake/filesystem.go | 12 +- .../2018-06-17/storagedatalake/path.go | 16 +- .../timeseriesinsights/environments.go | 2 +- .../timeseriesinsights/environments.go | 2 +- .../virtualmachineimagebuilder/models.go | 101 +- .../virtualmachineimagetemplates.go | 2 +- .../2017-07-01/backup/backupapi/interfaces.go | 125 +- .../mgmt/2017-07-01/backup/models.go | 21422 ++----- .../2017-07-01/backup/protectionpolicies.go | 164 - .../mgmt/2018-07-10/siterecovery/client.go | 55 + .../siterecovery/migrationrecoverypoints.go | 243 + .../mgmt/2018-07-10/siterecovery/models.go | 23605 +++++++ .../2018-07-10/siterecovery/operations.go | 152 + .../2018-07-10/siterecovery/recoverypoints.go | 243 + .../siterecovery/replicationalertsettings.go | 310 + .../replicationeligibilityresults.go | 195 + .../siterecovery/replicationevents.go | 235 + .../siterecovery/replicationfabrics.go | 775 + .../siterecovery/replicationjobs.go | 547 + .../replicationlogicalnetworks.go | 236 + .../siterecovery/replicationmigrationitems.go | 894 + .../replicationnetworkmappings.go | 600 + .../siterecovery/replicationnetworks.go | 347 + .../siterecovery/replicationpolicies.go | 466 + .../replicationprotectableitems.go | 244 + .../siterecovery/replicationprotecteditems.go | 1704 + .../replicationprotectioncontainermappings.go | 685 + .../replicationprotectioncontainers.go | 674 + .../siterecovery/replicationrecoveryplans.go | 976 + .../replicationrecoveryservicesproviders.go | 690 + ...eplicationstorageclassificationmappings.go | 518 + .../replicationstorageclassifications.go | 350 + .../siterecovery/replicationvaulthealth.go | 189 + .../siterecovery/replicationvaultsetting.go | 318 + .../siterecovery/replicationvcenters.go | 589 + .../siterecoveryapi/interfaces.go | 305 + .../siterecovery/supportedoperatingsystems.go | 115 + .../siterecovery/targetcomputesizes.go | 160 + .../mgmt/2018-07-10/siterecovery/version.go | 30 + .../2019-05-13/backup/backupapi/interfaces.go | 307 + .../mgmt/2019-05-13/backup/backups.go | 127 + .../mgmt/2019-05-13/backup/client.go | 51 + .../mgmt/2019-05-13/backup/engines.go | 251 + .../backup/exportjobsoperationresults.go | 0 .../mgmt/2019-05-13/backup/featuresupport.go | 119 + .../backup/itemlevelrecoveryconnections.go | 220 + .../backup/jobcancellations.go | 0 .../backup/jobdetails.go | 0 .../backup/joboperationresults.go | 0 .../{2017-07-01 => 2019-05-13}/backup/jobs.go | 0 .../backup/jobsgroup.go | 0 .../mgmt/2019-05-13/backup/models.go | 20986 +++++++ .../backup/operation.go | 0 .../2019-05-13/backup/operationresults.go | 123 + .../mgmt/2019-05-13/backup/operations.go | 147 + .../2019-05-13/backup/operationstatuses.go | 123 + .../backup/policies.go | 0 .../backup/protectablecontainers.go | 161 + .../2019-05-13/backup/protectableitems.go | 165 + .../backup/protecteditemoperationresults.go | 0 .../backup/protecteditemoperationstatuses.go | 130 + .../backup/protecteditems.go | 0 .../backup/protecteditemsgroup.go | 0 .../protectioncontaineroperationresults.go | 126 + ...tectioncontainerrefreshoperationresults.go | 123 + .../2019-05-13/backup/protectioncontainers.go | 458 + .../backup/protectioncontainersgroup.go | 160 + .../2019-05-13/backup/protectionintent.go | 366 + .../backup/protectionintentgroup.go | 164 + .../2019-05-13/backup/protectionpolicies.go | 285 + .../protectionpolicyoperationresults.go | 0 .../protectionpolicyoperationstatuses.go | 127 + .../backup/recoverypoints.go | 0 .../backup/resourcestorageconfigs.go | 277 + .../backup/resourcevaultconfigs.go | 0 .../backup/restores.go | 0 .../mgmt/2019-05-13/backup/securitypins.go | 118 + .../mgmt/2019-05-13/backup/status.go | 119 + .../mgmt/2019-05-13/backup/usagesummaries.go | 126 + .../mgmt/2019-05-13/backup/version.go | 30 + .../mgmt/2019-05-13/backup/workloaditems.go | 170 + .../2016-07-01/relay/hybridconnections.go | 2 +- .../2017-04-01/relay/hybridconnections.go | 2 +- .../relay/mgmt/2017-04-01/relay/wcfrelays.go | 2 +- .../mgmt/2019-04-01/resourcegraph/client.go | 4 +- .../applicationdefinitions.go | 669 + .../managedapplications/applications.go | 1059 + .../2019-07-01/managedapplications/client.go | 161 + .../managedapplications/jitrequests.go | 551 + .../managedapplicationsapi/interfaces.go | 73 + .../2019-07-01/managedapplications/models.go | 1729 + .../2019-07-01/managedapplications/version.go | 30 + .../mgmt/2016-03-01/scheduler/jobs.go | 4 +- .../search/mgmt/2015-08-19/search/services.go | 4 +- .../mgmt/2017-04-01/servicebus/queues.go | 4 +- .../mgmt/2017-04-01/servicebus/rules.go | 6 +- .../2017-04-01/servicebus/subscriptions.go | 4 +- .../mgmt/2017-04-01/servicebus/topics.go | 4 +- .../servicefabric/6.2/servicefabric/client.go | 426 +- .../servicefabric/6.3/servicefabric/client.go | 432 +- .../servicefabric/6.4/servicefabric/client.go | 436 +- .../servicefabric/6.5/servicefabric/client.go | 450 +- .../servicefabric/7.0/servicefabric/client.go | 21671 +++++++ .../7.0/servicefabric/meshapplication.go | 422 + .../7.0/servicefabric/meshcodepackage.go | 126 + .../7.0/servicefabric/meshgateway.go | 349 + .../7.0/servicefabric/meshnetwork.go | 346 + .../7.0/servicefabric/meshsecret.go | 346 + .../7.0/servicefabric/meshsecretvalue.go | 438 + .../7.0/servicefabric/meshservice.go | 194 + .../7.0/servicefabric/meshservicereplica.go | 198 + .../7.0/servicefabric/meshvolume.go | 351 + .../servicefabric/7.0/servicefabric/models.go | 52431 ++++++++++++++++ .../servicefabricapi/interfaces.go | 325 + .../7.0/servicefabric/version.go | 30 + .../mgmt/2016-09-01/servicefabric/clusters.go | 10 +- .../mgmt/2018-02-01/servicefabric/clusters.go | 10 +- .../mgmt/2018-02-01/servicefabric/models.go | 6 +- .../mgmt/2019-03-01/servicefabric/clusters.go | 10 +- .../mgmt/2019-03-01/servicefabric/models.go | 6 +- .../signalr/mgmt/2018-10-01/signalr/models.go | 2 +- .../2018-11-09/storagedatalake/filesystem.go | 12 +- .../2018-11-09/storagedatalake/path.go | 18 +- .../2019-10-31/storagedatalake/filesystem.go | 12 +- .../2019-10-31/storagedatalake/path.go | 18 +- .../mgmt/2018-07-01/storage/blobservices.go | 2 +- .../mgmt/2018-11-01/storage/blobservices.go | 2 +- .../mgmt/2019-04-01/storage/blobservices.go | 2 +- .../mgmt/2019-04-01/storage/fileshares.go | 2 +- .../mgmt/2019-06-01/storage/blobservices.go | 9 +- .../mgmt/2019-06-01/storage/fileservices.go | 3 +- .../mgmt/2019-06-01/storage/fileshares.go | 4 +- .../storage/mgmt/2019-06-01/storage/models.go | 130 +- .../2018-04-02/storagesync/serverendpoints.go | 2 +- .../2018-07-01/storagesync/serverendpoints.go | 4 +- .../2018-10-01/storagesync/serverendpoints.go | 4 +- .../2019-02-01/storagesync/serverendpoints.go | 4 +- .../storsimple/backupschedulegroups.go | 4 +- .../timeseriesinsights/environments.go | 2 +- services/web/mgmt/2016-09-01/web/apps.go | 8 +- .../web/appservicecertificateorders.go | 4 +- services/web/mgmt/2016-09-01/web/client.go | 2 +- services/web/mgmt/2018-02-01/web/apps.go | 16 +- .../web/appservicecertificateorders.go | 4 +- services/web/mgmt/2018-02-01/web/client.go | 2 +- services/web/mgmt/2019-08-01/web/apps.go | 20 +- .../web/appservicecertificateorders.go | 4 +- services/web/mgmt/2019-08-01/web/client.go | 2 +- storage/blob.go | 2 +- storage/directory.go | 2 +- version/version.go | 2 +- 819 files changed, 165481 insertions(+), 18929 deletions(-) create mode 100644 profiles/preview/preview/azuredata/mgmt/azuredata/azuredataapi/models.go create mode 100644 profiles/preview/preview/azuredata/mgmt/azuredata/models.go create mode 100644 profiles/preview/preview/customerlockbox/mgmt/customerlockbox/customerlockboxapi/models.go create mode 100644 profiles/preview/preview/customerlockbox/mgmt/customerlockbox/models.go create mode 100644 services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go create mode 100644 services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go create mode 100644 services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go create mode 100644 services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go create mode 100644 services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/models.go create mode 100644 services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go create mode 100644 services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go create mode 100644 services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go create mode 100644 services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/version.go create mode 100644 services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go create mode 100644 services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go create mode 100644 services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/models.go create mode 100644 services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go create mode 100644 services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go create mode 100644 services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/version.go create mode 100644 services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go create mode 100644 services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go create mode 100644 services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go create mode 100644 services/preview/sql/mgmt/v3.0/sql/workloadgroups.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go create mode 100644 services/recoveryservices/mgmt/2018-07-10/siterecovery/version.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/backups.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/client.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/engines.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/exportjobsoperationresults.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/jobcancellations.go (100%) rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/jobdetails.go (100%) rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/joboperationresults.go (100%) rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/jobs.go (100%) rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/jobsgroup.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/models.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/operation.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/operations.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/policies.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/protecteditemoperationresults.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/protecteditems.go (100%) rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/protecteditemsgroup.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/protectionpolicyoperationresults.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/recoverypoints.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/resourcevaultconfigs.go (100%) rename services/recoveryservices/mgmt/{2017-07-01 => 2019-05-13}/backup/restores.go (100%) create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/status.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/version.go create mode 100644 services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go create mode 100644 services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go create mode 100644 services/resources/mgmt/2019-07-01/managedapplications/applications.go create mode 100644 services/resources/mgmt/2019-07-01/managedapplications/client.go create mode 100644 services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go create mode 100644 services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go create mode 100644 services/resources/mgmt/2019-07-01/managedapplications/models.go create mode 100644 services/resources/mgmt/2019-07-01/managedapplications/version.go create mode 100644 services/servicefabric/7.0/servicefabric/client.go create mode 100644 services/servicefabric/7.0/servicefabric/meshapplication.go create mode 100644 services/servicefabric/7.0/servicefabric/meshcodepackage.go create mode 100644 services/servicefabric/7.0/servicefabric/meshgateway.go create mode 100644 services/servicefabric/7.0/servicefabric/meshnetwork.go create mode 100644 services/servicefabric/7.0/servicefabric/meshsecret.go create mode 100644 services/servicefabric/7.0/servicefabric/meshsecretvalue.go create mode 100644 services/servicefabric/7.0/servicefabric/meshservice.go create mode 100644 services/servicefabric/7.0/servicefabric/meshservicereplica.go create mode 100644 services/servicefabric/7.0/servicefabric/meshvolume.go create mode 100644 services/servicefabric/7.0/servicefabric/models.go create mode 100644 services/servicefabric/7.0/servicefabric/servicefabricapi/interfaces.go create mode 100644 services/servicefabric/7.0/servicefabric/version.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 85a65d509c64..090d067ec1ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,54 @@ # CHANGELOG +## `v37.0.0` + +### New Packages + +| Package Name | API Version | +| -----------: | :---------: | +| azuredata | 2017-03-01-preview | +| backup | 2019-05-13 | +| customerlockbox | 2018-02-28-preview | +| managedapplications | 2019-07-01 | +| servicefabric | 7.0 | +| siterecovery | 2018-07-10 | + +### Updated Packages + +| Package Name | API Version | +| -----------: | :---------: | +| azurestack | 2017-06-01 | +| compute | 2018-04-01
2018-06-01
2018-10-01
2019-03-01 | +| containerregistry | 2019-06-01-preview | +| containerservice | 2019-10-01 | +| datashare | 2018-11-01-preview
2019-11-01 | +| hanaonazure | 2017-11-03-preview | +| mysql | 2017-12-01
2017-12-01-preview | +| network | 2019-09-01 | +| policyinsights | 2019-10-01 | +| postgresql | 2017-12-01-preview | +| qnamaker | v4.0 | +| securityinsight | 2017-08-01-preview | +| sql | 2015-05-01-preview
2018-06-01-preview | +| sqlvirtualmachine | 2017-03-01-preview | + +### BreakingChanges + +| Package Name | API Version | +| -----------: | :---------: | +| appplatform | 2019-05-01-preview | +| backup | 2017-07-01 | +| cdn | 2019-06-15-preview | +| compute | 2019-07-01 | +| datafactory | 2018-06-01 | +| documentdb | 2019-08-01
2019-08-01-preview | +| network | 2019-08-01 | +| resourcegraph | 2018-09-01 | +| security | v1.0
v2.0
v3.0 | +| sql | 2017-03-01-preview
v3.0 | +| storage | 2019-06-01 | +| virtualmachineimagebuilder | 2019-05-01-preview | + ## `v36.2.0` ### New Packages diff --git a/Gopkg.lock b/Gopkg.lock index 3d076a8f590b..43aa10c8f048 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -21,12 +21,12 @@ version = "v13.3.0" [[projects]] - digest = "1:d37f34e1e231ee4b8657d1b6153e2696b1d7341850f648f5d78151d3bc1f677b" + digest = "1:a5f0485ed2aad9b9c6a730815d1f2bc92b0acc126d7ee8e36c1a51882fc284f5" name = "github.com/Masterminds/semver" packages = ["."] pruneopts = "UT" - revision = "fe7c21038085e01e67044ec1efe3afb1eaa59f75" - version = "v3.0.1" + revision = "25911d36c978be5eb3e81847734874fd4e1dc6c7" + version = "v3.0.2" [[projects]] digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55" @@ -143,18 +143,18 @@ [[projects]] branch = "master" - digest = "1:994c4915a59f821705d08ea77b117ec7a3e6a46cc867fd194d887500dac1c3c2" + digest = "1:f604f5e2ee721b6757d962dfe7bab4f28aae50c456e39cfb2f3819762a44a6ae" name = "golang.org/x/crypto" packages = [ "pkcs12", "pkcs12/internal/rc2", ] pruneopts = "UT" - revision = "8986dd9e96cf0a6f74da406c005ba3df38527c04" + revision = "ac88ee75c92c889b97e05591e9a39b6480c538b3" [[projects]] branch = "master" - digest = "1:3a0c9d6a605d6a7c90e343ce34bdb8b894d69f6a9cbcda71351b5e48b8d754af" + digest = "1:10c612b4f89a6d75ac2a0e7cd33cb9474034e8914844231d76a40fe7cd799945" name = "golang.org/x/tools" packages = [ "go/ast/astutil", @@ -172,7 +172,7 @@ "internal/span", ] pruneopts = "UT" - revision = "6d8f1af9ccc0737695ff54584220e9967e9e661b" + revision = "ecd32218bd7f33fd31c1abbfb74283690bedd093" [[projects]] branch = "v1" @@ -183,12 +183,12 @@ revision = "41f04d3bba152ddec2103e299fed053415705330" [[projects]] - digest = "1:59f10c1537d2199d9115d946927fe31165959a95190849c82ff11e05803528b0" + digest = "1:b75b3deb2bce8bc079e16bb2aecfe01eb80098f5650f9e93e5643ca8b7b73737" name = "gopkg.in/yaml.v2" packages = ["."] pruneopts = "UT" - revision = "f221b8435cfb71e54062f6c6e99e9ade30b124d5" - version = "v2.2.4" + revision = "1f64d6156d11335c3f22d9330b0ad14fc1e789ce" + version = "v2.2.7" [solve-meta] analyzer-name = "dep" diff --git a/Gopkg.toml b/Gopkg.toml index 01b90caabc49..397fd11b923c 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -25,7 +25,7 @@ [[constraint]] name = "github.com/Azure/go-autorest" - version = "13.0.0" + version = "13.3.0" [[constraint]] branch = "master" diff --git a/profiles/latest/azurestack/mgmt/azurestack/models.go b/profiles/latest/azurestack/mgmt/azurestack/models.go index 24f2f7d6dbdf..eb2759357de6 100644 --- a/profiles/latest/azurestack/mgmt/azurestack/models.go +++ b/profiles/latest/azurestack/mgmt/azurestack/models.go @@ -29,6 +29,28 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type Category = original.Category + +const ( + ADFS Category = original.ADFS + AzureAD Category = original.AzureAD +) + +type CompatibilityIssue = original.CompatibilityIssue + +const ( + ADFSIdentitySystemRequired CompatibilityIssue = original.ADFSIdentitySystemRequired + AzureADIdentitySystemRequired CompatibilityIssue = original.AzureADIdentitySystemRequired + CapacityBillingModelRequired CompatibilityIssue = original.CapacityBillingModelRequired + ConnectionToAzureRequired CompatibilityIssue = original.ConnectionToAzureRequired + ConnectionToInternetRequired CompatibilityIssue = original.ConnectionToInternetRequired + DevelopmentBillingModelRequired CompatibilityIssue = original.DevelopmentBillingModelRequired + DisconnectedEnvironmentRequired CompatibilityIssue = original.DisconnectedEnvironmentRequired + HigherDeviceVersionRequired CompatibilityIssue = original.HigherDeviceVersionRequired + LowerDeviceVersionRequired CompatibilityIssue = original.LowerDeviceVersionRequired + PayAsYouGoBillingModelRequired CompatibilityIssue = original.PayAsYouGoBillingModelRequired +) + type ComputeRole = original.ComputeRole const ( @@ -62,6 +84,7 @@ const ( type ActivationKeyResult = original.ActivationKeyResult type BaseClient = original.BaseClient +type Compatibility = original.Compatibility type CustomerSubscription = original.CustomerSubscription type CustomerSubscriptionList = original.CustomerSubscriptionList type CustomerSubscriptionListIterator = original.CustomerSubscriptionListIterator @@ -69,12 +92,14 @@ type CustomerSubscriptionListPage = original.CustomerSubscriptionListPage type CustomerSubscriptionProperties = original.CustomerSubscriptionProperties type CustomerSubscriptionsClient = original.CustomerSubscriptionsClient type DataDiskImage = original.DataDiskImage +type DeviceConfiguration = original.DeviceConfiguration type Display = original.Display type ErrorDetails = original.ErrorDetails type ErrorResponse = original.ErrorResponse type ExtendedProduct = original.ExtendedProduct type ExtendedProductProperties = original.ExtendedProductProperties type IconUris = original.IconUris +type MarketplaceProductLogUpdate = original.MarketplaceProductLogUpdate type Operation = original.Operation type OperationList = original.OperationList type OperationListIterator = original.OperationListIterator @@ -86,6 +111,7 @@ type ProductLink = original.ProductLink type ProductList = original.ProductList type ProductListIterator = original.ProductListIterator type ProductListPage = original.ProductListPage +type ProductLog = original.ProductLog type ProductNestedProperties = original.ProductNestedProperties type ProductProperties = original.ProductProperties type ProductsClient = original.ProductsClient @@ -157,6 +183,12 @@ func NewRegistrationsClientWithBaseURI(baseURI string, subscriptionID string) Re func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleCategoryValues() []Category { + return original.PossibleCategoryValues() +} +func PossibleCompatibilityIssueValues() []CompatibilityIssue { + return original.PossibleCompatibilityIssueValues() +} func PossibleComputeRoleValues() []ComputeRole { return original.PossibleComputeRoleValues() } diff --git a/profiles/latest/compute/mgmt/compute/models.go b/profiles/latest/compute/mgmt/compute/models.go index 9fa6e9e831eb..af120f14e85c 100644 --- a/profiles/latest/compute/mgmt/compute/models.go +++ b/profiles/latest/compute/mgmt/compute/models.go @@ -471,6 +471,7 @@ type VirtualMachinePriorityTypes = original.VirtualMachinePriorityTypes const ( Low VirtualMachinePriorityTypes = original.Low Regular VirtualMachinePriorityTypes = original.Regular + Spot VirtualMachinePriorityTypes = original.Spot ) type VirtualMachineScaleSetScaleInRules = original.VirtualMachineScaleSetScaleInRules @@ -760,24 +761,29 @@ type EncryptionSettingsElement = original.EncryptionSettingsElement type GalleriesClient = original.GalleriesClient type GalleriesCreateOrUpdateFuture = original.GalleriesCreateOrUpdateFuture type GalleriesDeleteFuture = original.GalleriesDeleteFuture +type GalleriesUpdateFuture = original.GalleriesUpdateFuture type Gallery = original.Gallery type GalleryApplication = original.GalleryApplication type GalleryApplicationList = original.GalleryApplicationList type GalleryApplicationListIterator = original.GalleryApplicationListIterator type GalleryApplicationListPage = original.GalleryApplicationListPage type GalleryApplicationProperties = original.GalleryApplicationProperties +type GalleryApplicationUpdate = original.GalleryApplicationUpdate type GalleryApplicationVersion = original.GalleryApplicationVersion type GalleryApplicationVersionList = original.GalleryApplicationVersionList type GalleryApplicationVersionListIterator = original.GalleryApplicationVersionListIterator type GalleryApplicationVersionListPage = original.GalleryApplicationVersionListPage type GalleryApplicationVersionProperties = original.GalleryApplicationVersionProperties type GalleryApplicationVersionPublishingProfile = original.GalleryApplicationVersionPublishingProfile +type GalleryApplicationVersionUpdate = original.GalleryApplicationVersionUpdate type GalleryApplicationVersionsClient = original.GalleryApplicationVersionsClient type GalleryApplicationVersionsCreateOrUpdateFuture = original.GalleryApplicationVersionsCreateOrUpdateFuture type GalleryApplicationVersionsDeleteFuture = original.GalleryApplicationVersionsDeleteFuture +type GalleryApplicationVersionsUpdateFuture = original.GalleryApplicationVersionsUpdateFuture type GalleryApplicationsClient = original.GalleryApplicationsClient type GalleryApplicationsCreateOrUpdateFuture = original.GalleryApplicationsCreateOrUpdateFuture type GalleryApplicationsDeleteFuture = original.GalleryApplicationsDeleteFuture +type GalleryApplicationsUpdateFuture = original.GalleryApplicationsUpdateFuture type GalleryArtifactPublishingProfileBase = original.GalleryArtifactPublishingProfileBase type GalleryArtifactSource = original.GalleryArtifactSource type GalleryArtifactVersionSource = original.GalleryArtifactVersionSource @@ -790,6 +796,7 @@ type GalleryImageList = original.GalleryImageList type GalleryImageListIterator = original.GalleryImageListIterator type GalleryImageListPage = original.GalleryImageListPage type GalleryImageProperties = original.GalleryImageProperties +type GalleryImageUpdate = original.GalleryImageUpdate type GalleryImageVersion = original.GalleryImageVersion type GalleryImageVersionList = original.GalleryImageVersionList type GalleryImageVersionListIterator = original.GalleryImageVersionListIterator @@ -797,17 +804,21 @@ type GalleryImageVersionListPage = original.GalleryImageVersionListPage type GalleryImageVersionProperties = original.GalleryImageVersionProperties type GalleryImageVersionPublishingProfile = original.GalleryImageVersionPublishingProfile type GalleryImageVersionStorageProfile = original.GalleryImageVersionStorageProfile +type GalleryImageVersionUpdate = original.GalleryImageVersionUpdate type GalleryImageVersionsClient = original.GalleryImageVersionsClient type GalleryImageVersionsCreateOrUpdateFuture = original.GalleryImageVersionsCreateOrUpdateFuture type GalleryImageVersionsDeleteFuture = original.GalleryImageVersionsDeleteFuture +type GalleryImageVersionsUpdateFuture = original.GalleryImageVersionsUpdateFuture type GalleryImagesClient = original.GalleryImagesClient type GalleryImagesCreateOrUpdateFuture = original.GalleryImagesCreateOrUpdateFuture type GalleryImagesDeleteFuture = original.GalleryImagesDeleteFuture +type GalleryImagesUpdateFuture = original.GalleryImagesUpdateFuture type GalleryList = original.GalleryList type GalleryListIterator = original.GalleryListIterator type GalleryListPage = original.GalleryListPage type GalleryOSDiskImage = original.GalleryOSDiskImage type GalleryProperties = original.GalleryProperties +type GalleryUpdate = original.GalleryUpdate type GrantAccessData = original.GrantAccessData type HardwareProfile = original.HardwareProfile type Image = original.Image @@ -980,9 +991,11 @@ type VirtualMachineScaleSetExtensionListResultIterator = original.VirtualMachine type VirtualMachineScaleSetExtensionListResultPage = original.VirtualMachineScaleSetExtensionListResultPage type VirtualMachineScaleSetExtensionProfile = original.VirtualMachineScaleSetExtensionProfile type VirtualMachineScaleSetExtensionProperties = original.VirtualMachineScaleSetExtensionProperties +type VirtualMachineScaleSetExtensionUpdate = original.VirtualMachineScaleSetExtensionUpdate type VirtualMachineScaleSetExtensionsClient = original.VirtualMachineScaleSetExtensionsClient type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture = original.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture type VirtualMachineScaleSetExtensionsDeleteFuture = original.VirtualMachineScaleSetExtensionsDeleteFuture +type VirtualMachineScaleSetExtensionsUpdateFuture = original.VirtualMachineScaleSetExtensionsUpdateFuture type VirtualMachineScaleSetIPConfiguration = original.VirtualMachineScaleSetIPConfiguration type VirtualMachineScaleSetIPConfigurationProperties = original.VirtualMachineScaleSetIPConfigurationProperties type VirtualMachineScaleSetIPTag = original.VirtualMachineScaleSetIPTag diff --git a/profiles/latest/cosmos-db/mgmt/documentdb/models.go b/profiles/latest/cosmos-db/mgmt/documentdb/models.go index 46e118566900..3aaf9fd42e09 100644 --- a/profiles/latest/cosmos-db/mgmt/documentdb/models.go +++ b/profiles/latest/cosmos-db/mgmt/documentdb/models.go @@ -29,6 +29,13 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type CompositePathSortOrder = original.CompositePathSortOrder + +const ( + Ascending CompositePathSortOrder = original.Ascending + Descending CompositePathSortOrder = original.Descending +) + type ConflictResolutionMode = original.ConflictResolutionMode const ( @@ -120,6 +127,15 @@ const ( PrimaryAggregationTypeTotal PrimaryAggregationType = original.PrimaryAggregationTypeTotal ) +type SpatialType = original.SpatialType + +const ( + SpatialTypeLineString SpatialType = original.SpatialTypeLineString + SpatialTypeMultiPolygon SpatialType = original.SpatialTypeMultiPolygon + SpatialTypePoint SpatialType = original.SpatialTypePoint + SpatialTypePolygon SpatialType = original.SpatialTypePolygon +) + type TriggerOperation = original.TriggerOperation const ( @@ -156,6 +172,7 @@ type Capability = original.Capability type CassandraKeyspaceCreateUpdateParameters = original.CassandraKeyspaceCreateUpdateParameters type CassandraKeyspaceCreateUpdateProperties = original.CassandraKeyspaceCreateUpdateProperties type CassandraKeyspaceGetProperties = original.CassandraKeyspaceGetProperties +type CassandraKeyspaceGetPropertiesResource = original.CassandraKeyspaceGetPropertiesResource type CassandraKeyspaceGetResults = original.CassandraKeyspaceGetResults type CassandraKeyspaceListResult = original.CassandraKeyspaceListResult type CassandraKeyspaceResource = original.CassandraKeyspaceResource @@ -171,6 +188,7 @@ type CassandraSchema = original.CassandraSchema type CassandraTableCreateUpdateParameters = original.CassandraTableCreateUpdateParameters type CassandraTableCreateUpdateProperties = original.CassandraTableCreateUpdateProperties type CassandraTableGetProperties = original.CassandraTableGetProperties +type CassandraTableGetPropertiesResource = original.CassandraTableGetPropertiesResource type CassandraTableGetResults = original.CassandraTableGetResults type CassandraTableListResult = original.CassandraTableListResult type CassandraTableResource = original.CassandraTableResource @@ -180,6 +198,7 @@ type CollectionPartitionClient = original.CollectionPartitionClient type CollectionPartitionRegionClient = original.CollectionPartitionRegionClient type CollectionRegionClient = original.CollectionRegionClient type Column = original.Column +type CompositePath = original.CompositePath type ConflictResolutionPolicy = original.ConflictResolutionPolicy type ConsistencyPolicy = original.ConsistencyPolicy type ContainerPartitionKey = original.ContainerPartitionKey @@ -213,12 +232,14 @@ type FailoverPolicy = original.FailoverPolicy type GremlinDatabaseCreateUpdateParameters = original.GremlinDatabaseCreateUpdateParameters type GremlinDatabaseCreateUpdateProperties = original.GremlinDatabaseCreateUpdateProperties type GremlinDatabaseGetProperties = original.GremlinDatabaseGetProperties +type GremlinDatabaseGetPropertiesResource = original.GremlinDatabaseGetPropertiesResource type GremlinDatabaseGetResults = original.GremlinDatabaseGetResults type GremlinDatabaseListResult = original.GremlinDatabaseListResult type GremlinDatabaseResource = original.GremlinDatabaseResource type GremlinGraphCreateUpdateParameters = original.GremlinGraphCreateUpdateParameters type GremlinGraphCreateUpdateProperties = original.GremlinGraphCreateUpdateProperties type GremlinGraphGetProperties = original.GremlinGraphGetProperties +type GremlinGraphGetPropertiesResource = original.GremlinGraphGetPropertiesResource type GremlinGraphGetResults = original.GremlinGraphGetResults type GremlinGraphListResult = original.GremlinGraphListResult type GremlinGraphResource = original.GremlinGraphResource @@ -243,12 +264,14 @@ type MetricValue = original.MetricValue type MongoDBCollectionCreateUpdateParameters = original.MongoDBCollectionCreateUpdateParameters type MongoDBCollectionCreateUpdateProperties = original.MongoDBCollectionCreateUpdateProperties type MongoDBCollectionGetProperties = original.MongoDBCollectionGetProperties +type MongoDBCollectionGetPropertiesResource = original.MongoDBCollectionGetPropertiesResource type MongoDBCollectionGetResults = original.MongoDBCollectionGetResults type MongoDBCollectionListResult = original.MongoDBCollectionListResult type MongoDBCollectionResource = original.MongoDBCollectionResource type MongoDBDatabaseCreateUpdateParameters = original.MongoDBDatabaseCreateUpdateParameters type MongoDBDatabaseCreateUpdateProperties = original.MongoDBDatabaseCreateUpdateProperties type MongoDBDatabaseGetProperties = original.MongoDBDatabaseGetProperties +type MongoDBDatabaseGetPropertiesResource = original.MongoDBDatabaseGetPropertiesResource type MongoDBDatabaseGetResults = original.MongoDBDatabaseGetResults type MongoDBDatabaseListResult = original.MongoDBDatabaseListResult type MongoDBDatabaseResource = original.MongoDBDatabaseResource @@ -284,12 +307,14 @@ type RegionForOnlineOffline = original.RegionForOnlineOffline type SQLContainerCreateUpdateParameters = original.SQLContainerCreateUpdateParameters type SQLContainerCreateUpdateProperties = original.SQLContainerCreateUpdateProperties type SQLContainerGetProperties = original.SQLContainerGetProperties +type SQLContainerGetPropertiesResource = original.SQLContainerGetPropertiesResource type SQLContainerGetResults = original.SQLContainerGetResults type SQLContainerListResult = original.SQLContainerListResult type SQLContainerResource = original.SQLContainerResource type SQLDatabaseCreateUpdateParameters = original.SQLDatabaseCreateUpdateParameters type SQLDatabaseCreateUpdateProperties = original.SQLDatabaseCreateUpdateProperties type SQLDatabaseGetProperties = original.SQLDatabaseGetProperties +type SQLDatabaseGetPropertiesResource = original.SQLDatabaseGetPropertiesResource type SQLDatabaseGetResults = original.SQLDatabaseGetResults type SQLDatabaseListResult = original.SQLDatabaseListResult type SQLDatabaseResource = original.SQLDatabaseResource @@ -309,24 +334,29 @@ type SQLResourcesUpdateSQLDatabaseThroughputFuture = original.SQLResourcesUpdate type SQLStoredProcedureCreateUpdateParameters = original.SQLStoredProcedureCreateUpdateParameters type SQLStoredProcedureCreateUpdateProperties = original.SQLStoredProcedureCreateUpdateProperties type SQLStoredProcedureGetProperties = original.SQLStoredProcedureGetProperties +type SQLStoredProcedureGetPropertiesResource = original.SQLStoredProcedureGetPropertiesResource type SQLStoredProcedureGetResults = original.SQLStoredProcedureGetResults type SQLStoredProcedureListResult = original.SQLStoredProcedureListResult type SQLStoredProcedureResource = original.SQLStoredProcedureResource type SQLTriggerCreateUpdateParameters = original.SQLTriggerCreateUpdateParameters type SQLTriggerCreateUpdateProperties = original.SQLTriggerCreateUpdateProperties type SQLTriggerGetProperties = original.SQLTriggerGetProperties +type SQLTriggerGetPropertiesResource = original.SQLTriggerGetPropertiesResource type SQLTriggerGetResults = original.SQLTriggerGetResults type SQLTriggerListResult = original.SQLTriggerListResult type SQLTriggerResource = original.SQLTriggerResource type SQLUserDefinedFunctionCreateUpdateParameters = original.SQLUserDefinedFunctionCreateUpdateParameters type SQLUserDefinedFunctionCreateUpdateProperties = original.SQLUserDefinedFunctionCreateUpdateProperties type SQLUserDefinedFunctionGetProperties = original.SQLUserDefinedFunctionGetProperties +type SQLUserDefinedFunctionGetPropertiesResource = original.SQLUserDefinedFunctionGetPropertiesResource type SQLUserDefinedFunctionGetResults = original.SQLUserDefinedFunctionGetResults type SQLUserDefinedFunctionListResult = original.SQLUserDefinedFunctionListResult type SQLUserDefinedFunctionResource = original.SQLUserDefinedFunctionResource +type SpatialSpec = original.SpatialSpec type TableCreateUpdateParameters = original.TableCreateUpdateParameters type TableCreateUpdateProperties = original.TableCreateUpdateProperties type TableGetProperties = original.TableGetProperties +type TableGetPropertiesResource = original.TableGetPropertiesResource type TableGetResults = original.TableGetResults type TableListResult = original.TableListResult type TableResource = original.TableResource @@ -335,6 +365,7 @@ type TableResourcesCreateUpdateTableFuture = original.TableResourcesCreateUpdate type TableResourcesDeleteTableFuture = original.TableResourcesDeleteTableFuture type TableResourcesUpdateTableThroughputFuture = original.TableResourcesUpdateTableThroughputFuture type ThroughputSettingsGetProperties = original.ThroughputSettingsGetProperties +type ThroughputSettingsGetPropertiesResource = original.ThroughputSettingsGetPropertiesResource type ThroughputSettingsGetResults = original.ThroughputSettingsGetResults type ThroughputSettingsResource = original.ThroughputSettingsResource type ThroughputSettingsUpdateParameters = original.ThroughputSettingsUpdateParameters @@ -465,6 +496,9 @@ func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string) T func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { + return original.PossibleCompositePathSortOrderValues() +} func PossibleConflictResolutionModeValues() []ConflictResolutionMode { return original.PossibleConflictResolutionModeValues() } @@ -498,6 +532,9 @@ func PossiblePartitionKindValues() []PartitionKind { func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { return original.PossiblePrimaryAggregationTypeValues() } +func PossibleSpatialTypeValues() []SpatialType { + return original.PossibleSpatialTypeValues() +} func PossibleTriggerOperationValues() []TriggerOperation { return original.PossibleTriggerOperationValues() } diff --git a/profiles/latest/datafactory/mgmt/datafactory/models.go b/profiles/latest/datafactory/mgmt/datafactory/models.go index 1a4cb55ecc90..7af2ee7637f3 100644 --- a/profiles/latest/datafactory/mgmt/datafactory/models.go +++ b/profiles/latest/datafactory/mgmt/datafactory/models.go @@ -532,6 +532,14 @@ const ( SapHanaAuthenticationTypeWindows SapHanaAuthenticationType = original.SapHanaAuthenticationTypeWindows ) +type SapHanaPartitionOption = original.SapHanaPartitionOption + +const ( + SapHanaPartitionOptionNone SapHanaPartitionOption = original.SapHanaPartitionOptionNone + SapHanaPartitionOptionPhysicalPartitionsOfTable SapHanaPartitionOption = original.SapHanaPartitionOptionPhysicalPartitionsOfTable + SapHanaPartitionOptionSapHanaDynamicRange SapHanaPartitionOption = original.SapHanaPartitionOptionSapHanaDynamicRange +) + type SapTablePartitionOption = original.SapTablePartitionOption const ( @@ -1393,6 +1401,8 @@ type CustomActivityTypeProperties = original.CustomActivityTypeProperties type CustomDataSourceLinkedService = original.CustomDataSourceLinkedService type CustomDataset = original.CustomDataset type CustomSetupBase = original.CustomSetupBase +type DWCopyCommandDefaultValue = original.DWCopyCommandDefaultValue +type DWCopyCommandSettings = original.DWCopyCommandSettings type DataFlow = original.DataFlow type DataFlowDebugCommandPayload = original.DataFlowDebugCommandPayload type DataFlowDebugCommandRequest = original.DataFlowDebugCommandRequest @@ -1890,6 +1900,7 @@ type SapEccResourceDatasetTypeProperties = original.SapEccResourceDatasetTypePro type SapEccSource = original.SapEccSource type SapHanaLinkedService = original.SapHanaLinkedService type SapHanaLinkedServiceProperties = original.SapHanaLinkedServiceProperties +type SapHanaPartitionSettings = original.SapHanaPartitionSettings type SapHanaSource = original.SapHanaSource type SapHanaTableDataset = original.SapHanaTableDataset type SapHanaTableDatasetTypeProperties = original.SapHanaTableDatasetTypeProperties @@ -2366,6 +2377,9 @@ func PossibleSapCloudForCustomerSinkWriteBehaviorValues() []SapCloudForCustomerS func PossibleSapHanaAuthenticationTypeValues() []SapHanaAuthenticationType { return original.PossibleSapHanaAuthenticationTypeValues() } +func PossibleSapHanaPartitionOptionValues() []SapHanaPartitionOption { + return original.PossibleSapHanaPartitionOptionValues() +} func PossibleSapTablePartitionOptionValues() []SapTablePartitionOption { return original.PossibleSapTablePartitionOptionValues() } diff --git a/profiles/latest/mysql/mgmt/mysql/models.go b/profiles/latest/mysql/mgmt/mysql/models.go index ee9b5df9a05d..4d1f316f0e53 100644 --- a/profiles/latest/mysql/mgmt/mysql/models.go +++ b/profiles/latest/mysql/mgmt/mysql/models.go @@ -72,6 +72,7 @@ const ( type ServerVersion = original.ServerVersion const ( + EightFullStopZero ServerVersion = original.EightFullStopZero FiveFullStopSeven ServerVersion = original.FiveFullStopSeven FiveFullStopSix ServerVersion = original.FiveFullStopSix ) diff --git a/profiles/latest/policyinsights/mgmt/policyinsights/models.go b/profiles/latest/policyinsights/mgmt/policyinsights/models.go index 792fa9b13ca8..4544f0f230dd 100644 --- a/profiles/latest/policyinsights/mgmt/policyinsights/models.go +++ b/profiles/latest/policyinsights/mgmt/policyinsights/models.go @@ -36,6 +36,13 @@ const ( Latest PolicyStatesResource = original.Latest ) +type ResourceDiscoveryMode = original.ResourceDiscoveryMode + +const ( + ExistingNonCompliant ResourceDiscoveryMode = original.ExistingNonCompliant + ReEvaluateCompliance ResourceDiscoveryMode = original.ReEvaluateCompliance +) + type BaseClient = original.BaseClient type ComplianceDetail = original.ComplianceDetail type ErrorDefinition = original.ErrorDefinition @@ -54,6 +61,13 @@ type PolicyEvent = original.PolicyEvent type PolicyEventsClient = original.PolicyEventsClient type PolicyEventsQueryResults = original.PolicyEventsQueryResults type PolicyGroupSummary = original.PolicyGroupSummary +type PolicyMetadata = original.PolicyMetadata +type PolicyMetadataClient = original.PolicyMetadataClient +type PolicyMetadataCollection = original.PolicyMetadataCollection +type PolicyMetadataCollectionIterator = original.PolicyMetadataCollectionIterator +type PolicyMetadataCollectionPage = original.PolicyMetadataCollectionPage +type PolicyMetadataProperties = original.PolicyMetadataProperties +type PolicyMetadataSlimProperties = original.PolicyMetadataSlimProperties type PolicyState = original.PolicyState type PolicyStatesClient = original.PolicyStatesClient type PolicyStatesQueryResults = original.PolicyStatesQueryResults @@ -76,6 +90,7 @@ type RemediationListResultIterator = original.RemediationListResultIterator type RemediationListResultPage = original.RemediationListResultPage type RemediationProperties = original.RemediationProperties type RemediationsClient = original.RemediationsClient +type SlimPolicyMetadata = original.SlimPolicyMetadata type String = original.String type SummarizeResults = original.SummarizeResults type Summary = original.Summary @@ -98,6 +113,18 @@ func NewPolicyEventsClient() PolicyEventsClient { func NewPolicyEventsClientWithBaseURI(baseURI string) PolicyEventsClient { return original.NewPolicyEventsClientWithBaseURI(baseURI) } +func NewPolicyMetadataClient() PolicyMetadataClient { + return original.NewPolicyMetadataClient() +} +func NewPolicyMetadataClientWithBaseURI(baseURI string) PolicyMetadataClient { + return original.NewPolicyMetadataClientWithBaseURI(baseURI) +} +func NewPolicyMetadataCollectionIterator(page PolicyMetadataCollectionPage) PolicyMetadataCollectionIterator { + return original.NewPolicyMetadataCollectionIterator(page) +} +func NewPolicyMetadataCollectionPage(getNextPage func(context.Context, PolicyMetadataCollection) (PolicyMetadataCollection, error)) PolicyMetadataCollectionPage { + return original.NewPolicyMetadataCollectionPage(getNextPage) +} func NewPolicyStatesClient() PolicyStatesClient { return original.NewPolicyStatesClient() } @@ -140,6 +167,9 @@ func NewWithBaseURI(baseURI string) BaseClient { func PossiblePolicyStatesResourceValues() []PolicyStatesResource { return original.PossiblePolicyStatesResourceValues() } +func PossibleResourceDiscoveryModeValues() []ResourceDiscoveryMode { + return original.PossibleResourceDiscoveryModeValues() +} func UserAgent() string { return original.UserAgent() + " profiles/latest" } diff --git a/profiles/latest/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go b/profiles/latest/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go index 3f4601162208..093f733e0044 100644 --- a/profiles/latest/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go +++ b/profiles/latest/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go @@ -23,6 +23,7 @@ import original "github.com/Azure/azure-sdk-for-go/services/policyinsights/mgmt/ type OperationsClientAPI = original.OperationsClientAPI type PolicyEventsClientAPI = original.PolicyEventsClientAPI +type PolicyMetadataClientAPI = original.PolicyMetadataClientAPI type PolicyStatesClientAPI = original.PolicyStatesClientAPI type PolicyTrackedResourcesClientAPI = original.PolicyTrackedResourcesClientAPI type RemediationsClientAPI = original.RemediationsClientAPI diff --git a/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go b/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go index f7aabeef3371..019ebc617251 100644 --- a/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go +++ b/profiles/latest/recoveryservices/mgmt/backup/backupapi/models.go @@ -19,7 +19,7 @@ package backupapi -import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2017-07-01/backup/backupapi" +import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup/backupapi" type BackupsClientAPI = original.BackupsClientAPI type EnginesClientAPI = original.EnginesClientAPI diff --git a/profiles/latest/recoveryservices/mgmt/backup/models.go b/profiles/latest/recoveryservices/mgmt/backup/models.go index 989bb6b87a7b..52714f7c8804 100644 --- a/profiles/latest/recoveryservices/mgmt/backup/models.go +++ b/profiles/latest/recoveryservices/mgmt/backup/models.go @@ -22,7 +22,7 @@ package backup import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2017-07-01/backup" + original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup" ) const ( diff --git a/profiles/latest/recoveryservices/mgmt/siterecovery/models.go b/profiles/latest/recoveryservices/mgmt/siterecovery/models.go index 44935a27634d..ca9dcb138629 100644 --- a/profiles/latest/recoveryservices/mgmt/siterecovery/models.go +++ b/profiles/latest/recoveryservices/mgmt/siterecovery/models.go @@ -22,7 +22,7 @@ package siterecovery import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery" + original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-07-10/siterecovery" ) const ( @@ -119,6 +119,13 @@ const ( VersionExpiry HealthErrorCategory = original.VersionExpiry ) +type HealthErrorCustomerResolvability = original.HealthErrorCustomerResolvability + +const ( + Allowed HealthErrorCustomerResolvability = original.Allowed + NotAllowed HealthErrorCustomerResolvability = original.NotAllowed +) + type HyperVReplicaAzureRpRecoveryPointType = original.HyperVReplicaAzureRpRecoveryPointType const ( @@ -139,10 +146,17 @@ const ( type InstanceType = original.InstanceType const ( - InstanceTypeA2A InstanceType = original.InstanceTypeA2A - InstanceTypeApplyRecoveryPointProviderSpecificInput InstanceType = original.InstanceTypeApplyRecoveryPointProviderSpecificInput - InstanceTypeHyperVReplicaAzure InstanceType = original.InstanceTypeHyperVReplicaAzure - InstanceTypeInMageAzureV2 InstanceType = original.InstanceTypeInMageAzureV2 + InstanceTypeA2A InstanceType = original.InstanceTypeA2A + InstanceTypeAddDisksProviderSpecificInput InstanceType = original.InstanceTypeAddDisksProviderSpecificInput +) + +type InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInput + +const ( + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 ) type InstanceTypeBasicConfigurationSettings = original.InstanceTypeBasicConfigurationSettings @@ -355,6 +369,13 @@ const ( InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput ) +type InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInput + +const ( + InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A + InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput +) + type InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = original.InstanceTypeBasicReplicationProviderSpecificContainerCreationInput const ( @@ -611,6 +632,15 @@ const ( TestMigrationStateTestMigrationSucceeded TestMigrationState = original.TestMigrationStateTestMigrationSucceeded ) +type VMEncryptionType = original.VMEncryptionType + +const ( + NotEncrypted VMEncryptionType = original.NotEncrypted + OnePassEncrypted VMEncryptionType = original.OnePassEncrypted + TwoPassEncrypted VMEncryptionType = original.TwoPassEncrypted +) + +type A2AAddDisksInput = original.A2AAddDisksInput type A2AApplyRecoveryPointInput = original.A2AApplyRecoveryPointInput type A2AContainerCreationInput = original.A2AContainerCreationInput type A2AContainerMappingInput = original.A2AContainerMappingInput @@ -623,15 +653,20 @@ type A2AProtectedDiskDetails = original.A2AProtectedDiskDetails type A2AProtectedManagedDiskDetails = original.A2AProtectedManagedDiskDetails type A2AProtectionContainerMappingDetails = original.A2AProtectionContainerMappingDetails type A2ARecoveryPointDetails = original.A2ARecoveryPointDetails +type A2ARemoveDisksInput = original.A2ARemoveDisksInput type A2AReplicationDetails = original.A2AReplicationDetails type A2AReprotectInput = original.A2AReprotectInput type A2ASwitchProtectionInput = original.A2ASwitchProtectionInput +type A2AUnprotectedDiskDetails = original.A2AUnprotectedDiskDetails type A2AUpdateContainerMappingInput = original.A2AUpdateContainerMappingInput type A2AUpdateReplicationProtectedItemInput = original.A2AUpdateReplicationProtectedItemInput type A2AVMDiskInputDetails = original.A2AVMDiskInputDetails type A2AVMManagedDiskInputDetails = original.A2AVMManagedDiskInputDetails type A2AVMManagedDiskUpdateDetails = original.A2AVMManagedDiskUpdateDetails type ASRTask = original.ASRTask +type AddDisksInput = original.AddDisksInput +type AddDisksInputProperties = original.AddDisksInputProperties +type AddDisksProviderSpecificInput = original.AddDisksProviderSpecificInput type AddRecoveryServicesProviderInput = original.AddRecoveryServicesProviderInput type AddRecoveryServicesProviderInputProperties = original.AddRecoveryServicesProviderInputProperties type AddVCenterRequest = original.AddVCenterRequest @@ -654,6 +689,7 @@ type AzureToAzureUpdateNetworkMappingInput = original.AzureToAzureUpdateNetworkM type AzureToAzureVMSyncedConfigDetails = original.AzureToAzureVMSyncedConfigDetails type AzureVMDiskDetails = original.AzureVMDiskDetails type BaseClient = original.BaseClient +type BasicAddDisksProviderSpecificInput = original.BasicAddDisksProviderSpecificInput type BasicApplyRecoveryPointProviderSpecificInput = original.BasicApplyRecoveryPointProviderSpecificInput type BasicConfigurationSettings = original.BasicConfigurationSettings type BasicDisableProtectionProviderSpecificInput = original.BasicDisableProtectionProviderSpecificInput @@ -677,6 +713,7 @@ type BasicProviderSpecificFailoverInput = original.BasicProviderSpecificFailover type BasicProviderSpecificRecoveryPointDetails = original.BasicProviderSpecificRecoveryPointDetails type BasicRecoveryPlanActionDetails = original.BasicRecoveryPlanActionDetails type BasicRecoveryPlanProviderSpecificFailoverInput = original.BasicRecoveryPlanProviderSpecificFailoverInput +type BasicRemoveDisksProviderSpecificInput = original.BasicRemoveDisksProviderSpecificInput type BasicReplicationProviderSpecificContainerCreationInput = original.BasicReplicationProviderSpecificContainerCreationInput type BasicReplicationProviderSpecificContainerMappingInput = original.BasicReplicationProviderSpecificContainerMappingInput type BasicReplicationProviderSpecificSettings = original.BasicReplicationProviderSpecificSettings @@ -778,9 +815,11 @@ type IdentityProviderInput = original.IdentityProviderInput type InMageAgentDetails = original.InMageAgentDetails type InMageAgentVersionDetails = original.InMageAgentVersionDetails type InMageAzureV2ApplyRecoveryPointInput = original.InMageAzureV2ApplyRecoveryPointInput +type InMageAzureV2DiskInputDetails = original.InMageAzureV2DiskInputDetails type InMageAzureV2EnableProtectionInput = original.InMageAzureV2EnableProtectionInput type InMageAzureV2EventDetails = original.InMageAzureV2EventDetails type InMageAzureV2FailoverProviderInput = original.InMageAzureV2FailoverProviderInput +type InMageAzureV2ManagedDiskDetails = original.InMageAzureV2ManagedDiskDetails type InMageAzureV2PolicyDetails = original.InMageAzureV2PolicyDetails type InMageAzureV2PolicyInput = original.InMageAzureV2PolicyInput type InMageAzureV2ProtectedDiskDetails = original.InMageAzureV2ProtectedDiskDetails @@ -855,6 +894,7 @@ type NetworkMappingProperties = original.NetworkMappingProperties type NetworkProperties = original.NetworkProperties type OSDetails = original.OSDetails type OSDiskDetails = original.OSDiskDetails +type OSVersionWrapper = original.OSVersionWrapper type OperationsClient = original.OperationsClient type OperationsDiscovery = original.OperationsDiscovery type OperationsDiscoveryCollection = original.OperationsDiscoveryCollection @@ -932,11 +972,21 @@ type RecoveryServicesProviderCollection = original.RecoveryServicesProviderColle type RecoveryServicesProviderCollectionIterator = original.RecoveryServicesProviderCollectionIterator type RecoveryServicesProviderCollectionPage = original.RecoveryServicesProviderCollectionPage type RecoveryServicesProviderProperties = original.RecoveryServicesProviderProperties +type RemoveDisksInput = original.RemoveDisksInput +type RemoveDisksInputProperties = original.RemoveDisksInputProperties +type RemoveDisksProviderSpecificInput = original.RemoveDisksProviderSpecificInput type RemoveProtectionContainerMappingInput = original.RemoveProtectionContainerMappingInput type RemoveProtectionContainerMappingInputProperties = original.RemoveProtectionContainerMappingInputProperties type RenewCertificateInput = original.RenewCertificateInput type RenewCertificateInputProperties = original.RenewCertificateInputProperties type ReplicationAlertSettingsClient = original.ReplicationAlertSettingsClient +type ReplicationEligibilityResults = original.ReplicationEligibilityResults +type ReplicationEligibilityResultsClient = original.ReplicationEligibilityResultsClient +type ReplicationEligibilityResultsCollection = original.ReplicationEligibilityResultsCollection +type ReplicationEligibilityResultsErrorInfo = original.ReplicationEligibilityResultsErrorInfo +type ReplicationEligibilityResultsGetFuture = original.ReplicationEligibilityResultsGetFuture +type ReplicationEligibilityResultsListFuture = original.ReplicationEligibilityResultsListFuture +type ReplicationEligibilityResultsProperties = original.ReplicationEligibilityResultsProperties type ReplicationEventsClient = original.ReplicationEventsClient type ReplicationFabricsCheckConsistencyFuture = original.ReplicationFabricsCheckConsistencyFuture type ReplicationFabricsClient = original.ReplicationFabricsClient @@ -975,6 +1025,7 @@ type ReplicationProtectedItemCollection = original.ReplicationProtectedItemColle type ReplicationProtectedItemCollectionIterator = original.ReplicationProtectedItemCollectionIterator type ReplicationProtectedItemCollectionPage = original.ReplicationProtectedItemCollectionPage type ReplicationProtectedItemProperties = original.ReplicationProtectedItemProperties +type ReplicationProtectedItemsAddDisksFuture = original.ReplicationProtectedItemsAddDisksFuture type ReplicationProtectedItemsApplyRecoveryPointFuture = original.ReplicationProtectedItemsApplyRecoveryPointFuture type ReplicationProtectedItemsClient = original.ReplicationProtectedItemsClient type ReplicationProtectedItemsCreateFuture = original.ReplicationProtectedItemsCreateFuture @@ -982,8 +1033,10 @@ type ReplicationProtectedItemsDeleteFuture = original.ReplicationProtectedItemsD type ReplicationProtectedItemsFailoverCommitFuture = original.ReplicationProtectedItemsFailoverCommitFuture type ReplicationProtectedItemsPlannedFailoverFuture = original.ReplicationProtectedItemsPlannedFailoverFuture type ReplicationProtectedItemsPurgeFuture = original.ReplicationProtectedItemsPurgeFuture +type ReplicationProtectedItemsRemoveDisksFuture = original.ReplicationProtectedItemsRemoveDisksFuture type ReplicationProtectedItemsRepairReplicationFuture = original.ReplicationProtectedItemsRepairReplicationFuture type ReplicationProtectedItemsReprotectFuture = original.ReplicationProtectedItemsReprotectFuture +type ReplicationProtectedItemsResolveHealthErrorsFuture = original.ReplicationProtectedItemsResolveHealthErrorsFuture type ReplicationProtectedItemsTestFailoverCleanupFuture = original.ReplicationProtectedItemsTestFailoverCleanupFuture type ReplicationProtectedItemsTestFailoverFuture = original.ReplicationProtectedItemsTestFailoverFuture type ReplicationProtectedItemsUnplannedFailoverFuture = original.ReplicationProtectedItemsUnplannedFailoverFuture @@ -1025,10 +1078,14 @@ type ReplicationStorageClassificationMappingsDeleteFuture = original.Replication type ReplicationStorageClassificationsClient = original.ReplicationStorageClassificationsClient type ReplicationVaultHealthClient = original.ReplicationVaultHealthClient type ReplicationVaultHealthRefreshFuture = original.ReplicationVaultHealthRefreshFuture +type ReplicationVaultSettingClient = original.ReplicationVaultSettingClient type ReplicationvCentersClient = original.ReplicationvCentersClient type ReplicationvCentersCreateFuture = original.ReplicationvCentersCreateFuture type ReplicationvCentersDeleteFuture = original.ReplicationvCentersDeleteFuture type ReplicationvCentersUpdateFuture = original.ReplicationvCentersUpdateFuture +type ResolveHealthError = original.ResolveHealthError +type ResolveHealthInput = original.ResolveHealthInput +type ResolveHealthInputProperties = original.ResolveHealthInputProperties type Resource = original.Resource type ResourceHealthSummary = original.ResourceHealthSummary type ResumeJobParams = original.ResumeJobParams @@ -1055,6 +1112,11 @@ type StorageClassificationMappingProperties = original.StorageClassificationMapp type StorageClassificationProperties = original.StorageClassificationProperties type StorageMappingInputProperties = original.StorageMappingInputProperties type Subnet = original.Subnet +type SupportedOSDetails = original.SupportedOSDetails +type SupportedOSProperties = original.SupportedOSProperties +type SupportedOSProperty = original.SupportedOSProperty +type SupportedOperatingSystems = original.SupportedOperatingSystems +type SupportedOperatingSystemsClient = original.SupportedOperatingSystemsClient type SwitchProtectionInput = original.SwitchProtectionInput type SwitchProtectionInputProperties = original.SwitchProtectionInputProperties type SwitchProtectionJobDetails = original.SwitchProtectionJobDetails @@ -1123,6 +1185,13 @@ type VMwareV2FabricSpecificDetails = original.VMwareV2FabricSpecificDetails type VMwareVirtualMachineDetails = original.VMwareVirtualMachineDetails type VaultHealthDetails = original.VaultHealthDetails type VaultHealthProperties = original.VaultHealthProperties +type VaultSetting = original.VaultSetting +type VaultSettingCollection = original.VaultSettingCollection +type VaultSettingCollectionIterator = original.VaultSettingCollectionIterator +type VaultSettingCollectionPage = original.VaultSettingCollectionPage +type VaultSettingCreationInput = original.VaultSettingCreationInput +type VaultSettingCreationInputProperties = original.VaultSettingCreationInputProperties +type VaultSettingProperties = original.VaultSettingProperties type VersionDetails = original.VersionDetails type VirtualMachineTaskDetails = original.VirtualMachineTaskDetails type VmmDetails = original.VmmDetails @@ -1264,6 +1333,12 @@ func NewReplicationAlertSettingsClient(subscriptionID string, resourceGroupName func NewReplicationAlertSettingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationAlertSettingsClient { return original.NewReplicationAlertSettingsClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) } +func NewReplicationEligibilityResultsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationEligibilityResultsClient { + return original.NewReplicationEligibilityResultsClient(subscriptionID, resourceGroupName, resourceName) +} +func NewReplicationEligibilityResultsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEligibilityResultsClient { + return original.NewReplicationEligibilityResultsClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) +} func NewReplicationEventsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationEventsClient { return original.NewReplicationEventsClient(subscriptionID, resourceGroupName, resourceName) } @@ -1372,6 +1447,12 @@ func NewReplicationVaultHealthClient(subscriptionID string, resourceGroupName st func NewReplicationVaultHealthClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { return original.NewReplicationVaultHealthClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) } +func NewReplicationVaultSettingClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultSettingClient { + return original.NewReplicationVaultSettingClient(subscriptionID, resourceGroupName, resourceName) +} +func NewReplicationVaultSettingClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultSettingClient { + return original.NewReplicationVaultSettingClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) +} func NewReplicationvCentersClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationvCentersClient { return original.NewReplicationvCentersClient(subscriptionID, resourceGroupName, resourceName) } @@ -1390,6 +1471,12 @@ func NewStorageClassificationMappingCollectionIterator(page StorageClassificatio func NewStorageClassificationMappingCollectionPage(getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage { return original.NewStorageClassificationMappingCollectionPage(getNextPage) } +func NewSupportedOperatingSystemsClient(subscriptionID string, resourceGroupName string, resourceName string) SupportedOperatingSystemsClient { + return original.NewSupportedOperatingSystemsClient(subscriptionID, resourceGroupName, resourceName) +} +func NewSupportedOperatingSystemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) SupportedOperatingSystemsClient { + return original.NewSupportedOperatingSystemsClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) +} func NewTargetComputeSizeCollectionIterator(page TargetComputeSizeCollectionPage) TargetComputeSizeCollectionIterator { return original.NewTargetComputeSizeCollectionIterator(page) } @@ -1408,6 +1495,12 @@ func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionI func NewVCenterCollectionPage(getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage { return original.NewVCenterCollectionPage(getNextPage) } +func NewVaultSettingCollectionIterator(page VaultSettingCollectionPage) VaultSettingCollectionIterator { + return original.NewVaultSettingCollectionIterator(page) +} +func NewVaultSettingCollectionPage(getNextPage func(context.Context, VaultSettingCollection) (VaultSettingCollection, error)) VaultSettingCollectionPage { + return original.NewVaultSettingCollectionPage(getNextPage) +} func NewWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) } @@ -1444,12 +1537,18 @@ func PossibleFailoverDeploymentModelValues() []FailoverDeploymentModel { func PossibleHealthErrorCategoryValues() []HealthErrorCategory { return original.PossibleHealthErrorCategoryValues() } +func PossibleHealthErrorCustomerResolvabilityValues() []HealthErrorCustomerResolvability { + return original.PossibleHealthErrorCustomerResolvabilityValues() +} func PossibleHyperVReplicaAzureRpRecoveryPointTypeValues() []HyperVReplicaAzureRpRecoveryPointType { return original.PossibleHyperVReplicaAzureRpRecoveryPointTypeValues() } func PossibleInMageV2RpRecoveryPointTypeValues() []InMageV2RpRecoveryPointType { return original.PossibleInMageV2RpRecoveryPointTypeValues() } +func PossibleInstanceTypeBasicApplyRecoveryPointProviderSpecificInputValues() []InstanceTypeBasicApplyRecoveryPointProviderSpecificInput { + return original.PossibleInstanceTypeBasicApplyRecoveryPointProviderSpecificInputValues() +} func PossibleInstanceTypeBasicConfigurationSettingsValues() []InstanceTypeBasicConfigurationSettings { return original.PossibleInstanceTypeBasicConfigurationSettingsValues() } @@ -1516,6 +1615,9 @@ func PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() []InstanceTypeBa func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput { return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() } +func PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() []InstanceTypeBasicRemoveDisksProviderSpecificInput { + return original.PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() +} func PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues() []InstanceTypeBasicReplicationProviderSpecificContainerCreationInput { return original.PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues() } @@ -1606,6 +1708,9 @@ func PossibleSourceSiteOperationsValues() []SourceSiteOperations { func PossibleTestMigrationStateValues() []TestMigrationState { return original.PossibleTestMigrationStateValues() } +func PossibleVMEncryptionTypeValues() []VMEncryptionType { + return original.PossibleVMEncryptionTypeValues() +} func UserAgent() string { return original.UserAgent() + " profiles/latest" } diff --git a/profiles/latest/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go b/profiles/latest/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go index 874745df4c8e..a14559010360 100644 --- a/profiles/latest/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go +++ b/profiles/latest/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go @@ -19,12 +19,13 @@ package siterecoveryapi -import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/siterecoveryapi" +import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi" type MigrationRecoveryPointsClientAPI = original.MigrationRecoveryPointsClientAPI type OperationsClientAPI = original.OperationsClientAPI type RecoveryPointsClientAPI = original.RecoveryPointsClientAPI type ReplicationAlertSettingsClientAPI = original.ReplicationAlertSettingsClientAPI +type ReplicationEligibilityResultsClientAPI = original.ReplicationEligibilityResultsClientAPI type ReplicationEventsClientAPI = original.ReplicationEventsClientAPI type ReplicationFabricsClientAPI = original.ReplicationFabricsClientAPI type ReplicationJobsClientAPI = original.ReplicationJobsClientAPI @@ -42,5 +43,7 @@ type ReplicationRecoveryServicesProvidersClientAPI = original.ReplicationRecover type ReplicationStorageClassificationMappingsClientAPI = original.ReplicationStorageClassificationMappingsClientAPI type ReplicationStorageClassificationsClientAPI = original.ReplicationStorageClassificationsClientAPI type ReplicationVaultHealthClientAPI = original.ReplicationVaultHealthClientAPI +type ReplicationVaultSettingClientAPI = original.ReplicationVaultSettingClientAPI type ReplicationvCentersClientAPI = original.ReplicationvCentersClientAPI +type SupportedOperatingSystemsClientAPI = original.SupportedOperatingSystemsClientAPI type TargetComputeSizesClientAPI = original.TargetComputeSizesClientAPI diff --git a/profiles/latest/resources/mgmt/managedapplications/managedapplicationsapi/models.go b/profiles/latest/resources/mgmt/managedapplications/managedapplicationsapi/models.go index 5d61ba2e7d61..fc49db2a227e 100644 --- a/profiles/latest/resources/mgmt/managedapplications/managedapplicationsapi/models.go +++ b/profiles/latest/resources/mgmt/managedapplications/managedapplicationsapi/models.go @@ -19,7 +19,9 @@ package managedapplicationsapi -import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/managedapplicationsapi" +import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi" type ApplicationDefinitionsClientAPI = original.ApplicationDefinitionsClientAPI type ApplicationsClientAPI = original.ApplicationsClientAPI +type BaseClientAPI = original.BaseClientAPI +type JitRequestsClientAPI = original.JitRequestsClientAPI diff --git a/profiles/latest/resources/mgmt/managedapplications/models.go b/profiles/latest/resources/mgmt/managedapplications/models.go index 90d8a0f756dd..8d2254d01b66 100644 --- a/profiles/latest/resources/mgmt/managedapplications/models.go +++ b/profiles/latest/resources/mgmt/managedapplications/models.go @@ -22,7 +22,7 @@ package managedapplications import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications" + original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications" ) const ( @@ -44,20 +44,41 @@ const ( ReadOnly ApplicationLockLevel = original.ReadOnly ) +type JitRequestState = original.JitRequestState + +const ( + Approved JitRequestState = original.Approved + Canceled JitRequestState = original.Canceled + Denied JitRequestState = original.Denied + Expired JitRequestState = original.Expired + Failed JitRequestState = original.Failed + NotSpecified JitRequestState = original.NotSpecified + Pending JitRequestState = original.Pending + Timeout JitRequestState = original.Timeout +) + +type JitSchedulingType = original.JitSchedulingType + +const ( + JitSchedulingTypeNotSpecified JitSchedulingType = original.JitSchedulingTypeNotSpecified + JitSchedulingTypeOnce JitSchedulingType = original.JitSchedulingTypeOnce + JitSchedulingTypeRecurring JitSchedulingType = original.JitSchedulingTypeRecurring +) + type ProvisioningState = original.ProvisioningState const ( - Accepted ProvisioningState = original.Accepted - Canceled ProvisioningState = original.Canceled - Created ProvisioningState = original.Created - Creating ProvisioningState = original.Creating - Deleted ProvisioningState = original.Deleted - Deleting ProvisioningState = original.Deleting - Failed ProvisioningState = original.Failed - Ready ProvisioningState = original.Ready - Running ProvisioningState = original.Running - Succeeded ProvisioningState = original.Succeeded - Updating ProvisioningState = original.Updating + ProvisioningStateAccepted ProvisioningState = original.ProvisioningStateAccepted + ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled + ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated + ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating + ProvisioningStateDeleted ProvisioningState = original.ProvisioningStateDeleted + ProvisioningStateDeleting ProvisioningState = original.ProvisioningStateDeleting + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateReady ProvisioningState = original.ProvisioningStateReady + ProvisioningStateRunning ProvisioningState = original.ProvisioningStateRunning + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating ) type ResourceIdentityType = original.ResourceIdentityType @@ -68,6 +89,7 @@ const ( type Application = original.Application type ApplicationArtifact = original.ApplicationArtifact +type ApplicationClientDetails = original.ApplicationClientDetails type ApplicationDefinition = original.ApplicationDefinition type ApplicationDefinitionListResult = original.ApplicationDefinitionListResult type ApplicationDefinitionListResultIterator = original.ApplicationDefinitionListResultIterator @@ -90,10 +112,24 @@ type ApplicationsCreateOrUpdateByIDFuture = original.ApplicationsCreateOrUpdateB type ApplicationsCreateOrUpdateFuture = original.ApplicationsCreateOrUpdateFuture type ApplicationsDeleteByIDFuture = original.ApplicationsDeleteByIDFuture type ApplicationsDeleteFuture = original.ApplicationsDeleteFuture +type ApplicationsRefreshPermissionsFuture = original.ApplicationsRefreshPermissionsFuture type BaseClient = original.BaseClient type ErrorResponse = original.ErrorResponse type GenericResource = original.GenericResource type Identity = original.Identity +type JitAuthorizationPolicies = original.JitAuthorizationPolicies +type JitRequestDefinition = original.JitRequestDefinition +type JitRequestDefinitionListResult = original.JitRequestDefinitionListResult +type JitRequestPatchable = original.JitRequestPatchable +type JitRequestProperties = original.JitRequestProperties +type JitRequestsClient = original.JitRequestsClient +type JitRequestsCreateOrUpdateFuture = original.JitRequestsCreateOrUpdateFuture +type JitSchedulingPolicy = original.JitSchedulingPolicy +type Operation = original.Operation +type OperationDisplay = original.OperationDisplay +type OperationListResult = original.OperationListResult +type OperationListResultIterator = original.OperationListResultIterator +type OperationListResultPage = original.OperationListResultPage type Plan = original.Plan type PlanPatchable = original.PlanPatchable type Resource = original.Resource @@ -126,6 +162,18 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return original.NewApplicationsClientWithBaseURI(baseURI, subscriptionID) } +func NewJitRequestsClient(subscriptionID string) JitRequestsClient { + return original.NewJitRequestsClient(subscriptionID) +} +func NewJitRequestsClientWithBaseURI(baseURI string, subscriptionID string) JitRequestsClient { + return original.NewJitRequestsClientWithBaseURI(baseURI, subscriptionID) +} +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return original.NewOperationListResultIterator(page) +} +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return original.NewOperationListResultPage(getNextPage) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } @@ -135,6 +183,12 @@ func PossibleApplicationArtifactTypeValues() []ApplicationArtifactType { func PossibleApplicationLockLevelValues() []ApplicationLockLevel { return original.PossibleApplicationLockLevelValues() } +func PossibleJitRequestStateValues() []JitRequestState { + return original.PossibleJitRequestStateValues() +} +func PossibleJitSchedulingTypeValues() []JitSchedulingType { + return original.PossibleJitSchedulingTypeValues() +} func PossibleProvisioningStateValues() []ProvisioningState { return original.PossibleProvisioningStateValues() } diff --git a/profiles/latest/servicefabric/servicefabric/models.go b/profiles/latest/servicefabric/servicefabric/models.go index 13113d487398..eba4306a27ce 100644 --- a/profiles/latest/servicefabric/servicefabric/models.go +++ b/profiles/latest/servicefabric/servicefabric/models.go @@ -19,7 +19,7 @@ package servicefabric -import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/6.5/servicefabric" +import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/7.0/servicefabric" const ( DefaultBaseURI = original.DefaultBaseURI @@ -42,6 +42,20 @@ const ( ApplicationPackageCleanupPolicyManual ApplicationPackageCleanupPolicy = original.ApplicationPackageCleanupPolicyManual ) +type ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeState + +const ( + ApplicationResourceUpgradeStateCompletedRollback ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateCompletedRollback + ApplicationResourceUpgradeStateCompletedRollforward ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateCompletedRollforward + ApplicationResourceUpgradeStateFailed ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateFailed + ApplicationResourceUpgradeStateInvalid ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateInvalid + ApplicationResourceUpgradeStateProvisioningTarget ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateProvisioningTarget + ApplicationResourceUpgradeStateRollingBack ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateRollingBack + ApplicationResourceUpgradeStateRollingForward ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateRollingForward + ApplicationResourceUpgradeStateUnprovisioningCurrent ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateUnprovisioningCurrent + ApplicationResourceUpgradeStateUnprovisioningTarget ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateUnprovisioningTarget +) + type ApplicationScopedVolumeKind = original.ApplicationScopedVolumeKind const ( @@ -279,12 +293,14 @@ const ( type DeploymentStatus = original.DeploymentStatus const ( - DeploymentStatusActivating DeploymentStatus = original.DeploymentStatusActivating - DeploymentStatusActive DeploymentStatus = original.DeploymentStatusActive - DeploymentStatusDeactivating DeploymentStatus = original.DeploymentStatusDeactivating - DeploymentStatusDownloading DeploymentStatus = original.DeploymentStatusDownloading - DeploymentStatusInvalid DeploymentStatus = original.DeploymentStatusInvalid - DeploymentStatusUpgrading DeploymentStatus = original.DeploymentStatusUpgrading + DeploymentStatusActivating DeploymentStatus = original.DeploymentStatusActivating + DeploymentStatusActive DeploymentStatus = original.DeploymentStatusActive + DeploymentStatusDeactivating DeploymentStatus = original.DeploymentStatusDeactivating + DeploymentStatusDownloading DeploymentStatus = original.DeploymentStatusDownloading + DeploymentStatusFailed DeploymentStatus = original.DeploymentStatusFailed + DeploymentStatusInvalid DeploymentStatus = original.DeploymentStatusInvalid + DeploymentStatusRanToCompletion DeploymentStatus = original.DeploymentStatusRanToCompletion + DeploymentStatusUpgrading DeploymentStatus = original.DeploymentStatusUpgrading ) type DiagnosticsSinkKind = original.DiagnosticsSinkKind @@ -328,6 +344,20 @@ const ( EntryPointStatusStopping EntryPointStatus = original.EntryPointStatusStopping ) +type EnvironmentVariableType = original.EnvironmentVariableType + +const ( + ClearText EnvironmentVariableType = original.ClearText + KeyVaultReference EnvironmentVariableType = original.KeyVaultReference + SecretValueReference EnvironmentVariableType = original.SecretValueReference +) + +type ExecutionPolicyType = original.ExecutionPolicyType + +const ( + RunToCompletion ExecutionPolicyType = original.RunToCompletion +) + type FabricErrorCodes = original.FabricErrorCodes const ( @@ -569,6 +599,14 @@ const ( HostTypeInvalid HostType = original.HostTypeInvalid ) +type ImageRegistryPasswordType = original.ImageRegistryPasswordType + +const ( + ImageRegistryPasswordTypeClearText ImageRegistryPasswordType = original.ImageRegistryPasswordTypeClearText + ImageRegistryPasswordTypeKeyVaultReference ImageRegistryPasswordType = original.ImageRegistryPasswordTypeKeyVaultReference + ImageRegistryPasswordTypeSecretValueReference ImageRegistryPasswordType = original.ImageRegistryPasswordTypeSecretValueReference +) + type ImpactLevel = original.ImpactLevel const ( @@ -856,10 +894,11 @@ const ( type MoveCost = original.MoveCost const ( - High MoveCost = original.High - Low MoveCost = original.Low - Medium MoveCost = original.Medium - Zero MoveCost = original.Zero + High MoveCost = original.High + Low MoveCost = original.Low + Medium MoveCost = original.Medium + VeryHigh MoveCost = original.VeryHigh + Zero MoveCost = original.Zero ) type NetworkKind = original.NetworkKind @@ -1169,6 +1208,13 @@ const ( RestartPartitionModeOnlyActiveSecondaries RestartPartitionMode = original.RestartPartitionModeOnlyActiveSecondaries ) +type RestartPolicy = original.RestartPolicy + +const ( + Never RestartPolicy = original.Never + OnFailure RestartPolicy = original.OnFailure +) + type RestoreState = original.RestoreState const ( @@ -1205,6 +1251,15 @@ const ( RetentionPolicyTypeRetentionPolicyDescription RetentionPolicyTypeBasicBasicRetentionPolicyDescription = original.RetentionPolicyTypeRetentionPolicyDescription ) +type RollingUpgradeMode = original.RollingUpgradeMode + +const ( + RollingUpgradeModeInvalid RollingUpgradeMode = original.RollingUpgradeModeInvalid + RollingUpgradeModeMonitored RollingUpgradeMode = original.RollingUpgradeModeMonitored + RollingUpgradeModeUnmonitoredAuto RollingUpgradeMode = original.RollingUpgradeModeUnmonitoredAuto + RollingUpgradeModeUnmonitoredManual RollingUpgradeMode = original.RollingUpgradeModeUnmonitoredManual +) + type SafetyCheckKind = original.SafetyCheckKind const ( @@ -1242,10 +1297,18 @@ const ( ScheduleKindTimeBased ScheduleKind = original.ScheduleKindTimeBased ) +type Scheme = original.Scheme + +const ( + HTTP Scheme = original.HTTP + HTTPS Scheme = original.HTTPS +) + type SecretKind = original.SecretKind const ( - InlinedValue SecretKind = original.InlinedValue + InlinedValue SecretKind = original.InlinedValue + KeyVaultVersionedReference SecretKind = original.KeyVaultVersionedReference ) type ServiceCorrelationScheme = original.ServiceCorrelationScheme @@ -1433,6 +1496,14 @@ const ( ServiceTypeRegistrationStatusRegistered ServiceTypeRegistrationStatus = original.ServiceTypeRegistrationStatusRegistered ) +type SettingType = original.SettingType + +const ( + SettingTypeClearText SettingType = original.SettingTypeClearText + SettingTypeKeyVaultReference SettingType = original.SettingTypeKeyVaultReference + SettingTypeSecretValueReference SettingType = original.SettingTypeSecretValueReference +) + type SizeTypes = original.SizeTypes const ( @@ -1473,6 +1544,13 @@ const ( TypeServicePlacementPolicyDescription Type = original.TypeServicePlacementPolicyDescription ) +type TypeBasicExecutionPolicy = original.TypeBasicExecutionPolicy + +const ( + TypeExecutionPolicy TypeBasicExecutionPolicy = original.TypeExecutionPolicy + TypeRunToCompletion TypeBasicExecutionPolicy = original.TypeRunToCompletion +) + type UpgradeDomainState = original.UpgradeDomainState const ( @@ -1567,6 +1645,7 @@ type ApplicationParameter = original.ApplicationParameter type ApplicationProcessExitedEvent = original.ApplicationProcessExitedEvent type ApplicationProperties = original.ApplicationProperties type ApplicationResourceDescription = original.ApplicationResourceDescription +type ApplicationResourceUpgradeProgressInfo = original.ApplicationResourceUpgradeProgressInfo type ApplicationScopedVolume = original.ApplicationScopedVolume type ApplicationScopedVolumeCreationParameters = original.ApplicationScopedVolumeCreationParameters type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk = original.ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk @@ -1619,6 +1698,7 @@ type BasicClusterEvent = original.BasicClusterEvent type BasicDeployedServiceReplicaDetailInfo = original.BasicDeployedServiceReplicaDetailInfo type BasicDeployedServiceReplicaInfo = original.BasicDeployedServiceReplicaInfo type BasicDiagnosticsSinkProperties = original.BasicDiagnosticsSinkProperties +type BasicExecutionPolicy = original.BasicExecutionPolicy type BasicFabricEvent = original.BasicFabricEvent type BasicHealthEvaluation = original.BasicHealthEvaluation type BasicNetworkResourceProperties = original.BasicNetworkResourceProperties @@ -1706,6 +1786,7 @@ type CodePackageEntryPointStatistics = original.CodePackageEntryPointStatistics type ComposeDeploymentStatusInfo = original.ComposeDeploymentStatusInfo type ComposeDeploymentUpgradeDescription = original.ComposeDeploymentUpgradeDescription type ComposeDeploymentUpgradeProgressInfo = original.ComposeDeploymentUpgradeProgressInfo +type ConfigParameterOverride = original.ConfigParameterOverride type ContainerAPIRequestBody = original.ContainerAPIRequestBody type ContainerAPIResponse = original.ContainerAPIResponse type ContainerAPIResult = original.ContainerAPIResult @@ -1755,6 +1836,7 @@ type DiagnosticsDescription = original.DiagnosticsDescription type DiagnosticsRef = original.DiagnosticsRef type DiagnosticsSinkProperties = original.DiagnosticsSinkProperties type DisableBackupDescription = original.DisableBackupDescription +type DiskInfo = original.DiskInfo type DoublePropertyValue = original.DoublePropertyValue type EnableBackupDescription = original.EnableBackupDescription type EndpointProperties = original.EndpointProperties @@ -1770,6 +1852,7 @@ type EnvironmentVariable = original.EnvironmentVariable type Epoch = original.Epoch type EventHealthEvaluation = original.EventHealthEvaluation type ExecutingFaultsChaosEvent = original.ExecutingFaultsChaosEvent +type ExecutionPolicy = original.ExecutionPolicy type ExternalStoreProvisionApplicationTypeDescription = original.ExternalStoreProvisionApplicationTypeDescription type FabricCodeVersionInfo = original.FabricCodeVersionInfo type FabricConfigVersionInfo = original.FabricConfigVersionInfo @@ -1808,6 +1891,7 @@ type IdentityItemDescription = original.IdentityItemDescription type ImageRegistryCredential = original.ImageRegistryCredential type ImageStoreContent = original.ImageStoreContent type ImageStoreCopyDescription = original.ImageStoreCopyDescription +type ImageStoreInfo = original.ImageStoreInfo type InlinedValueSecretResourceProperties = original.InlinedValueSecretResourceProperties type Int64PropertyValue = original.Int64PropertyValue type Int64RangePartitionInformation = original.Int64RangePartitionInformation @@ -1816,6 +1900,7 @@ type InvokeQuorumLossResult = original.InvokeQuorumLossResult type KeyValueStoreReplicaStatus = original.KeyValueStoreReplicaStatus type ListApplicationEvent = original.ListApplicationEvent type ListClusterEvent = original.ListClusterEvent +type ListConfigParameterOverride = original.ListConfigParameterOverride type ListContainerInstanceEvent = original.ListContainerInstanceEvent type ListDeployedCodePackageInfo = original.ListDeployedCodePackageInfo type ListDeployedServicePackageInfo = original.ListDeployedServicePackageInfo @@ -1936,6 +2021,11 @@ type PartitionSafetyCheck = original.PartitionSafetyCheck type PartitionSchemeDescription = original.PartitionSchemeDescription type PartitionsHealthEvaluation = original.PartitionsHealthEvaluation type PrimaryReplicatorStatus = original.PrimaryReplicatorStatus +type Probe = original.Probe +type ProbeExec = original.ProbeExec +type ProbeHTTPGet = original.ProbeHTTPGet +type ProbeHTTPGetHeaders = original.ProbeHTTPGetHeaders +type ProbeTCPSocket = original.ProbeTCPSocket type PropertyBatchDescriptionList = original.PropertyBatchDescriptionList type PropertyBatchInfo = original.PropertyBatchInfo type PropertyBatchInfoModel = original.PropertyBatchInfoModel @@ -1991,6 +2081,7 @@ type ResumeApplicationUpgradeDescription = original.ResumeApplicationUpgradeDesc type ResumeClusterUpgradeDescription = original.ResumeClusterUpgradeDescription type RetentionPolicyDescription = original.RetentionPolicyDescription type RollingUpgradeUpdateDescription = original.RollingUpgradeUpdateDescription +type RunToCompletionExecutionPolicy = original.RunToCompletionExecutionPolicy type SafetyCheck = original.SafetyCheck type SafetyCheckWrapper = original.SafetyCheckWrapper type ScalingMechanismDescription = original.ScalingMechanismDescription @@ -2050,6 +2141,7 @@ type ServiceTypeHealthPolicyMapItem = original.ServiceTypeHealthPolicyMapItem type ServiceTypeInfo = original.ServiceTypeInfo type ServiceTypeManifest = original.ServiceTypeManifest type ServiceUpdateDescription = original.ServiceUpdateDescription +type ServiceUpgradeProgress = original.ServiceUpgradeProgress type ServicesHealthEvaluation = original.ServicesHealthEvaluation type Setting = original.Setting type SingletonPartitionInformation = original.SingletonPartitionInformation @@ -2099,6 +2191,7 @@ type UpgradeOrchestrationServiceStateSummary = original.UpgradeOrchestrationServ type UploadChunkRange = original.UploadChunkRange type UploadSession = original.UploadSession type UploadSessionInfo = original.UploadSessionInfo +type UsageInfo = original.UsageInfo type ValidationFailedChaosEvent = original.ValidationFailedChaosEvent type VolumeProperties = original.VolumeProperties type VolumeProviderParametersAzureFile = original.VolumeProviderParametersAzureFile @@ -2176,6 +2269,9 @@ func PossibleApplicationDefinitionKindValues() []ApplicationDefinitionKind { func PossibleApplicationPackageCleanupPolicyValues() []ApplicationPackageCleanupPolicy { return original.PossibleApplicationPackageCleanupPolicyValues() } +func PossibleApplicationResourceUpgradeStateValues() []ApplicationResourceUpgradeState { + return original.PossibleApplicationResourceUpgradeStateValues() +} func PossibleApplicationScopedVolumeKindValues() []ApplicationScopedVolumeKind { return original.PossibleApplicationScopedVolumeKindValues() } @@ -2269,6 +2365,12 @@ func PossibleEntityKindValues() []EntityKind { func PossibleEntryPointStatusValues() []EntryPointStatus { return original.PossibleEntryPointStatusValues() } +func PossibleEnvironmentVariableTypeValues() []EnvironmentVariableType { + return original.PossibleEnvironmentVariableTypeValues() +} +func PossibleExecutionPolicyTypeValues() []ExecutionPolicyType { + return original.PossibleExecutionPolicyTypeValues() +} func PossibleFabricErrorCodesValues() []FabricErrorCodes { return original.PossibleFabricErrorCodesValues() } @@ -2299,6 +2401,9 @@ func PossibleHostIsolationModeValues() []HostIsolationMode { func PossibleHostTypeValues() []HostType { return original.PossibleHostTypeValues() } +func PossibleImageRegistryPasswordTypeValues() []ImageRegistryPasswordType { + return original.PossibleImageRegistryPasswordTypeValues() +} func PossibleImpactLevelValues() []ImpactLevel { return original.PossibleImpactLevelValues() } @@ -2470,6 +2575,9 @@ func PossibleResourceStatusValues() []ResourceStatus { func PossibleRestartPartitionModeValues() []RestartPartitionMode { return original.PossibleRestartPartitionModeValues() } +func PossibleRestartPolicyValues() []RestartPolicy { + return original.PossibleRestartPolicyValues() +} func PossibleRestoreStateValues() []RestoreState { return original.PossibleRestoreStateValues() } @@ -2482,6 +2590,9 @@ func PossibleRetentionPolicyTypeBasicBasicRetentionPolicyDescriptionValues() []R func PossibleRetentionPolicyTypeValues() []RetentionPolicyType { return original.PossibleRetentionPolicyTypeValues() } +func PossibleRollingUpgradeModeValues() []RollingUpgradeMode { + return original.PossibleRollingUpgradeModeValues() +} func PossibleSafetyCheckKindValues() []SafetyCheckKind { return original.PossibleSafetyCheckKindValues() } @@ -2494,6 +2605,9 @@ func PossibleScalingTriggerKindValues() []ScalingTriggerKind { func PossibleScheduleKindValues() []ScheduleKind { return original.PossibleScheduleKindValues() } +func PossibleSchemeValues() []Scheme { + return original.PossibleSchemeValues() +} func PossibleSecretKindValues() []SecretKind { return original.PossibleSecretKindValues() } @@ -2560,6 +2674,9 @@ func PossibleServiceStatusValues() []ServiceStatus { func PossibleServiceTypeRegistrationStatusValues() []ServiceTypeRegistrationStatus { return original.PossibleServiceTypeRegistrationStatusValues() } +func PossibleSettingTypeValues() []SettingType { + return original.PossibleSettingTypeValues() +} func PossibleSizeTypesValues() []SizeTypes { return original.PossibleSizeTypesValues() } @@ -2569,6 +2686,9 @@ func PossibleStateValues() []State { func PossibleStorageKindValues() []StorageKind { return original.PossibleStorageKindValues() } +func PossibleTypeBasicExecutionPolicyValues() []TypeBasicExecutionPolicy { + return original.PossibleTypeBasicExecutionPolicyValues() +} func PossibleTypeValues() []Type { return original.PossibleTypeValues() } diff --git a/profiles/latest/servicefabric/servicefabric/servicefabricapi/models.go b/profiles/latest/servicefabric/servicefabric/servicefabricapi/models.go index 8e0223c3b3de..46a6f3d6ad84 100644 --- a/profiles/latest/servicefabric/servicefabric/servicefabricapi/models.go +++ b/profiles/latest/servicefabric/servicefabric/servicefabricapi/models.go @@ -19,7 +19,7 @@ package servicefabricapi -import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/6.5/servicefabric/servicefabricapi" +import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/7.0/servicefabric/servicefabricapi" type BaseClientAPI = original.BaseClientAPI type MeshApplicationClientAPI = original.MeshApplicationClientAPI diff --git a/profiles/latest/storage/mgmt/storage/models.go b/profiles/latest/storage/mgmt/storage/models.go index d81a72ad6dd0..c1a82e06f0b3 100644 --- a/profiles/latest/storage/mgmt/storage/models.go +++ b/profiles/latest/storage/mgmt/storage/models.go @@ -240,6 +240,13 @@ const ( QuotaID ReasonCode = original.QuotaID ) +type RoutingChoice = original.RoutingChoice + +const ( + InternetRouting RoutingChoice = original.InternetRouting + MicrosoftRouting RoutingChoice = original.MicrosoftRouting +) + type Services = original.Services const ( @@ -310,11 +317,13 @@ const ( type Account = original.Account type AccountCheckNameAvailabilityParameters = original.AccountCheckNameAvailabilityParameters type AccountCreateParameters = original.AccountCreateParameters +type AccountInternetEndpoints = original.AccountInternetEndpoints type AccountKey = original.AccountKey type AccountListKeysResult = original.AccountListKeysResult type AccountListResult = original.AccountListResult type AccountListResultIterator = original.AccountListResultIterator type AccountListResultPage = original.AccountListResultPage +type AccountMicrosoftEndpoints = original.AccountMicrosoftEndpoints type AccountProperties = original.AccountProperties type AccountPropertiesCreateParameters = original.AccountPropertiesCreateParameters type AccountPropertiesUpdateParameters = original.AccountPropertiesUpdateParameters @@ -408,10 +417,12 @@ type PrivateLinkServiceConnectionState = original.PrivateLinkServiceConnectionSt type ProxyResource = original.ProxyResource type Resource = original.Resource type Restriction = original.Restriction +type RoutingPreference = original.RoutingPreference type SKUCapability = original.SKUCapability type ServiceSasParameters = original.ServiceSasParameters type ServiceSpecification = original.ServiceSpecification type Sku = original.Sku +type SkuInformation = original.SkuInformation type SkuListResult = original.SkuListResult type SkusClient = original.SkusClient type TagProperty = original.TagProperty @@ -594,6 +605,9 @@ func PossibleReasonCodeValues() []ReasonCode { func PossibleReasonValues() []Reason { return original.PossibleReasonValues() } +func PossibleRoutingChoiceValues() []RoutingChoice { + return original.PossibleRoutingChoiceValues() +} func PossibleServicesValues() []Services { return original.PossibleServicesValues() } diff --git a/profiles/preview/azurestack/mgmt/azurestack/models.go b/profiles/preview/azurestack/mgmt/azurestack/models.go index c7c59493bcf9..b9966e784a6d 100644 --- a/profiles/preview/azurestack/mgmt/azurestack/models.go +++ b/profiles/preview/azurestack/mgmt/azurestack/models.go @@ -29,6 +29,28 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type Category = original.Category + +const ( + ADFS Category = original.ADFS + AzureAD Category = original.AzureAD +) + +type CompatibilityIssue = original.CompatibilityIssue + +const ( + ADFSIdentitySystemRequired CompatibilityIssue = original.ADFSIdentitySystemRequired + AzureADIdentitySystemRequired CompatibilityIssue = original.AzureADIdentitySystemRequired + CapacityBillingModelRequired CompatibilityIssue = original.CapacityBillingModelRequired + ConnectionToAzureRequired CompatibilityIssue = original.ConnectionToAzureRequired + ConnectionToInternetRequired CompatibilityIssue = original.ConnectionToInternetRequired + DevelopmentBillingModelRequired CompatibilityIssue = original.DevelopmentBillingModelRequired + DisconnectedEnvironmentRequired CompatibilityIssue = original.DisconnectedEnvironmentRequired + HigherDeviceVersionRequired CompatibilityIssue = original.HigherDeviceVersionRequired + LowerDeviceVersionRequired CompatibilityIssue = original.LowerDeviceVersionRequired + PayAsYouGoBillingModelRequired CompatibilityIssue = original.PayAsYouGoBillingModelRequired +) + type ComputeRole = original.ComputeRole const ( @@ -62,6 +84,7 @@ const ( type ActivationKeyResult = original.ActivationKeyResult type BaseClient = original.BaseClient +type Compatibility = original.Compatibility type CustomerSubscription = original.CustomerSubscription type CustomerSubscriptionList = original.CustomerSubscriptionList type CustomerSubscriptionListIterator = original.CustomerSubscriptionListIterator @@ -69,12 +92,14 @@ type CustomerSubscriptionListPage = original.CustomerSubscriptionListPage type CustomerSubscriptionProperties = original.CustomerSubscriptionProperties type CustomerSubscriptionsClient = original.CustomerSubscriptionsClient type DataDiskImage = original.DataDiskImage +type DeviceConfiguration = original.DeviceConfiguration type Display = original.Display type ErrorDetails = original.ErrorDetails type ErrorResponse = original.ErrorResponse type ExtendedProduct = original.ExtendedProduct type ExtendedProductProperties = original.ExtendedProductProperties type IconUris = original.IconUris +type MarketplaceProductLogUpdate = original.MarketplaceProductLogUpdate type Operation = original.Operation type OperationList = original.OperationList type OperationListIterator = original.OperationListIterator @@ -86,6 +111,7 @@ type ProductLink = original.ProductLink type ProductList = original.ProductList type ProductListIterator = original.ProductListIterator type ProductListPage = original.ProductListPage +type ProductLog = original.ProductLog type ProductNestedProperties = original.ProductNestedProperties type ProductProperties = original.ProductProperties type ProductsClient = original.ProductsClient @@ -157,6 +183,12 @@ func NewRegistrationsClientWithBaseURI(baseURI string, subscriptionID string) Re func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleCategoryValues() []Category { + return original.PossibleCategoryValues() +} +func PossibleCompatibilityIssueValues() []CompatibilityIssue { + return original.PossibleCompatibilityIssueValues() +} func PossibleComputeRoleValues() []ComputeRole { return original.PossibleComputeRoleValues() } diff --git a/profiles/preview/compute/mgmt/compute/models.go b/profiles/preview/compute/mgmt/compute/models.go index 5c8d68562042..7f529528affb 100644 --- a/profiles/preview/compute/mgmt/compute/models.go +++ b/profiles/preview/compute/mgmt/compute/models.go @@ -471,6 +471,7 @@ type VirtualMachinePriorityTypes = original.VirtualMachinePriorityTypes const ( Low VirtualMachinePriorityTypes = original.Low Regular VirtualMachinePriorityTypes = original.Regular + Spot VirtualMachinePriorityTypes = original.Spot ) type VirtualMachineScaleSetScaleInRules = original.VirtualMachineScaleSetScaleInRules @@ -760,24 +761,29 @@ type EncryptionSettingsElement = original.EncryptionSettingsElement type GalleriesClient = original.GalleriesClient type GalleriesCreateOrUpdateFuture = original.GalleriesCreateOrUpdateFuture type GalleriesDeleteFuture = original.GalleriesDeleteFuture +type GalleriesUpdateFuture = original.GalleriesUpdateFuture type Gallery = original.Gallery type GalleryApplication = original.GalleryApplication type GalleryApplicationList = original.GalleryApplicationList type GalleryApplicationListIterator = original.GalleryApplicationListIterator type GalleryApplicationListPage = original.GalleryApplicationListPage type GalleryApplicationProperties = original.GalleryApplicationProperties +type GalleryApplicationUpdate = original.GalleryApplicationUpdate type GalleryApplicationVersion = original.GalleryApplicationVersion type GalleryApplicationVersionList = original.GalleryApplicationVersionList type GalleryApplicationVersionListIterator = original.GalleryApplicationVersionListIterator type GalleryApplicationVersionListPage = original.GalleryApplicationVersionListPage type GalleryApplicationVersionProperties = original.GalleryApplicationVersionProperties type GalleryApplicationVersionPublishingProfile = original.GalleryApplicationVersionPublishingProfile +type GalleryApplicationVersionUpdate = original.GalleryApplicationVersionUpdate type GalleryApplicationVersionsClient = original.GalleryApplicationVersionsClient type GalleryApplicationVersionsCreateOrUpdateFuture = original.GalleryApplicationVersionsCreateOrUpdateFuture type GalleryApplicationVersionsDeleteFuture = original.GalleryApplicationVersionsDeleteFuture +type GalleryApplicationVersionsUpdateFuture = original.GalleryApplicationVersionsUpdateFuture type GalleryApplicationsClient = original.GalleryApplicationsClient type GalleryApplicationsCreateOrUpdateFuture = original.GalleryApplicationsCreateOrUpdateFuture type GalleryApplicationsDeleteFuture = original.GalleryApplicationsDeleteFuture +type GalleryApplicationsUpdateFuture = original.GalleryApplicationsUpdateFuture type GalleryArtifactPublishingProfileBase = original.GalleryArtifactPublishingProfileBase type GalleryArtifactSource = original.GalleryArtifactSource type GalleryArtifactVersionSource = original.GalleryArtifactVersionSource @@ -790,6 +796,7 @@ type GalleryImageList = original.GalleryImageList type GalleryImageListIterator = original.GalleryImageListIterator type GalleryImageListPage = original.GalleryImageListPage type GalleryImageProperties = original.GalleryImageProperties +type GalleryImageUpdate = original.GalleryImageUpdate type GalleryImageVersion = original.GalleryImageVersion type GalleryImageVersionList = original.GalleryImageVersionList type GalleryImageVersionListIterator = original.GalleryImageVersionListIterator @@ -797,17 +804,21 @@ type GalleryImageVersionListPage = original.GalleryImageVersionListPage type GalleryImageVersionProperties = original.GalleryImageVersionProperties type GalleryImageVersionPublishingProfile = original.GalleryImageVersionPublishingProfile type GalleryImageVersionStorageProfile = original.GalleryImageVersionStorageProfile +type GalleryImageVersionUpdate = original.GalleryImageVersionUpdate type GalleryImageVersionsClient = original.GalleryImageVersionsClient type GalleryImageVersionsCreateOrUpdateFuture = original.GalleryImageVersionsCreateOrUpdateFuture type GalleryImageVersionsDeleteFuture = original.GalleryImageVersionsDeleteFuture +type GalleryImageVersionsUpdateFuture = original.GalleryImageVersionsUpdateFuture type GalleryImagesClient = original.GalleryImagesClient type GalleryImagesCreateOrUpdateFuture = original.GalleryImagesCreateOrUpdateFuture type GalleryImagesDeleteFuture = original.GalleryImagesDeleteFuture +type GalleryImagesUpdateFuture = original.GalleryImagesUpdateFuture type GalleryList = original.GalleryList type GalleryListIterator = original.GalleryListIterator type GalleryListPage = original.GalleryListPage type GalleryOSDiskImage = original.GalleryOSDiskImage type GalleryProperties = original.GalleryProperties +type GalleryUpdate = original.GalleryUpdate type GrantAccessData = original.GrantAccessData type HardwareProfile = original.HardwareProfile type Image = original.Image @@ -980,9 +991,11 @@ type VirtualMachineScaleSetExtensionListResultIterator = original.VirtualMachine type VirtualMachineScaleSetExtensionListResultPage = original.VirtualMachineScaleSetExtensionListResultPage type VirtualMachineScaleSetExtensionProfile = original.VirtualMachineScaleSetExtensionProfile type VirtualMachineScaleSetExtensionProperties = original.VirtualMachineScaleSetExtensionProperties +type VirtualMachineScaleSetExtensionUpdate = original.VirtualMachineScaleSetExtensionUpdate type VirtualMachineScaleSetExtensionsClient = original.VirtualMachineScaleSetExtensionsClient type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture = original.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture type VirtualMachineScaleSetExtensionsDeleteFuture = original.VirtualMachineScaleSetExtensionsDeleteFuture +type VirtualMachineScaleSetExtensionsUpdateFuture = original.VirtualMachineScaleSetExtensionsUpdateFuture type VirtualMachineScaleSetIPConfiguration = original.VirtualMachineScaleSetIPConfiguration type VirtualMachineScaleSetIPConfigurationProperties = original.VirtualMachineScaleSetIPConfigurationProperties type VirtualMachineScaleSetIPTag = original.VirtualMachineScaleSetIPTag diff --git a/profiles/preview/containerregistry/mgmt/containerregistry/containerregistryapi/models.go b/profiles/preview/containerregistry/mgmt/containerregistry/containerregistryapi/models.go index 1d33365b1341..245afa60d062 100644 --- a/profiles/preview/containerregistry/mgmt/containerregistry/containerregistryapi/models.go +++ b/profiles/preview/containerregistry/mgmt/containerregistry/containerregistryapi/models.go @@ -26,6 +26,7 @@ type RegistriesClientAPI = original.RegistriesClientAPI type ReplicationsClientAPI = original.ReplicationsClientAPI type RunsClientAPI = original.RunsClientAPI type ScopeMapsClientAPI = original.ScopeMapsClientAPI +type TaskRunsClientAPI = original.TaskRunsClientAPI type TasksClientAPI = original.TasksClientAPI type TokensClientAPI = original.TokensClientAPI type WebhooksClientAPI = original.WebhooksClientAPI diff --git a/profiles/preview/containerregistry/mgmt/containerregistry/models.go b/profiles/preview/containerregistry/mgmt/containerregistry/models.go index 39b34d0ed182..4f7281c43d3c 100644 --- a/profiles/preview/containerregistry/mgmt/containerregistry/models.go +++ b/profiles/preview/containerregistry/mgmt/containerregistry/models.go @@ -318,6 +318,8 @@ type DockerBuildStepUpdateParameters = original.DockerBuildStepUpdateParameters type EncodedTaskRunRequest = original.EncodedTaskRunRequest type EncodedTaskStep = original.EncodedTaskStep type EncodedTaskStepUpdateParameters = original.EncodedTaskStepUpdateParameters +type Error = original.Error +type ErrorSchema = original.ErrorSchema type Event = original.Event type EventContent = original.EventContent type EventInfo = original.EventInfo @@ -431,7 +433,18 @@ type TaskListResultIterator = original.TaskListResultIterator type TaskListResultPage = original.TaskListResultPage type TaskProperties = original.TaskProperties type TaskPropertiesUpdateParameters = original.TaskPropertiesUpdateParameters +type TaskRun = original.TaskRun +type TaskRunListResult = original.TaskRunListResult +type TaskRunListResultIterator = original.TaskRunListResultIterator +type TaskRunListResultPage = original.TaskRunListResultPage +type TaskRunProperties = original.TaskRunProperties +type TaskRunPropertiesUpdateParameters = original.TaskRunPropertiesUpdateParameters type TaskRunRequest = original.TaskRunRequest +type TaskRunUpdateParameters = original.TaskRunUpdateParameters +type TaskRunsClient = original.TaskRunsClient +type TaskRunsCreateFuture = original.TaskRunsCreateFuture +type TaskRunsDeleteFuture = original.TaskRunsDeleteFuture +type TaskRunsUpdateFuture = original.TaskRunsUpdateFuture type TaskStepProperties = original.TaskStepProperties type TaskStepUpdateParameters = original.TaskStepUpdateParameters type TaskUpdateParameters = original.TaskUpdateParameters @@ -550,6 +563,18 @@ func NewTaskListResultIterator(page TaskListResultPage) TaskListResultIterator { func NewTaskListResultPage(getNextPage func(context.Context, TaskListResult) (TaskListResult, error)) TaskListResultPage { return original.NewTaskListResultPage(getNextPage) } +func NewTaskRunListResultIterator(page TaskRunListResultPage) TaskRunListResultIterator { + return original.NewTaskRunListResultIterator(page) +} +func NewTaskRunListResultPage(getNextPage func(context.Context, TaskRunListResult) (TaskRunListResult, error)) TaskRunListResultPage { + return original.NewTaskRunListResultPage(getNextPage) +} +func NewTaskRunsClient(subscriptionID string) TaskRunsClient { + return original.NewTaskRunsClient(subscriptionID) +} +func NewTaskRunsClientWithBaseURI(baseURI string, subscriptionID string) TaskRunsClient { + return original.NewTaskRunsClientWithBaseURI(baseURI, subscriptionID) +} func NewTasksClient(subscriptionID string) TasksClient { return original.NewTasksClient(subscriptionID) } diff --git a/profiles/preview/cosmos-db/mgmt/documentdb/models.go b/profiles/preview/cosmos-db/mgmt/documentdb/models.go index a72781230e11..867d346f99a2 100644 --- a/profiles/preview/cosmos-db/mgmt/documentdb/models.go +++ b/profiles/preview/cosmos-db/mgmt/documentdb/models.go @@ -29,6 +29,13 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type CompositePathSortOrder = original.CompositePathSortOrder + +const ( + Ascending CompositePathSortOrder = original.Ascending + Descending CompositePathSortOrder = original.Descending +) + type ConflictResolutionMode = original.ConflictResolutionMode const ( @@ -120,6 +127,15 @@ const ( PrimaryAggregationTypeTotal PrimaryAggregationType = original.PrimaryAggregationTypeTotal ) +type SpatialType = original.SpatialType + +const ( + SpatialTypeLineString SpatialType = original.SpatialTypeLineString + SpatialTypeMultiPolygon SpatialType = original.SpatialTypeMultiPolygon + SpatialTypePoint SpatialType = original.SpatialTypePoint + SpatialTypePolygon SpatialType = original.SpatialTypePolygon +) + type TriggerOperation = original.TriggerOperation const ( @@ -156,6 +172,7 @@ type Capability = original.Capability type CassandraKeyspaceCreateUpdateParameters = original.CassandraKeyspaceCreateUpdateParameters type CassandraKeyspaceCreateUpdateProperties = original.CassandraKeyspaceCreateUpdateProperties type CassandraKeyspaceGetProperties = original.CassandraKeyspaceGetProperties +type CassandraKeyspaceGetPropertiesResource = original.CassandraKeyspaceGetPropertiesResource type CassandraKeyspaceGetResults = original.CassandraKeyspaceGetResults type CassandraKeyspaceListResult = original.CassandraKeyspaceListResult type CassandraKeyspaceResource = original.CassandraKeyspaceResource @@ -171,6 +188,7 @@ type CassandraSchema = original.CassandraSchema type CassandraTableCreateUpdateParameters = original.CassandraTableCreateUpdateParameters type CassandraTableCreateUpdateProperties = original.CassandraTableCreateUpdateProperties type CassandraTableGetProperties = original.CassandraTableGetProperties +type CassandraTableGetPropertiesResource = original.CassandraTableGetPropertiesResource type CassandraTableGetResults = original.CassandraTableGetResults type CassandraTableListResult = original.CassandraTableListResult type CassandraTableResource = original.CassandraTableResource @@ -180,6 +198,7 @@ type CollectionPartitionClient = original.CollectionPartitionClient type CollectionPartitionRegionClient = original.CollectionPartitionRegionClient type CollectionRegionClient = original.CollectionRegionClient type Column = original.Column +type CompositePath = original.CompositePath type ConflictResolutionPolicy = original.ConflictResolutionPolicy type ConsistencyPolicy = original.ConsistencyPolicy type ContainerPartitionKey = original.ContainerPartitionKey @@ -213,12 +232,14 @@ type FailoverPolicy = original.FailoverPolicy type GremlinDatabaseCreateUpdateParameters = original.GremlinDatabaseCreateUpdateParameters type GremlinDatabaseCreateUpdateProperties = original.GremlinDatabaseCreateUpdateProperties type GremlinDatabaseGetProperties = original.GremlinDatabaseGetProperties +type GremlinDatabaseGetPropertiesResource = original.GremlinDatabaseGetPropertiesResource type GremlinDatabaseGetResults = original.GremlinDatabaseGetResults type GremlinDatabaseListResult = original.GremlinDatabaseListResult type GremlinDatabaseResource = original.GremlinDatabaseResource type GremlinGraphCreateUpdateParameters = original.GremlinGraphCreateUpdateParameters type GremlinGraphCreateUpdateProperties = original.GremlinGraphCreateUpdateProperties type GremlinGraphGetProperties = original.GremlinGraphGetProperties +type GremlinGraphGetPropertiesResource = original.GremlinGraphGetPropertiesResource type GremlinGraphGetResults = original.GremlinGraphGetResults type GremlinGraphListResult = original.GremlinGraphListResult type GremlinGraphResource = original.GremlinGraphResource @@ -243,12 +264,14 @@ type MetricValue = original.MetricValue type MongoDBCollectionCreateUpdateParameters = original.MongoDBCollectionCreateUpdateParameters type MongoDBCollectionCreateUpdateProperties = original.MongoDBCollectionCreateUpdateProperties type MongoDBCollectionGetProperties = original.MongoDBCollectionGetProperties +type MongoDBCollectionGetPropertiesResource = original.MongoDBCollectionGetPropertiesResource type MongoDBCollectionGetResults = original.MongoDBCollectionGetResults type MongoDBCollectionListResult = original.MongoDBCollectionListResult type MongoDBCollectionResource = original.MongoDBCollectionResource type MongoDBDatabaseCreateUpdateParameters = original.MongoDBDatabaseCreateUpdateParameters type MongoDBDatabaseCreateUpdateProperties = original.MongoDBDatabaseCreateUpdateProperties type MongoDBDatabaseGetProperties = original.MongoDBDatabaseGetProperties +type MongoDBDatabaseGetPropertiesResource = original.MongoDBDatabaseGetPropertiesResource type MongoDBDatabaseGetResults = original.MongoDBDatabaseGetResults type MongoDBDatabaseListResult = original.MongoDBDatabaseListResult type MongoDBDatabaseResource = original.MongoDBDatabaseResource @@ -284,12 +307,14 @@ type RegionForOnlineOffline = original.RegionForOnlineOffline type SQLContainerCreateUpdateParameters = original.SQLContainerCreateUpdateParameters type SQLContainerCreateUpdateProperties = original.SQLContainerCreateUpdateProperties type SQLContainerGetProperties = original.SQLContainerGetProperties +type SQLContainerGetPropertiesResource = original.SQLContainerGetPropertiesResource type SQLContainerGetResults = original.SQLContainerGetResults type SQLContainerListResult = original.SQLContainerListResult type SQLContainerResource = original.SQLContainerResource type SQLDatabaseCreateUpdateParameters = original.SQLDatabaseCreateUpdateParameters type SQLDatabaseCreateUpdateProperties = original.SQLDatabaseCreateUpdateProperties type SQLDatabaseGetProperties = original.SQLDatabaseGetProperties +type SQLDatabaseGetPropertiesResource = original.SQLDatabaseGetPropertiesResource type SQLDatabaseGetResults = original.SQLDatabaseGetResults type SQLDatabaseListResult = original.SQLDatabaseListResult type SQLDatabaseResource = original.SQLDatabaseResource @@ -309,24 +334,29 @@ type SQLResourcesUpdateSQLDatabaseThroughputFuture = original.SQLResourcesUpdate type SQLStoredProcedureCreateUpdateParameters = original.SQLStoredProcedureCreateUpdateParameters type SQLStoredProcedureCreateUpdateProperties = original.SQLStoredProcedureCreateUpdateProperties type SQLStoredProcedureGetProperties = original.SQLStoredProcedureGetProperties +type SQLStoredProcedureGetPropertiesResource = original.SQLStoredProcedureGetPropertiesResource type SQLStoredProcedureGetResults = original.SQLStoredProcedureGetResults type SQLStoredProcedureListResult = original.SQLStoredProcedureListResult type SQLStoredProcedureResource = original.SQLStoredProcedureResource type SQLTriggerCreateUpdateParameters = original.SQLTriggerCreateUpdateParameters type SQLTriggerCreateUpdateProperties = original.SQLTriggerCreateUpdateProperties type SQLTriggerGetProperties = original.SQLTriggerGetProperties +type SQLTriggerGetPropertiesResource = original.SQLTriggerGetPropertiesResource type SQLTriggerGetResults = original.SQLTriggerGetResults type SQLTriggerListResult = original.SQLTriggerListResult type SQLTriggerResource = original.SQLTriggerResource type SQLUserDefinedFunctionCreateUpdateParameters = original.SQLUserDefinedFunctionCreateUpdateParameters type SQLUserDefinedFunctionCreateUpdateProperties = original.SQLUserDefinedFunctionCreateUpdateProperties type SQLUserDefinedFunctionGetProperties = original.SQLUserDefinedFunctionGetProperties +type SQLUserDefinedFunctionGetPropertiesResource = original.SQLUserDefinedFunctionGetPropertiesResource type SQLUserDefinedFunctionGetResults = original.SQLUserDefinedFunctionGetResults type SQLUserDefinedFunctionListResult = original.SQLUserDefinedFunctionListResult type SQLUserDefinedFunctionResource = original.SQLUserDefinedFunctionResource +type SpatialSpec = original.SpatialSpec type TableCreateUpdateParameters = original.TableCreateUpdateParameters type TableCreateUpdateProperties = original.TableCreateUpdateProperties type TableGetProperties = original.TableGetProperties +type TableGetPropertiesResource = original.TableGetPropertiesResource type TableGetResults = original.TableGetResults type TableListResult = original.TableListResult type TableResource = original.TableResource @@ -335,6 +365,7 @@ type TableResourcesCreateUpdateTableFuture = original.TableResourcesCreateUpdate type TableResourcesDeleteTableFuture = original.TableResourcesDeleteTableFuture type TableResourcesUpdateTableThroughputFuture = original.TableResourcesUpdateTableThroughputFuture type ThroughputSettingsGetProperties = original.ThroughputSettingsGetProperties +type ThroughputSettingsGetPropertiesResource = original.ThroughputSettingsGetPropertiesResource type ThroughputSettingsGetResults = original.ThroughputSettingsGetResults type ThroughputSettingsResource = original.ThroughputSettingsResource type ThroughputSettingsUpdateParameters = original.ThroughputSettingsUpdateParameters @@ -465,6 +496,9 @@ func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string) T func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } +func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { + return original.PossibleCompositePathSortOrderValues() +} func PossibleConflictResolutionModeValues() []ConflictResolutionMode { return original.PossibleConflictResolutionModeValues() } @@ -498,6 +532,9 @@ func PossiblePartitionKindValues() []PartitionKind { func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { return original.PossiblePrimaryAggregationTypeValues() } +func PossibleSpatialTypeValues() []SpatialType { + return original.PossibleSpatialTypeValues() +} func PossibleTriggerOperationValues() []TriggerOperation { return original.PossibleTriggerOperationValues() } diff --git a/profiles/preview/datafactory/mgmt/datafactory/models.go b/profiles/preview/datafactory/mgmt/datafactory/models.go index d1fde85048f3..65c83c157d52 100644 --- a/profiles/preview/datafactory/mgmt/datafactory/models.go +++ b/profiles/preview/datafactory/mgmt/datafactory/models.go @@ -532,6 +532,14 @@ const ( SapHanaAuthenticationTypeWindows SapHanaAuthenticationType = original.SapHanaAuthenticationTypeWindows ) +type SapHanaPartitionOption = original.SapHanaPartitionOption + +const ( + SapHanaPartitionOptionNone SapHanaPartitionOption = original.SapHanaPartitionOptionNone + SapHanaPartitionOptionPhysicalPartitionsOfTable SapHanaPartitionOption = original.SapHanaPartitionOptionPhysicalPartitionsOfTable + SapHanaPartitionOptionSapHanaDynamicRange SapHanaPartitionOption = original.SapHanaPartitionOptionSapHanaDynamicRange +) + type SapTablePartitionOption = original.SapTablePartitionOption const ( @@ -1393,6 +1401,8 @@ type CustomActivityTypeProperties = original.CustomActivityTypeProperties type CustomDataSourceLinkedService = original.CustomDataSourceLinkedService type CustomDataset = original.CustomDataset type CustomSetupBase = original.CustomSetupBase +type DWCopyCommandDefaultValue = original.DWCopyCommandDefaultValue +type DWCopyCommandSettings = original.DWCopyCommandSettings type DataFlow = original.DataFlow type DataFlowDebugCommandPayload = original.DataFlowDebugCommandPayload type DataFlowDebugCommandRequest = original.DataFlowDebugCommandRequest @@ -1890,6 +1900,7 @@ type SapEccResourceDatasetTypeProperties = original.SapEccResourceDatasetTypePro type SapEccSource = original.SapEccSource type SapHanaLinkedService = original.SapHanaLinkedService type SapHanaLinkedServiceProperties = original.SapHanaLinkedServiceProperties +type SapHanaPartitionSettings = original.SapHanaPartitionSettings type SapHanaSource = original.SapHanaSource type SapHanaTableDataset = original.SapHanaTableDataset type SapHanaTableDatasetTypeProperties = original.SapHanaTableDatasetTypeProperties @@ -2366,6 +2377,9 @@ func PossibleSapCloudForCustomerSinkWriteBehaviorValues() []SapCloudForCustomerS func PossibleSapHanaAuthenticationTypeValues() []SapHanaAuthenticationType { return original.PossibleSapHanaAuthenticationTypeValues() } +func PossibleSapHanaPartitionOptionValues() []SapHanaPartitionOption { + return original.PossibleSapHanaPartitionOptionValues() +} func PossibleSapTablePartitionOptionValues() []SapTablePartitionOption { return original.PossibleSapTablePartitionOptionValues() } diff --git a/profiles/preview/mysql/mgmt/mysql/models.go b/profiles/preview/mysql/mgmt/mysql/models.go index 70398c8ab209..57faaff2d1a7 100644 --- a/profiles/preview/mysql/mgmt/mysql/models.go +++ b/profiles/preview/mysql/mgmt/mysql/models.go @@ -72,6 +72,7 @@ const ( type ServerVersion = original.ServerVersion const ( + EightFullStopZero ServerVersion = original.EightFullStopZero FiveFullStopSeven ServerVersion = original.FiveFullStopSeven FiveFullStopSix ServerVersion = original.FiveFullStopSix ) diff --git a/profiles/preview/policyinsights/mgmt/policyinsights/models.go b/profiles/preview/policyinsights/mgmt/policyinsights/models.go index b615e657622b..7966b0033673 100644 --- a/profiles/preview/policyinsights/mgmt/policyinsights/models.go +++ b/profiles/preview/policyinsights/mgmt/policyinsights/models.go @@ -36,6 +36,13 @@ const ( Latest PolicyStatesResource = original.Latest ) +type ResourceDiscoveryMode = original.ResourceDiscoveryMode + +const ( + ExistingNonCompliant ResourceDiscoveryMode = original.ExistingNonCompliant + ReEvaluateCompliance ResourceDiscoveryMode = original.ReEvaluateCompliance +) + type BaseClient = original.BaseClient type ComplianceDetail = original.ComplianceDetail type ErrorDefinition = original.ErrorDefinition @@ -54,6 +61,13 @@ type PolicyEvent = original.PolicyEvent type PolicyEventsClient = original.PolicyEventsClient type PolicyEventsQueryResults = original.PolicyEventsQueryResults type PolicyGroupSummary = original.PolicyGroupSummary +type PolicyMetadata = original.PolicyMetadata +type PolicyMetadataClient = original.PolicyMetadataClient +type PolicyMetadataCollection = original.PolicyMetadataCollection +type PolicyMetadataCollectionIterator = original.PolicyMetadataCollectionIterator +type PolicyMetadataCollectionPage = original.PolicyMetadataCollectionPage +type PolicyMetadataProperties = original.PolicyMetadataProperties +type PolicyMetadataSlimProperties = original.PolicyMetadataSlimProperties type PolicyState = original.PolicyState type PolicyStatesClient = original.PolicyStatesClient type PolicyStatesQueryResults = original.PolicyStatesQueryResults @@ -76,6 +90,7 @@ type RemediationListResultIterator = original.RemediationListResultIterator type RemediationListResultPage = original.RemediationListResultPage type RemediationProperties = original.RemediationProperties type RemediationsClient = original.RemediationsClient +type SlimPolicyMetadata = original.SlimPolicyMetadata type String = original.String type SummarizeResults = original.SummarizeResults type Summary = original.Summary @@ -98,6 +113,18 @@ func NewPolicyEventsClient() PolicyEventsClient { func NewPolicyEventsClientWithBaseURI(baseURI string) PolicyEventsClient { return original.NewPolicyEventsClientWithBaseURI(baseURI) } +func NewPolicyMetadataClient() PolicyMetadataClient { + return original.NewPolicyMetadataClient() +} +func NewPolicyMetadataClientWithBaseURI(baseURI string) PolicyMetadataClient { + return original.NewPolicyMetadataClientWithBaseURI(baseURI) +} +func NewPolicyMetadataCollectionIterator(page PolicyMetadataCollectionPage) PolicyMetadataCollectionIterator { + return original.NewPolicyMetadataCollectionIterator(page) +} +func NewPolicyMetadataCollectionPage(getNextPage func(context.Context, PolicyMetadataCollection) (PolicyMetadataCollection, error)) PolicyMetadataCollectionPage { + return original.NewPolicyMetadataCollectionPage(getNextPage) +} func NewPolicyStatesClient() PolicyStatesClient { return original.NewPolicyStatesClient() } @@ -140,6 +167,9 @@ func NewWithBaseURI(baseURI string) BaseClient { func PossiblePolicyStatesResourceValues() []PolicyStatesResource { return original.PossiblePolicyStatesResourceValues() } +func PossibleResourceDiscoveryModeValues() []ResourceDiscoveryMode { + return original.PossibleResourceDiscoveryModeValues() +} func UserAgent() string { return original.UserAgent() + " profiles/preview" } diff --git a/profiles/preview/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go b/profiles/preview/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go index 3f4601162208..093f733e0044 100644 --- a/profiles/preview/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go +++ b/profiles/preview/policyinsights/mgmt/policyinsights/policyinsightsapi/models.go @@ -23,6 +23,7 @@ import original "github.com/Azure/azure-sdk-for-go/services/policyinsights/mgmt/ type OperationsClientAPI = original.OperationsClientAPI type PolicyEventsClientAPI = original.PolicyEventsClientAPI +type PolicyMetadataClientAPI = original.PolicyMetadataClientAPI type PolicyStatesClientAPI = original.PolicyStatesClientAPI type PolicyTrackedResourcesClientAPI = original.PolicyTrackedResourcesClientAPI type RemediationsClientAPI = original.RemediationsClientAPI diff --git a/profiles/preview/preview/azuredata/mgmt/azuredata/azuredataapi/models.go b/profiles/preview/preview/azuredata/mgmt/azuredata/azuredataapi/models.go new file mode 100644 index 000000000000..4d154c580940 --- /dev/null +++ b/profiles/preview/preview/azuredata/mgmt/azuredata/azuredataapi/models.go @@ -0,0 +1,26 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package azuredataapi + +import original "github.com/Azure/azure-sdk-for-go/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi" + +type OperationsClientAPI = original.OperationsClientAPI +type SQLServerRegistrationsClientAPI = original.SQLServerRegistrationsClientAPI +type SQLServersClientAPI = original.SQLServersClientAPI diff --git a/profiles/preview/preview/azuredata/mgmt/azuredata/models.go b/profiles/preview/preview/azuredata/mgmt/azuredata/models.go new file mode 100644 index 000000000000..2bff918acecd --- /dev/null +++ b/profiles/preview/preview/azuredata/mgmt/azuredata/models.go @@ -0,0 +1,113 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package azuredata + +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata" +) + +const ( + DefaultBaseURI = original.DefaultBaseURI +) + +type OperationOrigin = original.OperationOrigin + +const ( + System OperationOrigin = original.System + User OperationOrigin = original.User +) + +type BaseClient = original.BaseClient +type Operation = original.Operation +type OperationDisplay = original.OperationDisplay +type OperationListResult = original.OperationListResult +type OperationListResultIterator = original.OperationListResultIterator +type OperationListResultPage = original.OperationListResultPage +type OperationsClient = original.OperationsClient +type ProxyResource = original.ProxyResource +type Resource = original.Resource +type SQLServer = original.SQLServer +type SQLServerListResult = original.SQLServerListResult +type SQLServerListResultIterator = original.SQLServerListResultIterator +type SQLServerListResultPage = original.SQLServerListResultPage +type SQLServerProperties = original.SQLServerProperties +type SQLServerRegistration = original.SQLServerRegistration +type SQLServerRegistrationListResult = original.SQLServerRegistrationListResult +type SQLServerRegistrationListResultIterator = original.SQLServerRegistrationListResultIterator +type SQLServerRegistrationListResultPage = original.SQLServerRegistrationListResultPage +type SQLServerRegistrationProperties = original.SQLServerRegistrationProperties +type SQLServerRegistrationUpdate = original.SQLServerRegistrationUpdate +type SQLServerRegistrationsClient = original.SQLServerRegistrationsClient +type SQLServersClient = original.SQLServersClient +type TrackedResource = original.TrackedResource + +func New(subscriptionID string) BaseClient { + return original.New(subscriptionID) +} +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return original.NewOperationListResultIterator(page) +} +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return original.NewOperationListResultPage(getNextPage) +} +func NewOperationsClient(subscriptionID string) OperationsClient { + return original.NewOperationsClient(subscriptionID) +} +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewSQLServerListResultIterator(page SQLServerListResultPage) SQLServerListResultIterator { + return original.NewSQLServerListResultIterator(page) +} +func NewSQLServerListResultPage(getNextPage func(context.Context, SQLServerListResult) (SQLServerListResult, error)) SQLServerListResultPage { + return original.NewSQLServerListResultPage(getNextPage) +} +func NewSQLServerRegistrationListResultIterator(page SQLServerRegistrationListResultPage) SQLServerRegistrationListResultIterator { + return original.NewSQLServerRegistrationListResultIterator(page) +} +func NewSQLServerRegistrationListResultPage(getNextPage func(context.Context, SQLServerRegistrationListResult) (SQLServerRegistrationListResult, error)) SQLServerRegistrationListResultPage { + return original.NewSQLServerRegistrationListResultPage(getNextPage) +} +func NewSQLServerRegistrationsClient(subscriptionID string) SQLServerRegistrationsClient { + return original.NewSQLServerRegistrationsClient(subscriptionID) +} +func NewSQLServerRegistrationsClientWithBaseURI(baseURI string, subscriptionID string) SQLServerRegistrationsClient { + return original.NewSQLServerRegistrationsClientWithBaseURI(baseURI, subscriptionID) +} +func NewSQLServersClient(subscriptionID string) SQLServersClient { + return original.NewSQLServersClient(subscriptionID) +} +func NewSQLServersClientWithBaseURI(baseURI string, subscriptionID string) SQLServersClient { + return original.NewSQLServersClientWithBaseURI(baseURI, subscriptionID) +} +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return original.NewWithBaseURI(baseURI, subscriptionID) +} +func PossibleOperationOriginValues() []OperationOrigin { + return original.PossibleOperationOriginValues() +} +func UserAgent() string { + return original.UserAgent() + " profiles/preview" +} +func Version() string { + return original.Version() +} diff --git a/profiles/preview/preview/cdn/mgmt/cdn/models.go b/profiles/preview/preview/cdn/mgmt/cdn/models.go index 17ec3e085971..10504de6c40c 100644 --- a/profiles/preview/preview/cdn/mgmt/cdn/models.go +++ b/profiles/preview/preview/cdn/mgmt/cdn/models.go @@ -29,13 +29,13 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) -type Action = original.Action +type ActionType = original.ActionType const ( - Allow Action = original.Allow - Block Action = original.Block - Log Action = original.Log - Redirect Action = original.Redirect + Allow ActionType = original.Allow + Block ActionType = original.Block + Log ActionType = original.Log + Redirect ActionType = original.Redirect ) type CacheBehavior = original.CacheBehavior @@ -61,6 +61,20 @@ const ( Shared CertificateType = original.Shared ) +type CookiesOperator = original.CookiesOperator + +const ( + Any CookiesOperator = original.Any + BeginsWith CookiesOperator = original.BeginsWith + Contains CookiesOperator = original.Contains + EndsWith CookiesOperator = original.EndsWith + Equal CookiesOperator = original.Equal + GreaterThan CookiesOperator = original.GreaterThan + GreaterThanOrEqual CookiesOperator = original.GreaterThanOrEqual + LessThan CookiesOperator = original.LessThan + LessThanOrEqual CookiesOperator = original.LessThanOrEqual +) + type CustomDomainResourceState = original.CustomDomainResourceState const ( @@ -156,10 +170,20 @@ const ( RequestURI MatchVariable = original.RequestURI ) +type MinimumTLSVersion = original.MinimumTLSVersion + +const ( + None MinimumTLSVersion = original.None + TLS10 MinimumTLSVersion = original.TLS10 + TLS12 MinimumTLSVersion = original.TLS12 +) + type Name = original.Name const ( + NameCookies Name = original.NameCookies NameDeliveryRuleCondition Name = original.NameDeliveryRuleCondition + NameHTTPVersion Name = original.NameHTTPVersion NameIsDevice Name = original.NameIsDevice NamePostArgs Name = original.NamePostArgs NameQueryString Name = original.NameQueryString @@ -178,27 +202,29 @@ type NameBasicDeliveryRuleAction = original.NameBasicDeliveryRuleAction const ( NameCacheExpiration NameBasicDeliveryRuleAction = original.NameCacheExpiration + NameCacheKeyQueryString NameBasicDeliveryRuleAction = original.NameCacheKeyQueryString NameDeliveryRuleAction NameBasicDeliveryRuleAction = original.NameDeliveryRuleAction NameModifyRequestHeader NameBasicDeliveryRuleAction = original.NameModifyRequestHeader NameModifyResponseHeader NameBasicDeliveryRuleAction = original.NameModifyResponseHeader NameURLRedirect NameBasicDeliveryRuleAction = original.NameURLRedirect + NameURLRewrite NameBasicDeliveryRuleAction = original.NameURLRewrite ) type Operator = original.Operator const ( - Any Operator = original.Any - BeginsWith Operator = original.BeginsWith - Contains Operator = original.Contains - EndsWith Operator = original.EndsWith - Equal Operator = original.Equal - GeoMatch Operator = original.GeoMatch - GreaterThan Operator = original.GreaterThan - GreaterThanOrEqual Operator = original.GreaterThanOrEqual - IPMatch Operator = original.IPMatch - LessThan Operator = original.LessThan - LessThanOrEqual Operator = original.LessThanOrEqual - RegEx Operator = original.RegEx + OperatorAny Operator = original.OperatorAny + OperatorBeginsWith Operator = original.OperatorBeginsWith + OperatorContains Operator = original.OperatorContains + OperatorEndsWith Operator = original.OperatorEndsWith + OperatorEqual Operator = original.OperatorEqual + OperatorGeoMatch Operator = original.OperatorGeoMatch + OperatorGreaterThan Operator = original.OperatorGreaterThan + OperatorGreaterThanOrEqual Operator = original.OperatorGreaterThanOrEqual + OperatorIPMatch Operator = original.OperatorIPMatch + OperatorLessThan Operator = original.OperatorLessThan + OperatorLessThanOrEqual Operator = original.OperatorLessThanOrEqual + OperatorRegEx Operator = original.OperatorRegEx ) type OptimizationType = original.OptimizationType @@ -282,6 +308,15 @@ const ( ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded ) +type QueryStringBehavior = original.QueryStringBehavior + +const ( + Exclude QueryStringBehavior = original.Exclude + ExcludeAll QueryStringBehavior = original.ExcludeAll + Include QueryStringBehavior = original.Include + IncludeAll QueryStringBehavior = original.IncludeAll +) + type QueryStringCachingBehavior = original.QueryStringCachingBehavior const ( @@ -374,6 +409,7 @@ type SkuName = original.SkuName const ( CustomVerizon SkuName = original.CustomVerizon + PremiumChinaCdn SkuName = original.PremiumChinaCdn PremiumVerizon SkuName = original.PremiumVerizon StandardAkamai SkuName = original.StandardAkamai StandardChinaCdn SkuName = original.StandardChinaCdn @@ -388,6 +424,17 @@ const ( Uppercase Transform = original.Uppercase ) +type TransformType = original.TransformType + +const ( + TransformTypeLowercase TransformType = original.TransformTypeLowercase + TransformTypeRemoveNulls TransformType = original.TransformTypeRemoveNulls + TransformTypeTrim TransformType = original.TransformTypeTrim + TransformTypeUppercase TransformType = original.TransformTypeUppercase + TransformTypeURLDecode TransformType = original.TransformTypeURLDecode + TransformTypeURLEncode TransformType = original.TransformTypeURLEncode +) + type URLFileExtensionOperator = original.URLFileExtensionOperator const ( @@ -431,16 +478,17 @@ const ( URLPathOperatorWildcard URLPathOperator = original.URLPathOperatorWildcard ) -type ActionType = original.ActionType type BaseClient = original.BaseClient type BasicCustomDomainHTTPSParameters = original.BasicCustomDomainHTTPSParameters type BasicDeliveryRuleAction = original.BasicDeliveryRuleAction type BasicDeliveryRuleCondition = original.BasicDeliveryRuleCondition type CacheExpirationActionParameters = original.CacheExpirationActionParameters +type CacheKeyQueryStringActionParameters = original.CacheKeyQueryStringActionParameters type CertificateSourceParameters = original.CertificateSourceParameters type CheckNameAvailabilityInput = original.CheckNameAvailabilityInput type CheckNameAvailabilityOutput = original.CheckNameAvailabilityOutput type CidrIPAddress = original.CidrIPAddress +type CookiesMatchConditionParameters = original.CookiesMatchConditionParameters type CustomDomain = original.CustomDomain type CustomDomainHTTPSParameters = original.CustomDomainHTTPSParameters type CustomDomainListResult = original.CustomDomainListResult @@ -459,7 +507,10 @@ type DeepCreatedOriginProperties = original.DeepCreatedOriginProperties type DeliveryRule = original.DeliveryRule type DeliveryRuleAction = original.DeliveryRuleAction type DeliveryRuleCacheExpirationAction = original.DeliveryRuleCacheExpirationAction +type DeliveryRuleCacheKeyQueryStringAction = original.DeliveryRuleCacheKeyQueryStringAction type DeliveryRuleCondition = original.DeliveryRuleCondition +type DeliveryRuleCookiesCondition = original.DeliveryRuleCookiesCondition +type DeliveryRuleHTTPVersionCondition = original.DeliveryRuleHTTPVersionCondition type DeliveryRuleIsDeviceCondition = original.DeliveryRuleIsDeviceCondition type DeliveryRulePostArgsCondition = original.DeliveryRulePostArgsCondition type DeliveryRuleQueryStringCondition = original.DeliveryRuleQueryStringCondition @@ -500,6 +551,7 @@ type EndpointsStopFuture = original.EndpointsStopFuture type EndpointsUpdateFuture = original.EndpointsUpdateFuture type ErrorResponse = original.ErrorResponse type GeoFilter = original.GeoFilter +type HTTPVersionMatchConditionParameters = original.HTTPVersionMatchConditionParameters type HeaderActionParameters = original.HeaderActionParameters type IPAddressGroup = original.IPAddressGroup type IsDeviceMatchConditionParameters = original.IsDeviceMatchConditionParameters @@ -575,6 +627,8 @@ type URLFileNameMatchConditionParameters = original.URLFileNameMatchConditionPar type URLPathMatchConditionParameters = original.URLPathMatchConditionParameters type URLRedirectAction = original.URLRedirectAction type URLRedirectActionParameters = original.URLRedirectActionParameters +type URLRewriteAction = original.URLRewriteAction +type URLRewriteActionParameters = original.URLRewriteActionParameters type UserManagedHTTPSParameters = original.UserManagedHTTPSParameters type ValidateCustomDomainInput = original.ValidateCustomDomainInput type ValidateCustomDomainOutput = original.ValidateCustomDomainOutput @@ -701,8 +755,8 @@ func NewWebApplicationFirewallPolicyListPage(getNextPage func(context.Context, W func NewWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID, subscriptionID1) } -func PossibleActionValues() []Action { - return original.PossibleActionValues() +func PossibleActionTypeValues() []ActionType { + return original.PossibleActionTypeValues() } func PossibleCacheBehaviorValues() []CacheBehavior { return original.PossibleCacheBehaviorValues() @@ -713,6 +767,9 @@ func PossibleCertificateSourceValues() []CertificateSource { func PossibleCertificateTypeValues() []CertificateType { return original.PossibleCertificateTypeValues() } +func PossibleCookiesOperatorValues() []CookiesOperator { + return original.PossibleCookiesOperatorValues() +} func PossibleCustomDomainResourceStateValues() []CustomDomainResourceState { return original.PossibleCustomDomainResourceStateValues() } @@ -743,6 +800,9 @@ func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { func PossibleMatchVariableValues() []MatchVariable { return original.PossibleMatchVariableValues() } +func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { + return original.PossibleMinimumTLSVersionValues() +} func PossibleNameBasicDeliveryRuleActionValues() []NameBasicDeliveryRuleAction { return original.PossibleNameBasicDeliveryRuleActionValues() } @@ -779,6 +839,9 @@ func PossibleProtocolTypeValues() []ProtocolType { func PossibleProvisioningStateValues() []ProvisioningState { return original.PossibleProvisioningStateValues() } +func PossibleQueryStringBehaviorValues() []QueryStringBehavior { + return original.PossibleQueryStringBehaviorValues() +} func PossibleQueryStringCachingBehaviorValues() []QueryStringCachingBehavior { return original.PossibleQueryStringCachingBehaviorValues() } @@ -806,6 +869,9 @@ func PossibleResourceTypeValues() []ResourceType { func PossibleSkuNameValues() []SkuName { return original.PossibleSkuNameValues() } +func PossibleTransformTypeValues() []TransformType { + return original.PossibleTransformTypeValues() +} func PossibleTransformValues() []Transform { return original.PossibleTransformValues() } diff --git a/profiles/preview/preview/cosmos-db/mgmt/documentdb/models.go b/profiles/preview/preview/cosmos-db/mgmt/documentdb/models.go index 52092fed9e02..0fc9511aa648 100644 --- a/profiles/preview/preview/cosmos-db/mgmt/documentdb/models.go +++ b/profiles/preview/preview/cosmos-db/mgmt/documentdb/models.go @@ -29,6 +29,13 @@ const ( DefaultBaseURI = original.DefaultBaseURI ) +type CompositePathSortOrder = original.CompositePathSortOrder + +const ( + Ascending CompositePathSortOrder = original.Ascending + Descending CompositePathSortOrder = original.Descending +) + type ConflictResolutionMode = original.ConflictResolutionMode const ( @@ -120,6 +127,15 @@ const ( PrimaryAggregationTypeTotal PrimaryAggregationType = original.PrimaryAggregationTypeTotal ) +type SpatialType = original.SpatialType + +const ( + SpatialTypeLineString SpatialType = original.SpatialTypeLineString + SpatialTypeMultiPolygon SpatialType = original.SpatialTypeMultiPolygon + SpatialTypePoint SpatialType = original.SpatialTypePoint + SpatialTypePolygon SpatialType = original.SpatialTypePolygon +) + type TriggerOperation = original.TriggerOperation const ( @@ -157,6 +173,7 @@ type Capability = original.Capability type CassandraKeyspaceCreateUpdateParameters = original.CassandraKeyspaceCreateUpdateParameters type CassandraKeyspaceCreateUpdateProperties = original.CassandraKeyspaceCreateUpdateProperties type CassandraKeyspaceGetProperties = original.CassandraKeyspaceGetProperties +type CassandraKeyspaceGetPropertiesResource = original.CassandraKeyspaceGetPropertiesResource type CassandraKeyspaceGetResults = original.CassandraKeyspaceGetResults type CassandraKeyspaceListResult = original.CassandraKeyspaceListResult type CassandraKeyspaceResource = original.CassandraKeyspaceResource @@ -172,6 +189,7 @@ type CassandraSchema = original.CassandraSchema type CassandraTableCreateUpdateParameters = original.CassandraTableCreateUpdateParameters type CassandraTableCreateUpdateProperties = original.CassandraTableCreateUpdateProperties type CassandraTableGetProperties = original.CassandraTableGetProperties +type CassandraTableGetPropertiesResource = original.CassandraTableGetPropertiesResource type CassandraTableGetResults = original.CassandraTableGetResults type CassandraTableListResult = original.CassandraTableListResult type CassandraTableResource = original.CassandraTableResource @@ -181,6 +199,7 @@ type CollectionPartitionClient = original.CollectionPartitionClient type CollectionPartitionRegionClient = original.CollectionPartitionRegionClient type CollectionRegionClient = original.CollectionRegionClient type Column = original.Column +type CompositePath = original.CompositePath type ConflictResolutionPolicy = original.ConflictResolutionPolicy type ConsistencyPolicy = original.ConsistencyPolicy type ContainerPartitionKey = original.ContainerPartitionKey @@ -214,12 +233,14 @@ type FailoverPolicy = original.FailoverPolicy type GremlinDatabaseCreateUpdateParameters = original.GremlinDatabaseCreateUpdateParameters type GremlinDatabaseCreateUpdateProperties = original.GremlinDatabaseCreateUpdateProperties type GremlinDatabaseGetProperties = original.GremlinDatabaseGetProperties +type GremlinDatabaseGetPropertiesResource = original.GremlinDatabaseGetPropertiesResource type GremlinDatabaseGetResults = original.GremlinDatabaseGetResults type GremlinDatabaseListResult = original.GremlinDatabaseListResult type GremlinDatabaseResource = original.GremlinDatabaseResource type GremlinGraphCreateUpdateParameters = original.GremlinGraphCreateUpdateParameters type GremlinGraphCreateUpdateProperties = original.GremlinGraphCreateUpdateProperties type GremlinGraphGetProperties = original.GremlinGraphGetProperties +type GremlinGraphGetPropertiesResource = original.GremlinGraphGetPropertiesResource type GremlinGraphGetResults = original.GremlinGraphGetResults type GremlinGraphListResult = original.GremlinGraphListResult type GremlinGraphResource = original.GremlinGraphResource @@ -244,12 +265,14 @@ type MetricValue = original.MetricValue type MongoDBCollectionCreateUpdateParameters = original.MongoDBCollectionCreateUpdateParameters type MongoDBCollectionCreateUpdateProperties = original.MongoDBCollectionCreateUpdateProperties type MongoDBCollectionGetProperties = original.MongoDBCollectionGetProperties +type MongoDBCollectionGetPropertiesResource = original.MongoDBCollectionGetPropertiesResource type MongoDBCollectionGetResults = original.MongoDBCollectionGetResults type MongoDBCollectionListResult = original.MongoDBCollectionListResult type MongoDBCollectionResource = original.MongoDBCollectionResource type MongoDBDatabaseCreateUpdateParameters = original.MongoDBDatabaseCreateUpdateParameters type MongoDBDatabaseCreateUpdateProperties = original.MongoDBDatabaseCreateUpdateProperties type MongoDBDatabaseGetProperties = original.MongoDBDatabaseGetProperties +type MongoDBDatabaseGetPropertiesResource = original.MongoDBDatabaseGetPropertiesResource type MongoDBDatabaseGetResults = original.MongoDBDatabaseGetResults type MongoDBDatabaseListResult = original.MongoDBDatabaseListResult type MongoDBDatabaseResource = original.MongoDBDatabaseResource @@ -299,12 +322,14 @@ type Resource = original.Resource type SQLContainerCreateUpdateParameters = original.SQLContainerCreateUpdateParameters type SQLContainerCreateUpdateProperties = original.SQLContainerCreateUpdateProperties type SQLContainerGetProperties = original.SQLContainerGetProperties +type SQLContainerGetPropertiesResource = original.SQLContainerGetPropertiesResource type SQLContainerGetResults = original.SQLContainerGetResults type SQLContainerListResult = original.SQLContainerListResult type SQLContainerResource = original.SQLContainerResource type SQLDatabaseCreateUpdateParameters = original.SQLDatabaseCreateUpdateParameters type SQLDatabaseCreateUpdateProperties = original.SQLDatabaseCreateUpdateProperties type SQLDatabaseGetProperties = original.SQLDatabaseGetProperties +type SQLDatabaseGetPropertiesResource = original.SQLDatabaseGetPropertiesResource type SQLDatabaseGetResults = original.SQLDatabaseGetResults type SQLDatabaseListResult = original.SQLDatabaseListResult type SQLDatabaseResource = original.SQLDatabaseResource @@ -324,24 +349,29 @@ type SQLResourcesUpdateSQLDatabaseThroughputFuture = original.SQLResourcesUpdate type SQLStoredProcedureCreateUpdateParameters = original.SQLStoredProcedureCreateUpdateParameters type SQLStoredProcedureCreateUpdateProperties = original.SQLStoredProcedureCreateUpdateProperties type SQLStoredProcedureGetProperties = original.SQLStoredProcedureGetProperties +type SQLStoredProcedureGetPropertiesResource = original.SQLStoredProcedureGetPropertiesResource type SQLStoredProcedureGetResults = original.SQLStoredProcedureGetResults type SQLStoredProcedureListResult = original.SQLStoredProcedureListResult type SQLStoredProcedureResource = original.SQLStoredProcedureResource type SQLTriggerCreateUpdateParameters = original.SQLTriggerCreateUpdateParameters type SQLTriggerCreateUpdateProperties = original.SQLTriggerCreateUpdateProperties type SQLTriggerGetProperties = original.SQLTriggerGetProperties +type SQLTriggerGetPropertiesResource = original.SQLTriggerGetPropertiesResource type SQLTriggerGetResults = original.SQLTriggerGetResults type SQLTriggerListResult = original.SQLTriggerListResult type SQLTriggerResource = original.SQLTriggerResource type SQLUserDefinedFunctionCreateUpdateParameters = original.SQLUserDefinedFunctionCreateUpdateParameters type SQLUserDefinedFunctionCreateUpdateProperties = original.SQLUserDefinedFunctionCreateUpdateProperties type SQLUserDefinedFunctionGetProperties = original.SQLUserDefinedFunctionGetProperties +type SQLUserDefinedFunctionGetPropertiesResource = original.SQLUserDefinedFunctionGetPropertiesResource type SQLUserDefinedFunctionGetResults = original.SQLUserDefinedFunctionGetResults type SQLUserDefinedFunctionListResult = original.SQLUserDefinedFunctionListResult type SQLUserDefinedFunctionResource = original.SQLUserDefinedFunctionResource +type SpatialSpec = original.SpatialSpec type TableCreateUpdateParameters = original.TableCreateUpdateParameters type TableCreateUpdateProperties = original.TableCreateUpdateProperties type TableGetProperties = original.TableGetProperties +type TableGetPropertiesResource = original.TableGetPropertiesResource type TableGetResults = original.TableGetResults type TableListResult = original.TableListResult type TableResource = original.TableResource @@ -350,6 +380,7 @@ type TableResourcesCreateUpdateTableFuture = original.TableResourcesCreateUpdate type TableResourcesDeleteTableFuture = original.TableResourcesDeleteTableFuture type TableResourcesUpdateTableThroughputFuture = original.TableResourcesUpdateTableThroughputFuture type ThroughputSettingsGetProperties = original.ThroughputSettingsGetProperties +type ThroughputSettingsGetPropertiesResource = original.ThroughputSettingsGetPropertiesResource type ThroughputSettingsGetResults = original.ThroughputSettingsGetResults type ThroughputSettingsResource = original.ThroughputSettingsResource type ThroughputSettingsUpdateParameters = original.ThroughputSettingsUpdateParameters @@ -493,6 +524,9 @@ func NewTableResourcesClientWithBaseURI(baseURI string, subscriptionID string, s func NewWithBaseURI(baseURI string, subscriptionID string, subscriptionID1 string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID, subscriptionID1) } +func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { + return original.PossibleCompositePathSortOrderValues() +} func PossibleConflictResolutionModeValues() []ConflictResolutionMode { return original.PossibleConflictResolutionModeValues() } @@ -526,6 +560,9 @@ func PossiblePartitionKindValues() []PartitionKind { func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { return original.PossiblePrimaryAggregationTypeValues() } +func PossibleSpatialTypeValues() []SpatialType { + return original.PossibleSpatialTypeValues() +} func PossibleTriggerOperationValues() []TriggerOperation { return original.PossibleTriggerOperationValues() } diff --git a/profiles/preview/preview/customerlockbox/mgmt/customerlockbox/customerlockboxapi/models.go b/profiles/preview/preview/customerlockbox/mgmt/customerlockbox/customerlockboxapi/models.go new file mode 100644 index 000000000000..294a2cdecdaf --- /dev/null +++ b/profiles/preview/preview/customerlockbox/mgmt/customerlockbox/customerlockboxapi/models.go @@ -0,0 +1,25 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package customerlockboxapi + +import original "github.com/Azure/azure-sdk-for-go/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi" + +type OperationsClientAPI = original.OperationsClientAPI +type RequestsClientAPI = original.RequestsClientAPI diff --git a/profiles/preview/preview/customerlockbox/mgmt/customerlockbox/models.go b/profiles/preview/preview/customerlockbox/mgmt/customerlockbox/models.go new file mode 100644 index 000000000000..0ec6c54d58d1 --- /dev/null +++ b/profiles/preview/preview/customerlockbox/mgmt/customerlockbox/models.go @@ -0,0 +1,117 @@ +// +build go1.9 + +// Copyright 2019 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This code was auto-generated by: +// github.com/Azure/azure-sdk-for-go/tools/profileBuilder + +package customerlockbox + +import ( + "context" + + original "github.com/Azure/azure-sdk-for-go/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox" +) + +const ( + DefaultBaseURI = original.DefaultBaseURI +) + +type Decision = original.Decision + +const ( + Approve Decision = original.Approve + Deny Decision = original.Deny +) + +type Status = original.Status + +const ( + Approved Status = original.Approved + Approving Status = original.Approving + Completed Status = original.Completed + Completing Status = original.Completing + Denied Status = original.Denied + Denying Status = original.Denying + Error Status = original.Error + Expired Status = original.Expired + Initializing Status = original.Initializing + Pending Status = original.Pending + Revoked Status = original.Revoked + Revoking Status = original.Revoking + Unknown Status = original.Unknown +) + +type Approval = original.Approval +type BaseClient = original.BaseClient +type ErrorAdditionalInfo = original.ErrorAdditionalInfo +type ErrorAdditionalInfoInfo = original.ErrorAdditionalInfoInfo +type ErrorBody = original.ErrorBody +type ErrorResponse = original.ErrorResponse +type LockboxRequestResponse = original.LockboxRequestResponse +type LockboxRequestResponseProperties = original.LockboxRequestResponseProperties +type Operation = original.Operation +type OperationDisplay = original.OperationDisplay +type OperationListResult = original.OperationListResult +type OperationListResultIterator = original.OperationListResultIterator +type OperationListResultPage = original.OperationListResultPage +type OperationsClient = original.OperationsClient +type RequestListResult = original.RequestListResult +type RequestListResultIterator = original.RequestListResultIterator +type RequestListResultPage = original.RequestListResultPage +type RequestsClient = original.RequestsClient + +func New() BaseClient { + return original.New() +} +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return original.NewOperationListResultIterator(page) +} +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return original.NewOperationListResultPage(getNextPage) +} +func NewOperationsClient() OperationsClient { + return original.NewOperationsClient() +} +func NewOperationsClientWithBaseURI(baseURI string) OperationsClient { + return original.NewOperationsClientWithBaseURI(baseURI) +} +func NewRequestListResultIterator(page RequestListResultPage) RequestListResultIterator { + return original.NewRequestListResultIterator(page) +} +func NewRequestListResultPage(getNextPage func(context.Context, RequestListResult) (RequestListResult, error)) RequestListResultPage { + return original.NewRequestListResultPage(getNextPage) +} +func NewRequestsClient() RequestsClient { + return original.NewRequestsClient() +} +func NewRequestsClientWithBaseURI(baseURI string) RequestsClient { + return original.NewRequestsClientWithBaseURI(baseURI) +} +func NewWithBaseURI(baseURI string) BaseClient { + return original.NewWithBaseURI(baseURI) +} +func PossibleDecisionValues() []Decision { + return original.PossibleDecisionValues() +} +func PossibleStatusValues() []Status { + return original.PossibleStatusValues() +} +func UserAgent() string { + return original.UserAgent() + " profiles/preview" +} +func Version() string { + return original.Version() +} diff --git a/profiles/preview/preview/mysql/mgmt/mysql/models.go b/profiles/preview/preview/mysql/mgmt/mysql/models.go index 6ed8532aef8c..a2696b226ee8 100644 --- a/profiles/preview/preview/mysql/mgmt/mysql/models.go +++ b/profiles/preview/preview/mysql/mgmt/mysql/models.go @@ -46,6 +46,12 @@ const ( Enabled GeoRedundantBackup = original.Enabled ) +type IdentityType = original.IdentityType + +const ( + SystemAssigned IdentityType = original.SystemAssigned +) + type OperationOrigin = original.OperationOrigin const ( @@ -72,6 +78,7 @@ const ( type ServerVersion = original.ServerVersion const ( + EightFullStopZero ServerVersion = original.EightFullStopZero FiveFullStopSeven ServerVersion = original.FiveFullStopSeven FiveFullStopSix ServerVersion = original.FiveFullStopSix ) @@ -146,6 +153,7 @@ type PerformanceTierProperties = original.PerformanceTierProperties type PerformanceTierServiceLevelObjectives = original.PerformanceTierServiceLevelObjectives type ProxyResource = original.ProxyResource type ReplicasClient = original.ReplicasClient +type ResourceIdentity = original.ResourceIdentity type SecurityAlertPolicyProperties = original.SecurityAlertPolicyProperties type Server = original.Server type ServerAdministratorProperties = original.ServerAdministratorProperties @@ -274,6 +282,9 @@ func PossibleCreateModeValues() []CreateMode { func PossibleGeoRedundantBackupValues() []GeoRedundantBackup { return original.PossibleGeoRedundantBackupValues() } +func PossibleIdentityTypeValues() []IdentityType { + return original.PossibleIdentityTypeValues() +} func PossibleOperationOriginValues() []OperationOrigin { return original.PossibleOperationOriginValues() } diff --git a/profiles/preview/preview/postgresql/mgmt/postgresql/models.go b/profiles/preview/preview/postgresql/mgmt/postgresql/models.go index bff224032dcd..d1b50ec42155 100644 --- a/profiles/preview/preview/postgresql/mgmt/postgresql/models.go +++ b/profiles/preview/preview/postgresql/mgmt/postgresql/models.go @@ -46,6 +46,12 @@ const ( Enabled GeoRedundantBackup = original.Enabled ) +type IdentityType = original.IdentityType + +const ( + SystemAssigned IdentityType = original.SystemAssigned +) + type OperationOrigin = original.OperationOrigin const ( @@ -150,6 +156,7 @@ type PerformanceTierProperties = original.PerformanceTierProperties type PerformanceTierServiceLevelObjectives = original.PerformanceTierServiceLevelObjectives type ProxyResource = original.ProxyResource type ReplicasClient = original.ReplicasClient +type ResourceIdentity = original.ResourceIdentity type SecurityAlertPolicyProperties = original.SecurityAlertPolicyProperties type Server = original.Server type ServerAdministratorProperties = original.ServerAdministratorProperties @@ -278,6 +285,9 @@ func PossibleCreateModeValues() []CreateMode { func PossibleGeoRedundantBackupValues() []GeoRedundantBackup { return original.PossibleGeoRedundantBackupValues() } +func PossibleIdentityTypeValues() []IdentityType { + return original.PossibleIdentityTypeValues() +} func PossibleOperationOriginValues() []OperationOrigin { return original.PossibleOperationOriginValues() } diff --git a/profiles/preview/preview/security/mgmt/security/models.go b/profiles/preview/preview/security/mgmt/security/models.go index cf99cd57bc4e..f8eccc38ad1f 100644 --- a/profiles/preview/preview/security/mgmt/security/models.go +++ b/profiles/preview/preview/security/mgmt/security/models.go @@ -399,6 +399,13 @@ const ( VersionAndAboveSignature Type = original.VersionAndAboveSignature ) +type UnmaskedIPLoggingStatus = original.UnmaskedIPLoggingStatus + +const ( + UnmaskedIPLoggingStatusDisabled UnmaskedIPLoggingStatus = original.UnmaskedIPLoggingStatusDisabled + UnmaskedIPLoggingStatusEnabled UnmaskedIPLoggingStatus = original.UnmaskedIPLoggingStatusEnabled +) + type ValueType = original.ValueType const ( @@ -497,6 +504,7 @@ type DiscoveredSecuritySolutionListIterator = original.DiscoveredSecuritySolutio type DiscoveredSecuritySolutionListPage = original.DiscoveredSecuritySolutionListPage type DiscoveredSecuritySolutionProperties = original.DiscoveredSecuritySolutionProperties type DiscoveredSecuritySolutionsClient = original.DiscoveredSecuritySolutionsClient +type ETag = original.ETag type ExternalSecuritySolution = original.ExternalSecuritySolution type ExternalSecuritySolutionKind1 = original.ExternalSecuritySolutionKind1 type ExternalSecuritySolutionList = original.ExternalSecuritySolutionList @@ -613,6 +621,7 @@ type SubAssessmentListPage = original.SubAssessmentListPage type SubAssessmentProperties = original.SubAssessmentProperties type SubAssessmentStatus = original.SubAssessmentStatus type SubAssessmentsClient = original.SubAssessmentsClient +type Tags = original.Tags type TagsResource = original.TagsResource type Task = original.Task type TaskList = original.TaskList @@ -632,6 +641,7 @@ type TopologyResourceProperties = original.TopologyResourceProperties type TopologySingleResource = original.TopologySingleResource type TopologySingleResourceChild = original.TopologySingleResourceChild type TopologySingleResourceParent = original.TopologySingleResourceParent +type TrackedResource = original.TrackedResource type UpdateIoTSecuritySolutionProperties = original.UpdateIoTSecuritySolutionProperties type UpdateIotSecuritySolutionData = original.UpdateIotSecuritySolutionData type UserDefinedResourcesProperties = original.UserDefinedResourcesProperties @@ -1098,6 +1108,9 @@ func PossibleSubAssessmentStatusCodeValues() []SubAssessmentStatusCode { func PossibleTypeValues() []Type { return original.PossibleTypeValues() } +func PossibleUnmaskedIPLoggingStatusValues() []UnmaskedIPLoggingStatus { + return original.PossibleUnmaskedIPLoggingStatusValues() +} func PossibleValueTypeValues() []ValueType { return original.PossibleValueTypeValues() } diff --git a/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go b/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go index d2886b9dfefe..f166c9eccd81 100644 --- a/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go +++ b/profiles/preview/preview/securityinsight/mgmt/securityinsight/models.go @@ -212,6 +212,16 @@ const ( Unknown FileHashAlgorithm = original.Unknown ) +type IncidentSeverity = original.IncidentSeverity + +const ( + IncidentSeverityCritical IncidentSeverity = original.IncidentSeverityCritical + IncidentSeverityHigh IncidentSeverity = original.IncidentSeverityHigh + IncidentSeverityInformational IncidentSeverity = original.IncidentSeverityInformational + IncidentSeverityLow IncidentSeverity = original.IncidentSeverityLow + IncidentSeverityMedium IncidentSeverity = original.IncidentSeverityMedium +) + type KillChainIntent = original.KillChainIntent const ( @@ -530,6 +540,7 @@ type HostEntity = original.HostEntity type HostEntityProperties = original.HostEntityProperties type IPEntity = original.IPEntity type IPEntityProperties = original.IPEntityProperties +type IncidentInfo = original.IncidentInfo type MCASDataConnector = original.MCASDataConnector type MCASDataConnectorDataTypes = original.MCASDataConnectorDataTypes type MCASDataConnectorDataTypesDiscoveryLogs = original.MCASDataConnectorDataTypesDiscoveryLogs @@ -830,6 +841,9 @@ func PossibleEntityTypeValues() []EntityType { func PossibleFileHashAlgorithmValues() []FileHashAlgorithm { return original.PossibleFileHashAlgorithmValues() } +func PossibleIncidentSeverityValues() []IncidentSeverity { + return original.PossibleIncidentSeverityValues() +} func PossibleKillChainIntentValues() []KillChainIntent { return original.PossibleKillChainIntentValues() } diff --git a/profiles/preview/preview/sql/mgmt/sql/models.go b/profiles/preview/preview/sql/mgmt/sql/models.go index 487de81e36f6..b3908b2d87cf 100644 --- a/profiles/preview/preview/sql/mgmt/sql/models.go +++ b/profiles/preview/preview/sql/mgmt/sql/models.go @@ -92,6 +92,17 @@ const ( ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = original.ManagedServerCreateModePointInTimeRestore ) +type ManagementOperationState = original.ManagementOperationState + +const ( + CancelInProgress ManagementOperationState = original.CancelInProgress + Cancelled ManagementOperationState = original.Cancelled + Failed ManagementOperationState = original.Failed + InProgress ManagementOperationState = original.InProgress + Pending ManagementOperationState = original.Pending + Succeeded ManagementOperationState = original.Succeeded +) + type ReplicaType = original.ReplicaType const ( @@ -114,6 +125,10 @@ const ( Recommended SensitivityLabelSource = original.Recommended ) +type AdministratorListResult = original.AdministratorListResult +type AdministratorListResultIterator = original.AdministratorListResultIterator +type AdministratorListResultPage = original.AdministratorListResultPage +type AdministratorProperties = original.AdministratorProperties type BaseClient = original.BaseClient type CompleteDatabaseRestoreDefinition = original.CompleteDatabaseRestoreDefinition type DatabaseSecurityAlertListResult = original.DatabaseSecurityAlertListResult @@ -154,6 +169,12 @@ type ManagedInstance = original.ManagedInstance type ManagedInstanceListResult = original.ManagedInstanceListResult type ManagedInstanceListResultIterator = original.ManagedInstanceListResultIterator type ManagedInstanceListResultPage = original.ManagedInstanceListResultPage +type ManagedInstanceOperation = original.ManagedInstanceOperation +type ManagedInstanceOperationListResult = original.ManagedInstanceOperationListResult +type ManagedInstanceOperationListResultIterator = original.ManagedInstanceOperationListResultIterator +type ManagedInstanceOperationListResultPage = original.ManagedInstanceOperationListResultPage +type ManagedInstanceOperationProperties = original.ManagedInstanceOperationProperties +type ManagedInstanceOperationsClient = original.ManagedInstanceOperationsClient type ManagedInstanceProperties = original.ManagedInstanceProperties type ManagedInstanceUpdate = original.ManagedInstanceUpdate type ManagedInstanceVulnerabilityAssessment = original.ManagedInstanceVulnerabilityAssessment @@ -186,6 +207,10 @@ type SensitivityLabelListResult = original.SensitivityLabelListResult type SensitivityLabelListResultIterator = original.SensitivityLabelListResultIterator type SensitivityLabelListResultPage = original.SensitivityLabelListResultPage type SensitivityLabelProperties = original.SensitivityLabelProperties +type ServerAzureADAdministrator = original.ServerAzureADAdministrator +type ServerAzureADAdministratorsClient = original.ServerAzureADAdministratorsClient +type ServerAzureADAdministratorsCreateOrUpdateFuture = original.ServerAzureADAdministratorsCreateOrUpdateFuture +type ServerAzureADAdministratorsDeleteFuture = original.ServerAzureADAdministratorsDeleteFuture type ServerVulnerabilityAssessment = original.ServerVulnerabilityAssessment type ServerVulnerabilityAssessmentListResult = original.ServerVulnerabilityAssessmentListResult type ServerVulnerabilityAssessmentListResultIterator = original.ServerVulnerabilityAssessmentListResultIterator @@ -204,6 +229,12 @@ type VulnerabilityAssessmentRecurringScansProperties = original.VulnerabilityAss func New(subscriptionID string) BaseClient { return original.New(subscriptionID) } +func NewAdministratorListResultIterator(page AdministratorListResultPage) AdministratorListResultIterator { + return original.NewAdministratorListResultIterator(page) +} +func NewAdministratorListResultPage(getNextPage func(context.Context, AdministratorListResult) (AdministratorListResult, error)) AdministratorListResultPage { + return original.NewAdministratorListResultPage(getNextPage) +} func NewDatabaseSecurityAlertListResultIterator(page DatabaseSecurityAlertListResultPage) DatabaseSecurityAlertListResultIterator { return original.NewDatabaseSecurityAlertListResultIterator(page) } @@ -270,6 +301,18 @@ func NewManagedInstanceListResultIterator(page ManagedInstanceListResultPage) Ma func NewManagedInstanceListResultPage(getNextPage func(context.Context, ManagedInstanceListResult) (ManagedInstanceListResult, error)) ManagedInstanceListResultPage { return original.NewManagedInstanceListResultPage(getNextPage) } +func NewManagedInstanceOperationListResultIterator(page ManagedInstanceOperationListResultPage) ManagedInstanceOperationListResultIterator { + return original.NewManagedInstanceOperationListResultIterator(page) +} +func NewManagedInstanceOperationListResultPage(getNextPage func(context.Context, ManagedInstanceOperationListResult) (ManagedInstanceOperationListResult, error)) ManagedInstanceOperationListResultPage { + return original.NewManagedInstanceOperationListResultPage(getNextPage) +} +func NewManagedInstanceOperationsClient(subscriptionID string) ManagedInstanceOperationsClient { + return original.NewManagedInstanceOperationsClient(subscriptionID) +} +func NewManagedInstanceOperationsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceOperationsClient { + return original.NewManagedInstanceOperationsClientWithBaseURI(baseURI, subscriptionID) +} func NewManagedInstanceVulnerabilityAssessmentListResultIterator(page ManagedInstanceVulnerabilityAssessmentListResultPage) ManagedInstanceVulnerabilityAssessmentListResultIterator { return original.NewManagedInstanceVulnerabilityAssessmentListResultIterator(page) } @@ -306,6 +349,12 @@ func NewSensitivityLabelListResultIterator(page SensitivityLabelListResultPage) func NewSensitivityLabelListResultPage(getNextPage func(context.Context, SensitivityLabelListResult) (SensitivityLabelListResult, error)) SensitivityLabelListResultPage { return original.NewSensitivityLabelListResultPage(getNextPage) } +func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAdministratorsClient { + return original.NewServerAzureADAdministratorsClient(subscriptionID) +} +func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { + return original.NewServerAzureADAdministratorsClientWithBaseURI(baseURI, subscriptionID) +} func NewServerVulnerabilityAssessmentListResultIterator(page ServerVulnerabilityAssessmentListResultPage) ServerVulnerabilityAssessmentListResultIterator { return original.NewServerVulnerabilityAssessmentListResultIterator(page) } @@ -357,6 +406,9 @@ func PossibleManagedInstanceProxyOverrideValues() []ManagedInstanceProxyOverride func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode { return original.PossibleManagedServerCreateModeValues() } +func PossibleManagementOperationStateValues() []ManagementOperationState { + return original.PossibleManagementOperationStateValues() +} func PossibleReplicaTypeValues() []ReplicaType { return original.PossibleReplicaTypeValues() } diff --git a/profiles/preview/preview/sql/mgmt/sql/sqlapi/models.go b/profiles/preview/preview/sql/mgmt/sql/sqlapi/models.go index 46419e0025a9..33a1e830cf2a 100644 --- a/profiles/preview/preview/sql/mgmt/sql/sqlapi/models.go +++ b/profiles/preview/preview/sql/mgmt/sql/sqlapi/models.go @@ -28,8 +28,10 @@ type InstancePoolsClientAPI = original.InstancePoolsClientAPI type ManagedDatabaseRestoreDetailsClientAPI = original.ManagedDatabaseRestoreDetailsClientAPI type ManagedDatabaseSensitivityLabelsClientAPI = original.ManagedDatabaseSensitivityLabelsClientAPI type ManagedDatabasesClientAPI = original.ManagedDatabasesClientAPI +type ManagedInstanceOperationsClientAPI = original.ManagedInstanceOperationsClientAPI type ManagedInstanceVulnerabilityAssessmentsClientAPI = original.ManagedInstanceVulnerabilityAssessmentsClientAPI type ManagedInstancesClientAPI = original.ManagedInstancesClientAPI type PrivateEndpointConnectionsClientAPI = original.PrivateEndpointConnectionsClientAPI +type ServerAzureADAdministratorsClientAPI = original.ServerAzureADAdministratorsClientAPI type ServerVulnerabilityAssessmentsClientAPI = original.ServerVulnerabilityAssessmentsClientAPI type UsagesClientAPI = original.UsagesClientAPI diff --git a/profiles/preview/preview/sqlvirtualmachine/mgmt/sqlvirtualmachine/models.go b/profiles/preview/preview/sqlvirtualmachine/mgmt/sqlvirtualmachine/models.go index a3fb9d42db63..e2bb6ff86869 100644 --- a/profiles/preview/preview/sqlvirtualmachine/mgmt/sqlvirtualmachine/models.go +++ b/profiles/preview/preview/sqlvirtualmachine/mgmt/sqlvirtualmachine/models.go @@ -118,6 +118,7 @@ type SQLServerLicenseType = original.SQLServerLicenseType const ( AHUB SQLServerLicenseType = original.AHUB + DR SQLServerLicenseType = original.DR PAYG SQLServerLicenseType = original.PAYG ) diff --git a/profiles/preview/preview/virtualmachineimagebuilder/mgmt/virtualmachineimagebuilder/models.go b/profiles/preview/preview/virtualmachineimagebuilder/mgmt/virtualmachineimagebuilder/models.go index 65b662458756..61f4c34a94cd 100644 --- a/profiles/preview/preview/virtualmachineimagebuilder/mgmt/virtualmachineimagebuilder/models.go +++ b/profiles/preview/preview/virtualmachineimagebuilder/mgmt/virtualmachineimagebuilder/models.go @@ -56,16 +56,6 @@ const ( Updating ProvisioningState = original.Updating ) -type ProvisioningState1 = original.ProvisioningState1 - -const ( - ProvisioningState1Creating ProvisioningState1 = original.ProvisioningState1Creating - ProvisioningState1Deleting ProvisioningState1 = original.ProvisioningState1Deleting - ProvisioningState1Failed ProvisioningState1 = original.ProvisioningState1Failed - ProvisioningState1Succeeded ProvisioningState1 = original.ProvisioningState1Succeeded - ProvisioningState1Updating ProvisioningState1 = original.ProvisioningState1Updating -) - type ResourceIdentityType = original.ResourceIdentityType const ( @@ -148,6 +138,7 @@ type ImageTemplateSharedImageVersionSource = original.ImageTemplateSharedImageVe type ImageTemplateShellCustomizer = original.ImageTemplateShellCustomizer type ImageTemplateSource = original.ImageTemplateSource type ImageTemplateUpdateParameters = original.ImageTemplateUpdateParameters +type ImageTemplateVMProfile = original.ImageTemplateVMProfile type ImageTemplateVhdDistributor = original.ImageTemplateVhdDistributor type InnerError = original.InnerError type Operation = original.Operation @@ -209,9 +200,6 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func PossibleProvisioningErrorCodeValues() []ProvisioningErrorCode { return original.PossibleProvisioningErrorCodeValues() } -func PossibleProvisioningState1Values() []ProvisioningState1 { - return original.PossibleProvisioningState1Values() -} func PossibleProvisioningStateValues() []ProvisioningState { return original.PossibleProvisioningStateValues() } diff --git a/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go b/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go index f7aabeef3371..019ebc617251 100644 --- a/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go +++ b/profiles/preview/recoveryservices/mgmt/backup/backupapi/models.go @@ -19,7 +19,7 @@ package backupapi -import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2017-07-01/backup/backupapi" +import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup/backupapi" type BackupsClientAPI = original.BackupsClientAPI type EnginesClientAPI = original.EnginesClientAPI diff --git a/profiles/preview/recoveryservices/mgmt/backup/models.go b/profiles/preview/recoveryservices/mgmt/backup/models.go index 230dba59d36a..8aa2dd1fe357 100644 --- a/profiles/preview/recoveryservices/mgmt/backup/models.go +++ b/profiles/preview/recoveryservices/mgmt/backup/models.go @@ -22,7 +22,7 @@ package backup import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2017-07-01/backup" + original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup" ) const ( diff --git a/profiles/preview/recoveryservices/mgmt/siterecovery/models.go b/profiles/preview/recoveryservices/mgmt/siterecovery/models.go index ac4b334cd13a..a10c329774a3 100644 --- a/profiles/preview/recoveryservices/mgmt/siterecovery/models.go +++ b/profiles/preview/recoveryservices/mgmt/siterecovery/models.go @@ -22,7 +22,7 @@ package siterecovery import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery" + original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-07-10/siterecovery" ) const ( @@ -119,6 +119,13 @@ const ( VersionExpiry HealthErrorCategory = original.VersionExpiry ) +type HealthErrorCustomerResolvability = original.HealthErrorCustomerResolvability + +const ( + Allowed HealthErrorCustomerResolvability = original.Allowed + NotAllowed HealthErrorCustomerResolvability = original.NotAllowed +) + type HyperVReplicaAzureRpRecoveryPointType = original.HyperVReplicaAzureRpRecoveryPointType const ( @@ -139,10 +146,17 @@ const ( type InstanceType = original.InstanceType const ( - InstanceTypeA2A InstanceType = original.InstanceTypeA2A - InstanceTypeApplyRecoveryPointProviderSpecificInput InstanceType = original.InstanceTypeApplyRecoveryPointProviderSpecificInput - InstanceTypeHyperVReplicaAzure InstanceType = original.InstanceTypeHyperVReplicaAzure - InstanceTypeInMageAzureV2 InstanceType = original.InstanceTypeInMageAzureV2 + InstanceTypeA2A InstanceType = original.InstanceTypeA2A + InstanceTypeAddDisksProviderSpecificInput InstanceType = original.InstanceTypeAddDisksProviderSpecificInput +) + +type InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInput + +const ( + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = original.InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 ) type InstanceTypeBasicConfigurationSettings = original.InstanceTypeBasicConfigurationSettings @@ -355,6 +369,13 @@ const ( InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = original.InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput ) +type InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInput + +const ( + InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A + InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput InstanceTypeBasicRemoveDisksProviderSpecificInput = original.InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput +) + type InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = original.InstanceTypeBasicReplicationProviderSpecificContainerCreationInput const ( @@ -611,6 +632,15 @@ const ( TestMigrationStateTestMigrationSucceeded TestMigrationState = original.TestMigrationStateTestMigrationSucceeded ) +type VMEncryptionType = original.VMEncryptionType + +const ( + NotEncrypted VMEncryptionType = original.NotEncrypted + OnePassEncrypted VMEncryptionType = original.OnePassEncrypted + TwoPassEncrypted VMEncryptionType = original.TwoPassEncrypted +) + +type A2AAddDisksInput = original.A2AAddDisksInput type A2AApplyRecoveryPointInput = original.A2AApplyRecoveryPointInput type A2AContainerCreationInput = original.A2AContainerCreationInput type A2AContainerMappingInput = original.A2AContainerMappingInput @@ -623,15 +653,20 @@ type A2AProtectedDiskDetails = original.A2AProtectedDiskDetails type A2AProtectedManagedDiskDetails = original.A2AProtectedManagedDiskDetails type A2AProtectionContainerMappingDetails = original.A2AProtectionContainerMappingDetails type A2ARecoveryPointDetails = original.A2ARecoveryPointDetails +type A2ARemoveDisksInput = original.A2ARemoveDisksInput type A2AReplicationDetails = original.A2AReplicationDetails type A2AReprotectInput = original.A2AReprotectInput type A2ASwitchProtectionInput = original.A2ASwitchProtectionInput +type A2AUnprotectedDiskDetails = original.A2AUnprotectedDiskDetails type A2AUpdateContainerMappingInput = original.A2AUpdateContainerMappingInput type A2AUpdateReplicationProtectedItemInput = original.A2AUpdateReplicationProtectedItemInput type A2AVMDiskInputDetails = original.A2AVMDiskInputDetails type A2AVMManagedDiskInputDetails = original.A2AVMManagedDiskInputDetails type A2AVMManagedDiskUpdateDetails = original.A2AVMManagedDiskUpdateDetails type ASRTask = original.ASRTask +type AddDisksInput = original.AddDisksInput +type AddDisksInputProperties = original.AddDisksInputProperties +type AddDisksProviderSpecificInput = original.AddDisksProviderSpecificInput type AddRecoveryServicesProviderInput = original.AddRecoveryServicesProviderInput type AddRecoveryServicesProviderInputProperties = original.AddRecoveryServicesProviderInputProperties type AddVCenterRequest = original.AddVCenterRequest @@ -654,6 +689,7 @@ type AzureToAzureUpdateNetworkMappingInput = original.AzureToAzureUpdateNetworkM type AzureToAzureVMSyncedConfigDetails = original.AzureToAzureVMSyncedConfigDetails type AzureVMDiskDetails = original.AzureVMDiskDetails type BaseClient = original.BaseClient +type BasicAddDisksProviderSpecificInput = original.BasicAddDisksProviderSpecificInput type BasicApplyRecoveryPointProviderSpecificInput = original.BasicApplyRecoveryPointProviderSpecificInput type BasicConfigurationSettings = original.BasicConfigurationSettings type BasicDisableProtectionProviderSpecificInput = original.BasicDisableProtectionProviderSpecificInput @@ -677,6 +713,7 @@ type BasicProviderSpecificFailoverInput = original.BasicProviderSpecificFailover type BasicProviderSpecificRecoveryPointDetails = original.BasicProviderSpecificRecoveryPointDetails type BasicRecoveryPlanActionDetails = original.BasicRecoveryPlanActionDetails type BasicRecoveryPlanProviderSpecificFailoverInput = original.BasicRecoveryPlanProviderSpecificFailoverInput +type BasicRemoveDisksProviderSpecificInput = original.BasicRemoveDisksProviderSpecificInput type BasicReplicationProviderSpecificContainerCreationInput = original.BasicReplicationProviderSpecificContainerCreationInput type BasicReplicationProviderSpecificContainerMappingInput = original.BasicReplicationProviderSpecificContainerMappingInput type BasicReplicationProviderSpecificSettings = original.BasicReplicationProviderSpecificSettings @@ -778,9 +815,11 @@ type IdentityProviderInput = original.IdentityProviderInput type InMageAgentDetails = original.InMageAgentDetails type InMageAgentVersionDetails = original.InMageAgentVersionDetails type InMageAzureV2ApplyRecoveryPointInput = original.InMageAzureV2ApplyRecoveryPointInput +type InMageAzureV2DiskInputDetails = original.InMageAzureV2DiskInputDetails type InMageAzureV2EnableProtectionInput = original.InMageAzureV2EnableProtectionInput type InMageAzureV2EventDetails = original.InMageAzureV2EventDetails type InMageAzureV2FailoverProviderInput = original.InMageAzureV2FailoverProviderInput +type InMageAzureV2ManagedDiskDetails = original.InMageAzureV2ManagedDiskDetails type InMageAzureV2PolicyDetails = original.InMageAzureV2PolicyDetails type InMageAzureV2PolicyInput = original.InMageAzureV2PolicyInput type InMageAzureV2ProtectedDiskDetails = original.InMageAzureV2ProtectedDiskDetails @@ -855,6 +894,7 @@ type NetworkMappingProperties = original.NetworkMappingProperties type NetworkProperties = original.NetworkProperties type OSDetails = original.OSDetails type OSDiskDetails = original.OSDiskDetails +type OSVersionWrapper = original.OSVersionWrapper type OperationsClient = original.OperationsClient type OperationsDiscovery = original.OperationsDiscovery type OperationsDiscoveryCollection = original.OperationsDiscoveryCollection @@ -932,11 +972,21 @@ type RecoveryServicesProviderCollection = original.RecoveryServicesProviderColle type RecoveryServicesProviderCollectionIterator = original.RecoveryServicesProviderCollectionIterator type RecoveryServicesProviderCollectionPage = original.RecoveryServicesProviderCollectionPage type RecoveryServicesProviderProperties = original.RecoveryServicesProviderProperties +type RemoveDisksInput = original.RemoveDisksInput +type RemoveDisksInputProperties = original.RemoveDisksInputProperties +type RemoveDisksProviderSpecificInput = original.RemoveDisksProviderSpecificInput type RemoveProtectionContainerMappingInput = original.RemoveProtectionContainerMappingInput type RemoveProtectionContainerMappingInputProperties = original.RemoveProtectionContainerMappingInputProperties type RenewCertificateInput = original.RenewCertificateInput type RenewCertificateInputProperties = original.RenewCertificateInputProperties type ReplicationAlertSettingsClient = original.ReplicationAlertSettingsClient +type ReplicationEligibilityResults = original.ReplicationEligibilityResults +type ReplicationEligibilityResultsClient = original.ReplicationEligibilityResultsClient +type ReplicationEligibilityResultsCollection = original.ReplicationEligibilityResultsCollection +type ReplicationEligibilityResultsErrorInfo = original.ReplicationEligibilityResultsErrorInfo +type ReplicationEligibilityResultsGetFuture = original.ReplicationEligibilityResultsGetFuture +type ReplicationEligibilityResultsListFuture = original.ReplicationEligibilityResultsListFuture +type ReplicationEligibilityResultsProperties = original.ReplicationEligibilityResultsProperties type ReplicationEventsClient = original.ReplicationEventsClient type ReplicationFabricsCheckConsistencyFuture = original.ReplicationFabricsCheckConsistencyFuture type ReplicationFabricsClient = original.ReplicationFabricsClient @@ -975,6 +1025,7 @@ type ReplicationProtectedItemCollection = original.ReplicationProtectedItemColle type ReplicationProtectedItemCollectionIterator = original.ReplicationProtectedItemCollectionIterator type ReplicationProtectedItemCollectionPage = original.ReplicationProtectedItemCollectionPage type ReplicationProtectedItemProperties = original.ReplicationProtectedItemProperties +type ReplicationProtectedItemsAddDisksFuture = original.ReplicationProtectedItemsAddDisksFuture type ReplicationProtectedItemsApplyRecoveryPointFuture = original.ReplicationProtectedItemsApplyRecoveryPointFuture type ReplicationProtectedItemsClient = original.ReplicationProtectedItemsClient type ReplicationProtectedItemsCreateFuture = original.ReplicationProtectedItemsCreateFuture @@ -982,8 +1033,10 @@ type ReplicationProtectedItemsDeleteFuture = original.ReplicationProtectedItemsD type ReplicationProtectedItemsFailoverCommitFuture = original.ReplicationProtectedItemsFailoverCommitFuture type ReplicationProtectedItemsPlannedFailoverFuture = original.ReplicationProtectedItemsPlannedFailoverFuture type ReplicationProtectedItemsPurgeFuture = original.ReplicationProtectedItemsPurgeFuture +type ReplicationProtectedItemsRemoveDisksFuture = original.ReplicationProtectedItemsRemoveDisksFuture type ReplicationProtectedItemsRepairReplicationFuture = original.ReplicationProtectedItemsRepairReplicationFuture type ReplicationProtectedItemsReprotectFuture = original.ReplicationProtectedItemsReprotectFuture +type ReplicationProtectedItemsResolveHealthErrorsFuture = original.ReplicationProtectedItemsResolveHealthErrorsFuture type ReplicationProtectedItemsTestFailoverCleanupFuture = original.ReplicationProtectedItemsTestFailoverCleanupFuture type ReplicationProtectedItemsTestFailoverFuture = original.ReplicationProtectedItemsTestFailoverFuture type ReplicationProtectedItemsUnplannedFailoverFuture = original.ReplicationProtectedItemsUnplannedFailoverFuture @@ -1025,10 +1078,14 @@ type ReplicationStorageClassificationMappingsDeleteFuture = original.Replication type ReplicationStorageClassificationsClient = original.ReplicationStorageClassificationsClient type ReplicationVaultHealthClient = original.ReplicationVaultHealthClient type ReplicationVaultHealthRefreshFuture = original.ReplicationVaultHealthRefreshFuture +type ReplicationVaultSettingClient = original.ReplicationVaultSettingClient type ReplicationvCentersClient = original.ReplicationvCentersClient type ReplicationvCentersCreateFuture = original.ReplicationvCentersCreateFuture type ReplicationvCentersDeleteFuture = original.ReplicationvCentersDeleteFuture type ReplicationvCentersUpdateFuture = original.ReplicationvCentersUpdateFuture +type ResolveHealthError = original.ResolveHealthError +type ResolveHealthInput = original.ResolveHealthInput +type ResolveHealthInputProperties = original.ResolveHealthInputProperties type Resource = original.Resource type ResourceHealthSummary = original.ResourceHealthSummary type ResumeJobParams = original.ResumeJobParams @@ -1055,6 +1112,11 @@ type StorageClassificationMappingProperties = original.StorageClassificationMapp type StorageClassificationProperties = original.StorageClassificationProperties type StorageMappingInputProperties = original.StorageMappingInputProperties type Subnet = original.Subnet +type SupportedOSDetails = original.SupportedOSDetails +type SupportedOSProperties = original.SupportedOSProperties +type SupportedOSProperty = original.SupportedOSProperty +type SupportedOperatingSystems = original.SupportedOperatingSystems +type SupportedOperatingSystemsClient = original.SupportedOperatingSystemsClient type SwitchProtectionInput = original.SwitchProtectionInput type SwitchProtectionInputProperties = original.SwitchProtectionInputProperties type SwitchProtectionJobDetails = original.SwitchProtectionJobDetails @@ -1123,6 +1185,13 @@ type VMwareV2FabricSpecificDetails = original.VMwareV2FabricSpecificDetails type VMwareVirtualMachineDetails = original.VMwareVirtualMachineDetails type VaultHealthDetails = original.VaultHealthDetails type VaultHealthProperties = original.VaultHealthProperties +type VaultSetting = original.VaultSetting +type VaultSettingCollection = original.VaultSettingCollection +type VaultSettingCollectionIterator = original.VaultSettingCollectionIterator +type VaultSettingCollectionPage = original.VaultSettingCollectionPage +type VaultSettingCreationInput = original.VaultSettingCreationInput +type VaultSettingCreationInputProperties = original.VaultSettingCreationInputProperties +type VaultSettingProperties = original.VaultSettingProperties type VersionDetails = original.VersionDetails type VirtualMachineTaskDetails = original.VirtualMachineTaskDetails type VmmDetails = original.VmmDetails @@ -1264,6 +1333,12 @@ func NewReplicationAlertSettingsClient(subscriptionID string, resourceGroupName func NewReplicationAlertSettingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationAlertSettingsClient { return original.NewReplicationAlertSettingsClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) } +func NewReplicationEligibilityResultsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationEligibilityResultsClient { + return original.NewReplicationEligibilityResultsClient(subscriptionID, resourceGroupName, resourceName) +} +func NewReplicationEligibilityResultsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEligibilityResultsClient { + return original.NewReplicationEligibilityResultsClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) +} func NewReplicationEventsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationEventsClient { return original.NewReplicationEventsClient(subscriptionID, resourceGroupName, resourceName) } @@ -1372,6 +1447,12 @@ func NewReplicationVaultHealthClient(subscriptionID string, resourceGroupName st func NewReplicationVaultHealthClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { return original.NewReplicationVaultHealthClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) } +func NewReplicationVaultSettingClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultSettingClient { + return original.NewReplicationVaultSettingClient(subscriptionID, resourceGroupName, resourceName) +} +func NewReplicationVaultSettingClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultSettingClient { + return original.NewReplicationVaultSettingClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) +} func NewReplicationvCentersClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationvCentersClient { return original.NewReplicationvCentersClient(subscriptionID, resourceGroupName, resourceName) } @@ -1390,6 +1471,12 @@ func NewStorageClassificationMappingCollectionIterator(page StorageClassificatio func NewStorageClassificationMappingCollectionPage(getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage { return original.NewStorageClassificationMappingCollectionPage(getNextPage) } +func NewSupportedOperatingSystemsClient(subscriptionID string, resourceGroupName string, resourceName string) SupportedOperatingSystemsClient { + return original.NewSupportedOperatingSystemsClient(subscriptionID, resourceGroupName, resourceName) +} +func NewSupportedOperatingSystemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) SupportedOperatingSystemsClient { + return original.NewSupportedOperatingSystemsClientWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) +} func NewTargetComputeSizeCollectionIterator(page TargetComputeSizeCollectionPage) TargetComputeSizeCollectionIterator { return original.NewTargetComputeSizeCollectionIterator(page) } @@ -1408,6 +1495,12 @@ func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionI func NewVCenterCollectionPage(getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage { return original.NewVCenterCollectionPage(getNextPage) } +func NewVaultSettingCollectionIterator(page VaultSettingCollectionPage) VaultSettingCollectionIterator { + return original.NewVaultSettingCollectionIterator(page) +} +func NewVaultSettingCollectionPage(getNextPage func(context.Context, VaultSettingCollection) (VaultSettingCollection, error)) VaultSettingCollectionPage { + return original.NewVaultSettingCollectionPage(getNextPage) +} func NewWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName) } @@ -1444,12 +1537,18 @@ func PossibleFailoverDeploymentModelValues() []FailoverDeploymentModel { func PossibleHealthErrorCategoryValues() []HealthErrorCategory { return original.PossibleHealthErrorCategoryValues() } +func PossibleHealthErrorCustomerResolvabilityValues() []HealthErrorCustomerResolvability { + return original.PossibleHealthErrorCustomerResolvabilityValues() +} func PossibleHyperVReplicaAzureRpRecoveryPointTypeValues() []HyperVReplicaAzureRpRecoveryPointType { return original.PossibleHyperVReplicaAzureRpRecoveryPointTypeValues() } func PossibleInMageV2RpRecoveryPointTypeValues() []InMageV2RpRecoveryPointType { return original.PossibleInMageV2RpRecoveryPointTypeValues() } +func PossibleInstanceTypeBasicApplyRecoveryPointProviderSpecificInputValues() []InstanceTypeBasicApplyRecoveryPointProviderSpecificInput { + return original.PossibleInstanceTypeBasicApplyRecoveryPointProviderSpecificInputValues() +} func PossibleInstanceTypeBasicConfigurationSettingsValues() []InstanceTypeBasicConfigurationSettings { return original.PossibleInstanceTypeBasicConfigurationSettingsValues() } @@ -1516,6 +1615,9 @@ func PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() []InstanceTypeBa func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput { return original.PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() } +func PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() []InstanceTypeBasicRemoveDisksProviderSpecificInput { + return original.PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() +} func PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues() []InstanceTypeBasicReplicationProviderSpecificContainerCreationInput { return original.PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues() } @@ -1606,6 +1708,9 @@ func PossibleSourceSiteOperationsValues() []SourceSiteOperations { func PossibleTestMigrationStateValues() []TestMigrationState { return original.PossibleTestMigrationStateValues() } +func PossibleVMEncryptionTypeValues() []VMEncryptionType { + return original.PossibleVMEncryptionTypeValues() +} func UserAgent() string { return original.UserAgent() + " profiles/preview" } diff --git a/profiles/preview/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go b/profiles/preview/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go index 874745df4c8e..a14559010360 100644 --- a/profiles/preview/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go +++ b/profiles/preview/recoveryservices/mgmt/siterecovery/siterecoveryapi/models.go @@ -19,12 +19,13 @@ package siterecoveryapi -import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-01-10/siterecovery/siterecoveryapi" +import original "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi" type MigrationRecoveryPointsClientAPI = original.MigrationRecoveryPointsClientAPI type OperationsClientAPI = original.OperationsClientAPI type RecoveryPointsClientAPI = original.RecoveryPointsClientAPI type ReplicationAlertSettingsClientAPI = original.ReplicationAlertSettingsClientAPI +type ReplicationEligibilityResultsClientAPI = original.ReplicationEligibilityResultsClientAPI type ReplicationEventsClientAPI = original.ReplicationEventsClientAPI type ReplicationFabricsClientAPI = original.ReplicationFabricsClientAPI type ReplicationJobsClientAPI = original.ReplicationJobsClientAPI @@ -42,5 +43,7 @@ type ReplicationRecoveryServicesProvidersClientAPI = original.ReplicationRecover type ReplicationStorageClassificationMappingsClientAPI = original.ReplicationStorageClassificationMappingsClientAPI type ReplicationStorageClassificationsClientAPI = original.ReplicationStorageClassificationsClientAPI type ReplicationVaultHealthClientAPI = original.ReplicationVaultHealthClientAPI +type ReplicationVaultSettingClientAPI = original.ReplicationVaultSettingClientAPI type ReplicationvCentersClientAPI = original.ReplicationvCentersClientAPI +type SupportedOperatingSystemsClientAPI = original.SupportedOperatingSystemsClientAPI type TargetComputeSizesClientAPI = original.TargetComputeSizesClientAPI diff --git a/profiles/preview/resources/mgmt/managedapplications/managedapplicationsapi/models.go b/profiles/preview/resources/mgmt/managedapplications/managedapplicationsapi/models.go index 5d61ba2e7d61..fc49db2a227e 100644 --- a/profiles/preview/resources/mgmt/managedapplications/managedapplicationsapi/models.go +++ b/profiles/preview/resources/mgmt/managedapplications/managedapplicationsapi/models.go @@ -19,7 +19,9 @@ package managedapplicationsapi -import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications/managedapplicationsapi" +import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi" type ApplicationDefinitionsClientAPI = original.ApplicationDefinitionsClientAPI type ApplicationsClientAPI = original.ApplicationsClientAPI +type BaseClientAPI = original.BaseClientAPI +type JitRequestsClientAPI = original.JitRequestsClientAPI diff --git a/profiles/preview/resources/mgmt/managedapplications/models.go b/profiles/preview/resources/mgmt/managedapplications/models.go index 216b7b3c1005..49b796076258 100644 --- a/profiles/preview/resources/mgmt/managedapplications/models.go +++ b/profiles/preview/resources/mgmt/managedapplications/models.go @@ -22,7 +22,7 @@ package managedapplications import ( "context" - original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/managedapplications" + original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications" ) const ( @@ -44,20 +44,41 @@ const ( ReadOnly ApplicationLockLevel = original.ReadOnly ) +type JitRequestState = original.JitRequestState + +const ( + Approved JitRequestState = original.Approved + Canceled JitRequestState = original.Canceled + Denied JitRequestState = original.Denied + Expired JitRequestState = original.Expired + Failed JitRequestState = original.Failed + NotSpecified JitRequestState = original.NotSpecified + Pending JitRequestState = original.Pending + Timeout JitRequestState = original.Timeout +) + +type JitSchedulingType = original.JitSchedulingType + +const ( + JitSchedulingTypeNotSpecified JitSchedulingType = original.JitSchedulingTypeNotSpecified + JitSchedulingTypeOnce JitSchedulingType = original.JitSchedulingTypeOnce + JitSchedulingTypeRecurring JitSchedulingType = original.JitSchedulingTypeRecurring +) + type ProvisioningState = original.ProvisioningState const ( - Accepted ProvisioningState = original.Accepted - Canceled ProvisioningState = original.Canceled - Created ProvisioningState = original.Created - Creating ProvisioningState = original.Creating - Deleted ProvisioningState = original.Deleted - Deleting ProvisioningState = original.Deleting - Failed ProvisioningState = original.Failed - Ready ProvisioningState = original.Ready - Running ProvisioningState = original.Running - Succeeded ProvisioningState = original.Succeeded - Updating ProvisioningState = original.Updating + ProvisioningStateAccepted ProvisioningState = original.ProvisioningStateAccepted + ProvisioningStateCanceled ProvisioningState = original.ProvisioningStateCanceled + ProvisioningStateCreated ProvisioningState = original.ProvisioningStateCreated + ProvisioningStateCreating ProvisioningState = original.ProvisioningStateCreating + ProvisioningStateDeleted ProvisioningState = original.ProvisioningStateDeleted + ProvisioningStateDeleting ProvisioningState = original.ProvisioningStateDeleting + ProvisioningStateFailed ProvisioningState = original.ProvisioningStateFailed + ProvisioningStateReady ProvisioningState = original.ProvisioningStateReady + ProvisioningStateRunning ProvisioningState = original.ProvisioningStateRunning + ProvisioningStateSucceeded ProvisioningState = original.ProvisioningStateSucceeded + ProvisioningStateUpdating ProvisioningState = original.ProvisioningStateUpdating ) type ResourceIdentityType = original.ResourceIdentityType @@ -68,6 +89,7 @@ const ( type Application = original.Application type ApplicationArtifact = original.ApplicationArtifact +type ApplicationClientDetails = original.ApplicationClientDetails type ApplicationDefinition = original.ApplicationDefinition type ApplicationDefinitionListResult = original.ApplicationDefinitionListResult type ApplicationDefinitionListResultIterator = original.ApplicationDefinitionListResultIterator @@ -90,10 +112,24 @@ type ApplicationsCreateOrUpdateByIDFuture = original.ApplicationsCreateOrUpdateB type ApplicationsCreateOrUpdateFuture = original.ApplicationsCreateOrUpdateFuture type ApplicationsDeleteByIDFuture = original.ApplicationsDeleteByIDFuture type ApplicationsDeleteFuture = original.ApplicationsDeleteFuture +type ApplicationsRefreshPermissionsFuture = original.ApplicationsRefreshPermissionsFuture type BaseClient = original.BaseClient type ErrorResponse = original.ErrorResponse type GenericResource = original.GenericResource type Identity = original.Identity +type JitAuthorizationPolicies = original.JitAuthorizationPolicies +type JitRequestDefinition = original.JitRequestDefinition +type JitRequestDefinitionListResult = original.JitRequestDefinitionListResult +type JitRequestPatchable = original.JitRequestPatchable +type JitRequestProperties = original.JitRequestProperties +type JitRequestsClient = original.JitRequestsClient +type JitRequestsCreateOrUpdateFuture = original.JitRequestsCreateOrUpdateFuture +type JitSchedulingPolicy = original.JitSchedulingPolicy +type Operation = original.Operation +type OperationDisplay = original.OperationDisplay +type OperationListResult = original.OperationListResult +type OperationListResultIterator = original.OperationListResultIterator +type OperationListResultPage = original.OperationListResultPage type Plan = original.Plan type PlanPatchable = original.PlanPatchable type Resource = original.Resource @@ -126,6 +162,18 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return original.NewApplicationsClientWithBaseURI(baseURI, subscriptionID) } +func NewJitRequestsClient(subscriptionID string) JitRequestsClient { + return original.NewJitRequestsClient(subscriptionID) +} +func NewJitRequestsClientWithBaseURI(baseURI string, subscriptionID string) JitRequestsClient { + return original.NewJitRequestsClientWithBaseURI(baseURI, subscriptionID) +} +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return original.NewOperationListResultIterator(page) +} +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return original.NewOperationListResultPage(getNextPage) +} func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return original.NewWithBaseURI(baseURI, subscriptionID) } @@ -135,6 +183,12 @@ func PossibleApplicationArtifactTypeValues() []ApplicationArtifactType { func PossibleApplicationLockLevelValues() []ApplicationLockLevel { return original.PossibleApplicationLockLevelValues() } +func PossibleJitRequestStateValues() []JitRequestState { + return original.PossibleJitRequestStateValues() +} +func PossibleJitSchedulingTypeValues() []JitSchedulingType { + return original.PossibleJitSchedulingTypeValues() +} func PossibleProvisioningStateValues() []ProvisioningState { return original.PossibleProvisioningStateValues() } diff --git a/profiles/preview/servicefabric/servicefabric/models.go b/profiles/preview/servicefabric/servicefabric/models.go index c9e6d8c0983d..bf4dbc6da3cc 100644 --- a/profiles/preview/servicefabric/servicefabric/models.go +++ b/profiles/preview/servicefabric/servicefabric/models.go @@ -19,7 +19,7 @@ package servicefabric -import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/6.5/servicefabric" +import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/7.0/servicefabric" const ( DefaultBaseURI = original.DefaultBaseURI @@ -42,6 +42,20 @@ const ( ApplicationPackageCleanupPolicyManual ApplicationPackageCleanupPolicy = original.ApplicationPackageCleanupPolicyManual ) +type ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeState + +const ( + ApplicationResourceUpgradeStateCompletedRollback ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateCompletedRollback + ApplicationResourceUpgradeStateCompletedRollforward ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateCompletedRollforward + ApplicationResourceUpgradeStateFailed ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateFailed + ApplicationResourceUpgradeStateInvalid ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateInvalid + ApplicationResourceUpgradeStateProvisioningTarget ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateProvisioningTarget + ApplicationResourceUpgradeStateRollingBack ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateRollingBack + ApplicationResourceUpgradeStateRollingForward ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateRollingForward + ApplicationResourceUpgradeStateUnprovisioningCurrent ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateUnprovisioningCurrent + ApplicationResourceUpgradeStateUnprovisioningTarget ApplicationResourceUpgradeState = original.ApplicationResourceUpgradeStateUnprovisioningTarget +) + type ApplicationScopedVolumeKind = original.ApplicationScopedVolumeKind const ( @@ -279,12 +293,14 @@ const ( type DeploymentStatus = original.DeploymentStatus const ( - DeploymentStatusActivating DeploymentStatus = original.DeploymentStatusActivating - DeploymentStatusActive DeploymentStatus = original.DeploymentStatusActive - DeploymentStatusDeactivating DeploymentStatus = original.DeploymentStatusDeactivating - DeploymentStatusDownloading DeploymentStatus = original.DeploymentStatusDownloading - DeploymentStatusInvalid DeploymentStatus = original.DeploymentStatusInvalid - DeploymentStatusUpgrading DeploymentStatus = original.DeploymentStatusUpgrading + DeploymentStatusActivating DeploymentStatus = original.DeploymentStatusActivating + DeploymentStatusActive DeploymentStatus = original.DeploymentStatusActive + DeploymentStatusDeactivating DeploymentStatus = original.DeploymentStatusDeactivating + DeploymentStatusDownloading DeploymentStatus = original.DeploymentStatusDownloading + DeploymentStatusFailed DeploymentStatus = original.DeploymentStatusFailed + DeploymentStatusInvalid DeploymentStatus = original.DeploymentStatusInvalid + DeploymentStatusRanToCompletion DeploymentStatus = original.DeploymentStatusRanToCompletion + DeploymentStatusUpgrading DeploymentStatus = original.DeploymentStatusUpgrading ) type DiagnosticsSinkKind = original.DiagnosticsSinkKind @@ -328,6 +344,20 @@ const ( EntryPointStatusStopping EntryPointStatus = original.EntryPointStatusStopping ) +type EnvironmentVariableType = original.EnvironmentVariableType + +const ( + ClearText EnvironmentVariableType = original.ClearText + KeyVaultReference EnvironmentVariableType = original.KeyVaultReference + SecretValueReference EnvironmentVariableType = original.SecretValueReference +) + +type ExecutionPolicyType = original.ExecutionPolicyType + +const ( + RunToCompletion ExecutionPolicyType = original.RunToCompletion +) + type FabricErrorCodes = original.FabricErrorCodes const ( @@ -569,6 +599,14 @@ const ( HostTypeInvalid HostType = original.HostTypeInvalid ) +type ImageRegistryPasswordType = original.ImageRegistryPasswordType + +const ( + ImageRegistryPasswordTypeClearText ImageRegistryPasswordType = original.ImageRegistryPasswordTypeClearText + ImageRegistryPasswordTypeKeyVaultReference ImageRegistryPasswordType = original.ImageRegistryPasswordTypeKeyVaultReference + ImageRegistryPasswordTypeSecretValueReference ImageRegistryPasswordType = original.ImageRegistryPasswordTypeSecretValueReference +) + type ImpactLevel = original.ImpactLevel const ( @@ -856,10 +894,11 @@ const ( type MoveCost = original.MoveCost const ( - High MoveCost = original.High - Low MoveCost = original.Low - Medium MoveCost = original.Medium - Zero MoveCost = original.Zero + High MoveCost = original.High + Low MoveCost = original.Low + Medium MoveCost = original.Medium + VeryHigh MoveCost = original.VeryHigh + Zero MoveCost = original.Zero ) type NetworkKind = original.NetworkKind @@ -1169,6 +1208,13 @@ const ( RestartPartitionModeOnlyActiveSecondaries RestartPartitionMode = original.RestartPartitionModeOnlyActiveSecondaries ) +type RestartPolicy = original.RestartPolicy + +const ( + Never RestartPolicy = original.Never + OnFailure RestartPolicy = original.OnFailure +) + type RestoreState = original.RestoreState const ( @@ -1205,6 +1251,15 @@ const ( RetentionPolicyTypeRetentionPolicyDescription RetentionPolicyTypeBasicBasicRetentionPolicyDescription = original.RetentionPolicyTypeRetentionPolicyDescription ) +type RollingUpgradeMode = original.RollingUpgradeMode + +const ( + RollingUpgradeModeInvalid RollingUpgradeMode = original.RollingUpgradeModeInvalid + RollingUpgradeModeMonitored RollingUpgradeMode = original.RollingUpgradeModeMonitored + RollingUpgradeModeUnmonitoredAuto RollingUpgradeMode = original.RollingUpgradeModeUnmonitoredAuto + RollingUpgradeModeUnmonitoredManual RollingUpgradeMode = original.RollingUpgradeModeUnmonitoredManual +) + type SafetyCheckKind = original.SafetyCheckKind const ( @@ -1242,10 +1297,18 @@ const ( ScheduleKindTimeBased ScheduleKind = original.ScheduleKindTimeBased ) +type Scheme = original.Scheme + +const ( + HTTP Scheme = original.HTTP + HTTPS Scheme = original.HTTPS +) + type SecretKind = original.SecretKind const ( - InlinedValue SecretKind = original.InlinedValue + InlinedValue SecretKind = original.InlinedValue + KeyVaultVersionedReference SecretKind = original.KeyVaultVersionedReference ) type ServiceCorrelationScheme = original.ServiceCorrelationScheme @@ -1433,6 +1496,14 @@ const ( ServiceTypeRegistrationStatusRegistered ServiceTypeRegistrationStatus = original.ServiceTypeRegistrationStatusRegistered ) +type SettingType = original.SettingType + +const ( + SettingTypeClearText SettingType = original.SettingTypeClearText + SettingTypeKeyVaultReference SettingType = original.SettingTypeKeyVaultReference + SettingTypeSecretValueReference SettingType = original.SettingTypeSecretValueReference +) + type SizeTypes = original.SizeTypes const ( @@ -1473,6 +1544,13 @@ const ( TypeServicePlacementPolicyDescription Type = original.TypeServicePlacementPolicyDescription ) +type TypeBasicExecutionPolicy = original.TypeBasicExecutionPolicy + +const ( + TypeExecutionPolicy TypeBasicExecutionPolicy = original.TypeExecutionPolicy + TypeRunToCompletion TypeBasicExecutionPolicy = original.TypeRunToCompletion +) + type UpgradeDomainState = original.UpgradeDomainState const ( @@ -1567,6 +1645,7 @@ type ApplicationParameter = original.ApplicationParameter type ApplicationProcessExitedEvent = original.ApplicationProcessExitedEvent type ApplicationProperties = original.ApplicationProperties type ApplicationResourceDescription = original.ApplicationResourceDescription +type ApplicationResourceUpgradeProgressInfo = original.ApplicationResourceUpgradeProgressInfo type ApplicationScopedVolume = original.ApplicationScopedVolume type ApplicationScopedVolumeCreationParameters = original.ApplicationScopedVolumeCreationParameters type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk = original.ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk @@ -1619,6 +1698,7 @@ type BasicClusterEvent = original.BasicClusterEvent type BasicDeployedServiceReplicaDetailInfo = original.BasicDeployedServiceReplicaDetailInfo type BasicDeployedServiceReplicaInfo = original.BasicDeployedServiceReplicaInfo type BasicDiagnosticsSinkProperties = original.BasicDiagnosticsSinkProperties +type BasicExecutionPolicy = original.BasicExecutionPolicy type BasicFabricEvent = original.BasicFabricEvent type BasicHealthEvaluation = original.BasicHealthEvaluation type BasicNetworkResourceProperties = original.BasicNetworkResourceProperties @@ -1706,6 +1786,7 @@ type CodePackageEntryPointStatistics = original.CodePackageEntryPointStatistics type ComposeDeploymentStatusInfo = original.ComposeDeploymentStatusInfo type ComposeDeploymentUpgradeDescription = original.ComposeDeploymentUpgradeDescription type ComposeDeploymentUpgradeProgressInfo = original.ComposeDeploymentUpgradeProgressInfo +type ConfigParameterOverride = original.ConfigParameterOverride type ContainerAPIRequestBody = original.ContainerAPIRequestBody type ContainerAPIResponse = original.ContainerAPIResponse type ContainerAPIResult = original.ContainerAPIResult @@ -1755,6 +1836,7 @@ type DiagnosticsDescription = original.DiagnosticsDescription type DiagnosticsRef = original.DiagnosticsRef type DiagnosticsSinkProperties = original.DiagnosticsSinkProperties type DisableBackupDescription = original.DisableBackupDescription +type DiskInfo = original.DiskInfo type DoublePropertyValue = original.DoublePropertyValue type EnableBackupDescription = original.EnableBackupDescription type EndpointProperties = original.EndpointProperties @@ -1770,6 +1852,7 @@ type EnvironmentVariable = original.EnvironmentVariable type Epoch = original.Epoch type EventHealthEvaluation = original.EventHealthEvaluation type ExecutingFaultsChaosEvent = original.ExecutingFaultsChaosEvent +type ExecutionPolicy = original.ExecutionPolicy type ExternalStoreProvisionApplicationTypeDescription = original.ExternalStoreProvisionApplicationTypeDescription type FabricCodeVersionInfo = original.FabricCodeVersionInfo type FabricConfigVersionInfo = original.FabricConfigVersionInfo @@ -1808,6 +1891,7 @@ type IdentityItemDescription = original.IdentityItemDescription type ImageRegistryCredential = original.ImageRegistryCredential type ImageStoreContent = original.ImageStoreContent type ImageStoreCopyDescription = original.ImageStoreCopyDescription +type ImageStoreInfo = original.ImageStoreInfo type InlinedValueSecretResourceProperties = original.InlinedValueSecretResourceProperties type Int64PropertyValue = original.Int64PropertyValue type Int64RangePartitionInformation = original.Int64RangePartitionInformation @@ -1816,6 +1900,7 @@ type InvokeQuorumLossResult = original.InvokeQuorumLossResult type KeyValueStoreReplicaStatus = original.KeyValueStoreReplicaStatus type ListApplicationEvent = original.ListApplicationEvent type ListClusterEvent = original.ListClusterEvent +type ListConfigParameterOverride = original.ListConfigParameterOverride type ListContainerInstanceEvent = original.ListContainerInstanceEvent type ListDeployedCodePackageInfo = original.ListDeployedCodePackageInfo type ListDeployedServicePackageInfo = original.ListDeployedServicePackageInfo @@ -1936,6 +2021,11 @@ type PartitionSafetyCheck = original.PartitionSafetyCheck type PartitionSchemeDescription = original.PartitionSchemeDescription type PartitionsHealthEvaluation = original.PartitionsHealthEvaluation type PrimaryReplicatorStatus = original.PrimaryReplicatorStatus +type Probe = original.Probe +type ProbeExec = original.ProbeExec +type ProbeHTTPGet = original.ProbeHTTPGet +type ProbeHTTPGetHeaders = original.ProbeHTTPGetHeaders +type ProbeTCPSocket = original.ProbeTCPSocket type PropertyBatchDescriptionList = original.PropertyBatchDescriptionList type PropertyBatchInfo = original.PropertyBatchInfo type PropertyBatchInfoModel = original.PropertyBatchInfoModel @@ -1991,6 +2081,7 @@ type ResumeApplicationUpgradeDescription = original.ResumeApplicationUpgradeDesc type ResumeClusterUpgradeDescription = original.ResumeClusterUpgradeDescription type RetentionPolicyDescription = original.RetentionPolicyDescription type RollingUpgradeUpdateDescription = original.RollingUpgradeUpdateDescription +type RunToCompletionExecutionPolicy = original.RunToCompletionExecutionPolicy type SafetyCheck = original.SafetyCheck type SafetyCheckWrapper = original.SafetyCheckWrapper type ScalingMechanismDescription = original.ScalingMechanismDescription @@ -2050,6 +2141,7 @@ type ServiceTypeHealthPolicyMapItem = original.ServiceTypeHealthPolicyMapItem type ServiceTypeInfo = original.ServiceTypeInfo type ServiceTypeManifest = original.ServiceTypeManifest type ServiceUpdateDescription = original.ServiceUpdateDescription +type ServiceUpgradeProgress = original.ServiceUpgradeProgress type ServicesHealthEvaluation = original.ServicesHealthEvaluation type Setting = original.Setting type SingletonPartitionInformation = original.SingletonPartitionInformation @@ -2099,6 +2191,7 @@ type UpgradeOrchestrationServiceStateSummary = original.UpgradeOrchestrationServ type UploadChunkRange = original.UploadChunkRange type UploadSession = original.UploadSession type UploadSessionInfo = original.UploadSessionInfo +type UsageInfo = original.UsageInfo type ValidationFailedChaosEvent = original.ValidationFailedChaosEvent type VolumeProperties = original.VolumeProperties type VolumeProviderParametersAzureFile = original.VolumeProviderParametersAzureFile @@ -2176,6 +2269,9 @@ func PossibleApplicationDefinitionKindValues() []ApplicationDefinitionKind { func PossibleApplicationPackageCleanupPolicyValues() []ApplicationPackageCleanupPolicy { return original.PossibleApplicationPackageCleanupPolicyValues() } +func PossibleApplicationResourceUpgradeStateValues() []ApplicationResourceUpgradeState { + return original.PossibleApplicationResourceUpgradeStateValues() +} func PossibleApplicationScopedVolumeKindValues() []ApplicationScopedVolumeKind { return original.PossibleApplicationScopedVolumeKindValues() } @@ -2269,6 +2365,12 @@ func PossibleEntityKindValues() []EntityKind { func PossibleEntryPointStatusValues() []EntryPointStatus { return original.PossibleEntryPointStatusValues() } +func PossibleEnvironmentVariableTypeValues() []EnvironmentVariableType { + return original.PossibleEnvironmentVariableTypeValues() +} +func PossibleExecutionPolicyTypeValues() []ExecutionPolicyType { + return original.PossibleExecutionPolicyTypeValues() +} func PossibleFabricErrorCodesValues() []FabricErrorCodes { return original.PossibleFabricErrorCodesValues() } @@ -2299,6 +2401,9 @@ func PossibleHostIsolationModeValues() []HostIsolationMode { func PossibleHostTypeValues() []HostType { return original.PossibleHostTypeValues() } +func PossibleImageRegistryPasswordTypeValues() []ImageRegistryPasswordType { + return original.PossibleImageRegistryPasswordTypeValues() +} func PossibleImpactLevelValues() []ImpactLevel { return original.PossibleImpactLevelValues() } @@ -2470,6 +2575,9 @@ func PossibleResourceStatusValues() []ResourceStatus { func PossibleRestartPartitionModeValues() []RestartPartitionMode { return original.PossibleRestartPartitionModeValues() } +func PossibleRestartPolicyValues() []RestartPolicy { + return original.PossibleRestartPolicyValues() +} func PossibleRestoreStateValues() []RestoreState { return original.PossibleRestoreStateValues() } @@ -2482,6 +2590,9 @@ func PossibleRetentionPolicyTypeBasicBasicRetentionPolicyDescriptionValues() []R func PossibleRetentionPolicyTypeValues() []RetentionPolicyType { return original.PossibleRetentionPolicyTypeValues() } +func PossibleRollingUpgradeModeValues() []RollingUpgradeMode { + return original.PossibleRollingUpgradeModeValues() +} func PossibleSafetyCheckKindValues() []SafetyCheckKind { return original.PossibleSafetyCheckKindValues() } @@ -2494,6 +2605,9 @@ func PossibleScalingTriggerKindValues() []ScalingTriggerKind { func PossibleScheduleKindValues() []ScheduleKind { return original.PossibleScheduleKindValues() } +func PossibleSchemeValues() []Scheme { + return original.PossibleSchemeValues() +} func PossibleSecretKindValues() []SecretKind { return original.PossibleSecretKindValues() } @@ -2560,6 +2674,9 @@ func PossibleServiceStatusValues() []ServiceStatus { func PossibleServiceTypeRegistrationStatusValues() []ServiceTypeRegistrationStatus { return original.PossibleServiceTypeRegistrationStatusValues() } +func PossibleSettingTypeValues() []SettingType { + return original.PossibleSettingTypeValues() +} func PossibleSizeTypesValues() []SizeTypes { return original.PossibleSizeTypesValues() } @@ -2569,6 +2686,9 @@ func PossibleStateValues() []State { func PossibleStorageKindValues() []StorageKind { return original.PossibleStorageKindValues() } +func PossibleTypeBasicExecutionPolicyValues() []TypeBasicExecutionPolicy { + return original.PossibleTypeBasicExecutionPolicyValues() +} func PossibleTypeValues() []Type { return original.PossibleTypeValues() } diff --git a/profiles/preview/servicefabric/servicefabric/servicefabricapi/models.go b/profiles/preview/servicefabric/servicefabric/servicefabricapi/models.go index 8e0223c3b3de..46a6f3d6ad84 100644 --- a/profiles/preview/servicefabric/servicefabric/servicefabricapi/models.go +++ b/profiles/preview/servicefabric/servicefabric/servicefabricapi/models.go @@ -19,7 +19,7 @@ package servicefabricapi -import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/6.5/servicefabric/servicefabricapi" +import original "github.com/Azure/azure-sdk-for-go/services/servicefabric/7.0/servicefabric/servicefabricapi" type BaseClientAPI = original.BaseClientAPI type MeshApplicationClientAPI = original.MeshApplicationClientAPI diff --git a/profiles/preview/storage/mgmt/storage/models.go b/profiles/preview/storage/mgmt/storage/models.go index 5fb2595e743b..87c8946db909 100644 --- a/profiles/preview/storage/mgmt/storage/models.go +++ b/profiles/preview/storage/mgmt/storage/models.go @@ -240,6 +240,13 @@ const ( QuotaID ReasonCode = original.QuotaID ) +type RoutingChoice = original.RoutingChoice + +const ( + InternetRouting RoutingChoice = original.InternetRouting + MicrosoftRouting RoutingChoice = original.MicrosoftRouting +) + type Services = original.Services const ( @@ -310,11 +317,13 @@ const ( type Account = original.Account type AccountCheckNameAvailabilityParameters = original.AccountCheckNameAvailabilityParameters type AccountCreateParameters = original.AccountCreateParameters +type AccountInternetEndpoints = original.AccountInternetEndpoints type AccountKey = original.AccountKey type AccountListKeysResult = original.AccountListKeysResult type AccountListResult = original.AccountListResult type AccountListResultIterator = original.AccountListResultIterator type AccountListResultPage = original.AccountListResultPage +type AccountMicrosoftEndpoints = original.AccountMicrosoftEndpoints type AccountProperties = original.AccountProperties type AccountPropertiesCreateParameters = original.AccountPropertiesCreateParameters type AccountPropertiesUpdateParameters = original.AccountPropertiesUpdateParameters @@ -408,10 +417,12 @@ type PrivateLinkServiceConnectionState = original.PrivateLinkServiceConnectionSt type ProxyResource = original.ProxyResource type Resource = original.Resource type Restriction = original.Restriction +type RoutingPreference = original.RoutingPreference type SKUCapability = original.SKUCapability type ServiceSasParameters = original.ServiceSasParameters type ServiceSpecification = original.ServiceSpecification type Sku = original.Sku +type SkuInformation = original.SkuInformation type SkuListResult = original.SkuListResult type SkusClient = original.SkusClient type TagProperty = original.TagProperty @@ -594,6 +605,9 @@ func PossibleReasonCodeValues() []ReasonCode { func PossibleReasonValues() []Reason { return original.PossibleReasonValues() } +func PossibleRoutingChoiceValues() []RoutingChoice { + return original.PossibleRoutingChoiceValues() +} func PossibleServicesValues() []Services { return original.PossibleServicesValues() } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go index 2a6b862c19f3..4bea834c07ef 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/apioperations.go @@ -387,10 +387,10 @@ func (client APIOperationsClient) ListByAPI(ctx context.Context, resourceGroupNa {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationsClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go index 116ff0bb34f4..102563d55fbb 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/apiproducts.go @@ -73,10 +73,10 @@ func (client APIProductsClient) ListByAPI(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIProductsClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go index 3a1c43ec07a9..9cc041a0f5f0 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/apis.go @@ -461,10 +461,10 @@ func (client ApisClient) ListByService(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ApisClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go index 1694b4c8caa7..d60e0c0c8737 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/authorizationservers.go @@ -350,10 +350,10 @@ func (client AuthorizationServersClient) ListByService(ctx context.Context, reso {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go index 2b7ff7f05479..ca3ad840178c 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/backends.go @@ -351,10 +351,10 @@ func (client BackendsClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.BackendsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go index ab2a4622e3d0..a6ffe00b6e00 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/certificates.go @@ -350,10 +350,10 @@ func (client CertificatesClient) ListByService(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CertificatesClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go index 8f33aeb3ac49..ea916a633a82 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/groups.go @@ -354,10 +354,10 @@ func (client GroupsClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go index d3a0cf83b1d1..9db75d441954 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/groupusers.go @@ -176,10 +176,10 @@ func (client GroupUsersClient) ListByGroup(ctx context.Context, resourceGroupNam {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUsersClient", "ListByGroup", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go index ccc1c339ab64..6c90f767abb4 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/loggers.go @@ -340,10 +340,10 @@ func (client LoggersClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.LoggersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go index 083e6ec53899..a129bd8c82c1 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/openidconnectproviders.go @@ -343,10 +343,10 @@ func (client OpenIDConnectProvidersClient) ListByService(ctx context.Context, re {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OpenIDConnectProvidersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go index ecd6125a16eb..d87efcd02950 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/productapis.go @@ -173,10 +173,10 @@ func (client ProductApisClient) ListByProduct(ctx context.Context, resourceGroup {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductApisClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go index 3b5f4bae2231..c368a20b7eb6 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/productgroups.go @@ -172,10 +172,10 @@ func (client ProductGroupsClient) ListByProduct(ctx context.Context, resourceGro {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupsClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go index f11c4ccfe01a..9b7cfc2ff7b3 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/products.go @@ -365,10 +365,10 @@ func (client ProductsClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go index b4ded3dc8d89..67270961b06c 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/productsubscriptions.go @@ -78,10 +78,10 @@ func (client ProductSubscriptionsClient) ListByProduct(ctx context.Context, reso {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductSubscriptionsClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go index 5e44df4124a6..db482da90728 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/property.go @@ -350,10 +350,10 @@ func (client PropertyClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go index 8d3304ee4ad7..94e3564ef77b 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/reports.go @@ -71,10 +71,10 @@ func (client ReportsClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go index 1f1b917c9d10..d275c91332e4 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/subscriptions.go @@ -357,10 +357,10 @@ func (client SubscriptionsClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go index ed4c9ee3e4f5..33d0fb6f4d2c 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/usergroups.go @@ -75,10 +75,10 @@ func (client UserGroupsClient) ListByUser(ctx context.Context, resourceGroupName {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserGroupsClient", "ListByUser", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go index 383d0ae72452..7f2df4eca2c8 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/users.go @@ -462,10 +462,10 @@ func (client UsersClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UsersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go b/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go index db912ac89cfa..09d3692e32e6 100644 --- a/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go +++ b/services/apimanagement/mgmt/2016-07-07/apimanagement/usersubscriptions.go @@ -78,10 +78,10 @@ func (client UserSubscriptionsClient) ListByUser(ctx context.Context, resourceGr {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserSubscriptionsClient", "ListByUser", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go index ca308663c4df..f32e6a458f64 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apioperations.go @@ -385,10 +385,10 @@ func (client APIOperationsClient) ListByApis(ctx context.Context, resourceGroupN {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationsClient", "ListByApis", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go index 6422c8609481..495c214610eb 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apiproducts.go @@ -73,10 +73,10 @@ func (client APIProductsClient) ListByApis(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIProductsClient", "ListByApis", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go index 3c6a3cec1cce..b596f1f8a2c6 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/apis.go @@ -370,10 +370,10 @@ func (client ApisClient) ListByService(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ApisClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go index ebfad9f768ef..80b336389170 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/authorizationservers.go @@ -353,10 +353,10 @@ func (client AuthorizationServersClient) ListByService(ctx context.Context, reso {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go index 3d4f9c5ed9c7..eb051b8e686e 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/backends.go @@ -347,10 +347,10 @@ func (client BackendsClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.BackendsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go index 3769c00065ea..8fc929bc0a79 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/certificates.go @@ -360,10 +360,10 @@ func (client CertificatesClient) ListByService(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CertificatesClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go index 9f85728e9960..a7a73e97360d 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/groups.go @@ -354,10 +354,10 @@ func (client GroupsClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go index 63796f55cec7..e4c17b7eac98 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/groupusers.go @@ -273,10 +273,10 @@ func (client GroupUsersClient) ListByGroups(ctx context.Context, resourceGroupNa {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUsersClient", "ListByGroups", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go index 67e4ddb89883..f8baddb71950 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/loggers.go @@ -346,10 +346,10 @@ func (client LoggersClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.LoggersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go index 49200d08b046..b54a6c9bd3d7 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/openidconnectproviders.go @@ -349,10 +349,10 @@ func (client OpenIDConnectProvidersClient) ListByService(ctx context.Context, re {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OpenIDConnectProvidersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go index c8592f0479f5..05c20af89ff7 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/productapis.go @@ -269,10 +269,10 @@ func (client ProductApisClient) ListByProducts(ctx context.Context, resourceGrou {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductApisClient", "ListByProducts", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go index ee0267abee74..118e21268da9 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/productgroups.go @@ -269,10 +269,10 @@ func (client ProductGroupsClient) ListByProducts(ctx context.Context, resourceGr {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupsClient", "ListByProducts", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go index 585a0483b875..db694a731058 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/products.go @@ -365,10 +365,10 @@ func (client ProductsClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go index 0394cbe0a167..d31808f004df 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/productsubscriptions.go @@ -78,10 +78,10 @@ func (client ProductSubscriptionsClient) ListByProducts(ctx context.Context, res {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductSubscriptionsClient", "ListByProducts", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go index f6d972232796..e402a894a71d 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/properties.go @@ -69,10 +69,10 @@ func (client PropertiesClient) ListByService(ctx context.Context, resourceGroupN {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PropertiesClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go index 956d1fdcaac5..39d3823c3d7d 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/reports.go @@ -71,10 +71,10 @@ func (client ReportsClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go index 6f0071aea539..72804412e4d4 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/subscriptions.go @@ -365,10 +365,10 @@ func (client SubscriptionsClient) List(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionsClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go index e67e65dffaf4..a14f936b1b7b 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/usergroups.go @@ -75,10 +75,10 @@ func (client UserGroupsClient) ListByUsers(ctx context.Context, resourceGroupNam {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserGroupsClient", "ListByUsers", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go index ed076b7340f3..d28a42b16446 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/users.go @@ -558,10 +558,10 @@ func (client UsersClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UsersClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go b/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go index e95463aaa50c..42aded7274f1 100644 --- a/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go +++ b/services/apimanagement/mgmt/2016-10-10/apimanagement/usersubscriptions.go @@ -78,10 +78,10 @@ func (client UserSubscriptionsClient) ListByUsers(ctx context.Context, resourceG {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserSubscriptionsClient", "ListByUsers", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go index 2b34bd658790..a3e2fa64836f 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/api.go @@ -450,10 +450,10 @@ func (client APIClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByService", err.Error()) } @@ -605,10 +605,10 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByTags", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go index 5522e7bfd3fd..68912d22bbcf 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnostic.go @@ -474,10 +474,10 @@ func (client APIDiagnosticClient) ListByService(ctx context.Context, resourceGro {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go index b15bf3a73bed..5ccc509a3600 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apidiagnosticlogger.go @@ -383,10 +383,10 @@ func (client APIDiagnosticLoggerClient) ListByService(ctx context.Context, resou {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticLoggerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go index 9c5ac182a56f..24713590baef 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissueattachments.go @@ -79,10 +79,10 @@ func (client APIIssueAttachmentsClient) ListByService(ctx context.Context, resou {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueAttachmentsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go index b1cf35decaa4..0065a998c222 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissuecomments.go @@ -79,10 +79,10 @@ func (client APIIssueCommentsClient) ListByService(ctx context.Context, resource {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueCommentsClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go index 5c589ddc7466..3565d64a5182 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiissues.go @@ -75,10 +75,10 @@ func (client APIIssuesClient) ListByService(ctx context.Context, resourceGroupNa {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssuesClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go index 3c755c34482f..1d9b7ebe2ff2 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apioperation.go @@ -488,10 +488,10 @@ func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go index bda37ab1fefc..4ca7f66e2bd3 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiproduct.go @@ -73,10 +73,10 @@ func (client APIProductClient) ListByApis(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIProductClient", "ListByApis", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go index 05949c6e6ae2..53a8a2ba093c 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirelease.go @@ -364,10 +364,10 @@ func (client APIReleaseClient) List(ctx context.Context, resourceGroupName strin if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: serviceName, Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go index 3f06b2773392..c08d8c3a834f 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apirevisions.go @@ -66,10 +66,10 @@ func (client APIRevisionsClient) List(ctx context.Context, resourceGroupName str if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: serviceName, Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go index f80f5d666ca3..35a38173b6c7 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/apiversionset.go @@ -451,10 +451,10 @@ func (client APIVersionSetClient) ListByService(ctx context.Context, resourceGro if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: serviceName, Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil}, diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go index 37daeacae24f..b8628c809c14 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/authorizationserver.go @@ -444,10 +444,10 @@ func (client AuthorizationServerClient) ListByService(ctx context.Context, resou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go index 4450042dd39e..77e018f1fb58 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/backend.go @@ -444,10 +444,10 @@ func (client BackendClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go index c5e252eecfb5..bbde9cc42ef3 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/certificate.go @@ -454,10 +454,10 @@ func (client CertificateClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go index 62eb5d77a3a9..9e99d55af1a1 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnostic.go @@ -445,10 +445,10 @@ func (client DiagnosticClient) ListByService(ctx context.Context, resourceGroupN {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go index 2b845fc38079..3ab9c5ae0d24 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/diagnosticlogger.go @@ -360,10 +360,10 @@ func (client DiagnosticLoggerClient) ListByService(ctx context.Context, resource {Target: "diagnosticID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticLoggerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go index bbb76b793cc4..763564218e1e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/emailtemplate.go @@ -426,10 +426,10 @@ func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.EmailTemplateClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go index 39eb93bb579d..a3a40ced349f 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/group.go @@ -446,10 +446,10 @@ func (client GroupClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go index 89ebad4d0808..4e1ad85fb753 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/groupuser.go @@ -368,10 +368,10 @@ func (client GroupUserClient) List(ctx context.Context, resourceGroupName string {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go index 78c0a8d03d80..8037acc52776 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/logger.go @@ -455,10 +455,10 @@ func (client LoggerClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go index 65e08c84831e..d06b52f2c516 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/notification.go @@ -239,10 +239,10 @@ func (client NotificationClient) ListByService(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.NotificationClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go index 8b0b7ad530bb..e733aba314b2 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/openidconnectprovider.go @@ -440,10 +440,10 @@ func (client OpenIDConnectProviderClient) ListByService(ctx context.Context, res {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OpenIDConnectProviderClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go index 2beedb0afaf5..6261903f3153 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/operation.go @@ -78,10 +78,10 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OperationClient", "ListByTags", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go index 9c57165f5faa..2eaea059947b 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/product.go @@ -453,10 +453,10 @@ func (client ProductClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go index 694f3750b7d3..2b2b39bf0db5 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/productapi.go @@ -366,10 +366,10 @@ func (client ProductAPIClient) ListByProduct(ctx context.Context, resourceGroupN {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductAPIClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go index ee41f422049c..f1550f10f377 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/productgroup.go @@ -365,10 +365,10 @@ func (client ProductGroupClient) ListByProduct(ctx context.Context, resourceGrou {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go index 6e517ef4f6fa..05809fd23ea0 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/productsubscriptions.go @@ -78,10 +78,10 @@ func (client ProductSubscriptionsClient) List(ctx context.Context, resourceGroup {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductSubscriptionsClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go index 2c6545682260..836492419640 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/property.go @@ -445,10 +445,10 @@ func (client PropertyClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go index 622c26f17224..aad0c75826f9 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/reports.go @@ -66,10 +66,10 @@ func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByAPI", err.Error()) } @@ -205,10 +205,10 @@ func (client ReportsClient) ListByGeo(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByGeo", err.Error()) } @@ -346,10 +346,10 @@ func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupNa {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByOperation", err.Error()) } @@ -485,10 +485,10 @@ func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByProduct", err.Error()) } @@ -624,10 +624,10 @@ func (client ReportsClient) ListByRequest(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByRequest", err.Error()) } @@ -725,10 +725,10 @@ func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListBySubscription", err.Error()) } @@ -869,10 +869,10 @@ func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByTime", err.Error()) } @@ -1011,10 +1011,10 @@ func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByUser", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go index d90e5d37b4a5..38645ae4c0d0 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/subscription.go @@ -458,10 +458,10 @@ func (client SubscriptionClient) List(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go index 371b6e392cf2..b403ed011194 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tag.go @@ -1662,10 +1662,10 @@ func (client TagClient) ListByAPI(ctx context.Context, resourceGroupName string, {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByAPI", err.Error()) } @@ -1821,10 +1821,10 @@ func (client TagClient) ListByOperation(ctx context.Context, resourceGroupName s {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByOperation", err.Error()) } @@ -1972,10 +1972,10 @@ func (client TagClient) ListByProduct(ctx context.Context, resourceGroupName str {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByProduct", err.Error()) } @@ -2117,10 +2117,10 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go index d9237ecd38d6..ac88511f6c6b 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagdescription.go @@ -478,10 +478,10 @@ func (client TagDescriptionClient) ListByAPI(ctx context.Context, resourceGroupN {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagDescriptionClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go index ee8f12cf4234..58e0828a6de7 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/tagresource.go @@ -80,10 +80,10 @@ func (client TagResourceClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagResourceClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go index 2431cefa87af..38e4bd7c5b7a 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/user.go @@ -649,10 +649,10 @@ func (client UserClient) ListByService(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go index 74396c84e334..33ff3596cfbf 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/usergroup.go @@ -75,10 +75,10 @@ func (client UserGroupClient) List(ctx context.Context, resourceGroupName string {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserGroupClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go b/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go index 6cb6e30a331b..f80f04ac490e 100644 --- a/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go +++ b/services/apimanagement/mgmt/2017-03-01/apimanagement/usersubscription.go @@ -78,10 +78,10 @@ func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserSubscriptionClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go index 3139e4ac2e51..70e8fa0a2420 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/api.go @@ -454,10 +454,10 @@ func (client APIClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByService", err.Error()) } @@ -609,10 +609,10 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByTags", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go index de145f35a8c3..d797502b3cea 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnostic.go @@ -473,10 +473,10 @@ func (client APIDiagnosticClient) ListByService(ctx context.Context, resourceGro {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go index 4c4acb4fd859..0542f87afbd4 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apidiagnosticlogger.go @@ -383,10 +383,10 @@ func (client APIDiagnosticLoggerClient) ListByService(ctx context.Context, resou {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticLoggerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go index da426d0b467c..3de65fa4bd75 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissue.go @@ -479,10 +479,10 @@ func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go index 448f5cda0cbc..5d7e4111e08c 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissueattachment.go @@ -507,10 +507,10 @@ func (client APIIssueAttachmentClient) ListByService(ctx context.Context, resour {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueAttachmentClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go index fb265fbc511d..b2deb1da4bd1 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiissuecomment.go @@ -506,10 +506,10 @@ func (client APIIssueCommentClient) ListByService(ctx context.Context, resourceG {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueCommentClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go index 4ffdb4a876c4..860996c10cc2 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apioperation.go @@ -494,10 +494,10 @@ func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go index aa816680bfa8..6a550f3da640 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiproduct.go @@ -73,10 +73,10 @@ func (client APIProductClient) ListByApis(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIProductClient", "ListByApis", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go index 04dcb8e53a92..d377ee5b3a01 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirelease.go @@ -468,10 +468,10 @@ func (client APIReleaseClient) List(ctx context.Context, resourceGroupName strin {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIReleaseClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go index a51668d57683..e592aa54a3ce 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apirevisions.go @@ -74,10 +74,10 @@ func (client APIRevisionsClient) List(ctx context.Context, resourceGroupName str {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIRevisionsClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go index 160f8b852992..9b076462e145 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/apiversionset.go @@ -454,10 +454,10 @@ func (client APIVersionSetClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIVersionSetClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go index a1c08c495eb1..f2cf297b900a 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/authorizationserver.go @@ -453,10 +453,10 @@ func (client AuthorizationServerClient) ListByService(ctx context.Context, resou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go index 2bb70376089d..cbc401781c84 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/backend.go @@ -449,10 +449,10 @@ func (client BackendClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go index 5719e2e942f3..c4a50de0dc3e 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/certificate.go @@ -453,10 +453,10 @@ func (client CertificateClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go index 68016a51d580..178af8d52c36 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnostic.go @@ -444,10 +444,10 @@ func (client DiagnosticClient) ListByService(ctx context.Context, resourceGroupN {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go index d6c2c484455e..6d7e8da01c69 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/diagnosticlogger.go @@ -360,10 +360,10 @@ func (client DiagnosticLoggerClient) ListByService(ctx context.Context, resource {Target: "diagnosticID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticLoggerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go index 25ddbc28c46a..34b7ec7f5ed6 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/emailtemplate.go @@ -431,10 +431,10 @@ func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.EmailTemplateClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go index 655aabbf6e5d..a07a50bd1055 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/group.go @@ -451,10 +451,10 @@ func (client GroupClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go index 5c8cb1a13daa..0fa6dff037af 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/groupuser.go @@ -368,10 +368,10 @@ func (client GroupUserClient) List(ctx context.Context, resourceGroupName string {Target: "groupID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go index d6cf0f8d60d7..670c63713b39 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/logger.go @@ -444,10 +444,10 @@ func (client LoggerClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go index a70a0f69f7d9..daea621b574b 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/notification.go @@ -244,10 +244,10 @@ func (client NotificationClient) ListByService(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.NotificationClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go index 7089159e01a8..30faacf695c8 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/openidconnectprovider.go @@ -445,10 +445,10 @@ func (client OpenIDConnectProviderClient) ListByService(ctx context.Context, res {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OpenIDConnectProviderClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go index 2a370892b501..6827a4aa1f53 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/operation.go @@ -79,10 +79,10 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OperationClient", "ListByTags", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go index 43b15199660d..45c47f5df5ea 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/product.go @@ -458,10 +458,10 @@ func (client ProductClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go index 3d87035e4edb..b713dfb3cab5 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/productapi.go @@ -369,10 +369,10 @@ func (client ProductAPIClient) ListByProduct(ctx context.Context, resourceGroupN {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductAPIClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go index 0f50880c42d8..6c0f3d21ec4d 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/productgroup.go @@ -365,10 +365,10 @@ func (client ProductGroupClient) ListByProduct(ctx context.Context, resourceGrou {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go index 735a5c8c54d4..15afb0b27b76 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/productsubscriptions.go @@ -78,10 +78,10 @@ func (client ProductSubscriptionsClient) List(ctx context.Context, resourceGroup {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductSubscriptionsClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go index 9eadef15d431..1823ef044dcf 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/property.go @@ -450,10 +450,10 @@ func (client PropertyClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go index 6be189d1a6c2..705e7e385b6a 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/reports.go @@ -66,10 +66,10 @@ func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByAPI", err.Error()) } @@ -205,10 +205,10 @@ func (client ReportsClient) ListByGeo(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByGeo", err.Error()) } @@ -346,10 +346,10 @@ func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupNa {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByOperation", err.Error()) } @@ -485,10 +485,10 @@ func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByProduct", err.Error()) } @@ -624,10 +624,10 @@ func (client ReportsClient) ListByRequest(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByRequest", err.Error()) } @@ -725,10 +725,10 @@ func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListBySubscription", err.Error()) } @@ -869,10 +869,10 @@ func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByTime", err.Error()) } @@ -1011,10 +1011,10 @@ func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByUser", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go index 81fb194d038c..f688b9e71037 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/subscription.go @@ -469,10 +469,10 @@ func (client SubscriptionClient) List(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go index 6bbb605d68e3..ef4ca026018e 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tag.go @@ -1668,10 +1668,10 @@ func (client TagClient) ListByAPI(ctx context.Context, resourceGroupName string, {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByAPI", err.Error()) } @@ -1828,10 +1828,10 @@ func (client TagClient) ListByOperation(ctx context.Context, resourceGroupName s {Target: "operationID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByOperation", err.Error()) } @@ -1979,10 +1979,10 @@ func (client TagClient) ListByProduct(ctx context.Context, resourceGroupName str {Target: "productID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByProduct", err.Error()) } @@ -2124,10 +2124,10 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go index 67080a6219d7..b2df335b485c 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagdescription.go @@ -482,10 +482,10 @@ func (client TagDescriptionClient) ListByAPI(ctx context.Context, resourceGroupN {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagDescriptionClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go index 6a6fca70e9ba..6a912bb784a0 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/tagresource.go @@ -80,10 +80,10 @@ func (client TagResourceClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagResourceClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go index 36ff7f75d890..54107f41150e 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/user.go @@ -743,10 +743,10 @@ func (client UserClient) ListByService(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go index dc7708fbe2b5..bdbdc6aad725 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/usergroup.go @@ -75,10 +75,10 @@ func (client UserGroupClient) List(ctx context.Context, resourceGroupName string {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserGroupClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go b/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go index 0a2538288d8d..a52eb5e4faf3 100644 --- a/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go +++ b/services/apimanagement/mgmt/2018-01-01/apimanagement/usersubscription.go @@ -78,10 +78,10 @@ func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName {Target: "UID", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserSubscriptionClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go index fbc764e5e64e..7db6f0dfe386 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/api.go @@ -455,10 +455,10 @@ func (client APIClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByService", err.Error()) } @@ -612,10 +612,10 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByTags", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go index 6dfac3e93f50..e246f27df6d0 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apidiagnostic.go @@ -78,7 +78,7 @@ func (client APIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGr {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, @@ -503,10 +503,10 @@ func (client APIDiagnosticClient) ListByService(ctx context.Context, resourceGro {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go index 5697e027a3a5..ec54321f18a4 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissue.go @@ -477,10 +477,10 @@ func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go index 403bfdb36c60..48d2343eebb7 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissueattachment.go @@ -501,10 +501,10 @@ func (client APIIssueAttachmentClient) ListByService(ctx context.Context, resour {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueAttachmentClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go index a32c844e3b2a..9f3f332af3ae 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiissuecomment.go @@ -500,10 +500,10 @@ func (client APIIssueCommentClient) ListByService(ctx context.Context, resourceG {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueCommentClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go index f534e9a505ff..85540f689889 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apioperation.go @@ -492,10 +492,10 @@ func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go index 6fd9817ecfd7..b99261c5322b 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiproduct.go @@ -72,10 +72,10 @@ func (client APIProductClient) ListByApis(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIProductClient", "ListByApis", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go index 5e7ec1c0a5e8..f8aa179b862a 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirelease.go @@ -467,10 +467,10 @@ func (client APIReleaseClient) ListByService(ctx context.Context, resourceGroupN {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIReleaseClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go index afeca62b6c36..5966b027d808 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apirevision.go @@ -72,10 +72,10 @@ func (client APIRevisionClient) ListByService(ctx context.Context, resourceGroup {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIRevisionClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go index 5337e077ed11..ebe19d739692 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apischema.go @@ -482,10 +482,10 @@ func (client APISchemaClient) ListByAPI(ctx context.Context, resourceGroupName s {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APISchemaClient", "ListByAPI", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go index 3eaf6f542e47..ca89c63f3b38 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apitagdescription.go @@ -482,10 +482,10 @@ func (client APITagDescriptionClient) ListByService(ctx context.Context, resourc {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APITagDescriptionClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go index 9d1fb36ef474..e76b142d782b 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/apiversionset.go @@ -447,10 +447,10 @@ func (client APIVersionSetClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIVersionSetClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go index d63ef979725b..582471ebd8cc 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/authorizationserver.go @@ -453,10 +453,10 @@ func (client AuthorizationServerClient) ListByService(ctx context.Context, resou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go index 3a5cbf6990dd..a6c52503eca4 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/backend.go @@ -446,10 +446,10 @@ func (client BackendClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go index 78bbc9dccbfc..61b6d608bdc9 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/cache.go @@ -451,10 +451,10 @@ func (client CacheClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CacheClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go index 1185ad097de9..6d9959f7d2c9 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/certificate.go @@ -453,10 +453,10 @@ func (client CertificateClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go index 931ebadbcb10..9dc71b52922e 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/diagnostic.go @@ -74,7 +74,7 @@ func (client DiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroup {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, @@ -479,10 +479,10 @@ func (client DiagnosticClient) ListByService(ctx context.Context, resourceGroupN {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go index 24e959912948..25da9732cc2d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/emailtemplate.go @@ -434,10 +434,10 @@ func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.EmailTemplateClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go index 700a2e4554cf..1d973cae0524 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/group.go @@ -446,10 +446,10 @@ func (client GroupClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go index 9f95e4b7b0a1..98d938054b2a 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/groupuser.go @@ -359,10 +359,10 @@ func (client GroupUserClient) List(ctx context.Context, resourceGroupName string {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go index 26f70998177c..b70e2e98333e 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/issue.go @@ -163,10 +163,10 @@ func (client IssueClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.IssueClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go index ea87e2946e34..93b80415877d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/logger.go @@ -449,10 +449,10 @@ func (client LoggerClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go index cdfc7316d49e..e4a2a5421016 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/notification.go @@ -244,10 +244,10 @@ func (client NotificationClient) ListByService(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.NotificationClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go index 32595383298c..5eb3593ba1c6 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/openidconnectprovider.go @@ -445,10 +445,10 @@ func (client OpenIDConnectProviderClient) ListByService(ctx context.Context, res {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OpenIDConnectProviderClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go index 56fb61d01300..270e5208ef5b 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/operation.go @@ -80,10 +80,10 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OperationClient", "ListByTags", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go index 69adbab43f83..30be79926a58 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/product.go @@ -455,10 +455,10 @@ func (client ProductClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "ListByService", err.Error()) } @@ -609,10 +609,10 @@ func (client ProductClient) ListByTags(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "ListByTags", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go index 957c1b9d100a..06de98e1db87 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productapi.go @@ -365,10 +365,10 @@ func (client ProductAPIClient) ListByProduct(ctx context.Context, resourceGroupN {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductAPIClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go index 0f24117bf59e..2eb7feca9207 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productgroup.go @@ -355,10 +355,10 @@ func (client ProductGroupClient) ListByProduct(ctx context.Context, resourceGrou {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "ListByProduct", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go index 6c901b1fe5ef..4583d1393240 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/productsubscriptions.go @@ -78,10 +78,10 @@ func (client ProductSubscriptionsClient) List(ctx context.Context, resourceGroup {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductSubscriptionsClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go index d4a74574e26f..9ae7cf7c5b03 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/property.go @@ -450,10 +450,10 @@ func (client PropertyClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go index 6162db046372..495355fa1117 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/reports.go @@ -67,10 +67,10 @@ func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByAPI", err.Error()) } @@ -219,10 +219,10 @@ func (client ReportsClient) ListByGeo(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByGeo", err.Error()) } @@ -370,10 +370,10 @@ func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupNa {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByOperation", err.Error()) } @@ -523,10 +523,10 @@ func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByProduct", err.Error()) } @@ -669,10 +669,10 @@ func (client ReportsClient) ListByRequest(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByRequest", err.Error()) } @@ -781,10 +781,10 @@ func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListBySubscription", err.Error()) } @@ -937,10 +937,10 @@ func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByTime", err.Error()) } @@ -1092,10 +1092,10 @@ func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByUser", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go index 6eeda9fc9c30..56e86031c114 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/subscription.go @@ -469,10 +469,10 @@ func (client SubscriptionClient) List(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go index 665846db54d5..75250fa5aadb 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/tag.go @@ -1641,10 +1641,10 @@ func (client TagClient) ListByAPI(ctx context.Context, resourceGroupName string, {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByAPI", err.Error()) } @@ -1797,10 +1797,10 @@ func (client TagClient) ListByOperation(ctx context.Context, resourceGroupName s {Target: "operationID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByOperation", err.Error()) } @@ -1947,10 +1947,10 @@ func (client TagClient) ListByProduct(ctx context.Context, resourceGroupName str {Target: "productID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByProduct", err.Error()) } @@ -2093,10 +2093,10 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go index 3fcf922092db..bc7a0c5ed13d 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/tagresource.go @@ -78,10 +78,10 @@ func (client TagResourceClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagResourceClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go index 4e122e1a1853..46ddceb4e738 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/user.go @@ -653,10 +653,10 @@ func (client UserClient) ListByService(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "ListByService", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go index 34e3ca28e5cf..7a03d93f87ee 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/usergroup.go @@ -74,10 +74,10 @@ func (client UserGroupClient) List(ctx context.Context, resourceGroupName string {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserGroupClient", "List", err.Error()) } diff --git a/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go b/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go index 7ae1b60d92d3..a374da136a39 100644 --- a/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go +++ b/services/apimanagement/mgmt/2019-01-01/apimanagement/usersubscription.go @@ -78,10 +78,10 @@ func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName {Target: "userID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserSubscriptionClient", "List", err.Error()) } diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go b/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go index bb51f0017315..234e74542d71 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/azurestackapi/interfaces.go @@ -33,8 +33,11 @@ var _ OperationsClientAPI = (*azurestack.OperationsClient)(nil) // ProductsClientAPI contains the set of methods on the ProductsClient type. type ProductsClientAPI interface { Get(ctx context.Context, resourceGroup string, registrationName string, productName string) (result azurestack.Product, err error) + GetProduct(ctx context.Context, resourceGroup string, registrationName string, productName string, deviceConfiguration *azurestack.DeviceConfiguration) (result azurestack.Product, err error) + GetProducts(ctx context.Context, resourceGroup string, registrationName string, deviceConfiguration *azurestack.DeviceConfiguration) (result azurestack.ProductList, err error) List(ctx context.Context, resourceGroup string, registrationName string) (result azurestack.ProductListPage, err error) ListDetails(ctx context.Context, resourceGroup string, registrationName string, productName string) (result azurestack.ExtendedProduct, err error) + UploadLog(ctx context.Context, resourceGroup string, registrationName string, productName string, marketplaceProductLogUpdate *azurestack.MarketplaceProductLogUpdate) (result azurestack.ProductLog, err error) } var _ ProductsClientAPI = (*azurestack.ProductsClient)(nil) diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/models.go b/services/azurestack/mgmt/2017-06-01/azurestack/models.go index 8be9e95db542..104f781d818a 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/models.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/models.go @@ -29,6 +29,52 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/azurestack/mgmt/2017-06-01/azurestack" +// Category enumerates the values for category. +type Category string + +const ( + // ADFS ... + ADFS Category = "ADFS" + // AzureAD ... + AzureAD Category = "AzureAD" +) + +// PossibleCategoryValues returns an array of possible values for the Category const type. +func PossibleCategoryValues() []Category { + return []Category{ADFS, AzureAD} +} + +// CompatibilityIssue enumerates the values for compatibility issue. +type CompatibilityIssue string + +const ( + // ADFSIdentitySystemRequired ... + ADFSIdentitySystemRequired CompatibilityIssue = "ADFSIdentitySystemRequired" + // AzureADIdentitySystemRequired ... + AzureADIdentitySystemRequired CompatibilityIssue = "AzureADIdentitySystemRequired" + // CapacityBillingModelRequired ... + CapacityBillingModelRequired CompatibilityIssue = "CapacityBillingModelRequired" + // ConnectionToAzureRequired ... + ConnectionToAzureRequired CompatibilityIssue = "ConnectionToAzureRequired" + // ConnectionToInternetRequired ... + ConnectionToInternetRequired CompatibilityIssue = "ConnectionToInternetRequired" + // DevelopmentBillingModelRequired ... + DevelopmentBillingModelRequired CompatibilityIssue = "DevelopmentBillingModelRequired" + // DisconnectedEnvironmentRequired ... + DisconnectedEnvironmentRequired CompatibilityIssue = "DisconnectedEnvironmentRequired" + // HigherDeviceVersionRequired ... + HigherDeviceVersionRequired CompatibilityIssue = "HigherDeviceVersionRequired" + // LowerDeviceVersionRequired ... + LowerDeviceVersionRequired CompatibilityIssue = "LowerDeviceVersionRequired" + // PayAsYouGoBillingModelRequired ... + PayAsYouGoBillingModelRequired CompatibilityIssue = "PayAsYouGoBillingModelRequired" +) + +// PossibleCompatibilityIssueValues returns an array of possible values for the CompatibilityIssue const type. +func PossibleCompatibilityIssueValues() []CompatibilityIssue { + return []CompatibilityIssue{ADFSIdentitySystemRequired, AzureADIdentitySystemRequired, CapacityBillingModelRequired, ConnectionToAzureRequired, ConnectionToInternetRequired, DevelopmentBillingModelRequired, DisconnectedEnvironmentRequired, HigherDeviceVersionRequired, LowerDeviceVersionRequired, PayAsYouGoBillingModelRequired} +} + // ComputeRole enumerates the values for compute role. type ComputeRole string @@ -102,6 +148,18 @@ type ActivationKeyResult struct { ActivationKey *string `json:"activationKey,omitempty"` } +// Compatibility product compatibility +type Compatibility struct { + // IsCompatible - Tells if product is compatible with current device + IsCompatible *bool `json:"isCompatible,omitempty"` + // Message - Short error message if any compatibility issues are found + Message *string `json:"message,omitempty"` + // Description - Full error message if any compatibility issues are found + Description *string `json:"description,omitempty"` + // Issues - List of all issues found + Issues *[]CompatibilityIssue `json:"issues,omitempty"` +} + // CustomerSubscription customer subscription. type CustomerSubscription struct { autorest.Response `json:"-"` @@ -349,6 +407,14 @@ type DataDiskImage struct { SourceBlobSasURI *string `json:"sourceBlobSasUri,omitempty"` } +// DeviceConfiguration device Configuration. +type DeviceConfiguration struct { + // DeviceVersion - READ-ONLY; Version of the device. + DeviceVersion *string `json:"deviceVersion,omitempty"` + // IdentitySystem - READ-ONLY; Identity system of the device. Possible values include: 'AzureAD', 'ADFS' + IdentitySystem Category `json:"identitySystem,omitempty"` +} + // Display contains the localized display information for this particular operation or action. type Display struct { // Provider - The localized, friendly version of the resource provider name. @@ -575,6 +641,18 @@ type IconUris struct { Hero *string `json:"hero,omitempty"` } +// MarketplaceProductLogUpdate update details for product log. +type MarketplaceProductLogUpdate struct { + // Operation - READ-ONLY; Operation to log. + Operation *string `json:"operation,omitempty"` + // Status - READ-ONLY; Operation status to log. + Status *string `json:"status,omitempty"` + // Error - READ-ONLY; Error related to the operation. + Error *string `json:"error,omitempty"` + // Details - READ-ONLY; Error details related to operation. + Details *string `json:"details,omitempty"` +} + // Operation describes the supported REST operation. type Operation struct { // Name - The name of the operation being performed on this particular object. @@ -980,6 +1058,33 @@ func NewProductListPage(getNextPage func(context.Context, ProductList) (ProductL return ProductListPage{fn: getNextPage} } +// ProductLog product action log. +type ProductLog struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Log ID. + ID *string `json:"id,omitempty"` + // ProductID - READ-ONLY; Logged product ID. + ProductID *string `json:"productId,omitempty"` + // SubscriptionID - READ-ONLY; Logged subscription ID. + SubscriptionID *string `json:"subscriptionId,omitempty"` + // RegistrationName - READ-ONLY; Logged registration name. + RegistrationName *string `json:"registrationName,omitempty"` + // ResourceGroupName - READ-ONLY; Logged resource group name. + ResourceGroupName *string `json:"resourceGroupName,omitempty"` + // Operation - READ-ONLY; Logged operation. + Operation *string `json:"operation,omitempty"` + // StartDate - READ-ONLY; Operation start datetime. + StartDate *string `json:"startDate,omitempty"` + // EndDate - READ-ONLY; Operation end datetime. + EndDate *string `json:"endDate,omitempty"` + // Status - READ-ONLY; Operation status. + Status *string `json:"status,omitempty"` + // Error - READ-ONLY; Operation error data. + Error *string `json:"error,omitempty"` + // Details - READ-ONLY; Operation error details. + Details *string `json:"details,omitempty"` +} + // ProductNestedProperties properties portion of the product resource. type ProductNestedProperties struct { // DisplayName - The display name of the product. @@ -1016,6 +1121,8 @@ type ProductNestedProperties struct { ProductKind *string `json:"productKind,omitempty"` // ProductProperties - Additional properties for the product. ProductProperties *ProductProperties `json:"productProperties,omitempty"` + // Compatibility - Product compatibility with current device. + Compatibility *Compatibility `json:"compatibility,omitempty"` } // ProductProperties additional properties of the product diff --git a/services/azurestack/mgmt/2017-06-01/azurestack/products.go b/services/azurestack/mgmt/2017-06-01/azurestack/products.go index e70cad6fee70..624df470f930 100644 --- a/services/azurestack/mgmt/2017-06-01/azurestack/products.go +++ b/services/azurestack/mgmt/2017-06-01/azurestack/products.go @@ -119,6 +119,178 @@ func (client ProductsClient) GetResponder(resp *http.Response) (result Product, return } +// GetProduct returns the specified product. +// Parameters: +// resourceGroup - name of the resource group. +// registrationName - name of the Azure Stack registration. +// productName - name of the product. +// deviceConfiguration - device configuration. +func (client ProductsClient) GetProduct(ctx context.Context, resourceGroup string, registrationName string, productName string, deviceConfiguration *DeviceConfiguration) (result Product, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProductsClient.GetProduct") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetProductPreparer(ctx, resourceGroup, registrationName, productName, deviceConfiguration) + if err != nil { + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "GetProduct", nil, "Failure preparing request") + return + } + + resp, err := client.GetProductSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "GetProduct", resp, "Failure sending request") + return + } + + result, err = client.GetProductResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "GetProduct", resp, "Failure responding to request") + } + + return +} + +// GetProductPreparer prepares the GetProduct request. +func (client ProductsClient) GetProductPreparer(ctx context.Context, resourceGroup string, registrationName string, productName string, deviceConfiguration *DeviceConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "productName": autorest.Encode("path", productName), + "registrationName": autorest.Encode("path", registrationName), + "resourceGroup": autorest.Encode("path", resourceGroup), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + deviceConfiguration.DeviceVersion = nil + deviceConfiguration.IdentitySystem = "" + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/GetProduct", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if deviceConfiguration != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(deviceConfiguration)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetProductSender sends the GetProduct request. The method will close the +// http.Response Body if it receives an error. +func (client ProductsClient) GetProductSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetProductResponder handles the response to the GetProduct request. The method always +// closes the http.Response Body. +func (client ProductsClient) GetProductResponder(resp *http.Response) (result Product, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProducts returns a list of products. +// Parameters: +// resourceGroup - name of the resource group. +// registrationName - name of the Azure Stack registration. +// deviceConfiguration - device configuration. +func (client ProductsClient) GetProducts(ctx context.Context, resourceGroup string, registrationName string, deviceConfiguration *DeviceConfiguration) (result ProductList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProductsClient.GetProducts") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetProductsPreparer(ctx, resourceGroup, registrationName, deviceConfiguration) + if err != nil { + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "GetProducts", nil, "Failure preparing request") + return + } + + resp, err := client.GetProductsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "GetProducts", resp, "Failure sending request") + return + } + + result, err = client.GetProductsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "GetProducts", resp, "Failure responding to request") + } + + return +} + +// GetProductsPreparer prepares the GetProducts request. +func (client ProductsClient) GetProductsPreparer(ctx context.Context, resourceGroup string, registrationName string, deviceConfiguration *DeviceConfiguration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registrationName": autorest.Encode("path", registrationName), + "resourceGroup": autorest.Encode("path", resourceGroup), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + deviceConfiguration.DeviceVersion = nil + deviceConfiguration.IdentitySystem = "" + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/_all/GetProducts", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if deviceConfiguration != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(deviceConfiguration)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetProductsSender sends the GetProducts request. The method will close the +// http.Response Body if it receives an error. +func (client ProductsClient) GetProductsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetProductsResponder handles the response to the GetProducts request. The method always +// closes the http.Response Body. +func (client ProductsClient) GetProductsResponder(resp *http.Response) (result ProductList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List returns a list of products. // Parameters: // resourceGroup - name of the resource group. @@ -312,3 +484,92 @@ func (client ProductsClient) ListDetailsResponder(resp *http.Response) (result E result.Response = autorest.Response{Response: resp} return } + +// UploadLog returns the specified product. +// Parameters: +// resourceGroup - name of the resource group. +// registrationName - name of the Azure Stack registration. +// productName - name of the product. +// marketplaceProductLogUpdate - update details for product log. +func (client ProductsClient) UploadLog(ctx context.Context, resourceGroup string, registrationName string, productName string, marketplaceProductLogUpdate *MarketplaceProductLogUpdate) (result ProductLog, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProductsClient.UploadLog") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UploadLogPreparer(ctx, resourceGroup, registrationName, productName, marketplaceProductLogUpdate) + if err != nil { + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "UploadLog", nil, "Failure preparing request") + return + } + + resp, err := client.UploadLogSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "UploadLog", resp, "Failure sending request") + return + } + + result, err = client.UploadLogResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azurestack.ProductsClient", "UploadLog", resp, "Failure responding to request") + } + + return +} + +// UploadLogPreparer prepares the UploadLog request. +func (client ProductsClient) UploadLogPreparer(ctx context.Context, resourceGroup string, registrationName string, productName string, marketplaceProductLogUpdate *MarketplaceProductLogUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "productName": autorest.Encode("path", productName), + "registrationName": autorest.Encode("path", registrationName), + "resourceGroup": autorest.Encode("path", resourceGroup), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + marketplaceProductLogUpdate.Operation = nil + marketplaceProductLogUpdate.Status = nil + marketplaceProductLogUpdate.Error = nil + marketplaceProductLogUpdate.Details = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/uploadProductLog", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if marketplaceProductLogUpdate != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(marketplaceProductLogUpdate)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UploadLogSender sends the UploadLog request. The method will close the +// http.Response Body if it receives an error. +func (client ProductsClient) UploadLogSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UploadLogResponder handles the response to the UploadLog request. The method always +// closes the http.Response Body. +func (client ProductsClient) UploadLogResponder(resp *http.Response) (result ProductLog, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/batch/2017-05-01.5.0/batch/account.go b/services/batch/2017-05-01.5.0/batch/account.go index e6e3ab0dcd8d..d3c002fae958 100644 --- a/services/batch/2017-05-01.5.0/batch/account.go +++ b/services/batch/2017-05-01.5.0/batch/account.go @@ -70,7 +70,7 @@ func (client AccountClient) ListNodeAgentSkus(ctx context.Context, filter string {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListNodeAgentSkus", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/application.go b/services/batch/2017-05-01.5.0/batch/application.go index 2b2100a6493a..e2dbdd724301 100644 --- a/services/batch/2017-05-01.5.0/batch/application.go +++ b/services/batch/2017-05-01.5.0/batch/application.go @@ -172,7 +172,7 @@ func (client ApplicationClient) List(ctx context.Context, maxResults *int32, tim {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ApplicationClient", "List", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/certificate.go b/services/batch/2017-05-01.5.0/batch/certificate.go index 33286452fff7..85f3e4f71da2 100644 --- a/services/batch/2017-05-01.5.0/batch/certificate.go +++ b/services/batch/2017-05-01.5.0/batch/certificate.go @@ -498,7 +498,7 @@ func (client CertificateClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.CertificateClient", "List", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/computenode.go b/services/batch/2017-05-01.5.0/batch/computenode.go index c529e5d6146a..ce6ae5de0e4c 100644 --- a/services/batch/2017-05-01.5.0/batch/computenode.go +++ b/services/batch/2017-05-01.5.0/batch/computenode.go @@ -811,7 +811,7 @@ func (client ComputeNodeClient) List(ctx context.Context, poolID string, filter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ComputeNodeClient", "List", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/file.go b/services/batch/2017-05-01.5.0/batch/file.go index 735a70fc3305..b8d21613ecb0 100644 --- a/services/batch/2017-05-01.5.0/batch/file.go +++ b/services/batch/2017-05-01.5.0/batch/file.go @@ -772,7 +772,7 @@ func (client FileClient) ListFromComputeNode(ctx context.Context, poolID string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromComputeNode", err.Error()) } @@ -937,7 +937,7 @@ func (client FileClient) ListFromTask(ctx context.Context, jobID string, taskID {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromTask", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/job.go b/services/batch/2017-05-01.5.0/batch/job.go index 4c00df2e54cc..dd3bd52ef97b 100644 --- a/services/batch/2017-05-01.5.0/batch/job.go +++ b/services/batch/2017-05-01.5.0/batch/job.go @@ -836,7 +836,7 @@ func (client JobClient) List(ctx context.Context, filter string, selectParameter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "List", err.Error()) } @@ -998,7 +998,7 @@ func (client JobClient) ListFromJobSchedule(ctx context.Context, jobScheduleID s {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListFromJobSchedule", err.Error()) } @@ -1165,7 +1165,7 @@ func (client JobClient) ListPreparationAndReleaseTaskStatus(ctx context.Context, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListPreparationAndReleaseTaskStatus", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/jobschedule.go b/services/batch/2017-05-01.5.0/batch/jobschedule.go index cc99ef6d32b7..6a8e6d923fa1 100644 --- a/services/batch/2017-05-01.5.0/batch/jobschedule.go +++ b/services/batch/2017-05-01.5.0/batch/jobschedule.go @@ -855,7 +855,7 @@ func (client JobScheduleClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobScheduleClient", "List", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/pool.go b/services/batch/2017-05-01.5.0/batch/pool.go index f79f5a53ba9e..452b2eb51b2a 100644 --- a/services/batch/2017-05-01.5.0/batch/pool.go +++ b/services/batch/2017-05-01.5.0/batch/pool.go @@ -1029,7 +1029,7 @@ func (client PoolClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "List", err.Error()) } @@ -1196,7 +1196,7 @@ func (client PoolClient) ListUsageMetrics(ctx context.Context, startTime *date.T {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "ListUsageMetrics", err.Error()) } diff --git a/services/batch/2017-05-01.5.0/batch/task.go b/services/batch/2017-05-01.5.0/batch/task.go index 4dab2bc3f67a..952e40f77128 100644 --- a/services/batch/2017-05-01.5.0/batch/task.go +++ b/services/batch/2017-05-01.5.0/batch/task.go @@ -573,7 +573,7 @@ func (client TaskClient) List(ctx context.Context, jobID string, filter string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.TaskClient", "List", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/account.go b/services/batch/2018-03-01.6.1/batch/account.go index 4b3d1181e759..edb36a6a87b4 100644 --- a/services/batch/2018-03-01.6.1/batch/account.go +++ b/services/batch/2018-03-01.6.1/batch/account.go @@ -71,7 +71,7 @@ func (client AccountClient) ListNodeAgentSkus(ctx context.Context, filter string {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListNodeAgentSkus", err.Error()) } @@ -224,7 +224,7 @@ func (client AccountClient) ListPoolNodeCounts(ctx context.Context, filter strin {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListPoolNodeCounts", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/application.go b/services/batch/2018-03-01.6.1/batch/application.go index 74bb68d1a2bc..86675b114d19 100644 --- a/services/batch/2018-03-01.6.1/batch/application.go +++ b/services/batch/2018-03-01.6.1/batch/application.go @@ -174,7 +174,7 @@ func (client ApplicationClient) List(ctx context.Context, maxResults *int32, tim {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ApplicationClient", "List", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/certificate.go b/services/batch/2018-03-01.6.1/batch/certificate.go index d60f254e5fdb..16e734491cd0 100644 --- a/services/batch/2018-03-01.6.1/batch/certificate.go +++ b/services/batch/2018-03-01.6.1/batch/certificate.go @@ -499,7 +499,7 @@ func (client CertificateClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.CertificateClient", "List", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/computenode.go b/services/batch/2018-03-01.6.1/batch/computenode.go index 63c22ce33828..9828ead4092b 100644 --- a/services/batch/2018-03-01.6.1/batch/computenode.go +++ b/services/batch/2018-03-01.6.1/batch/computenode.go @@ -813,7 +813,7 @@ func (client ComputeNodeClient) List(ctx context.Context, poolID string, filter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ComputeNodeClient", "List", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/file.go b/services/batch/2018-03-01.6.1/batch/file.go index 3bc202647b37..e378d16ec68e 100644 --- a/services/batch/2018-03-01.6.1/batch/file.go +++ b/services/batch/2018-03-01.6.1/batch/file.go @@ -773,7 +773,7 @@ func (client FileClient) ListFromComputeNode(ctx context.Context, poolID string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromComputeNode", err.Error()) } @@ -939,7 +939,7 @@ func (client FileClient) ListFromTask(ctx context.Context, jobID string, taskID {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromTask", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/job.go b/services/batch/2018-03-01.6.1/batch/job.go index 124a3b7be75b..1b57fa49399b 100644 --- a/services/batch/2018-03-01.6.1/batch/job.go +++ b/services/batch/2018-03-01.6.1/batch/job.go @@ -976,7 +976,7 @@ func (client JobClient) List(ctx context.Context, filter string, selectParameter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "List", err.Error()) } @@ -1139,7 +1139,7 @@ func (client JobClient) ListFromJobSchedule(ctx context.Context, jobScheduleID s {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListFromJobSchedule", err.Error()) } @@ -1308,7 +1308,7 @@ func (client JobClient) ListPreparationAndReleaseTaskStatus(ctx context.Context, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListPreparationAndReleaseTaskStatus", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/jobschedule.go b/services/batch/2018-03-01.6.1/batch/jobschedule.go index c40fd7c70dc5..3cfaeb61c5b1 100644 --- a/services/batch/2018-03-01.6.1/batch/jobschedule.go +++ b/services/batch/2018-03-01.6.1/batch/jobschedule.go @@ -887,7 +887,7 @@ func (client JobScheduleClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobScheduleClient", "List", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/pool.go b/services/batch/2018-03-01.6.1/batch/pool.go index 5fdf8d0bda92..5dfe0b67ce1e 100644 --- a/services/batch/2018-03-01.6.1/batch/pool.go +++ b/services/batch/2018-03-01.6.1/batch/pool.go @@ -1039,7 +1039,7 @@ func (client PoolClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "List", err.Error()) } @@ -1208,7 +1208,7 @@ func (client PoolClient) ListUsageMetrics(ctx context.Context, startTime *date.T {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "ListUsageMetrics", err.Error()) } diff --git a/services/batch/2018-03-01.6.1/batch/task.go b/services/batch/2018-03-01.6.1/batch/task.go index 7af37e05e1cb..82f4441465d0 100644 --- a/services/batch/2018-03-01.6.1/batch/task.go +++ b/services/batch/2018-03-01.6.1/batch/task.go @@ -586,7 +586,7 @@ func (client TaskClient) List(ctx context.Context, jobID string, filter string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.TaskClient", "List", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/account.go b/services/batch/2018-08-01.7.0/batch/account.go index caf7decac6c2..7ab45fa50d03 100644 --- a/services/batch/2018-08-01.7.0/batch/account.go +++ b/services/batch/2018-08-01.7.0/batch/account.go @@ -71,7 +71,7 @@ func (client AccountClient) ListNodeAgentSkus(ctx context.Context, filter string {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListNodeAgentSkus", err.Error()) } @@ -225,7 +225,7 @@ func (client AccountClient) ListPoolNodeCounts(ctx context.Context, filter strin {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListPoolNodeCounts", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/application.go b/services/batch/2018-08-01.7.0/batch/application.go index aff343fcf078..c0fbe942412d 100644 --- a/services/batch/2018-08-01.7.0/batch/application.go +++ b/services/batch/2018-08-01.7.0/batch/application.go @@ -174,7 +174,7 @@ func (client ApplicationClient) List(ctx context.Context, maxResults *int32, tim {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ApplicationClient", "List", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/certificate.go b/services/batch/2018-08-01.7.0/batch/certificate.go index f836ffb9ea59..dfb6f117b43f 100644 --- a/services/batch/2018-08-01.7.0/batch/certificate.go +++ b/services/batch/2018-08-01.7.0/batch/certificate.go @@ -499,7 +499,7 @@ func (client CertificateClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.CertificateClient", "List", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/computenode.go b/services/batch/2018-08-01.7.0/batch/computenode.go index 5bb4ed7fe494..c61564688921 100644 --- a/services/batch/2018-08-01.7.0/batch/computenode.go +++ b/services/batch/2018-08-01.7.0/batch/computenode.go @@ -813,7 +813,7 @@ func (client ComputeNodeClient) List(ctx context.Context, poolID string, filter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ComputeNodeClient", "List", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/file.go b/services/batch/2018-08-01.7.0/batch/file.go index 74693ea5f44a..c394426516b7 100644 --- a/services/batch/2018-08-01.7.0/batch/file.go +++ b/services/batch/2018-08-01.7.0/batch/file.go @@ -773,7 +773,7 @@ func (client FileClient) ListFromComputeNode(ctx context.Context, poolID string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromComputeNode", err.Error()) } @@ -939,7 +939,7 @@ func (client FileClient) ListFromTask(ctx context.Context, jobID string, taskID {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromTask", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/job.go b/services/batch/2018-08-01.7.0/batch/job.go index 035e86a9c8b8..acbf6873bd30 100644 --- a/services/batch/2018-08-01.7.0/batch/job.go +++ b/services/batch/2018-08-01.7.0/batch/job.go @@ -974,7 +974,7 @@ func (client JobClient) List(ctx context.Context, filter string, selectParameter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "List", err.Error()) } @@ -1137,7 +1137,7 @@ func (client JobClient) ListFromJobSchedule(ctx context.Context, jobScheduleID s {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListFromJobSchedule", err.Error()) } @@ -1306,7 +1306,7 @@ func (client JobClient) ListPreparationAndReleaseTaskStatus(ctx context.Context, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListPreparationAndReleaseTaskStatus", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/jobschedule.go b/services/batch/2018-08-01.7.0/batch/jobschedule.go index f4879ab218a6..58bb1f68e79e 100644 --- a/services/batch/2018-08-01.7.0/batch/jobschedule.go +++ b/services/batch/2018-08-01.7.0/batch/jobschedule.go @@ -887,7 +887,7 @@ func (client JobScheduleClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobScheduleClient", "List", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/pool.go b/services/batch/2018-08-01.7.0/batch/pool.go index 50d16022ad54..5fa620471266 100644 --- a/services/batch/2018-08-01.7.0/batch/pool.go +++ b/services/batch/2018-08-01.7.0/batch/pool.go @@ -1039,7 +1039,7 @@ func (client PoolClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "List", err.Error()) } @@ -1208,7 +1208,7 @@ func (client PoolClient) ListUsageMetrics(ctx context.Context, startTime *date.T {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "ListUsageMetrics", err.Error()) } diff --git a/services/batch/2018-08-01.7.0/batch/task.go b/services/batch/2018-08-01.7.0/batch/task.go index f8af796744e7..8466ad1cab37 100644 --- a/services/batch/2018-08-01.7.0/batch/task.go +++ b/services/batch/2018-08-01.7.0/batch/task.go @@ -586,7 +586,7 @@ func (client TaskClient) List(ctx context.Context, jobID string, filter string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.TaskClient", "List", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/account.go b/services/batch/2018-12-01.8.0/batch/account.go index ff1160dca0f3..cbbaa1a61285 100644 --- a/services/batch/2018-12-01.8.0/batch/account.go +++ b/services/batch/2018-12-01.8.0/batch/account.go @@ -66,7 +66,7 @@ func (client AccountClient) ListNodeAgentSkus(ctx context.Context, filter string {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListNodeAgentSkus", err.Error()) } @@ -224,7 +224,7 @@ func (client AccountClient) ListPoolNodeCounts(ctx context.Context, filter strin {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListPoolNodeCounts", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/application.go b/services/batch/2018-12-01.8.0/batch/application.go index 56717dc94d07..81382b83c213 100644 --- a/services/batch/2018-12-01.8.0/batch/application.go +++ b/services/batch/2018-12-01.8.0/batch/application.go @@ -173,7 +173,7 @@ func (client ApplicationClient) List(ctx context.Context, maxResults *int32, tim {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ApplicationClient", "List", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/certificate.go b/services/batch/2018-12-01.8.0/batch/certificate.go index f60fffa176af..8c179dfa4c36 100644 --- a/services/batch/2018-12-01.8.0/batch/certificate.go +++ b/services/batch/2018-12-01.8.0/batch/certificate.go @@ -510,7 +510,7 @@ func (client CertificateClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.CertificateClient", "List", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/computenode.go b/services/batch/2018-12-01.8.0/batch/computenode.go index d658e8915230..d24f54cfa08f 100644 --- a/services/batch/2018-12-01.8.0/batch/computenode.go +++ b/services/batch/2018-12-01.8.0/batch/computenode.go @@ -836,7 +836,7 @@ func (client ComputeNodeClient) List(ctx context.Context, poolID string, filter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ComputeNodeClient", "List", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/file.go b/services/batch/2018-12-01.8.0/batch/file.go index 1f13277ca4a6..827a803c856a 100644 --- a/services/batch/2018-12-01.8.0/batch/file.go +++ b/services/batch/2018-12-01.8.0/batch/file.go @@ -792,7 +792,7 @@ func (client FileClient) ListFromComputeNode(ctx context.Context, poolID string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromComputeNode", err.Error()) } @@ -962,7 +962,7 @@ func (client FileClient) ListFromTask(ctx context.Context, jobID string, taskID {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromTask", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/job.go b/services/batch/2018-12-01.8.0/batch/job.go index 5b56ddfa984b..2eeecd283695 100644 --- a/services/batch/2018-12-01.8.0/batch/job.go +++ b/services/batch/2018-12-01.8.0/batch/job.go @@ -999,7 +999,7 @@ func (client JobClient) List(ctx context.Context, filter string, selectParameter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "List", err.Error()) } @@ -1166,7 +1166,7 @@ func (client JobClient) ListFromJobSchedule(ctx context.Context, jobScheduleID s {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListFromJobSchedule", err.Error()) } @@ -1339,7 +1339,7 @@ func (client JobClient) ListPreparationAndReleaseTaskStatus(ctx context.Context, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListPreparationAndReleaseTaskStatus", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/jobschedule.go b/services/batch/2018-12-01.8.0/batch/jobschedule.go index 78bfd460aaae..a2137854dd09 100644 --- a/services/batch/2018-12-01.8.0/batch/jobschedule.go +++ b/services/batch/2018-12-01.8.0/batch/jobschedule.go @@ -908,7 +908,7 @@ func (client JobScheduleClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobScheduleClient", "List", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/pool.go b/services/batch/2018-12-01.8.0/batch/pool.go index a5a945c24c89..7b0d3cd246fd 100644 --- a/services/batch/2018-12-01.8.0/batch/pool.go +++ b/services/batch/2018-12-01.8.0/batch/pool.go @@ -1066,7 +1066,7 @@ func (client PoolClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "List", err.Error()) } @@ -1239,7 +1239,7 @@ func (client PoolClient) ListUsageMetrics(ctx context.Context, startTime *date.T {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "ListUsageMetrics", err.Error()) } diff --git a/services/batch/2018-12-01.8.0/batch/task.go b/services/batch/2018-12-01.8.0/batch/task.go index 0c8f8d6777c0..13207b7c88b7 100644 --- a/services/batch/2018-12-01.8.0/batch/task.go +++ b/services/batch/2018-12-01.8.0/batch/task.go @@ -597,7 +597,7 @@ func (client TaskClient) List(ctx context.Context, jobID string, filter string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.TaskClient", "List", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/account.go b/services/batch/2019-06-01.9.0/batch/account.go index 46953c595810..96c136d271f2 100644 --- a/services/batch/2019-06-01.9.0/batch/account.go +++ b/services/batch/2019-06-01.9.0/batch/account.go @@ -65,7 +65,7 @@ func (client AccountClient) ListPoolNodeCounts(ctx context.Context, filter strin {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListPoolNodeCounts", err.Error()) } @@ -224,7 +224,7 @@ func (client AccountClient) ListSupportedImages(ctx context.Context, filter stri {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListSupportedImages", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/application.go b/services/batch/2019-06-01.9.0/batch/application.go index e6592cf1c1e9..841cad815bd5 100644 --- a/services/batch/2019-06-01.9.0/batch/application.go +++ b/services/batch/2019-06-01.9.0/batch/application.go @@ -173,7 +173,7 @@ func (client ApplicationClient) List(ctx context.Context, maxResults *int32, tim {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ApplicationClient", "List", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/certificate.go b/services/batch/2019-06-01.9.0/batch/certificate.go index d1dad4d8d52b..28b20eb7bf2c 100644 --- a/services/batch/2019-06-01.9.0/batch/certificate.go +++ b/services/batch/2019-06-01.9.0/batch/certificate.go @@ -510,7 +510,7 @@ func (client CertificateClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.CertificateClient", "List", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/computenode.go b/services/batch/2019-06-01.9.0/batch/computenode.go index a74b85e60e6b..7b993bd6fd0a 100644 --- a/services/batch/2019-06-01.9.0/batch/computenode.go +++ b/services/batch/2019-06-01.9.0/batch/computenode.go @@ -837,7 +837,7 @@ func (client ComputeNodeClient) List(ctx context.Context, poolID string, filter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ComputeNodeClient", "List", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/file.go b/services/batch/2019-06-01.9.0/batch/file.go index aa8f2b631763..eed704abc66d 100644 --- a/services/batch/2019-06-01.9.0/batch/file.go +++ b/services/batch/2019-06-01.9.0/batch/file.go @@ -792,7 +792,7 @@ func (client FileClient) ListFromComputeNode(ctx context.Context, poolID string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromComputeNode", err.Error()) } @@ -962,7 +962,7 @@ func (client FileClient) ListFromTask(ctx context.Context, jobID string, taskID {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromTask", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/job.go b/services/batch/2019-06-01.9.0/batch/job.go index 9149abdf719d..ac5de93c941d 100644 --- a/services/batch/2019-06-01.9.0/batch/job.go +++ b/services/batch/2019-06-01.9.0/batch/job.go @@ -999,7 +999,7 @@ func (client JobClient) List(ctx context.Context, filter string, selectParameter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "List", err.Error()) } @@ -1166,7 +1166,7 @@ func (client JobClient) ListFromJobSchedule(ctx context.Context, jobScheduleID s {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListFromJobSchedule", err.Error()) } @@ -1339,7 +1339,7 @@ func (client JobClient) ListPreparationAndReleaseTaskStatus(ctx context.Context, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListPreparationAndReleaseTaskStatus", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/jobschedule.go b/services/batch/2019-06-01.9.0/batch/jobschedule.go index 67efc57e4c99..185210fbdce2 100644 --- a/services/batch/2019-06-01.9.0/batch/jobschedule.go +++ b/services/batch/2019-06-01.9.0/batch/jobschedule.go @@ -908,7 +908,7 @@ func (client JobScheduleClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobScheduleClient", "List", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/pool.go b/services/batch/2019-06-01.9.0/batch/pool.go index 644e84e83755..4a6203fefdd8 100644 --- a/services/batch/2019-06-01.9.0/batch/pool.go +++ b/services/batch/2019-06-01.9.0/batch/pool.go @@ -1066,7 +1066,7 @@ func (client PoolClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "List", err.Error()) } @@ -1239,7 +1239,7 @@ func (client PoolClient) ListUsageMetrics(ctx context.Context, startTime *date.T {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "ListUsageMetrics", err.Error()) } diff --git a/services/batch/2019-06-01.9.0/batch/task.go b/services/batch/2019-06-01.9.0/batch/task.go index 61a969b42ccd..19f2cdf81980 100644 --- a/services/batch/2019-06-01.9.0/batch/task.go +++ b/services/batch/2019-06-01.9.0/batch/task.go @@ -597,7 +597,7 @@ func (client TaskClient) List(ctx context.Context, jobID string, filter string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.TaskClient", "List", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/account.go b/services/batch/2019-08-01.10.0/batch/account.go index 2528c7be5a23..7425e398fde3 100644 --- a/services/batch/2019-08-01.10.0/batch/account.go +++ b/services/batch/2019-08-01.10.0/batch/account.go @@ -65,7 +65,7 @@ func (client AccountClient) ListPoolNodeCounts(ctx context.Context, filter strin {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListPoolNodeCounts", err.Error()) } @@ -224,7 +224,7 @@ func (client AccountClient) ListSupportedImages(ctx context.Context, filter stri {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.AccountClient", "ListSupportedImages", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/application.go b/services/batch/2019-08-01.10.0/batch/application.go index b7c2951cf635..abf89f0132d3 100644 --- a/services/batch/2019-08-01.10.0/batch/application.go +++ b/services/batch/2019-08-01.10.0/batch/application.go @@ -173,7 +173,7 @@ func (client ApplicationClient) List(ctx context.Context, maxResults *int32, tim {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ApplicationClient", "List", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/certificate.go b/services/batch/2019-08-01.10.0/batch/certificate.go index 97d09f211e2a..2c94ef3a921e 100644 --- a/services/batch/2019-08-01.10.0/batch/certificate.go +++ b/services/batch/2019-08-01.10.0/batch/certificate.go @@ -510,7 +510,7 @@ func (client CertificateClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.CertificateClient", "List", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/computenode.go b/services/batch/2019-08-01.10.0/batch/computenode.go index 046e83ecc502..e4e78633997c 100644 --- a/services/batch/2019-08-01.10.0/batch/computenode.go +++ b/services/batch/2019-08-01.10.0/batch/computenode.go @@ -837,7 +837,7 @@ func (client ComputeNodeClient) List(ctx context.Context, poolID string, filter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.ComputeNodeClient", "List", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/file.go b/services/batch/2019-08-01.10.0/batch/file.go index f2577632420d..62d4b83b5172 100644 --- a/services/batch/2019-08-01.10.0/batch/file.go +++ b/services/batch/2019-08-01.10.0/batch/file.go @@ -792,7 +792,7 @@ func (client FileClient) ListFromComputeNode(ctx context.Context, poolID string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromComputeNode", err.Error()) } @@ -962,7 +962,7 @@ func (client FileClient) ListFromTask(ctx context.Context, jobID string, taskID {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.FileClient", "ListFromTask", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/job.go b/services/batch/2019-08-01.10.0/batch/job.go index b09588768359..83c502ba50e4 100644 --- a/services/batch/2019-08-01.10.0/batch/job.go +++ b/services/batch/2019-08-01.10.0/batch/job.go @@ -999,7 +999,7 @@ func (client JobClient) List(ctx context.Context, filter string, selectParameter {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "List", err.Error()) } @@ -1166,7 +1166,7 @@ func (client JobClient) ListFromJobSchedule(ctx context.Context, jobScheduleID s {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListFromJobSchedule", err.Error()) } @@ -1339,7 +1339,7 @@ func (client JobClient) ListPreparationAndReleaseTaskStatus(ctx context.Context, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobClient", "ListPreparationAndReleaseTaskStatus", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/jobschedule.go b/services/batch/2019-08-01.10.0/batch/jobschedule.go index 14ac8c019c7d..9cbd0147bed6 100644 --- a/services/batch/2019-08-01.10.0/batch/jobschedule.go +++ b/services/batch/2019-08-01.10.0/batch/jobschedule.go @@ -908,7 +908,7 @@ func (client JobScheduleClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.JobScheduleClient", "List", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/pool.go b/services/batch/2019-08-01.10.0/batch/pool.go index e5e2d67af908..a5fa4553a2fe 100644 --- a/services/batch/2019-08-01.10.0/batch/pool.go +++ b/services/batch/2019-08-01.10.0/batch/pool.go @@ -1066,7 +1066,7 @@ func (client PoolClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "List", err.Error()) } @@ -1239,7 +1239,7 @@ func (client PoolClient) ListUsageMetrics(ctx context.Context, startTime *date.T {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.PoolClient", "ListUsageMetrics", err.Error()) } diff --git a/services/batch/2019-08-01.10.0/batch/task.go b/services/batch/2019-08-01.10.0/batch/task.go index 9672a71fa130..3614ac56ec2a 100644 --- a/services/batch/2019-08-01.10.0/batch/task.go +++ b/services/batch/2019-08-01.10.0/batch/task.go @@ -597,7 +597,7 @@ func (client TaskClient) List(ctx context.Context, jobID string, filter string, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batch.TaskClient", "List", err.Error()) } diff --git a/services/batch/mgmt/2017-09-01/batch/models.go b/services/batch/mgmt/2017-09-01/batch/models.go index fe26ebe4b47f..368841797eef 100644 --- a/services/batch/mgmt/2017-09-01/batch/models.go +++ b/services/batch/mgmt/2017-09-01/batch/models.go @@ -2165,7 +2165,7 @@ type PoolProperties struct { AllocationState AllocationState `json:"allocationState,omitempty"` // AllocationStateTransitionTime - READ-ONLY AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"` - // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). VMSize *string `json:"vmSize,omitempty"` // DeploymentConfiguration - Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"` diff --git a/services/batch/mgmt/2018-12-01/batch/models.go b/services/batch/mgmt/2018-12-01/batch/models.go index 9e2ec14c4d33..325a7bf441fc 100644 --- a/services/batch/mgmt/2018-12-01/batch/models.go +++ b/services/batch/mgmt/2018-12-01/batch/models.go @@ -2483,7 +2483,7 @@ type PoolProperties struct { AllocationState AllocationState `json:"allocationState,omitempty"` // AllocationStateTransitionTime - READ-ONLY AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"` - // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). VMSize *string `json:"vmSize,omitempty"` // DeploymentConfiguration - Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"` diff --git a/services/batch/mgmt/2019-04-01/batch/models.go b/services/batch/mgmt/2019-04-01/batch/models.go index bff3a841f93a..d04b2b469266 100644 --- a/services/batch/mgmt/2019-04-01/batch/models.go +++ b/services/batch/mgmt/2019-04-01/batch/models.go @@ -2487,7 +2487,7 @@ type PoolProperties struct { AllocationState AllocationState `json:"allocationState,omitempty"` // AllocationStateTransitionTime - READ-ONLY AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"` - // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). VMSize *string `json:"vmSize,omitempty"` // DeploymentConfiguration - Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"` diff --git a/services/batch/mgmt/2019-08-01/batch/models.go b/services/batch/mgmt/2019-08-01/batch/models.go index 45ff56b28ffc..d89a2826763c 100644 --- a/services/batch/mgmt/2019-08-01/batch/models.go +++ b/services/batch/mgmt/2019-08-01/batch/models.go @@ -2567,7 +2567,7 @@ type PoolProperties struct { AllocationState AllocationState `json:"allocationState,omitempty"` // AllocationStateTransitionTime - READ-ONLY AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"` - // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + // VMSize - For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). VMSize *string `json:"vmSize,omitempty"` // DeploymentConfiguration - Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). DeploymentConfiguration *DeploymentConfiguration `json:"deploymentConfiguration,omitempty"` diff --git a/services/batchai/mgmt/2018-03-01/batchai/clusters.go b/services/batchai/mgmt/2018-03-01/batchai/clusters.go index 363c87070726..1abb2390b825 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/clusters.go +++ b/services/batchai/mgmt/2018-03-01/batchai/clusters.go @@ -371,7 +371,7 @@ func (client ClustersClient) List(ctx context.Context, filter string, selectPara {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.ClustersClient", "List", err.Error()) } @@ -508,7 +508,7 @@ func (client ClustersClient) ListByResourceGroup(ctx context.Context, resourceGr {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.ClustersClient", "ListByResourceGroup", err.Error()) } diff --git a/services/batchai/mgmt/2018-03-01/batchai/fileservers.go b/services/batchai/mgmt/2018-03-01/batchai/fileservers.go index 4cea83b45dde..6267cf95d300 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/fileservers.go +++ b/services/batchai/mgmt/2018-03-01/batchai/fileservers.go @@ -346,7 +346,7 @@ func (client FileServersClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.FileServersClient", "List", err.Error()) } @@ -484,7 +484,7 @@ func (client FileServersClient) ListByResourceGroup(ctx context.Context, resourc {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.FileServersClient", "ListByResourceGroup", err.Error()) } diff --git a/services/batchai/mgmt/2018-03-01/batchai/jobs.go b/services/batchai/mgmt/2018-03-01/batchai/jobs.go index f06393fff32b..8b7e13aa95d6 100644 --- a/services/batchai/mgmt/2018-03-01/batchai/jobs.go +++ b/services/batchai/mgmt/2018-03-01/batchai/jobs.go @@ -361,7 +361,7 @@ func (client JobsClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "List", err.Error()) } @@ -498,7 +498,7 @@ func (client JobsClient) ListByResourceGroup(ctx context.Context, resourceGroupN {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "ListByResourceGroup", err.Error()) } @@ -646,12 +646,12 @@ func (client JobsClient) ListOutputFiles(ctx context.Context, resourceGroupName {TargetValue: linkexpiryinminutes, Constraints: []validation.Constraint{{Target: "linkexpiryinminutes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "linkexpiryinminutes", Name: validation.InclusiveMaximum, Rule: int64(600), Chain: nil}, - {Target: "linkexpiryinminutes", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "linkexpiryinminutes", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "ListOutputFiles", err.Error()) } diff --git a/services/batchai/mgmt/2018-05-01/batchai/clusters.go b/services/batchai/mgmt/2018-05-01/batchai/clusters.go index 8b8d51987dc0..dd059f57fd43 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/clusters.go +++ b/services/batchai/mgmt/2018-05-01/batchai/clusters.go @@ -398,7 +398,7 @@ func (client ClustersClient) ListByWorkspace(ctx context.Context, resourceGroupN {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.ClustersClient", "ListByWorkspace", err.Error()) } diff --git a/services/batchai/mgmt/2018-05-01/batchai/experiments.go b/services/batchai/mgmt/2018-05-01/batchai/experiments.go index 4b743e382b56..670da537a53f 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/experiments.go +++ b/services/batchai/mgmt/2018-05-01/batchai/experiments.go @@ -352,7 +352,7 @@ func (client ExperimentsClient) ListByWorkspace(ctx context.Context, resourceGro {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.ExperimentsClient", "ListByWorkspace", err.Error()) } diff --git a/services/batchai/mgmt/2018-05-01/batchai/fileservers.go b/services/batchai/mgmt/2018-05-01/batchai/fileservers.go index 5049ef167dfd..89d734e6a51b 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/fileservers.go +++ b/services/batchai/mgmt/2018-05-01/batchai/fileservers.go @@ -372,7 +372,7 @@ func (client FileServersClient) ListByWorkspace(ctx context.Context, resourceGro {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.FileServersClient", "ListByWorkspace", err.Error()) } diff --git a/services/batchai/mgmt/2018-05-01/batchai/jobs.go b/services/batchai/mgmt/2018-05-01/batchai/jobs.go index f3af0e13e107..2deda7ab72fa 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/jobs.go +++ b/services/batchai/mgmt/2018-05-01/batchai/jobs.go @@ -419,7 +419,7 @@ func (client JobsClient) ListByExperiment(ctx context.Context, resourceGroupName {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "ListByExperiment", err.Error()) } @@ -575,12 +575,12 @@ func (client JobsClient) ListOutputFiles(ctx context.Context, resourceGroupName {TargetValue: linkexpiryinminutes, Constraints: []validation.Constraint{{Target: "linkexpiryinminutes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "linkexpiryinminutes", Name: validation.InclusiveMaximum, Rule: int64(600), Chain: nil}, - {Target: "linkexpiryinminutes", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "linkexpiryinminutes", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "ListOutputFiles", err.Error()) } diff --git a/services/batchai/mgmt/2018-05-01/batchai/workspaces.go b/services/batchai/mgmt/2018-05-01/batchai/workspaces.go index 001804fa3843..56d986077c9c 100644 --- a/services/batchai/mgmt/2018-05-01/batchai/workspaces.go +++ b/services/batchai/mgmt/2018-05-01/batchai/workspaces.go @@ -327,7 +327,7 @@ func (client WorkspacesClient) List(ctx context.Context, maxResults *int32) (res {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.WorkspacesClient", "List", err.Error()) } @@ -456,7 +456,7 @@ func (client WorkspacesClient) ListByResourceGroup(ctx context.Context, resource {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.WorkspacesClient", "ListByResourceGroup", err.Error()) } diff --git a/services/cdn/mgmt/2019-04-15/cdn/models.go b/services/cdn/mgmt/2019-04-15/cdn/models.go index 30ad3746658e..ddf37c0fded2 100644 --- a/services/cdn/mgmt/2019-04-15/cdn/models.go +++ b/services/cdn/mgmt/2019-04-15/cdn/models.go @@ -5764,11 +5764,11 @@ func (ura URLRewriteAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction // URLRewriteActionParameters defines the parameters for the url rewrite action. type URLRewriteActionParameters struct { OdataType *string `json:"@odata.type,omitempty"` - // SourcePattern - define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. + // SourcePattern - define a request URI pattern that identifies the type of requests that may be rewritten. Currently, source pattern uses a prefix-based match. To match all URL paths, use "/" as the source pattern value. To match only the root directory and re-write this path, use the origin path field SourcePattern *string `json:"sourcePattern,omitempty"` - // Destination - Define the relative URL to which the above requests will be rewritten by. + // Destination - Define the destination path for be used in the rewrite. This will overwrite the source pattern Destination *string `json:"destination,omitempty"` - // PreserveUnmatchedPath - Whether to preserve unmatched path. Default value is true. + // PreserveUnmatchedPath - If True, the remaining path after the source pattern will be appended to the new destination path. PreserveUnmatchedPath *bool `json:"preserveUnmatchedPath,omitempty"` } diff --git a/services/cognitiveservices/v1.0/face/face.go b/services/cognitiveservices/v1.0/face/face.go index e8ccce02f293..de7e1c8929ca 100644 --- a/services/cognitiveservices/v1.0/face/face.go +++ b/services/cognitiveservices/v1.0/face/face.go @@ -411,7 +411,7 @@ func (client Client) FindSimilar(ctx context.Context, body FindSimilarRequest) ( Chain: []validation.Constraint{{Target: "body.FaceIds", Name: validation.MaxItems, Rule: 1000, Chain: nil}}}, {Target: "body.MaxNumOfCandidatesReturned", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("face.Client", "FindSimilar", err.Error()) } @@ -607,7 +607,7 @@ func (client Client) Identify(ctx context.Context, body IdentifyRequest) (result }}, {Target: "body.MaxNumOfCandidatesReturned", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMaximum, Rule: int64(5), Chain: nil}, - {Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("face.Client", "Identify", err.Error()) } diff --git a/services/cognitiveservices/v1.0/face/largefacelist.go b/services/cognitiveservices/v1.0/face/largefacelist.go index 115594d8f745..7994e058bb67 100644 --- a/services/cognitiveservices/v1.0/face/largefacelist.go +++ b/services/cognitiveservices/v1.0/face/largefacelist.go @@ -956,7 +956,7 @@ func (client LargeFaceListClient) ListFaces(ctx context.Context, largeFaceListID {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("face.LargeFaceListClient", "ListFaces", err.Error()) } diff --git a/services/cognitiveservices/v1.0/face/largepersongroup.go b/services/cognitiveservices/v1.0/face/largepersongroup.go index 46e06f289f1b..5244893d1819 100644 --- a/services/cognitiveservices/v1.0/face/largepersongroup.go +++ b/services/cognitiveservices/v1.0/face/largepersongroup.go @@ -428,7 +428,7 @@ func (client LargePersonGroupClient) List(ctx context.Context, start string, top {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("face.LargePersonGroupClient", "List", err.Error()) } diff --git a/services/cognitiveservices/v1.0/face/largepersongroupperson.go b/services/cognitiveservices/v1.0/face/largepersongroupperson.go index 9b91259e4402..d82d770a4368 100644 --- a/services/cognitiveservices/v1.0/face/largepersongroupperson.go +++ b/services/cognitiveservices/v1.0/face/largepersongroupperson.go @@ -767,7 +767,7 @@ func (client LargePersonGroupPersonClient) List(ctx context.Context, largePerson {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("face.LargePersonGroupPersonClient", "List", err.Error()) } diff --git a/services/cognitiveservices/v1.0/face/persongroup.go b/services/cognitiveservices/v1.0/face/persongroup.go index 4fcae71db274..32841523c8a5 100644 --- a/services/cognitiveservices/v1.0/face/persongroup.go +++ b/services/cognitiveservices/v1.0/face/persongroup.go @@ -424,7 +424,7 @@ func (client PersonGroupClient) List(ctx context.Context, start string, top *int {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("face.PersonGroupClient", "List", err.Error()) } diff --git a/services/cognitiveservices/v1.0/face/persongroupperson.go b/services/cognitiveservices/v1.0/face/persongroupperson.go index dd908336cb90..164f34adef64 100644 --- a/services/cognitiveservices/v1.0/face/persongroupperson.go +++ b/services/cognitiveservices/v1.0/face/persongroupperson.go @@ -767,7 +767,7 @@ func (client PersonGroupPersonClient) List(ctx context.Context, personGroupID st {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("face.PersonGroupPersonClient", "List", err.Error()) } diff --git a/services/cognitiveservices/v2.0/computervision/client.go b/services/cognitiveservices/v2.0/computervision/client.go index 2fceca32dee2..f90ac58bc54e 100644 --- a/services/cognitiveservices/v2.0/computervision/client.go +++ b/services/cognitiveservices/v2.0/computervision/client.go @@ -978,10 +978,10 @@ func (client BaseClient) GenerateThumbnail(ctx context.Context, width int32, hei if err := validation.Validate([]validation.Validation{ {TargetValue: width, Constraints: []validation.Constraint{{Target: "width", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "width", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "width", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {TargetValue: height, Constraints: []validation.Constraint{{Target: "height", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "height", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "height", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {TargetValue: imageURL, Constraints: []validation.Constraint{{Target: "imageURL.URL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("computervision.BaseClient", "GenerateThumbnail", err.Error()) @@ -1081,10 +1081,10 @@ func (client BaseClient) GenerateThumbnailInStream(ctx context.Context, width in if err := validation.Validate([]validation.Validation{ {TargetValue: width, Constraints: []validation.Constraint{{Target: "width", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "width", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "width", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {TargetValue: height, Constraints: []validation.Constraint{{Target: "height", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "height", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}); err != nil { + {Target: "height", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}); err != nil { return result, validation.NewError("computervision.BaseClient", "GenerateThumbnailInStream", err.Error()) } diff --git a/services/cognitiveservices/v2.0/luis/authoring/apps.go b/services/cognitiveservices/v2.0/luis/authoring/apps.go index 38fddba13f4a..db9cbadbef4a 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/apps.go +++ b/services/cognitiveservices/v2.0/luis/authoring/apps.go @@ -650,11 +650,11 @@ func (client AppsClient) List(ctx context.Context, skip *int32, take *int32) (re if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.AppsClient", "List", err.Error()) } diff --git a/services/cognitiveservices/v2.0/luis/authoring/examples.go b/services/cognitiveservices/v2.0/luis/authoring/examples.go index 78ecbf72d81f..02a1623a578e 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/examples.go +++ b/services/cognitiveservices/v2.0/luis/authoring/examples.go @@ -293,11 +293,11 @@ func (client ExamplesClient) List(ctx context.Context, appID uuid.UUID, versionI if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ExamplesClient", "List", err.Error()) } diff --git a/services/cognitiveservices/v2.0/luis/authoring/features.go b/services/cognitiveservices/v2.0/luis/authoring/features.go index cec6604ed7de..ae26e0edc49f 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/features.go +++ b/services/cognitiveservices/v2.0/luis/authoring/features.go @@ -287,11 +287,11 @@ func (client FeaturesClient) List(ctx context.Context, appID uuid.UUID, versionI if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.FeaturesClient", "List", err.Error()) } @@ -389,11 +389,11 @@ func (client FeaturesClient) ListApplicationVersionPatternFeatures(ctx context.C if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.FeaturesClient", "ListApplicationVersionPatternFeatures", err.Error()) } @@ -490,11 +490,11 @@ func (client FeaturesClient) ListPhraseLists(ctx context.Context, appID uuid.UUI if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.FeaturesClient", "ListPhraseLists", err.Error()) } diff --git a/services/cognitiveservices/v2.0/luis/authoring/model.go b/services/cognitiveservices/v2.0/luis/authoring/model.go index 7d750e922094..2b1df35f27cc 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/model.go +++ b/services/cognitiveservices/v2.0/luis/authoring/model.go @@ -3496,11 +3496,11 @@ func (client ModelClient) ExamplesMethod(ctx context.Context, appID uuid.UUID, v if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ExamplesMethod", err.Error()) } @@ -5139,11 +5139,11 @@ func (client ModelClient) ListClosedLists(ctx context.Context, appID uuid.UUID, if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListClosedLists", err.Error()) } @@ -5240,11 +5240,11 @@ func (client ModelClient) ListCompositeEntities(ctx context.Context, appID uuid. if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListCompositeEntities", err.Error()) } @@ -5717,11 +5717,11 @@ func (client ModelClient) ListEntities(ctx context.Context, appID uuid.UUID, ver if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListEntities", err.Error()) } @@ -5896,7 +5896,7 @@ func (client ModelClient) ListEntitySuggestions(ctx context.Context, appID uuid. {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListEntitySuggestions", err.Error()) } @@ -5989,11 +5989,11 @@ func (client ModelClient) ListHierarchicalEntities(ctx context.Context, appID uu if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListHierarchicalEntities", err.Error()) } @@ -6166,11 +6166,11 @@ func (client ModelClient) ListIntents(ctx context.Context, appID uuid.UUID, vers if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListIntents", err.Error()) } @@ -6269,7 +6269,7 @@ func (client ModelClient) ListIntentSuggestions(ctx context.Context, appID uuid. {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListIntentSuggestions", err.Error()) } @@ -6362,11 +6362,11 @@ func (client ModelClient) ListModels(ctx context.Context, appID uuid.UUID, versi if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListModels", err.Error()) } @@ -6463,11 +6463,11 @@ func (client ModelClient) ListPatternAnyEntityInfos(ctx context.Context, appID u if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListPatternAnyEntityInfos", err.Error()) } @@ -6790,11 +6790,11 @@ func (client ModelClient) ListPrebuilts(ctx context.Context, appID uuid.UUID, ve if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListPrebuilts", err.Error()) } @@ -6891,11 +6891,11 @@ func (client ModelClient) ListRegexEntityInfos(ctx context.Context, appID uuid.U if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListRegexEntityInfos", err.Error()) } diff --git a/services/cognitiveservices/v2.0/luis/authoring/pattern.go b/services/cognitiveservices/v2.0/luis/authoring/pattern.go index 4a0d41edc1d5..e9ba7b82cc40 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/pattern.go +++ b/services/cognitiveservices/v2.0/luis/authoring/pattern.go @@ -377,11 +377,11 @@ func (client PatternClient) ListIntentPatterns(ctx context.Context, appID uuid.U if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.PatternClient", "ListIntentPatterns", err.Error()) } @@ -479,11 +479,11 @@ func (client PatternClient) ListPatterns(ctx context.Context, appID uuid.UUID, v if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.PatternClient", "ListPatterns", err.Error()) } diff --git a/services/cognitiveservices/v2.0/luis/authoring/versions.go b/services/cognitiveservices/v2.0/luis/authoring/versions.go index 50d833cd8581..f7f06ab9adb9 100644 --- a/services/cognitiveservices/v2.0/luis/authoring/versions.go +++ b/services/cognitiveservices/v2.0/luis/authoring/versions.go @@ -516,11 +516,11 @@ func (client VersionsClient) List(ctx context.Context, appID uuid.UUID, skip *in if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.VersionsClient", "List", err.Error()) } diff --git a/services/cognitiveservices/v2.1/computervision/client.go b/services/cognitiveservices/v2.1/computervision/client.go index 6e2d02a2c27b..283932f59a55 100644 --- a/services/cognitiveservices/v2.1/computervision/client.go +++ b/services/cognitiveservices/v2.1/computervision/client.go @@ -996,10 +996,10 @@ func (client BaseClient) GenerateThumbnail(ctx context.Context, width int32, hei if err := validation.Validate([]validation.Validation{ {TargetValue: width, Constraints: []validation.Constraint{{Target: "width", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "width", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "width", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {TargetValue: height, Constraints: []validation.Constraint{{Target: "height", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "height", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "height", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {TargetValue: imageURL, Constraints: []validation.Constraint{{Target: "imageURL.URL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("computervision.BaseClient", "GenerateThumbnail", err.Error()) @@ -1099,10 +1099,10 @@ func (client BaseClient) GenerateThumbnailInStream(ctx context.Context, width in if err := validation.Validate([]validation.Validation{ {TargetValue: width, Constraints: []validation.Constraint{{Target: "width", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "width", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "width", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {TargetValue: height, Constraints: []validation.Constraint{{Target: "height", Name: validation.InclusiveMaximum, Rule: int64(1024), Chain: nil}, - {Target: "height", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}); err != nil { + {Target: "height", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}); err != nil { return result, validation.NewError("computervision.BaseClient", "GenerateThumbnailInStream", err.Error()) } diff --git a/services/cognitiveservices/v3.0/customvision/training/client.go b/services/cognitiveservices/v3.0/customvision/training/client.go index 1a0403d3747c..bb73f81c15bc 100644 --- a/services/cognitiveservices/v3.0/customvision/training/client.go +++ b/services/cognitiveservices/v3.0/customvision/training/client.go @@ -1702,7 +1702,7 @@ func (client BaseClient) GetImagePerformances(ctx context.Context, projectID uui {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(256), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("training.BaseClient", "GetImagePerformances", err.Error()) } @@ -2531,7 +2531,7 @@ func (client BaseClient) GetTaggedImages(ctx context.Context, projectID uuid.UUI {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(256), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("training.BaseClient", "GetTaggedImages", err.Error()) } @@ -2803,7 +2803,7 @@ func (client BaseClient) GetUntaggedImages(ctx context.Context, projectID uuid.U {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(256), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("training.BaseClient", "GetUntaggedImages", err.Error()) } diff --git a/services/cognitiveservices/v3.1/customvision/training/client.go b/services/cognitiveservices/v3.1/customvision/training/client.go index d2e44f28285d..f7bf67ce7831 100644 --- a/services/cognitiveservices/v3.1/customvision/training/client.go +++ b/services/cognitiveservices/v3.1/customvision/training/client.go @@ -1713,7 +1713,7 @@ func (client BaseClient) GetImagePerformances(ctx context.Context, projectID uui {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(256), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("training.BaseClient", "GetImagePerformances", err.Error()) } @@ -2542,7 +2542,7 @@ func (client BaseClient) GetTaggedImages(ctx context.Context, projectID uuid.UUI {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(256), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("training.BaseClient", "GetTaggedImages", err.Error()) } @@ -2814,7 +2814,7 @@ func (client BaseClient) GetUntaggedImages(ctx context.Context, projectID uuid.U {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(256), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("training.BaseClient", "GetUntaggedImages", err.Error()) } diff --git a/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go b/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go index 699817848b04..a7a5ade13ef8 100644 --- a/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go +++ b/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go @@ -55,7 +55,11 @@ func (client KnowledgebaseClient) Create(ctx context.Context, createKbPayload Cr Constraints: []validation.Constraint{{Target: "createKbPayload.Name", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "createKbPayload.Name", Name: validation.MaxLength, Rule: 100, Chain: nil}, {Target: "createKbPayload.Name", Name: validation.MinLength, Rule: 1, Chain: nil}, - }}}}}); err != nil { + }}, + {Target: "createKbPayload.DefaultAnswerUsedForExtraction", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "createKbPayload.DefaultAnswerUsedForExtraction", Name: validation.MaxLength, Rule: 300, Chain: nil}, + {Target: "createKbPayload.DefaultAnswerUsedForExtraction", Name: validation.MinLength, Rule: 1, Chain: nil}, + }}}}}); err != nil { return result, validation.NewError("qnamaker.KnowledgebaseClient", "Create", err.Error()) } diff --git a/services/cognitiveservices/v4.0/qnamaker/models.go b/services/cognitiveservices/v4.0/qnamaker/models.go index a5e23760bc24..691b3d24eddf 100644 --- a/services/cognitiveservices/v4.0/qnamaker/models.go +++ b/services/cognitiveservices/v4.0/qnamaker/models.go @@ -129,6 +129,10 @@ type CreateKbDTO struct { Urls *[]string `json:"urls,omitempty"` // Files - List of files from which to Extract Q-A. Files *[]FileDTO `json:"files,omitempty"` + // EnableHierarchicalExtraction - Enable hierarchical extraction of Q-A from files and urls. Value to be considered False if this field is not present. + EnableHierarchicalExtraction *bool `json:"enableHierarchicalExtraction,omitempty"` + // DefaultAnswerUsedForExtraction - Text string to be used as the answer in any Q-A which has no extracted answer from the document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True. + DefaultAnswerUsedForExtraction *string `json:"defaultAnswerUsedForExtraction,omitempty"` } // CreateKbInputDTO input to create KB. @@ -389,6 +393,10 @@ type UpdateKbOperationDTO struct { Delete *UpdateKbOperationDTODelete `json:"delete,omitempty"` // Update - An instance of UpdateKbContentsDTO for Update Operation Update *UpdateKbOperationDTOUpdate `json:"update,omitempty"` + // EnableHierarchicalExtraction - Enable hierarchical extraction of Q-A from files and urls. The value set during KB creation will be used if this field is not present. + EnableHierarchicalExtraction *bool `json:"enableHierarchicalExtraction,omitempty"` + // DefaultAnswerUsedForExtraction - Text string to be used as the answer in any Q-A which has no extracted answer from the document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True. + DefaultAnswerUsedForExtraction *string `json:"defaultAnswerUsedForExtraction,omitempty"` } // UpdateKbOperationDTOAdd an instance of CreateKbInputDTO for add operation diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go index 4f4aad1b33e3..ad98ce1ef909 100644 --- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go @@ -64,15 +64,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go index a4dab609e1cd..026173f70f1a 100644 --- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go @@ -64,15 +64,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/compute/mgmt/2018-04-01/compute/models.go b/services/compute/mgmt/2018-04-01/compute/models.go index 78e5b3ef6b59..159ae374f723 100644 --- a/services/compute/mgmt/2018-04-01/compute/models.go +++ b/services/compute/mgmt/2018-04-01/compute/models.go @@ -7296,6 +7296,8 @@ type VirtualMachineScaleSetUpdateProperties struct { Overprovision *bool `json:"overprovision,omitempty"` // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` } // VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go index 035bc098973c..fdc820f2a6ad 100644 --- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go @@ -64,15 +64,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/compute/mgmt/2018-06-01/compute/models.go b/services/compute/mgmt/2018-06-01/compute/models.go index 0a9457c2dc07..67c1032c81e7 100644 --- a/services/compute/mgmt/2018-06-01/compute/models.go +++ b/services/compute/mgmt/2018-06-01/compute/models.go @@ -9525,6 +9525,8 @@ type VirtualMachineScaleSetUpdateProperties struct { Overprovision *bool `json:"overprovision,omitempty"` // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` } // VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go index 4035822ecc4a..e6a45e4f6838 100644 --- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go @@ -64,15 +64,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/compute/mgmt/2018-10-01/compute/models.go b/services/compute/mgmt/2018-10-01/compute/models.go index 8e8a1ec5ffe2..6ada29eeddfd 100644 --- a/services/compute/mgmt/2018-10-01/compute/models.go +++ b/services/compute/mgmt/2018-10-01/compute/models.go @@ -9551,6 +9551,8 @@ type VirtualMachineScaleSetUpdateProperties struct { DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"` // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` } // VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go index 0d1b297012c8..9f439b4c6b8b 100644 --- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go @@ -64,15 +64,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go b/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go index 77ec9da3137b..b38de508c0e9 100644 --- a/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go +++ b/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go @@ -63,7 +63,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) diff --git a/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go b/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go index 31f8795d6fdd..30a1c559ca2b 100644 --- a/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go +++ b/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go @@ -63,7 +63,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { diff --git a/services/compute/mgmt/2019-03-01/compute/models.go b/services/compute/mgmt/2019-03-01/compute/models.go index f7461a488238..33312daac1fe 100644 --- a/services/compute/mgmt/2019-03-01/compute/models.go +++ b/services/compute/mgmt/2019-03-01/compute/models.go @@ -489,9 +489,9 @@ func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationR type OperatingSystemStateTypes string const ( - // Generalized ... + // Generalized Generalized image. Needs to be provisioned during deployment time. Generalized OperatingSystemStateTypes = "Generalized" - // Specialized ... + // Specialized Specialized image. Contains already provisioned OS Disk. Specialized OperatingSystemStateTypes = "Specialized" ) @@ -850,13 +850,13 @@ func PossibleStorageAccountTypeValues() []StorageAccountType { type StorageAccountTypes string const ( - // StorageAccountTypesPremiumLRS ... + // StorageAccountTypesPremiumLRS Premium_LRS for StorageAccountType. StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS" - // StorageAccountTypesStandardLRS ... + // StorageAccountTypesStandardLRS Standard_LRS for StorageAccountType. StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS" - // StorageAccountTypesStandardSSDLRS ... + // StorageAccountTypesStandardSSDLRS StandardSSD_LRS for StorageAccountType. StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS" - // StorageAccountTypesUltraSSDLRS ... + // StorageAccountTypesUltraSSDLRS UltraSSD_LRS for StorageAccountType. StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS" ) @@ -941,11 +941,13 @@ const ( Low VirtualMachinePriorityTypes = "Low" // Regular ... Regular VirtualMachinePriorityTypes = "Regular" + // Spot ... + Spot VirtualMachinePriorityTypes = "Spot" ) // PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type. func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes { - return []VirtualMachinePriorityTypes{Low, Regular} + return []VirtualMachinePriorityTypes{Low, Regular, Spot} } // VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules. @@ -1756,10 +1758,10 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { return nil } -// BillingProfile specifies the billing related details of a low priority VM or VMSS.

Minimum +// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.

Minimum // api-version: 2019-03-01. type BillingProfile struct { - // MaxPrice - Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.

This price will be compared with the current low priority price for the VM size. Also, the prices are compared at the time of create/update of low priority VM/VMSS and the operation will only succeed if the maxPrice is greater than the current low priority price.

The maxPrice will also be used for evicting a low priority VM/VMSS if the current low priority price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: $0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the low priority VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. + // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. MaxPrice *float64 `json:"maxPrice,omitempty"` } @@ -9020,11 +9022,11 @@ type VirtualMachineProperties struct { VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"` // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.

Minimum api-version: 2018-04-01. ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` - // Priority - Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low' + // Priority - Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot' Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` - // EvictionPolicy - Specifies the eviction policy for the low priority virtual machine. Only supported value is 'Deallocate'.

Minimum api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' + // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine. Only supported value is 'Deallocate'.

Minimum api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority virtual machine.

Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.

Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // Host - Specifies information about the dedicated host that the virtual machine resides in.

Minimum api-version: 2018-10-01. Host *SubResource `json:"host,omitempty"` @@ -11239,6 +11241,8 @@ type VirtualMachineScaleSetUpdateProperties struct { AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` } // VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP @@ -11709,11 +11713,11 @@ type VirtualMachineScaleSetVMProfile struct { ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

Possible values are:

Windows_Client

Windows_Server

If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Minimum api-version: 2015-06-15 LicenseType *string `json:"licenseType,omitempty"` - // Priority - Specifies the priority for the virtual machines in the scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' + // Priority - Specifies the priority for the virtual machines in the scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot' Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` - // EvictionPolicy - Specifies the eviction policy for virtual machines in a low priority scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + // EvictionPolicy - Specifies the eviction policy for virtual machines in a Azure Spot scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority VMSS.

Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.

Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // ScheduledEventsProfile - Specifies Scheduled Event related configurations. ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` diff --git a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go index 660464e05780..ddde31e7bbfe 100644 --- a/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go @@ -138,15 +138,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go b/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go index 836e80dbc99c..9cb805379b62 100644 --- a/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go +++ b/services/compute/mgmt/2019-07-01/compute/computeapi/interfaces.go @@ -47,7 +47,7 @@ var _ AvailabilitySetsClientAPI = (*compute.AvailabilitySetsClient)(nil) type ProximityPlacementGroupsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters compute.ProximityPlacementGroup) (result compute.ProximityPlacementGroup, err error) Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) - Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result compute.ProximityPlacementGroup, err error) + Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result compute.ProximityPlacementGroup, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.ProximityPlacementGroupListResultPage, err error) ListBySubscription(ctx context.Context) (result compute.ProximityPlacementGroupListResultPage, err error) Update(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters compute.ProximityPlacementGroupUpdate) (result compute.ProximityPlacementGroup, err error) @@ -195,6 +195,7 @@ type VirtualMachineScaleSetExtensionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result compute.VirtualMachineScaleSetExtensionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result compute.VirtualMachineScaleSetExtension, err error) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSetExtensionListResultPage, err error) + Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters compute.VirtualMachineScaleSetExtensionUpdate) (result compute.VirtualMachineScaleSetExtensionsUpdateFuture, err error) } var _ VirtualMachineScaleSetExtensionsClientAPI = (*compute.VirtualMachineScaleSetExtensionsClient)(nil) @@ -310,6 +311,7 @@ type GalleriesClientAPI interface { Get(ctx context.Context, resourceGroupName string, galleryName string) (result compute.Gallery, err error) List(ctx context.Context) (result compute.GalleryListPage, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result compute.GalleryListPage, err error) + Update(ctx context.Context, resourceGroupName string, galleryName string, gallery compute.GalleryUpdate) (result compute.GalleriesUpdateFuture, err error) } var _ GalleriesClientAPI = (*compute.GalleriesClient)(nil) @@ -320,6 +322,7 @@ type GalleryImagesClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImagesDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImage, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryImageListPage, err error) + Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage compute.GalleryImageUpdate) (result compute.GalleryImagesUpdateFuture, err error) } var _ GalleryImagesClientAPI = (*compute.GalleryImagesClient)(nil) @@ -330,6 +333,7 @@ type GalleryImageVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result compute.GalleryImageVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryImageVersion, err error) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result compute.GalleryImageVersionListPage, err error) + Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion compute.GalleryImageVersionUpdate) (result compute.GalleryImageVersionsUpdateFuture, err error) } var _ GalleryImageVersionsClientAPI = (*compute.GalleryImageVersionsClient)(nil) @@ -340,6 +344,7 @@ type GalleryApplicationsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplication, err error) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result compute.GalleryApplicationListPage, err error) + Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication compute.GalleryApplicationUpdate) (result compute.GalleryApplicationsUpdateFuture, err error) } var _ GalleryApplicationsClientAPI = (*compute.GalleryApplicationsClient)(nil) @@ -350,6 +355,7 @@ type GalleryApplicationVersionsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (result compute.GalleryApplicationVersionsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand compute.ReplicationStatusTypes) (result compute.GalleryApplicationVersion, err error) ListByGalleryApplication(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result compute.GalleryApplicationVersionListPage, err error) + Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion compute.GalleryApplicationVersionUpdate) (result compute.GalleryApplicationVersionsUpdateFuture, err error) } var _ GalleryApplicationVersionsClientAPI = (*compute.GalleryApplicationVersionsClient)(nil) diff --git a/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go b/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go index c786ffefc3f3..a3779afa2dbe 100644 --- a/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go +++ b/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go @@ -63,7 +63,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) diff --git a/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go b/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go index fb6ff59522b3..fd90291556a0 100644 --- a/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go +++ b/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go @@ -63,7 +63,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { diff --git a/services/compute/mgmt/2019-07-01/compute/galleries.go b/services/compute/mgmt/2019-07-01/compute/galleries.go index 553defda18ea..8b9486b00652 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleries.go +++ b/services/compute/mgmt/2019-07-01/compute/galleries.go @@ -496,3 +496,84 @@ func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, r result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } + +// Update update a Shared Image Gallery. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with +// dots and periods allowed in the middle. The maximum length is 80 characters. +// gallery - parameters supplied to the update Shared Image Gallery operation. +func (client GalleriesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (result GalleriesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, gallery) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters), + autorest.WithJSON(gallery), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2019-07-01/compute/galleryapplications.go b/services/compute/mgmt/2019-07-01/compute/galleryapplications.go index c2c651209dee..60651d079a35 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryapplications.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryapplications.go @@ -399,3 +399,88 @@ func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Contex result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName) return } + +// Update update a gallery Application Definition. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be +// updated. +// galleryApplicationName - the name of the gallery Application Definition to be updated. The allowed +// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum +// length is 80 characters. +// galleryApplication - parameters supplied to the update gallery Application operation. +func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (result GalleryApplicationsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryApplicationName": autorest.Encode("path", galleryApplicationName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters), + autorest.WithJSON(galleryApplication), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go b/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go index 40b2dc830e93..e2d3695d8d08 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryapplicationversions.go @@ -426,3 +426,90 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete( result.page, err = client.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName) return } + +// Update update a gallery Application Version. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Application Gallery in which the Application Definition resides. +// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is +// to be updated. +// galleryApplicationVersionName - the name of the gallery Application Version to be updated. Needs to follow +// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range +// of a 32-bit integer. Format: .. +// galleryApplicationVersion - parameters supplied to the update gallery Application Version operation. +func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (result GalleryApplicationVersionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryApplicationName": autorest.Encode("path", galleryApplicationName), + "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters), + autorest.WithJSON(galleryApplicationVersion), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2019-07-01/compute/galleryimages.go b/services/compute/mgmt/2019-07-01/compute/galleryimages.go index c4c78e5706bb..c992180ec1e4 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryimages.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryimages.go @@ -408,3 +408,87 @@ func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, res result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName) return } + +// Update update a gallery Image Definition. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be updated. +// galleryImageName - the name of the gallery Image Definition to be updated. The allowed characters are +// alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 +// characters. +// galleryImage - parameters supplied to the update gallery image operation. +func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (result GalleryImagesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters), + autorest.WithJSON(galleryImage), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go b/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go index 658da5864e04..e1c934b0e17a 100644 --- a/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go +++ b/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go @@ -420,3 +420,89 @@ func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context. result.page, err = client.ListByGalleryImage(ctx, resourceGroupName, galleryName, galleryImageName) return } + +// Update update a gallery Image Version. +// Parameters: +// resourceGroupName - the name of the resource group. +// galleryName - the name of the Shared Image Gallery in which the Image Definition resides. +// galleryImageName - the name of the gallery Image Definition in which the Image Version is to be updated. +// galleryImageVersionName - the name of the gallery Image Version to be updated. Needs to follow semantic +// version name pattern: The allowed characters are digit and period. Digits must be within the range of a +// 32-bit integer. Format: .. +// galleryImageVersion - parameters supplied to the update gallery Image Version operation. +func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (result GalleryImageVersionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), + "galleryName": autorest.Encode("path", galleryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters), + autorest.WithJSON(galleryImageVersion), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client GalleryImageVersionsClient) UpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2019-07-01/compute/models.go b/services/compute/mgmt/2019-07-01/compute/models.go index 11e0c0a1bd2c..ea09b2c85993 100644 --- a/services/compute/mgmt/2019-07-01/compute/models.go +++ b/services/compute/mgmt/2019-07-01/compute/models.go @@ -970,11 +970,13 @@ const ( Low VirtualMachinePriorityTypes = "Low" // Regular ... Regular VirtualMachinePriorityTypes = "Regular" + // Spot ... + Spot VirtualMachinePriorityTypes = "Spot" ) // PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type. func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes { - return []VirtualMachinePriorityTypes{Low, Regular} + return []VirtualMachinePriorityTypes{Low, Regular, Spot} } // VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules. @@ -1726,6 +1728,12 @@ type AvailabilitySetUpdate struct { Sku *Sku `json:"sku,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for AvailabilitySetUpdate. @@ -1779,16 +1787,43 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { } asu.Tags = tags } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + asu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + asu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + asu.Type = &typeVar + } } } return nil } -// BillingProfile specifies the billing related details of a low priority VM or VMSS.

Minimum +// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.

Minimum // api-version: 2019-03-01. type BillingProfile struct { - // MaxPrice - Specifies the maximum price you are willing to pay for a low priority VM/VMSS. This price is in US Dollars.

This price will be compared with the current low priority price for the VM size. Also, the prices are compared at the time of create/update of low priority VM/VMSS and the operation will only succeed if the maxPrice is greater than the current low priority price.

The maxPrice will also be used for evicting a low priority VM/VMSS if the current low priority price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: $0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the low priority VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. + // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

Possible values are:

- Any decimal value greater than zero. Example: 0.01538

-1 – indicates default price to be up-to on-demand.

You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

Minimum api-version: 2019-03-01. MaxPrice *float64 `json:"maxPrice,omitempty"` } @@ -2683,6 +2718,12 @@ type DedicatedHostGroupUpdate struct { Zones *[]string `json:"zones,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate. @@ -2736,6 +2777,33 @@ func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error { } dhgu.Tags = tags } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dhgu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dhgu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dhgu.Type = &typeVar + } } } @@ -3005,6 +3073,12 @@ type DedicatedHostUpdate struct { *DedicatedHostProperties `json:"properties,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for DedicatedHostUpdate. @@ -3046,6 +3120,33 @@ func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error { } dhu.Tags = tags } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + dhu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + dhu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + dhu.Type = &typeVar + } } } @@ -4128,6 +4229,35 @@ func (future *GalleriesDeleteFuture) Result(client GalleriesClient) (ar autorest return } +// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleriesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleriesUpdateFuture) Result(client GalleriesClient) (g Gallery, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent { + g, err = client.UpdateResponder(g.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request") + } + } + return +} + // Gallery specifies information about the Shared Image Gallery that you want to create or update. type Gallery struct { autorest.Response `json:"-"` @@ -4543,6 +4673,121 @@ func (future *GalleryApplicationsDeleteFuture) Result(client GalleryApplications return } +// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryApplicationsUpdateFuture) Result(client GalleryApplicationsClient) (ga GalleryApplication, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent { + ga, err = client.UpdateResponder(ga.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to +// update. +type GalleryApplicationUpdate struct { + *GalleryApplicationProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryApplicationUpdate. +func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gau.GalleryApplicationProperties != nil { + objectMap["properties"] = gau.GalleryApplicationProperties + } + if gau.Tags != nil { + objectMap["tags"] = gau.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct. +func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryApplicationProperties GalleryApplicationProperties + err = json.Unmarshal(*v, &galleryApplicationProperties) + if err != nil { + return err + } + gau.GalleryApplicationProperties = &galleryApplicationProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gau.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gau.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gau.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gau.Type = &typeVar + } + } + } + + return nil +} + // GalleryApplicationVersion specifies information about the gallery Application Version that you want to // create or update. type GalleryApplicationVersion struct { @@ -4873,38 +5118,153 @@ func (future *GalleryApplicationVersionsDeleteFuture) Result(client GalleryAppli return } -// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile. -type GalleryArtifactPublishingProfileBase struct { - // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable. - TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` - // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. - ReplicaCount *int32 `json:"replicaCount,omitempty"` - // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. - ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"` - // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published. - PublishedDate *date.Time `json:"publishedDate,omitempty"` - // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. - EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` - // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' - StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` +// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryApplicationVersionsUpdateFuture struct { + azure.Future } -// GalleryArtifactSource the source image from which the Image Version is going to be created. -type GalleryArtifactSource struct { - ManagedImage *ManagedArtifact `json:"managedImage,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryApplicationVersionsUpdateFuture) Result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent { + gav, err = client.UpdateResponder(gav.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request") + } + } + return } -// GalleryArtifactVersionSource the gallery artifact version source. -type GalleryArtifactVersionSource struct { - // ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image. +// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you +// want to update. +type GalleryApplicationVersionUpdate struct { + *GalleryApplicationVersionProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } -// GalleryDataDiskImage this is the data disk image. -type GalleryDataDiskImage struct { - // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - Lun *int32 `json:"lun,omitempty"` - // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. +// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate. +func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gavu.GalleryApplicationVersionProperties != nil { + objectMap["properties"] = gavu.GalleryApplicationVersionProperties + } + if gavu.Tags != nil { + objectMap["tags"] = gavu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct. +func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryApplicationVersionProperties GalleryApplicationVersionProperties + err = json.Unmarshal(*v, &galleryApplicationVersionProperties) + if err != nil { + return err + } + gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gavu.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gavu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gavu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gavu.Type = &typeVar + } + } + } + + return nil +} + +// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile. +type GalleryArtifactPublishingProfileBase struct { + // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable. + TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` + // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. + ReplicaCount *int32 `json:"replicaCount,omitempty"` + // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. + ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"` + // PublishedDate - READ-ONLY; The timestamp for when the gallery Image Version is published. + PublishedDate *date.Time `json:"publishedDate,omitempty"` + // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` + // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS' + StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` +} + +// GalleryArtifactSource the source image from which the Image Version is going to be created. +type GalleryArtifactSource struct { + ManagedImage *ManagedArtifact `json:"managedImage,omitempty"` +} + +// GalleryArtifactVersionSource the gallery artifact version source. +type GalleryArtifactVersionSource struct { + // ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, or user image. + ID *string `json:"id,omitempty"` +} + +// GalleryDataDiskImage this is the data disk image. +type GalleryDataDiskImage struct { + // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + Lun *int32 `json:"lun,omitempty"` + // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. SizeInGB *int32 `json:"sizeInGB,omitempty"` // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' HostCaching HostCaching `json:"hostCaching,omitempty"` @@ -5260,6 +5620,120 @@ func (future *GalleryImagesDeleteFuture) Result(client GalleryImagesClient) (ar return } +// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type GalleryImagesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryImagesUpdateFuture) Result(client GalleryImagesClient) (gi GalleryImage, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent { + gi, err = client.UpdateResponder(gi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update. +type GalleryImageUpdate struct { + *GalleryImageProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryImageUpdate. +func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if giu.GalleryImageProperties != nil { + objectMap["properties"] = giu.GalleryImageProperties + } + if giu.Tags != nil { + objectMap["tags"] = giu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct. +func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryImageProperties GalleryImageProperties + err = json.Unmarshal(*v, &galleryImageProperties) + if err != nil { + return err + } + giu.GalleryImageProperties = &galleryImageProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + giu.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + giu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + giu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + giu.Type = &typeVar + } + } + } + + return nil +} + // GalleryImageVersion specifies information about the gallery Image Version that you want to create or // update. type GalleryImageVersion struct { @@ -5593,6 +6067,120 @@ type GalleryImageVersionStorageProfile struct { DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"` } +// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type GalleryImageVersionsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *GalleryImageVersionsUpdateFuture) Result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent { + giv, err = client.UpdateResponder(giv.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request") + } + } + return +} + +// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update. +type GalleryImageVersionUpdate struct { + *GalleryImageVersionProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate. +func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if givu.GalleryImageVersionProperties != nil { + objectMap["properties"] = givu.GalleryImageVersionProperties + } + if givu.Tags != nil { + objectMap["tags"] = givu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct. +func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryImageVersionProperties GalleryImageVersionProperties + err = json.Unmarshal(*v, &galleryImageVersionProperties) + if err != nil { + return err + } + givu.GalleryImageVersionProperties = &galleryImageVersionProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + givu.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + givu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + givu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + givu.Type = &typeVar + } + } + } + + return nil +} + // GalleryList the List Galleries operation response. type GalleryList struct { autorest.Response `json:"-"` @@ -5731,30 +6319,115 @@ func (page GalleryListPage) Values() []Gallery { if page.gl.IsEmpty() { return nil } - return *page.gl.Value -} - -// Creates a new instance of the GalleryListPage type. -func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage { - return GalleryListPage{fn: getNextPage} -} + return *page.gl.Value +} + +// Creates a new instance of the GalleryListPage type. +func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage { + return GalleryListPage{fn: getNextPage} +} + +// GalleryOSDiskImage this is the OS disk image. +type GalleryOSDiskImage struct { + // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. + SizeInGB *int32 `json:"sizeInGB,omitempty"` + // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' + HostCaching HostCaching `json:"hostCaching,omitempty"` + Source *GalleryArtifactVersionSource `json:"source,omitempty"` +} + +// GalleryProperties describes the properties of a Shared Image Gallery. +type GalleryProperties struct { + // Description - The description of this Shared Image Gallery resource. This property is updatable. + Description *string `json:"description,omitempty"` + Identifier *GalleryIdentifier `json:"identifier,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// GalleryUpdate specifies information about the Shared Image Gallery that you want to update. +type GalleryUpdate struct { + *GalleryProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for GalleryUpdate. +func (gu GalleryUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gu.GalleryProperties != nil { + objectMap["properties"] = gu.GalleryProperties + } + if gu.Tags != nil { + objectMap["tags"] = gu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct. +func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var galleryProperties GalleryProperties + err = json.Unmarshal(*v, &galleryProperties) + if err != nil { + return err + } + gu.GalleryProperties = &galleryProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + gu.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + gu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + gu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + gu.Type = &typeVar + } + } + } -// GalleryOSDiskImage this is the OS disk image. -type GalleryOSDiskImage struct { - // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. - SizeInGB *int32 `json:"sizeInGB,omitempty"` - // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' - HostCaching HostCaching `json:"hostCaching,omitempty"` - Source *GalleryArtifactVersionSource `json:"source,omitempty"` -} - -// GalleryProperties describes the properties of a Shared Image Gallery. -type GalleryProperties struct { - // Description - The description of this Shared Image Gallery resource. This property is updatable. - Description *string `json:"description,omitempty"` - Identifier *GalleryIdentifier `json:"identifier,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + return nil } // GrantAccessData data used for requesting a SAS. @@ -6221,6 +6894,12 @@ type ImageUpdate struct { *ImageProperties `json:"properties,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for ImageUpdate. @@ -6262,6 +6941,33 @@ func (iu *ImageUpdate) UnmarshalJSON(body []byte) error { } iu.Tags = tags } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + iu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + iu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + iu.Type = &typeVar + } } } @@ -7095,6 +7801,12 @@ type ProximityPlacementGroupProperties struct { type ProximityPlacementGroupUpdate struct { // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate. @@ -8439,6 +9151,12 @@ type ThrottledRequestsInput struct { type UpdateResource struct { // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for UpdateResource. @@ -9089,6 +9807,12 @@ type VirtualMachineExtensionUpdate struct { *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate. @@ -9130,6 +9854,33 @@ func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error { } vmeu.Tags = tags } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmeu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmeu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmeu.Type = &typeVar + } } } @@ -9524,11 +10275,11 @@ type VirtualMachineProperties struct { VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"` // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.

Minimum api-version: 2018-04-01. ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` - // Priority - Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low' + // Priority - Specifies the priority for the virtual machine.

Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot' Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` - // EvictionPolicy - Specifies the eviction policy for the low priority virtual machine. Only supported value is 'Deallocate'.

Minimum api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' + // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine. Only supported value is 'Deallocate'.

Minimum api-version: 2019-03-01. Possible values include: 'Deallocate', 'Delete' EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority virtual machine.

Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.

Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // Host - Specifies information about the dedicated host that the virtual machine resides in.

Minimum api-version: 2018-10-01. Host *SubResource `json:"host,omitempty"` @@ -9731,7 +10482,9 @@ type VirtualMachineScaleSetDataDisk struct { type VirtualMachineScaleSetExtension struct { autorest.Response `json:"-"` // Name - The name of the extension. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` @@ -9767,6 +10520,15 @@ func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error { } vmsse.Name = &name } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmsse.Type = &typeVar + } case "properties": if v != nil { var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties @@ -10019,6 +10781,106 @@ func (future *VirtualMachineScaleSetExtensionsDeleteFuture) Result(client Virtua return } +// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type VirtualMachineScaleSetExtensionsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualMachineScaleSetExtensionsUpdateFuture) Result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent { + vmsse, err = client.UpdateResponder(vmsse.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension. +type VirtualMachineScaleSetExtensionUpdate struct { + // Name - READ-ONLY; The name of the extension. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate. +func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vmsseu.VirtualMachineScaleSetExtensionProperties != nil { + objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct. +func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmsseu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmsseu.Type = &typeVar + } + case "properties": + if v != nil { + var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties + err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties) + if err != nil { + return err + } + vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmsseu.ID = &ID + } + } + } + + return nil +} + // VirtualMachineScaleSetIdentity identity for the virtual machine scale set. type VirtualMachineScaleSetIdentity struct { // PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. @@ -11440,6 +12302,12 @@ type VirtualMachineScaleSetUpdate struct { Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate. @@ -11517,6 +12385,33 @@ func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error { } vmssu.Tags = tags } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmssu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmssu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmssu.Type = &typeVar + } } } @@ -11751,6 +12646,8 @@ type VirtualMachineScaleSetUpdateProperties struct { AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` + // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01. + ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` } // VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP @@ -11839,7 +12736,7 @@ type VirtualMachineScaleSetUpdateVMProfile struct { ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` // LicenseType - The license type, which is for bring your own license scenario. LicenseType *string `json:"licenseType,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority VMSS.

Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.

Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // ScheduledEventsProfile - Specifies Scheduled Event related configurations. ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` @@ -12302,11 +13199,11 @@ type VirtualMachineScaleSetVMProfile struct { ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` // LicenseType - Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

Possible values are:

Windows_Client

Windows_Server

If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)

Minimum api-version: 2015-06-15 LicenseType *string `json:"licenseType,omitempty"` - // Priority - Specifies the priority for the virtual machines in the scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' + // Priority - Specifies the priority for the virtual machines in the scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot' Priority VirtualMachinePriorityTypes `json:"priority,omitempty"` - // EvictionPolicy - Specifies the eviction policy for virtual machines in a low priority scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' + // EvictionPolicy - Specifies the eviction policy for virtual machines in a Azure Spot scale set.

Minimum api-version: 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"` - // BillingProfile - Specifies the billing related details of a low priority VMSS.

Minimum api-version: 2019-03-01. + // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.

Minimum api-version: 2019-03-01. BillingProfile *BillingProfile `json:"billingProfile,omitempty"` // ScheduledEventsProfile - Specifies Scheduled Event related configurations. ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` @@ -13015,6 +13912,12 @@ type VirtualMachineUpdate struct { Zones *[]string `json:"zones,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineUpdate. @@ -13092,6 +13995,33 @@ func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error { } vmu.Tags = tags } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vmu.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vmu.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vmu.Type = &typeVar + } } } diff --git a/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go b/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go index a42d52685560..7e5e9013d31c 100644 --- a/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go +++ b/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go @@ -200,7 +200,9 @@ func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response // Parameters: // resourceGroupName - the name of the resource group. // proximityPlacementGroupName - the name of the proximity placement group. -func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result ProximityPlacementGroup, err error) { +// includeColocationStatus - includeColocationStatus=true enables fetching the colocation status of all the +// resources in the proximity placement group. +func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result ProximityPlacementGroup, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Get") defer func() { @@ -211,7 +213,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName) + req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName, includeColocationStatus) if err != nil { err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request") return @@ -233,7 +235,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr } // GetPreparer prepares the Get request. -func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) { +func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (*http.Request, error) { pathParameters := map[string]interface{}{ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -244,6 +246,9 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(includeColocationStatus) > 0 { + queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus) + } preparer := autorest.CreatePreparer( autorest.AsGet(), diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachines.go b/services/compute/mgmt/2019-07-01/compute/virtualmachines.go index b329db181d98..3d25da43d3ea 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachines.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachines.go @@ -462,7 +462,8 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result return } -// Generalize sets the state of the virtual machine to generalized. +// Generalize sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine +// before performing this operation // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go index 7e4d6d0a6b70..54d16ac72156 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go @@ -87,6 +87,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx "api-version": APIVersion, } + extensionParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -398,3 +399,87 @@ func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Co result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName) return } + +// Update the operation to update an extension. +// Parameters: +// resourceGroupName - the name of the resource group. +// VMScaleSetName - the name of the VM scale set where the extension should be updated. +// vmssExtensionName - the name of the VM scale set extension. +// extensionParameters - parameters supplied to the Update VM scale set Extension operation. +func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (result VirtualMachineScaleSetExtensionsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + "vmssExtensionName": autorest.Encode("path", vmssExtensionName), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + extensionParameters.Name = nil + extensionParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters), + autorest.WithJSON(extensionParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go index 54b1393fe57d..4480fb995562 100644 --- a/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go +++ b/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go @@ -138,15 +138,15 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go b/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go index ce151f630090..77ec4fa84fd1 100644 --- a/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go +++ b/services/consumption/mgmt/2017-11-30/consumption/usagedetails.go @@ -73,7 +73,7 @@ func (client UsageDetailsClient) List(ctx context.Context, scope string, expand {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } diff --git a/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go b/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go index 91c112b40a3b..9f057d3de570 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-01-31/consumption/marketplaces.go @@ -67,7 +67,7 @@ func (client MarketplacesClient) List(ctx context.Context, filter string, top *i {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "List", err.Error()) } @@ -205,7 +205,7 @@ func (client MarketplacesClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go index 0d0b22f8b29e..6ebeccb8f196 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-01-31/consumption/pricesheet.go @@ -66,7 +66,7 @@ func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "Get", err.Error()) } @@ -165,7 +165,7 @@ func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPe {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "GetByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go index d7ebc99b862e..32da7fced874 100644 --- a/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-01-31/consumption/usagedetails.go @@ -69,7 +69,7 @@ func (client UsageDetailsClient) List(ctx context.Context, expand string, filter {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } @@ -212,7 +212,7 @@ func (client UsageDetailsClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go b/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go index abdd5c52b0d4..77a41b450b8a 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplaces.go @@ -67,7 +67,7 @@ func (client MarketplacesClient) List(ctx context.Context, filter string, top *i {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "List", err.Error()) } @@ -205,7 +205,7 @@ func (client MarketplacesClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go index df1bea985749..8e74732b37c9 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbybillingaccount.go @@ -69,7 +69,7 @@ func (client MarketplacesByBillingAccountClient) List(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesByBillingAccountClient", "List", err.Error()) } @@ -208,7 +208,7 @@ func (client MarketplacesByBillingAccountClient) ListByBillingPeriod(ctx context {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesByBillingAccountClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go index d921c3e1e1c9..bb273617739f 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbydepartment.go @@ -68,7 +68,7 @@ func (client MarketplacesByDepartmentClient) List(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesByDepartmentClient", "List", err.Error()) } @@ -207,7 +207,7 @@ func (client MarketplacesByDepartmentClient) ListByBillingPeriod(ctx context.Con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesByDepartmentClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go index f21064b59ecc..6a619df9f282 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go +++ b/services/consumption/mgmt/2018-03-31/consumption/marketplacesbyenrollmentaccounts.go @@ -69,7 +69,7 @@ func (client MarketplacesByEnrollmentAccountsClient) List(ctx context.Context, e {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesByEnrollmentAccountsClient", "List", err.Error()) } @@ -208,7 +208,7 @@ func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriod(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesByEnrollmentAccountsClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go index fcb4d9924f8c..2ca1d4f42a50 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-03-31/consumption/pricesheet.go @@ -66,7 +66,7 @@ func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "Get", err.Error()) } @@ -165,7 +165,7 @@ func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPe {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "GetByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go index 16e375299c22..f88097780b57 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetails.go @@ -71,7 +71,7 @@ func (client UsageDetailsClient) List(ctx context.Context, expand string, filter {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } @@ -220,7 +220,7 @@ func (client UsageDetailsClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go index 5670405c648d..469b39fe3eb4 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbybillingaccount.go @@ -73,7 +73,7 @@ func (client UsageDetailsByBillingAccountClient) List(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsByBillingAccountClient", "List", err.Error()) } @@ -223,7 +223,7 @@ func (client UsageDetailsByBillingAccountClient) ListByBillingPeriod(ctx context {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsByBillingAccountClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go index 4ba82ff839c0..5de8de088c9d 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbydepartment.go @@ -72,7 +72,7 @@ func (client UsageDetailsByDepartmentClient) List(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsByDepartmentClient", "List", err.Error()) } @@ -222,7 +222,7 @@ func (client UsageDetailsByDepartmentClient) ListByBillingPeriod(ctx context.Con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsByDepartmentClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go index aaa11e3b1c31..7a49809611ba 100644 --- a/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go +++ b/services/consumption/mgmt/2018-03-31/consumption/usagedetailsbyenrollmentaccount.go @@ -73,7 +73,7 @@ func (client UsageDetailsByEnrollmentAccountClient) List(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsByEnrollmentAccountClient", "List", err.Error()) } @@ -223,7 +223,7 @@ func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriod(ctx cont {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsByEnrollmentAccountClient", "ListByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go index 8754b9fbe92f..4102ff143308 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-05-31/consumption/pricesheet.go @@ -66,7 +66,7 @@ func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "Get", err.Error()) } @@ -165,7 +165,7 @@ func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPe {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "GetByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go index 4cb6951aa705..1cc0a1beb0ac 100644 --- a/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-05-31/consumption/usagedetails.go @@ -71,7 +71,7 @@ func (client UsageDetailsClient) List(ctx context.Context, expand string, filter {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } @@ -219,7 +219,7 @@ func (client UsageDetailsClient) ListByBillingAccount(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingAccount", err.Error()) } @@ -368,7 +368,7 @@ func (client UsageDetailsClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingPeriod", err.Error()) } @@ -517,7 +517,7 @@ func (client UsageDetailsClient) ListByDepartment(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByDepartment", err.Error()) } @@ -665,7 +665,7 @@ func (client UsageDetailsClient) ListByEnrollmentAccount(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByEnrollmentAccount", err.Error()) } @@ -815,7 +815,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByBillingAccount(ctx contex {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByBillingAccount", err.Error()) } @@ -966,7 +966,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByDepartment(ctx context.Co {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByDepartment", err.Error()) } @@ -1117,7 +1117,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByEnrollmentAccount(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByEnrollmentAccount", err.Error()) } diff --git a/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go b/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go index fd0d7613835f..7433e37baed0 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-06-30/consumption/marketplaces.go @@ -67,7 +67,7 @@ func (client MarketplacesClient) List(ctx context.Context, filter string, top *i {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "List", err.Error()) } @@ -205,7 +205,7 @@ func (client MarketplacesClient) ListByBillingAccount(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingAccount", err.Error()) } @@ -343,7 +343,7 @@ func (client MarketplacesClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingPeriod", err.Error()) } @@ -482,7 +482,7 @@ func (client MarketplacesClient) ListByDepartment(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByDepartment", err.Error()) } @@ -620,7 +620,7 @@ func (client MarketplacesClient) ListByEnrollmentAccount(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByEnrollmentAccount", err.Error()) } @@ -759,7 +759,7 @@ func (client MarketplacesClient) ListForBillingPeriodByBillingAccount(ctx contex {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByBillingAccount", err.Error()) } @@ -899,7 +899,7 @@ func (client MarketplacesClient) ListForBillingPeriodByDepartment(ctx context.Co {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByDepartment", err.Error()) } @@ -1039,7 +1039,7 @@ func (client MarketplacesClient) ListForBillingPeriodByEnrollmentAccount(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByEnrollmentAccount", err.Error()) } diff --git a/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go b/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go index 19e86e6ef29a..eb5af3b9ef84 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-06-30/consumption/pricesheet.go @@ -66,7 +66,7 @@ func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "Get", err.Error()) } @@ -165,7 +165,7 @@ func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPe {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "GetByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go b/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go index e864c36a4dea..bf65ae57c6d4 100644 --- a/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-06-30/consumption/usagedetails.go @@ -71,7 +71,7 @@ func (client UsageDetailsClient) List(ctx context.Context, expand string, filter {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } @@ -219,7 +219,7 @@ func (client UsageDetailsClient) ListByBillingAccount(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingAccount", err.Error()) } @@ -368,7 +368,7 @@ func (client UsageDetailsClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingPeriod", err.Error()) } @@ -517,7 +517,7 @@ func (client UsageDetailsClient) ListByDepartment(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByDepartment", err.Error()) } @@ -665,7 +665,7 @@ func (client UsageDetailsClient) ListByEnrollmentAccount(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByEnrollmentAccount", err.Error()) } @@ -813,7 +813,7 @@ func (client UsageDetailsClient) ListByManagementGroup(ctx context.Context, mana {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByManagementGroup", err.Error()) } @@ -963,7 +963,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByBillingAccount(ctx contex {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByBillingAccount", err.Error()) } @@ -1114,7 +1114,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByDepartment(ctx context.Co {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByDepartment", err.Error()) } @@ -1265,7 +1265,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByEnrollmentAccount(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByEnrollmentAccount", err.Error()) } @@ -1416,7 +1416,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByManagementGroup(ctx conte {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByManagementGroup", err.Error()) } diff --git a/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go b/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go index 60c9cb5eb1d3..cde58f2e66cc 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-08-31/consumption/marketplaces.go @@ -67,7 +67,7 @@ func (client MarketplacesClient) List(ctx context.Context, filter string, top *i {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "List", err.Error()) } @@ -205,7 +205,7 @@ func (client MarketplacesClient) ListByBillingAccount(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingAccount", err.Error()) } @@ -343,7 +343,7 @@ func (client MarketplacesClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingPeriod", err.Error()) } @@ -482,7 +482,7 @@ func (client MarketplacesClient) ListByDepartment(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByDepartment", err.Error()) } @@ -620,7 +620,7 @@ func (client MarketplacesClient) ListByEnrollmentAccount(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByEnrollmentAccount", err.Error()) } @@ -759,7 +759,7 @@ func (client MarketplacesClient) ListForBillingPeriodByBillingAccount(ctx contex {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByBillingAccount", err.Error()) } @@ -899,7 +899,7 @@ func (client MarketplacesClient) ListForBillingPeriodByDepartment(ctx context.Co {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByDepartment", err.Error()) } @@ -1039,7 +1039,7 @@ func (client MarketplacesClient) ListForBillingPeriodByEnrollmentAccount(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByEnrollmentAccount", err.Error()) } diff --git a/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go b/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go index 317f108ffc98..6110ba8a868f 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-08-31/consumption/pricesheet.go @@ -66,7 +66,7 @@ func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "Get", err.Error()) } @@ -165,7 +165,7 @@ func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPe {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "GetByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go b/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go index 291fd9b4336e..eae562cbaa8d 100644 --- a/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-08-31/consumption/usagedetails.go @@ -71,7 +71,7 @@ func (client UsageDetailsClient) List(ctx context.Context, expand string, filter {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } @@ -219,7 +219,7 @@ func (client UsageDetailsClient) ListByBillingAccount(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingAccount", err.Error()) } @@ -368,7 +368,7 @@ func (client UsageDetailsClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingPeriod", err.Error()) } @@ -517,7 +517,7 @@ func (client UsageDetailsClient) ListByDepartment(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByDepartment", err.Error()) } @@ -665,7 +665,7 @@ func (client UsageDetailsClient) ListByEnrollmentAccount(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByEnrollmentAccount", err.Error()) } @@ -813,7 +813,7 @@ func (client UsageDetailsClient) ListByManagementGroup(ctx context.Context, mana {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByManagementGroup", err.Error()) } @@ -963,7 +963,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByBillingAccount(ctx contex {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByBillingAccount", err.Error()) } @@ -1114,7 +1114,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByDepartment(ctx context.Co {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByDepartment", err.Error()) } @@ -1265,7 +1265,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByEnrollmentAccount(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByEnrollmentAccount", err.Error()) } @@ -1416,7 +1416,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByManagementGroup(ctx conte {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByManagementGroup", err.Error()) } diff --git a/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go b/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go index 96b15c11eac4..ba14dbfcfb99 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go +++ b/services/consumption/mgmt/2018-10-01/consumption/marketplaces.go @@ -67,7 +67,7 @@ func (client MarketplacesClient) List(ctx context.Context, filter string, top *i {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "List", err.Error()) } @@ -205,7 +205,7 @@ func (client MarketplacesClient) ListByBillingAccount(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingAccount", err.Error()) } @@ -343,7 +343,7 @@ func (client MarketplacesClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByBillingPeriod", err.Error()) } @@ -482,7 +482,7 @@ func (client MarketplacesClient) ListByDepartment(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByDepartment", err.Error()) } @@ -620,7 +620,7 @@ func (client MarketplacesClient) ListByEnrollmentAccount(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByEnrollmentAccount", err.Error()) } @@ -758,7 +758,7 @@ func (client MarketplacesClient) ListByManagementGroup(ctx context.Context, mana {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListByManagementGroup", err.Error()) } @@ -897,7 +897,7 @@ func (client MarketplacesClient) ListForBillingPeriodByBillingAccount(ctx contex {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByBillingAccount", err.Error()) } @@ -1037,7 +1037,7 @@ func (client MarketplacesClient) ListForBillingPeriodByDepartment(ctx context.Co {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByDepartment", err.Error()) } @@ -1177,7 +1177,7 @@ func (client MarketplacesClient) ListForBillingPeriodByEnrollmentAccount(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByEnrollmentAccount", err.Error()) } @@ -1317,7 +1317,7 @@ func (client MarketplacesClient) ListForBillingPeriodByManagementGroup(ctx conte {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "ListForBillingPeriodByManagementGroup", err.Error()) } diff --git a/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go b/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go index 8f2d86ca67ac..0233b7d99a91 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go +++ b/services/consumption/mgmt/2018-10-01/consumption/pricesheet.go @@ -66,7 +66,7 @@ func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "Get", err.Error()) } @@ -165,7 +165,7 @@ func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPe {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "GetByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go b/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go index e912cffa381e..255eb9aa7c76 100644 --- a/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go +++ b/services/consumption/mgmt/2018-10-01/consumption/usagedetails.go @@ -71,7 +71,7 @@ func (client UsageDetailsClient) List(ctx context.Context, expand string, filter {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } @@ -219,7 +219,7 @@ func (client UsageDetailsClient) ListByBillingAccount(ctx context.Context, billi {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingAccount", err.Error()) } @@ -368,7 +368,7 @@ func (client UsageDetailsClient) ListByBillingPeriod(ctx context.Context, billin {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByBillingPeriod", err.Error()) } @@ -517,7 +517,7 @@ func (client UsageDetailsClient) ListByDepartment(ctx context.Context, departmen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByDepartment", err.Error()) } @@ -665,7 +665,7 @@ func (client UsageDetailsClient) ListByEnrollmentAccount(ctx context.Context, en {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByEnrollmentAccount", err.Error()) } @@ -813,7 +813,7 @@ func (client UsageDetailsClient) ListByManagementGroup(ctx context.Context, mana {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListByManagementGroup", err.Error()) } @@ -963,7 +963,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByBillingAccount(ctx contex {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByBillingAccount", err.Error()) } @@ -1114,7 +1114,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByDepartment(ctx context.Co {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByDepartment", err.Error()) } @@ -1265,7 +1265,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByEnrollmentAccount(ctx con {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByEnrollmentAccount", err.Error()) } @@ -1416,7 +1416,7 @@ func (client UsageDetailsClient) ListForBillingPeriodByManagementGroup(ctx conte {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "ListForBillingPeriodByManagementGroup", err.Error()) } diff --git a/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go b/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go index 5cbe51c89f6e..4bd352ef42e9 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go +++ b/services/consumption/mgmt/2019-01-01/consumption/marketplaces.go @@ -76,7 +76,7 @@ func (client MarketplacesClient) List(ctx context.Context, scope string, filter {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.MarketplacesClient", "List", err.Error()) } diff --git a/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go b/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go index 5654aa634437..aa044683b8cf 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go +++ b/services/consumption/mgmt/2019-01-01/consumption/pricesheet.go @@ -66,7 +66,7 @@ func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "Get", err.Error()) } @@ -165,7 +165,7 @@ func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPe {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.PriceSheetClient", "GetByBillingPeriod", err.Error()) } diff --git a/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go b/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go index 96134161219e..8a4e90e88439 100644 --- a/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go +++ b/services/consumption/mgmt/2019-01-01/consumption/usagedetails.go @@ -80,7 +80,7 @@ func (client UsageDetailsClient) List(ctx context.Context, scope string, expand {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go index 2ae33cf6138e..7e4733fbfc06 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/tasks.go @@ -74,7 +74,7 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Platform", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil}, - {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: 300, Chain: nil}, + {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil}, }}, {Target: "taskCreateParameters.TaskProperties.Step", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Trigger", Name: validation.Null, Rule: false, diff --git a/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go b/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go index 860e5f38ad7a..bc3157709dd7 100644 --- a/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2019-04-01/containerregistry/tasks.go @@ -74,7 +74,7 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Platform", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil}, - {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: 300, Chain: nil}, + {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil}, }}, {Target: "taskCreateParameters.TaskProperties.Step", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Trigger", Name: validation.Null, Rule: false, diff --git a/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go b/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go index 860e5f38ad7a..bc3157709dd7 100644 --- a/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go @@ -74,7 +74,7 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Platform", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil}, - {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: 300, Chain: nil}, + {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil}, }}, {Target: "taskCreateParameters.TaskProperties.Step", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Trigger", Name: validation.Null, Rule: false, diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go index 56d3e1d0610d..7c377d3501ee 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/containerregistryapi/interfaces.go @@ -85,6 +85,17 @@ type RunsClientAPI interface { var _ RunsClientAPI = (*containerregistry.RunsClient)(nil) +// TaskRunsClientAPI contains the set of methods on the TaskRunsClient type. +type TaskRunsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, registryName string, taskRunName string, taskRun containerregistry.TaskRun) (result containerregistry.TaskRunsCreateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (result containerregistry.TaskRunsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (result containerregistry.TaskRun, err error) + List(ctx context.Context, resourceGroupName string, registryName string) (result containerregistry.TaskRunListResultPage, err error) + Update(ctx context.Context, resourceGroupName string, registryName string, taskRunName string, updateParameters containerregistry.TaskRunUpdateParameters) (result containerregistry.TaskRunsUpdateFuture, err error) +} + +var _ TaskRunsClientAPI = (*containerregistry.TaskRunsClient)(nil) + // TasksClientAPI contains the set of methods on the TasksClient type. type TasksClientAPI interface { Create(ctx context.Context, resourceGroupName string, registryName string, taskName string, taskCreateParameters containerregistry.Task) (result containerregistry.TasksCreateFuture, err error) diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/models.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/models.go index 2985cd7f36d1..65c16c1e85fb 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/models.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/models.go @@ -1250,6 +1250,20 @@ func (etsup EncodedTaskStepUpdateParameters) AsBasicTaskStepUpdateParameters() ( return &etsup, true } +// Error an error response from the Azure Container Registry service. +type Error struct { + // Code - error code. + Code *string `json:"code,omitempty"` + // Message - error message. + Message *string `json:"message,omitempty"` +} + +// ErrorSchema an error response from the Azure Container Registry service. +type ErrorSchema struct { + // Error - Azure container registry build API error body. + Error *Error `json:"error,omitempty"` +} + // Event the event for a webhook. type Event struct { // EventRequestMessage - The event request message sent to the service URI. @@ -4625,6 +4639,370 @@ func (tpup *TaskPropertiesUpdateParameters) UnmarshalJSON(body []byte) error { return nil } +// TaskRun the task run that has the ARM resource and properties. +// The task run will have the information of request and result of a run. +type TaskRun struct { + autorest.Response `json:"-"` + // Identity - Identity for the resource. + Identity *IdentityProperties `json:"identity,omitempty"` + // TaskRunProperties - The properties associated with the task run, i.e., request and result of the run + *TaskRunProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` + // Location - The location of the resource. This cannot be changed after the resource is created. + Location *string `json:"location,omitempty"` + // Tags - The tags of the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TaskRun. +func (tr TaskRun) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Identity != nil { + objectMap["identity"] = tr.Identity + } + if tr.TaskRunProperties != nil { + objectMap["properties"] = tr.TaskRunProperties + } + if tr.Location != nil { + objectMap["location"] = tr.Location + } + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TaskRun struct. +func (tr *TaskRun) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "identity": + if v != nil { + var identity IdentityProperties + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + tr.Identity = &identity + } + case "properties": + if v != nil { + var taskRunProperties TaskRunProperties + err = json.Unmarshal(*v, &taskRunProperties) + if err != nil { + return err + } + tr.TaskRunProperties = &taskRunProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + tr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + tr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + tr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + tr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + tr.Tags = tags + } + } + } + + return nil +} + +// TaskRunListResult the collection of task runs. +type TaskRunListResult struct { + autorest.Response `json:"-"` + // Value - The collection value. + Value *[]TaskRun `json:"value,omitempty"` + // NextLink - The URI that can be used to request the next set of paged results. + NextLink *string `json:"nextLink,omitempty"` +} + +// TaskRunListResultIterator provides access to a complete listing of TaskRun values. +type TaskRunListResultIterator struct { + i int + page TaskRunListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *TaskRunListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *TaskRunListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TaskRunListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter TaskRunListResultIterator) Response() TaskRunListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter TaskRunListResultIterator) Value() TaskRun { + if !iter.page.NotDone() { + return TaskRun{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TaskRunListResultIterator type. +func NewTaskRunListResultIterator(page TaskRunListResultPage) TaskRunListResultIterator { + return TaskRunListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (trlr TaskRunListResult) IsEmpty() bool { + return trlr.Value == nil || len(*trlr.Value) == 0 +} + +// taskRunListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (trlr TaskRunListResult) taskRunListResultPreparer(ctx context.Context) (*http.Request, error) { + if trlr.NextLink == nil || len(to.String(trlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(trlr.NextLink))) +} + +// TaskRunListResultPage contains a page of TaskRun values. +type TaskRunListResultPage struct { + fn func(context.Context, TaskRunListResult) (TaskRunListResult, error) + trlr TaskRunListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *TaskRunListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.trlr) + if err != nil { + return err + } + page.trlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TaskRunListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TaskRunListResultPage) NotDone() bool { + return !page.trlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page TaskRunListResultPage) Response() TaskRunListResult { + return page.trlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TaskRunListResultPage) Values() []TaskRun { + if page.trlr.IsEmpty() { + return nil + } + return *page.trlr.Value +} + +// Creates a new instance of the TaskRunListResultPage type. +func NewTaskRunListResultPage(getNextPage func(context.Context, TaskRunListResult) (TaskRunListResult, error)) TaskRunListResultPage { + return TaskRunListResultPage{fn: getNextPage} +} + +// TaskRunProperties the properties of task run. +type TaskRunProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of this task run. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // RunRequest - The request (parameters) for the run + RunRequest BasicRunRequest `json:"runRequest,omitempty"` + // RunResult - READ-ONLY; The result of this task run + RunResult *Run `json:"runResult,omitempty"` + // ForceUpdateTag - How the run should be forced to rerun even if the run request configuration has not changed + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for TaskRunProperties struct. +func (trp *TaskRunProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "provisioningState": + if v != nil { + var provisioningState ProvisioningState + err = json.Unmarshal(*v, &provisioningState) + if err != nil { + return err + } + trp.ProvisioningState = provisioningState + } + case "runRequest": + if v != nil { + runRequest, err := unmarshalBasicRunRequest(*v) + if err != nil { + return err + } + trp.RunRequest = runRequest + } + case "runResult": + if v != nil { + var runResult Run + err = json.Unmarshal(*v, &runResult) + if err != nil { + return err + } + trp.RunResult = &runResult + } + case "forceUpdateTag": + if v != nil { + var forceUpdateTag string + err = json.Unmarshal(*v, &forceUpdateTag) + if err != nil { + return err + } + trp.ForceUpdateTag = &forceUpdateTag + } + } + } + + return nil +} + +// TaskRunPropertiesUpdateParameters the properties of a task run update parameters. +type TaskRunPropertiesUpdateParameters struct { + // RunRequest - The request (parameters) for the new run + RunRequest BasicRunRequest `json:"runRequest,omitempty"` + // ForceUpdateTag - How the run should be forced to rerun even if the run request configuration has not changed + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for TaskRunPropertiesUpdateParameters struct. +func (trpup *TaskRunPropertiesUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "runRequest": + if v != nil { + runRequest, err := unmarshalBasicRunRequest(*v) + if err != nil { + return err + } + trpup.RunRequest = runRequest + } + case "forceUpdateTag": + if v != nil { + var forceUpdateTag string + err = json.Unmarshal(*v, &forceUpdateTag) + if err != nil { + return err + } + trpup.ForceUpdateTag = &forceUpdateTag + } + } + } + + return nil +} + // TaskRunRequest the parameters for a task run request. type TaskRunRequest struct { // TaskID - The resource ID of task against which run has to be queued. @@ -4686,6 +5064,154 @@ func (trr TaskRunRequest) AsBasicRunRequest() (BasicRunRequest, bool) { return &trr, true } +// TaskRunsCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type TaskRunsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *TaskRunsCreateFuture) Result(client TaskRunsClient) (tr TaskRun, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerregistry.TaskRunsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent { + tr, err = client.CreateResponder(tr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsCreateFuture", "Result", tr.Response.Response, "Failure responding to request") + } + } + return +} + +// TaskRunsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type TaskRunsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *TaskRunsDeleteFuture) Result(client TaskRunsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerregistry.TaskRunsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// TaskRunsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type TaskRunsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *TaskRunsUpdateFuture) Result(client TaskRunsClient) (tr TaskRun, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("containerregistry.TaskRunsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent { + tr, err = client.UpdateResponder(tr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsUpdateFuture", "Result", tr.Response.Response, "Failure responding to request") + } + } + return +} + +// TaskRunUpdateParameters the parameters for updating a task run. +type TaskRunUpdateParameters struct { + // Identity - Identity for the resource. + Identity *IdentityProperties `json:"identity,omitempty"` + // TaskRunPropertiesUpdateParameters - The properties for updating a task run. + *TaskRunPropertiesUpdateParameters `json:"properties,omitempty"` + // Tags - The ARM resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TaskRunUpdateParameters. +func (trup TaskRunUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if trup.Identity != nil { + objectMap["identity"] = trup.Identity + } + if trup.TaskRunPropertiesUpdateParameters != nil { + objectMap["properties"] = trup.TaskRunPropertiesUpdateParameters + } + if trup.Tags != nil { + objectMap["tags"] = trup.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for TaskRunUpdateParameters struct. +func (trup *TaskRunUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "identity": + if v != nil { + var identity IdentityProperties + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + trup.Identity = &identity + } + case "properties": + if v != nil { + var taskRunPropertiesUpdateParameters TaskRunPropertiesUpdateParameters + err = json.Unmarshal(*v, &taskRunPropertiesUpdateParameters) + if err != nil { + return err + } + trup.TaskRunPropertiesUpdateParameters = &taskRunPropertiesUpdateParameters + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + trup.Tags = tags + } + } + } + + return nil +} + // TasksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type TasksCreateFuture struct { azure.Future diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go new file mode 100644 index 000000000000..784174b4bec8 --- /dev/null +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/taskruns.go @@ -0,0 +1,528 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TaskRunsClient is the client for the TaskRuns methods of the Containerregistry service. +type TaskRunsClient struct { + BaseClient +} + +// NewTaskRunsClient creates an instance of the TaskRunsClient client. +func NewTaskRunsClient(subscriptionID string) TaskRunsClient { + return NewTaskRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTaskRunsClientWithBaseURI creates an instance of the TaskRunsClient client. +func NewTaskRunsClientWithBaseURI(baseURI string, subscriptionID string) TaskRunsClient { + return TaskRunsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a task run for a container registry with the specified parameters. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// registryName - the name of the container registry. +// taskRunName - the name of task run. +// taskRun - the parameters of a run that needs to scheduled. +func (client TaskRunsClient) Create(ctx context.Context, resourceGroupName string, registryName string, taskRunName string, taskRun TaskRun) (result TaskRunsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerregistry.TaskRunsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, registryName, taskRunName, taskRun) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client TaskRunsClient) CreatePreparer(ctx context.Context, resourceGroupName string, registryName string, taskRunName string, taskRun TaskRun) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "taskRunName": autorest.Encode("path", taskRunName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", pathParameters), + autorest.WithJSON(taskRun), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client TaskRunsClient) CreateSender(req *http.Request) (future TaskRunsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client TaskRunsClient) CreateResponder(resp *http.Response) (result TaskRun, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a specified task run resource. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// registryName - the name of the container registry. +// taskRunName - the task run name. +func (client TaskRunsClient) Delete(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (result TaskRunsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerregistry.TaskRunsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, registryName, taskRunName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client TaskRunsClient) DeletePreparer(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "taskRunName": autorest.Encode("path", taskRunName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client TaskRunsClient) DeleteSender(req *http.Request) (future TaskRunsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client TaskRunsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the detailed information for a given task run. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// registryName - the name of the container registry. +// taskRunName - the run request name. +func (client TaskRunsClient) Get(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (result TaskRun, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerregistry.TaskRunsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, registryName, taskRunName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client TaskRunsClient) GetPreparer(ctx context.Context, resourceGroupName string, registryName string, taskRunName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "taskRunName": autorest.Encode("path", taskRunName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client TaskRunsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client TaskRunsClient) GetResponder(resp *http.Response) (result TaskRun, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the task runs for a specified container registry. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// registryName - the name of the container registry. +func (client TaskRunsClient) List(ctx context.Context, resourceGroupName string, registryName string) (result TaskRunListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunsClient.List") + defer func() { + sc := -1 + if result.trlr.Response.Response != nil { + sc = result.trlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerregistry.TaskRunsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, registryName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.trlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "List", resp, "Failure sending request") + return + } + + result.trlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client TaskRunsClient) ListPreparer(ctx context.Context, resourceGroupName string, registryName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client TaskRunsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client TaskRunsClient) ListResponder(resp *http.Response) (result TaskRunListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client TaskRunsClient) listNextResults(ctx context.Context, lastResults TaskRunListResult) (result TaskRunListResult, err error) { + req, err := lastResults.taskRunListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client TaskRunsClient) ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result TaskRunListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, registryName) + return +} + +// Update updates a task run with the specified parameters. +// Parameters: +// resourceGroupName - the name of the resource group to which the container registry belongs. +// registryName - the name of the container registry. +// taskRunName - the task run name. +// updateParameters - the parameters for updating a task run. +func (client TaskRunsClient) Update(ctx context.Context, resourceGroupName string, registryName string, taskRunName string, updateParameters TaskRunUpdateParameters) (result TaskRunsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TaskRunsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerregistry.TaskRunsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, registryName, taskRunName, updateParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.TaskRunsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client TaskRunsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, registryName string, taskRunName string, updateParameters TaskRunUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "taskRunName": autorest.Encode("path", taskRunName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/taskRuns/{taskRunName}", pathParameters), + autorest.WithJSON(updateParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client TaskRunsClient) UpdateSender(req *http.Request) (future TaskRunsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client TaskRunsClient) UpdateResponder(resp *http.Response) (result TaskRun, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go index 22281869a1c2..49daf87d4bba 100644 --- a/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go +++ b/services/containerregistry/mgmt/2019-06-01-preview/containerregistry/tasks.go @@ -74,7 +74,7 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Platform", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil}, - {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: 300, Chain: nil}, + {Target: "taskCreateParameters.TaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil}, }}, {Target: "taskCreateParameters.TaskProperties.Step", Name: validation.Null, Rule: true, Chain: nil}, {Target: "taskCreateParameters.TaskProperties.Trigger", Name: validation.Null, Rule: false, diff --git a/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go b/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go index a2a340da035f..b2e6892968d9 100644 --- a/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-02-01/containerservice/agentpools.go @@ -65,7 +65,7 @@ func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("containerservice.AgentPoolsClient", "CreateOrUpdate", err.Error()) diff --git a/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go b/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go index 2de1c02faf0c..aacf0f9a20dc 100644 --- a/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go +++ b/services/containerservice/mgmt/2019-04-30/containerservice/agentpools.go @@ -69,7 +69,7 @@ func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.ManagedClusterAgentPoolProfileProperties.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("containerservice.AgentPoolsClient", "CreateOrUpdate", err.Error()) diff --git a/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go index a58266d7e18a..9702c6cbdc45 100644 --- a/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-08-01/containerservice/managedclusters.go @@ -92,7 +92,7 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go b/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go index 833bc9ff4ff4..3543d494ab11 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/containerserviceapi/interfaces.go @@ -63,6 +63,7 @@ type ManagedClustersClientAPI interface { List(ctx context.Context) (result containerservice.ManagedClusterListResultPage, err error) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result containerservice.ManagedClusterListResultPage, err error) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) + ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result containerservice.CredentialResults, err error) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterAADProfile) (result containerservice.ManagedClustersResetAADProfileFuture, err error) ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters containerservice.ManagedClusterServicePrincipalProfile) (result containerservice.ManagedClustersResetServicePrincipalProfileFuture, err error) diff --git a/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go b/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go index 46ea1d25531b..2fd0fa910f54 100644 --- a/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go +++ b/services/containerservice/mgmt/2019-10-01/containerservice/managedclusters.go @@ -92,7 +92,7 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, @@ -839,6 +839,94 @@ func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *h return } +// ListClusterMonitoringUserCredentials gets cluster monitoring user credential of the managed cluster with a specified +// resource group and name. +// Parameters: +// resourceGroupName - the name of the resource group. +// resourceName - the name of the managed cluster resource. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterMonitoringUserCredentials") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", err.Error()) + } + + req, err := client.ListClusterMonitoringUserCredentialsPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", nil, "Failure preparing request") + return + } + + resp, err := client.ListClusterMonitoringUserCredentialsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure sending request") + return + } + + result, err = client.ListClusterMonitoringUserCredentialsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure responding to request") + } + + return +} + +// ListClusterMonitoringUserCredentialsPreparer prepares the ListClusterMonitoringUserCredentials request. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListClusterMonitoringUserCredentialsSender sends the ListClusterMonitoringUserCredentials request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListClusterMonitoringUserCredentialsResponder handles the response to the ListClusterMonitoringUserCredentials request. The method always +// closes the http.Response Body. +func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListClusterUserCredentials gets cluster user credential of the managed cluster with a specified resource group and // name. // Parameters: diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go index 9fa680cfe34a..961d731a5ffa 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go @@ -153,11 +153,11 @@ func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourc Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, - {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(86400), Chain: nil}, - {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, }}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.Locations", Name: validation.Null, Rule: true, Chain: nil}, diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go index fdfd970cff52..ae6d08975b79 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/databaseaccounts.go @@ -154,11 +154,11 @@ func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourc Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, - {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(86400), Chain: nil}, - {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, }}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.Locations", Name: validation.Null, Rule: true, Chain: nil}, diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go index 3993869e0269..713581f0fb05 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/gremlinresources.go @@ -175,7 +175,7 @@ func (client GremlinResourcesClient) CreateUpdateGremlinGraph(ctx context.Contex {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/models.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/models.go index c1bbb2433e38..fe385c82151b 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/models.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/models.go @@ -31,6 +31,21 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2019-08-01/documentdb" +// CompositePathSortOrder enumerates the values for composite path sort order. +type CompositePathSortOrder string + +const ( + // Ascending ... + Ascending CompositePathSortOrder = "Ascending" + // Descending ... + Descending CompositePathSortOrder = "Descending" +) + +// PossibleCompositePathSortOrderValues returns an array of possible values for the CompositePathSortOrder const type. +func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { + return []CompositePathSortOrder{Ascending, Descending} +} + // ConflictResolutionMode enumerates the values for conflict resolution mode. type ConflictResolutionMode string @@ -224,6 +239,25 @@ func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeLast, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal} } +// SpatialType enumerates the values for spatial type. +type SpatialType string + +const ( + // SpatialTypeLineString ... + SpatialTypeLineString SpatialType = "LineString" + // SpatialTypeMultiPolygon ... + SpatialTypeMultiPolygon SpatialType = "MultiPolygon" + // SpatialTypePoint ... + SpatialTypePoint SpatialType = "Point" + // SpatialTypePolygon ... + SpatialTypePolygon SpatialType = "Polygon" +) + +// PossibleSpatialTypeValues returns an array of possible values for the SpatialType const type. +func PossibleSpatialTypeValues() []SpatialType { + return []SpatialType{SpatialTypeLineString, SpatialTypeMultiPolygon, SpatialTypePoint, SpatialTypePolygon} +} + // TriggerOperation enumerates the values for trigger operation. type TriggerOperation string @@ -449,6 +483,11 @@ func (ckcup CassandraKeyspaceCreateUpdateProperties) MarshalJSON() ([]byte, erro // CassandraKeyspaceGetProperties the properties of an Azure Cosmos DB Cassandra keyspace type CassandraKeyspaceGetProperties struct { + Resource *CassandraKeyspaceGetPropertiesResource `json:"resource,omitempty"` +} + +// CassandraKeyspaceGetPropertiesResource ... +type CassandraKeyspaceGetPropertiesResource struct { // ID - Name of the Cosmos DB Cassandra keyspace ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -872,6 +911,11 @@ func (ctcup CassandraTableCreateUpdateProperties) MarshalJSON() ([]byte, error) // CassandraTableGetProperties the properties of an Azure Cosmos DB Cassandra table type CassandraTableGetProperties struct { + Resource *CassandraTableGetPropertiesResource `json:"resource,omitempty"` +} + +// CassandraTableGetPropertiesResource ... +type CassandraTableGetPropertiesResource struct { // ID - Name of the Cosmos DB Cassandra table ID *string `json:"id,omitempty"` // DefaultTTL - Time to live of the Cosmos DB Cassandra table @@ -1020,6 +1064,14 @@ type Column struct { Type *string `json:"type,omitempty"` } +// CompositePath ... +type CompositePath struct { + // Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) + Path *string `json:"path,omitempty"` + // Order - Sort order for composite paths. Possible values include: 'Ascending', 'Descending' + Order CompositePathSortOrder `json:"order,omitempty"` +} + // ConflictResolutionPolicy the conflict resolution policy for the container. type ConflictResolutionPolicy struct { // Mode - Indicates the conflict resolution mode. Possible values include: 'LastWriterWins', 'Custom' @@ -1818,6 +1870,11 @@ func (gdcup GremlinDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) // GremlinDatabaseGetProperties the properties of an Azure Cosmos DB SQL database type GremlinDatabaseGetProperties struct { + Resource *GremlinDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// GremlinDatabaseGetPropertiesResource ... +type GremlinDatabaseGetPropertiesResource struct { // ID - Name of the Cosmos DB Gremlin database ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -2063,6 +2120,11 @@ func (ggcup GremlinGraphCreateUpdateProperties) MarshalJSON() ([]byte, error) { // GremlinGraphGetProperties the properties of an Azure Cosmos DB Gremlin graph type GremlinGraphGetProperties struct { + Resource *GremlinGraphGetPropertiesResource `json:"resource,omitempty"` +} + +// GremlinGraphGetPropertiesResource ... +type GremlinGraphGetPropertiesResource struct { // ID - Name of the Cosmos DB Gremlin graph ID *string `json:"id,omitempty"` // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph @@ -2396,6 +2458,10 @@ type IndexingPolicy struct { IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"` // ExcludedPaths - List of paths to exclude from indexing ExcludedPaths *[]ExcludedPath `json:"excludedPaths,omitempty"` + // CompositeIndexes - List of composite path list + CompositeIndexes *[][]CompositePath `json:"compositeIndexes,omitempty"` + // SpatialIndexes - List of spatial specifics + SpatialIndexes *[]SpatialSpec `json:"spatialIndexes,omitempty"` } // Location a region in which the Azure Cosmos DB database account is deployed. @@ -2611,6 +2677,11 @@ func (mdccup MongoDBCollectionCreateUpdateProperties) MarshalJSON() ([]byte, err // MongoDBCollectionGetProperties the properties of an Azure Cosmos DB MongoDB collection type MongoDBCollectionGetProperties struct { + Resource *MongoDBCollectionGetPropertiesResource `json:"resource,omitempty"` +} + +// MongoDBCollectionGetPropertiesResource ... +type MongoDBCollectionGetPropertiesResource struct { // ID - Name of the Cosmos DB MongoDB collection ID *string `json:"id,omitempty"` // ShardKey - A key-value pair of shard keys to be applied for the request. @@ -2625,8 +2696,8 @@ type MongoDBCollectionGetProperties struct { Etag *string `json:"_etag,omitempty"` } -// MarshalJSON is the custom marshaler for MongoDBCollectionGetProperties. -func (mdcgp MongoDBCollectionGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for MongoDBCollectionGetPropertiesResource. +func (mdcgp MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) if mdcgp.ID != nil { objectMap["id"] = mdcgp.ID @@ -2894,6 +2965,11 @@ func (mddcup MongoDBDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error // MongoDBDatabaseGetProperties the properties of an Azure Cosmos DB MongoDB database type MongoDBDatabaseGetProperties struct { + Resource *MongoDBDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// MongoDBDatabaseGetPropertiesResource ... +type MongoDBDatabaseGetPropertiesResource struct { // ID - Name of the Cosmos DB MongoDB database ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -3480,6 +3556,14 @@ type RegionForOnlineOffline struct { Region *string `json:"region,omitempty"` } +// SpatialSpec ... +type SpatialSpec struct { + // Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) + Path *string `json:"path,omitempty"` + // Types - List of path's spatial type + Types *[]SpatialType `json:"types,omitempty"` +} + // SQLContainerCreateUpdateParameters parameters to create and update Cosmos DB container. type SQLContainerCreateUpdateParameters struct { // SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container. @@ -3601,6 +3685,11 @@ func (sccup SQLContainerCreateUpdateProperties) MarshalJSON() ([]byte, error) { // SQLContainerGetProperties the properties of an Azure Cosmos DB container type SQLContainerGetProperties struct { + Resource *SQLContainerGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLContainerGetPropertiesResource ... +type SQLContainerGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL container ID *string `json:"id,omitempty"` // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container @@ -3865,6 +3954,11 @@ func (sdcup SQLDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { // SQLDatabaseGetProperties the properties of an Azure Cosmos DB SQL database type SQLDatabaseGetProperties struct { + Resource *SQLDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLDatabaseGetPropertiesResource ... +type SQLDatabaseGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL database ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -4432,6 +4526,11 @@ func (sspcup SQLStoredProcedureCreateUpdateProperties) MarshalJSON() ([]byte, er // SQLStoredProcedureGetProperties the properties of an Azure Cosmos DB StoredProcedure type SQLStoredProcedureGetProperties struct { + Resource *SQLStoredProcedureGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLStoredProcedureGetPropertiesResource ... +type SQLStoredProcedureGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL storedProcedure ID *string `json:"id,omitempty"` // Body - Body of the Stored Procedure @@ -4681,6 +4780,11 @@ func (stcup SQLTriggerCreateUpdateProperties) MarshalJSON() ([]byte, error) { // SQLTriggerGetProperties the properties of an Azure Cosmos DB trigger type SQLTriggerGetProperties struct { + Resource *SQLTriggerGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLTriggerGetPropertiesResource ... +type SQLTriggerGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL trigger ID *string `json:"id,omitempty"` // Body - Body of the Trigger @@ -4939,6 +5043,11 @@ func (sudfcup SQLUserDefinedFunctionCreateUpdateProperties) MarshalJSON() ([]byt // SQLUserDefinedFunctionGetProperties the properties of an Azure Cosmos DB userDefinedFunction type SQLUserDefinedFunctionGetProperties struct { + Resource *SQLUserDefinedFunctionGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLUserDefinedFunctionGetPropertiesResource ... +type SQLUserDefinedFunctionGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL userDefinedFunction ID *string `json:"id,omitempty"` // Body - Body of the User Defined Function @@ -5188,6 +5297,11 @@ func (tcup TableCreateUpdateProperties) MarshalJSON() ([]byte, error) { // TableGetProperties the properties of an Azure Cosmos Table type TableGetProperties struct { + Resource *TableGetPropertiesResource `json:"resource,omitempty"` +} + +// TableGetPropertiesResource ... +type TableGetPropertiesResource struct { // ID - Name of the Cosmos DB table ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -5394,12 +5508,23 @@ func (future *TableResourcesUpdateTableThroughputFuture) Result(client TableReso // ThroughputSettingsGetProperties the properties of an Azure Cosmos DB resource throughput type ThroughputSettingsGetProperties struct { + Resource *ThroughputSettingsGetPropertiesResource `json:"resource,omitempty"` +} + +// ThroughputSettingsGetPropertiesResource ... +type ThroughputSettingsGetPropertiesResource struct { // Throughput - Value of the Cosmos DB resource throughput Throughput *int32 `json:"throughput,omitempty"` // MinimumThroughput - READ-ONLY; The minimum throughput of the resource MinimumThroughput *string `json:"minimumThroughput,omitempty"` // OfferReplacePending - READ-ONLY; The throughput replace is pending OfferReplacePending *string `json:"offerReplacePending,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` } // ThroughputSettingsGetResults an Azure Cosmos DB resource throughput. diff --git a/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go b/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go index f374ba3d737b..c441798bb509 100644 --- a/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go +++ b/services/cosmos-db/mgmt/2019-08-01/documentdb/sqlresources.go @@ -75,7 +75,7 @@ func (client SQLResourcesClient) CreateUpdateSQLContainer(ctx context.Context, r {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go index 9728e69e4655..441f9acb4b4e 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/billingaccountdimensions.go @@ -67,7 +67,7 @@ func (client BillingAccountDimensionsClient) List(ctx context.Context, billingAc {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.BillingAccountDimensionsClient", "List", err.Error()) } diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go index c1ec4ec285c2..98a08e2ab3f6 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/resourcegroupdimensions.go @@ -67,7 +67,7 @@ func (client ResourceGroupDimensionsClient) List(ctx context.Context, resourceGr {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.ResourceGroupDimensionsClient", "List", err.Error()) } diff --git a/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go b/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go index 2f14a9303acb..0e2155d8499f 100644 --- a/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go +++ b/services/costmanagement/mgmt/2018-05-31/costmanagement/subscriptiondimensions.go @@ -66,7 +66,7 @@ func (client SubscriptionDimensionsClient) List(ctx context.Context, filter stri {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.SubscriptionDimensionsClient", "List", err.Error()) } diff --git a/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go b/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go index 846ddd30c468..39e31d5869a5 100644 --- a/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go +++ b/services/costmanagement/mgmt/2019-01-01/costmanagement/dimensions.go @@ -74,7 +74,7 @@ func (client DimensionsClient) ListBySubscription(ctx context.Context, scope str {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "ListBySubscription", err.Error()) } diff --git a/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go b/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go index 304cf2898f40..b195239fdec5 100644 --- a/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go +++ b/services/costmanagement/mgmt/2019-10-01/costmanagement/dimensions.go @@ -80,7 +80,7 @@ func (client DimensionsClient) List(ctx context.Context, scope string, filter st {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "List", err.Error()) } diff --git a/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go b/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go index df2b7c9143aa..1962df828166 100644 --- a/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go +++ b/services/customerinsights/mgmt/2017-01-01/customerinsights/hubs.go @@ -69,11 +69,11 @@ func (client HubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName s Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go b/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go index 8d2a18c342cb..bfed25dec61f 100644 --- a/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go +++ b/services/customerinsights/mgmt/2017-04-26/customerinsights/hubs.go @@ -69,11 +69,11 @@ func (client HubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName s Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MinUnits", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.HubPropertiesFormat.HubBillingInfo.MaxUnits", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/models.go b/services/datafactory/mgmt/2018-06-01/datafactory/models.go index ee51b42532a7..15067fbbca5e 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/models.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/models.go @@ -1099,6 +1099,23 @@ func PossibleSapHanaAuthenticationTypeValues() []SapHanaAuthenticationType { return []SapHanaAuthenticationType{SapHanaAuthenticationTypeBasic, SapHanaAuthenticationTypeWindows} } +// SapHanaPartitionOption enumerates the values for sap hana partition option. +type SapHanaPartitionOption string + +const ( + // SapHanaPartitionOptionNone ... + SapHanaPartitionOptionNone SapHanaPartitionOption = "None" + // SapHanaPartitionOptionPhysicalPartitionsOfTable ... + SapHanaPartitionOptionPhysicalPartitionsOfTable SapHanaPartitionOption = "PhysicalPartitionsOfTable" + // SapHanaPartitionOptionSapHanaDynamicRange ... + SapHanaPartitionOptionSapHanaDynamicRange SapHanaPartitionOption = "SapHanaDynamicRange" +) + +// PossibleSapHanaPartitionOptionValues returns an array of possible values for the SapHanaPartitionOption const type. +func PossibleSapHanaPartitionOptionValues() []SapHanaPartitionOption { + return []SapHanaPartitionOption{SapHanaPartitionOptionNone, SapHanaPartitionOptionPhysicalPartitionsOfTable, SapHanaPartitionOptionSapHanaDynamicRange} +} + // SapTablePartitionOption enumerates the values for sap table partition option. type SapTablePartitionOption string @@ -75518,6 +75535,34 @@ func (dtd *DrillTableDataset) UnmarshalJSON(body []byte) error { return nil } +// DWCopyCommandDefaultValue default value. +type DWCopyCommandDefaultValue struct { + // ColumnName - Column name. Type: object (or Expression with resultType string). + ColumnName interface{} `json:"columnName,omitempty"` + // DefaultValue - The default value of the column. Type: object (or Expression with resultType string). + DefaultValue interface{} `json:"defaultValue,omitempty"` +} + +// DWCopyCommandSettings DW Copy Command settings. +type DWCopyCommandSettings struct { + // DefaultValues - Specifies the default values for each target column in SQL DW. The default values in the property overwrite the DEFAULT constraint set in the DB, and identity column cannot have a default value. Type: array of objects (or Expression with resultType array of objects). + DefaultValues *[]DWCopyCommandDefaultValue `json:"defaultValues,omitempty"` + // AdditionalOptions - Additional options directly passed to SQL DW in Copy Command. Type: key value pairs (value should be string type) (or Expression with resultType object). Example: "additionalOptions": { "MAXERRORS": "1000", "DATEFORMAT": "'ymd'" } + AdditionalOptions map[string]*string `json:"additionalOptions"` +} + +// MarshalJSON is the custom marshaler for DWCopyCommandSettings. +func (dccs DWCopyCommandSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dccs.DefaultValues != nil { + objectMap["defaultValues"] = dccs.DefaultValues + } + if dccs.AdditionalOptions != nil { + objectMap["additionalOptions"] = dccs.AdditionalOptions + } + return json.Marshal(objectMap) +} + // DynamicsAXLinkedService dynamics AX linked service. type DynamicsAXLinkedService struct { // DynamicsAXLinkedServiceTypeProperties - Dynamics AX linked service properties. @@ -117037,6 +117082,8 @@ type IntegrationRuntimeVNetProperties struct { VNetID *string `json:"vNetId,omitempty"` // Subnet - The name of the subnet this integration runtime will join. Subnet *string `json:"subnet,omitempty"` + // PublicIPs - Resource IDs of the public IP addresses that this integration runtime will use. + PublicIPs *[]string `json:"publicIPs,omitempty"` } // MarshalJSON is the custom marshaler for IntegrationRuntimeVNetProperties. @@ -117048,6 +117095,9 @@ func (irvnp IntegrationRuntimeVNetProperties) MarshalJSON() ([]byte, error) { if irvnp.Subnet != nil { objectMap["subnet"] = irvnp.Subnet } + if irvnp.PublicIPs != nil { + objectMap["publicIPs"] = irvnp.PublicIPs + } for k, v := range irvnp.AdditionalProperties { objectMap[k] = v } @@ -117093,6 +117143,15 @@ func (irvnp *IntegrationRuntimeVNetProperties) UnmarshalJSON(body []byte) error } irvnp.Subnet = &subnet } + case "publicIPs": + if v != nil { + var publicIPs []string + err = json.Unmarshal(*v, &publicIPs) + if err != nil { + return err + } + irvnp.PublicIPs = &publicIPs + } } } @@ -135781,54 +135840,13 @@ func (msls *MySQLLinkedService) UnmarshalJSON(body []byte) error { // MySQLLinkedServiceTypeProperties mySQL linked service properties. type MySQLLinkedServiceTypeProperties struct { // ConnectionString - The connection string. - ConnectionString BasicSecretBase `json:"connectionString,omitempty"` + ConnectionString interface{} `json:"connectionString,omitempty"` // Password - The Azure key vault secret reference of password in connection string. Password *AzureKeyVaultSecretReference `json:"password,omitempty"` // EncryptedCredential - The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). EncryptedCredential interface{} `json:"encryptedCredential,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for MySQLLinkedServiceTypeProperties struct. -func (mslstp *MySQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "connectionString": - if v != nil { - connectionString, err := unmarshalBasicSecretBase(*v) - if err != nil { - return err - } - mslstp.ConnectionString = connectionString - } - case "password": - if v != nil { - var password AzureKeyVaultSecretReference - err = json.Unmarshal(*v, &password) - if err != nil { - return err - } - mslstp.Password = &password - } - case "encryptedCredential": - if v != nil { - var encryptedCredential interface{} - err = json.Unmarshal(*v, &encryptedCredential) - if err != nil { - return err - } - mslstp.EncryptedCredential = encryptedCredential - } - } - } - - return nil -} - // MySQLSource a copy activity source for MySQL databases. type MySQLSource struct { // Query - Database query. Type: string (or Expression with resultType string). @@ -157756,54 +157774,13 @@ func (psls *PostgreSQLLinkedService) UnmarshalJSON(body []byte) error { // PostgreSQLLinkedServiceTypeProperties postgreSQL linked service properties. type PostgreSQLLinkedServiceTypeProperties struct { // ConnectionString - The connection string. - ConnectionString BasicSecretBase `json:"connectionString,omitempty"` + ConnectionString interface{} `json:"connectionString,omitempty"` // Password - The Azure key vault secret reference of password in connection string. Password *AzureKeyVaultSecretReference `json:"password,omitempty"` // EncryptedCredential - The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string (or Expression with resultType string). EncryptedCredential interface{} `json:"encryptedCredential,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for PostgreSQLLinkedServiceTypeProperties struct. -func (pslstp *PostgreSQLLinkedServiceTypeProperties) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "connectionString": - if v != nil { - connectionString, err := unmarshalBasicSecretBase(*v) - if err != nil { - return err - } - pslstp.ConnectionString = connectionString - } - case "password": - if v != nil { - var password AzureKeyVaultSecretReference - err = json.Unmarshal(*v, &password) - if err != nil { - return err - } - pslstp.Password = &password - } - case "encryptedCredential": - if v != nil { - var encryptedCredential interface{} - err = json.Unmarshal(*v, &encryptedCredential) - if err != nil { - return err - } - pslstp.EncryptedCredential = encryptedCredential - } - } - } - - return nil -} - // PostgreSQLSource a copy activity source for PostgreSQL databases. type PostgreSQLSource struct { // Query - Database query. Type: string (or Expression with resultType string). @@ -181818,12 +181795,22 @@ func (shlsp *SapHanaLinkedServiceProperties) UnmarshalJSON(body []byte) error { return nil } +// SapHanaPartitionSettings the settings that will be leveraged for SAP HANA source partitioning. +type SapHanaPartitionSettings struct { + // PartitionColumnName - The name of the column that will be used for proceeding range partitioning. Type: string (or Expression with resultType string). + PartitionColumnName interface{} `json:"partitionColumnName,omitempty"` +} + // SapHanaSource a copy activity source for SAP HANA source. type SapHanaSource struct { // Query - SAP HANA Sql query. Type: string (or Expression with resultType string). Query interface{} `json:"query,omitempty"` // PacketSize - The packet size of data read from SAP HANA. Type: integer(or Expression with resultType integer). PacketSize interface{} `json:"packetSize,omitempty"` + // PartitionOption - The partition mechanism that will be used for SAP HANA read in parallel. Possible values include: 'SapHanaPartitionOptionNone', 'SapHanaPartitionOptionPhysicalPartitionsOfTable', 'SapHanaPartitionOptionSapHanaDynamicRange' + PartitionOption SapHanaPartitionOption `json:"partitionOption,omitempty"` + // PartitionSettings - The settings that will be leveraged for SAP HANA source partitioning. + PartitionSettings *SapHanaPartitionSettings `json:"partitionSettings,omitempty"` // QueryTimeout - Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). QueryTimeout interface{} `json:"queryTimeout,omitempty"` // AdditionalProperties - Unmatched properties from the message are deserialized this collection @@ -181848,6 +181835,12 @@ func (shs SapHanaSource) MarshalJSON() ([]byte, error) { if shs.PacketSize != nil { objectMap["packetSize"] = shs.PacketSize } + if shs.PartitionOption != "" { + objectMap["partitionOption"] = shs.PartitionOption + } + if shs.PartitionSettings != nil { + objectMap["partitionSettings"] = shs.PartitionSettings + } if shs.QueryTimeout != nil { objectMap["queryTimeout"] = shs.QueryTimeout } @@ -182346,6 +182339,24 @@ func (shs *SapHanaSource) UnmarshalJSON(body []byte) error { } shs.PacketSize = packetSize } + case "partitionOption": + if v != nil { + var partitionOption SapHanaPartitionOption + err = json.Unmarshal(*v, &partitionOption) + if err != nil { + return err + } + shs.PartitionOption = partitionOption + } + case "partitionSettings": + if v != nil { + var partitionSettings SapHanaPartitionSettings + err = json.Unmarshal(*v, &partitionSettings) + if err != nil { + return err + } + shs.PartitionSettings = &partitionSettings + } case "queryTimeout": if v != nil { var queryTimeout interface{} @@ -194996,6 +195007,10 @@ type SQLDWSink struct { AllowPolyBase interface{} `json:"allowPolyBase,omitempty"` // PolyBaseSettings - Specifies PolyBase-related settings when allowPolyBase is true. PolyBaseSettings *PolybaseSettings `json:"polyBaseSettings,omitempty"` + // AllowCopyCommand - Indicates to use Copy Command to copy data into SQL Data Warehouse. Type: boolean (or Expression with resultType boolean). + AllowCopyCommand interface{} `json:"allowCopyCommand,omitempty"` + // CopyCommandSettings - Specifies Copy Command related settings when allowCopyCommand is true. + CopyCommandSettings *DWCopyCommandSettings `json:"copyCommandSettings,omitempty"` // TableOption - The option to handle sink table, such as autoCreate. For now only 'autoCreate' value is supported. Type: string (or Expression with resultType string). TableOption interface{} `json:"tableOption,omitempty"` // AdditionalProperties - Unmatched properties from the message are deserialized this collection @@ -195027,6 +195042,12 @@ func (sds SQLDWSink) MarshalJSON() ([]byte, error) { if sds.PolyBaseSettings != nil { objectMap["polyBaseSettings"] = sds.PolyBaseSettings } + if sds.AllowCopyCommand != nil { + objectMap["allowCopyCommand"] = sds.AllowCopyCommand + } + if sds.CopyCommandSettings != nil { + objectMap["copyCommandSettings"] = sds.CopyCommandSettings + } if sds.TableOption != nil { objectMap["tableOption"] = sds.TableOption } @@ -195270,6 +195291,24 @@ func (sds *SQLDWSink) UnmarshalJSON(body []byte) error { } sds.PolyBaseSettings = &polyBaseSettings } + case "allowCopyCommand": + if v != nil { + var allowCopyCommand interface{} + err = json.Unmarshal(*v, &allowCopyCommand) + if err != nil { + return err + } + sds.AllowCopyCommand = allowCopyCommand + } + case "copyCommandSettings": + if v != nil { + var copyCommandSettings DWCopyCommandSettings + err = json.Unmarshal(*v, ©CommandSettings) + if err != nil { + return err + } + sds.CopyCommandSettings = ©CommandSettings + } case "tableOption": if v != nil { var tableOption interface{} @@ -214267,6 +214306,8 @@ type WebHookActivityTypeProperties struct { Body interface{} `json:"body,omitempty"` // Authentication - Authentication method used for calling the endpoint. Authentication *WebActivityAuthentication `json:"authentication,omitempty"` + // ReportStatusOnCallBack - When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean). + ReportStatusOnCallBack interface{} `json:"reportStatusOnCallBack,omitempty"` } // WebLinkedService web linked service. diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go b/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go index be7036d65efd..bb39a45be6f3 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/pipelines.go @@ -77,7 +77,7 @@ func (client PipelinesClient) CreateOrUpdate(ctx context.Context, resourceGroupN {TargetValue: pipeline, Constraints: []validation.Constraint{{Target: "pipeline.Pipeline", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "pipeline.Pipeline.Concurrency", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "pipeline.Pipeline.Concurrency", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "pipeline.Pipeline.Concurrency", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("datafactory.PipelinesClient", "CreateOrUpdate", err.Error()) } diff --git a/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go b/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go index cd696df0ab31..e7ef76f62d09 100644 --- a/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go +++ b/services/datafactory/mgmt/2018-06-01/datafactory/reruntriggers.go @@ -182,7 +182,7 @@ func (client RerunTriggersClient) Create(ctx context.Context, resourceGroupName {Target: "rerunTumblingWindowTriggerActionParameters.EndTime", Name: validation.Null, Rule: true, Chain: nil}, {Target: "rerunTumblingWindowTriggerActionParameters.MaxConcurrency", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "rerunTumblingWindowTriggerActionParameters.MaxConcurrency", Name: validation.InclusiveMaximum, Rule: int64(50), Chain: nil}, - {Target: "rerunTumblingWindowTriggerActionParameters.MaxConcurrency", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "rerunTumblingWindowTriggerActionParameters.MaxConcurrency", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("datafactory.RerunTriggersClient", "Create", err.Error()) } diff --git a/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go b/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go index 819d62cd7b21..d902f18a6045 100644 --- a/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go +++ b/services/datalake/analytics/2016-11-01-preview/catalog/catalog.go @@ -1845,10 +1845,10 @@ func (client Client) ListAcls(ctx context.Context, accountName string, filter st if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListAcls", err.Error()) } @@ -1998,10 +1998,10 @@ func (client Client) ListAclsByDatabase(ctx context.Context, accountName string, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListAclsByDatabase", err.Error()) } @@ -2154,10 +2154,10 @@ func (client Client) ListAssemblies(ctx context.Context, accountName string, dat if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListAssemblies", err.Error()) } @@ -2310,10 +2310,10 @@ func (client Client) ListCredentials(ctx context.Context, accountName string, da if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListCredentials", err.Error()) } @@ -2465,10 +2465,10 @@ func (client Client) ListDatabases(ctx context.Context, accountName string, filt if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListDatabases", err.Error()) } @@ -2617,10 +2617,10 @@ func (client Client) ListExternalDataSources(ctx context.Context, accountName st if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListExternalDataSources", err.Error()) } @@ -2774,10 +2774,10 @@ func (client Client) ListPackages(ctx context.Context, accountName string, datab if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListPackages", err.Error()) } @@ -2932,10 +2932,10 @@ func (client Client) ListProcedures(ctx context.Context, accountName string, dat if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListProcedures", err.Error()) } @@ -3089,10 +3089,10 @@ func (client Client) ListSchemas(ctx context.Context, accountName string, databa if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListSchemas", err.Error()) } @@ -3247,10 +3247,10 @@ func (client Client) ListTableFragments(ctx context.Context, accountName string, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTableFragments", err.Error()) } @@ -3407,10 +3407,10 @@ func (client Client) ListTablePartitions(ctx context.Context, accountName string if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTablePartitions", err.Error()) } @@ -3569,10 +3569,10 @@ func (client Client) ListTables(ctx context.Context, accountName string, databas if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTables", err.Error()) } @@ -3734,10 +3734,10 @@ func (client Client) ListTablesByDatabase(ctx context.Context, accountName strin if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTablesByDatabase", err.Error()) } @@ -3897,10 +3897,10 @@ func (client Client) ListTableStatistics(ctx context.Context, accountName string if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTableStatistics", err.Error()) } @@ -4056,10 +4056,10 @@ func (client Client) ListTableStatisticsByDatabase(ctx context.Context, accountN if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTableStatisticsByDatabase", err.Error()) } @@ -4214,10 +4214,10 @@ func (client Client) ListTableStatisticsByDatabaseAndSchema(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTableStatisticsByDatabaseAndSchema", err.Error()) } @@ -4372,10 +4372,10 @@ func (client Client) ListTableTypes(ctx context.Context, accountName string, dat if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTableTypes", err.Error()) } @@ -4530,10 +4530,10 @@ func (client Client) ListTableValuedFunctions(ctx context.Context, accountName s if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTableValuedFunctions", err.Error()) } @@ -4688,10 +4688,10 @@ func (client Client) ListTableValuedFunctionsByDatabase(ctx context.Context, acc if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTableValuedFunctionsByDatabase", err.Error()) } @@ -4845,10 +4845,10 @@ func (client Client) ListTypes(ctx context.Context, accountName string, database if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListTypes", err.Error()) } @@ -5003,10 +5003,10 @@ func (client Client) ListViews(ctx context.Context, accountName string, database if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListViews", err.Error()) } @@ -5160,10 +5160,10 @@ func (client Client) ListViewsByDatabase(ctx context.Context, accountName string if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("catalog.Client", "ListViewsByDatabase", err.Error()) } diff --git a/services/datalake/analytics/2016-11-01/job/job.go b/services/datalake/analytics/2016-11-01/job/job.go index 4d6b6ecfb014..ad71552a289e 100644 --- a/services/datalake/analytics/2016-11-01/job/job.go +++ b/services/datalake/analytics/2016-11-01/job/job.go @@ -559,10 +559,10 @@ func (client Client) List(ctx context.Context, accountName string, filter string if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("job.Client", "List", err.Error()) } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go b/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go index e1c4627f42ea..27ad4acd7a8e 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go @@ -150,16 +150,16 @@ func (client AccountsClient) Create(ctx context.Context, resourceGroupName strin Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.DefaultDataLakeStoreAccount", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.DataLakeStoreAccounts", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxJobCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxJobCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxJobCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelism", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelism", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelism", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MinPriorityPerJob", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.QueryStoreRetention", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CreateDataLakeAnalyticsAccountProperties.QueryStoreRetention", Name: validation.InclusiveMaximum, Rule: int64(180), Chain: nil}, - {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.QueryStoreRetention", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.CreateDataLakeAnalyticsAccountProperties.QueryStoreRetention", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("account.AccountsClient", "Create", err.Error()) @@ -409,10 +409,10 @@ func (client AccountsClient) List(ctx context.Context, filter string, top *int32 if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("account.AccountsClient", "List", err.Error()) } @@ -560,10 +560,10 @@ func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGr if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("account.AccountsClient", "ListByResourceGroup", err.Error()) } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go b/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go index 9d40621f417c..d098c7937b9d 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go @@ -65,9 +65,9 @@ func (client ComputePoliciesClient) CreateOrUpdate(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.ObjectID", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.CreateOrUpdateComputePolicyProperties.MaxDegreeOfParallelismPerJob", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.CreateOrUpdateComputePolicyProperties.MinPriorityPerJob", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("account.ComputePoliciesClient", "CreateOrUpdate", err.Error()) } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go b/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go index ad943ec309a6..87526468d0f7 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go @@ -311,10 +311,10 @@ func (client DataLakeStoreAccountsClient) ListByAccount(ctx context.Context, res if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("account.DataLakeStoreAccountsClient", "ListByAccount", err.Error()) } diff --git a/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go b/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go index 7701aa6cda63..94496f4dfd09 100644 --- a/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go +++ b/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go @@ -397,10 +397,10 @@ func (client StorageAccountsClient) ListByAccount(ctx context.Context, resourceG if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("account.StorageAccountsClient", "ListByAccount", err.Error()) } diff --git a/services/datalake/store/mgmt/2016-11-01/account/accounts.go b/services/datalake/store/mgmt/2016-11-01/account/accounts.go index 53f2f2cc9c6a..50b543a42b34 100644 --- a/services/datalake/store/mgmt/2016-11-01/account/accounts.go +++ b/services/datalake/store/mgmt/2016-11-01/account/accounts.go @@ -479,10 +479,10 @@ func (client AccountsClient) List(ctx context.Context, filter string, top *int32 if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("account.AccountsClient", "List", err.Error()) } @@ -630,10 +630,10 @@ func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGr if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("account.AccountsClient", "ListByResourceGroup", err.Error()) } diff --git a/services/datashare/mgmt/2019-11-01/datashare/models.go b/services/datashare/mgmt/2019-11-01/datashare/models.go index 2219eb89f0b7..635c9959b48d 100644 --- a/services/datashare/mgmt/2019-11-01/datashare/models.go +++ b/services/datashare/mgmt/2019-11-01/datashare/models.go @@ -5850,6 +5850,8 @@ type ProviderShareSubscriptionProperties struct { ConsumerTenantName *string `json:"consumerTenantName,omitempty"` // CreatedAt - READ-ONLY; created at CreatedAt *date.Time `json:"createdAt,omitempty"` + // ProviderEmail - READ-ONLY; Email of the provider who created the share + ProviderEmail *string `json:"providerEmail,omitempty"` // ProviderName - READ-ONLY; Name of the provider who created the share ProviderName *string `json:"providerName,omitempty"` // SharedAt - READ-ONLY; Shared at diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go index 33f4f8b2f36a..4dd760880816 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go @@ -67,7 +67,8 @@ func (client ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -165,7 +166,8 @@ func (client ConsumerGroupsClient) Delete(ctx context.Context, resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -260,7 +262,8 @@ func (client ConsumerGroupsClient) Get(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { @@ -360,16 +363,17 @@ func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("eventhub.ConsumerGroupsClient", "ListByEventHub", err.Error()) } diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go index 8a8b3ac8ef5e..d9b70ccb444a 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go @@ -66,21 +66,22 @@ func (client EventHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.Properties.PartitionCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Properties.PartitionCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Properties.PartitionCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.Properties.CaptureDescription", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(900), Chain: nil}, - {Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 60, Chain: nil}, + {Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMinimum, Rule: int64(60), Chain: nil}, }}, {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMaximum, Rule: int64(524288000), Chain: nil}, - {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMinimum, Rule: 10485760, Chain: nil}, + {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMinimum, Rule: int64(10485760), Chain: nil}, }}, }}, }}}}}); err != nil { @@ -178,7 +179,8 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRule(ctx context.Contex Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, @@ -277,7 +279,8 @@ func (client EventHubsClient) Delete(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "Delete", err.Error()) } @@ -368,7 +371,8 @@ func (client EventHubsClient) DeleteAuthorizationRule(ctx context.Context, resou Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "DeleteAuthorizationRule", err.Error()) @@ -461,7 +465,8 @@ func (client EventHubsClient) Get(ctx context.Context, resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "Get", err.Error()) } @@ -553,7 +558,8 @@ func (client EventHubsClient) GetAuthorizationRule(ctx context.Context, resource Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "GetAuthorizationRule", err.Error()) @@ -647,7 +653,8 @@ func (client EventHubsClient) ListAuthorizationRules(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListAuthorizationRules", err.Error()) } @@ -781,12 +788,12 @@ func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroup {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListByNamespace", err.Error()) } @@ -922,7 +929,8 @@ func (client EventHubsClient) ListKeys(ctx context.Context, resourceGroupName st Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "ListKeys", err.Error()) @@ -1018,7 +1026,8 @@ func (client EventHubsClient) RegenerateKeys(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("eventhub.EventHubsClient", "RegenerateKeys", err.Error()) diff --git a/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go index 92e4987c2429..919bea875af1 100644 --- a/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go +++ b/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go @@ -151,13 +151,13 @@ func (client NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.EHNamespaceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("eventhub.NamespacesClient", "CreateOrUpdate", err.Error()) diff --git a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go index 129dd2f0fc13..347775a60469 100644 --- a/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go +++ b/services/healthcareapis/mgmt/2019-09-16/healthcareapis/services.go @@ -155,13 +155,13 @@ func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa {Target: "serviceDescription.Properties.CosmosDbConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.InclusiveMaximum, Rule: int64(10000), Chain: nil}, - {Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.InclusiveMinimum, Rule: 400, Chain: nil}, + {Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.InclusiveMinimum, Rule: int64(400), Chain: nil}, }}, }}, {Target: "serviceDescription.Properties.CorsConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.InclusiveMaximum, Rule: int64(99999), Chain: nil}, - {Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/iothub/mgmt/2016-02-03/devices/iothubresource.go b/services/iothub/mgmt/2016-02-03/devices/iothubresource.go index 4385c283ff51..d50095867cd5 100644 --- a/services/iothub/mgmt/2016-02-03/devices/iothubresource.go +++ b/services/iothub/mgmt/2016-02-03/devices/iothubresource.go @@ -231,12 +231,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/iothub/mgmt/2017-01-19/devices/iothubresource.go b/services/iothub/mgmt/2017-01-19/devices/iothubresource.go index 188f223fe411..2ff13587801d 100644 --- a/services/iothub/mgmt/2017-01-19/devices/iothubresource.go +++ b/services/iothub/mgmt/2017-01-19/devices/iothubresource.go @@ -241,12 +241,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/iothub/mgmt/2017-07-01/devices/iothubresource.go b/services/iothub/mgmt/2017-07-01/devices/iothubresource.go index 4a7f2f2250be..02784fa4e61f 100644 --- a/services/iothub/mgmt/2017-07-01/devices/iothubresource.go +++ b/services/iothub/mgmt/2017-07-01/devices/iothubresource.go @@ -243,12 +243,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/iothub/mgmt/2018-01-22/devices/iothubresource.go b/services/iothub/mgmt/2018-01-22/devices/iothubresource.go index 9f89137abbc2..0965fde4bec9 100644 --- a/services/iothub/mgmt/2018-01-22/devices/iothubresource.go +++ b/services/iothub/mgmt/2018-01-22/devices/iothubresource.go @@ -241,12 +241,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/iothub/mgmt/2018-04-01/devices/iothubresource.go b/services/iothub/mgmt/2018-04-01/devices/iothubresource.go index dd2c2e9ed45c..f43bf66e6698 100644 --- a/services/iothub/mgmt/2018-04-01/devices/iothubresource.go +++ b/services/iothub/mgmt/2018-04-01/devices/iothubresource.go @@ -241,12 +241,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/keyvault/2015-06-01/keyvault/client.go b/services/keyvault/2015-06-01/keyvault/client.go index bc6c896585b4..093e9fcd4ff4 100644 --- a/services/keyvault/2015-06-01/keyvault/client.go +++ b/services/keyvault/2015-06-01/keyvault/client.go @@ -149,7 +149,7 @@ func (client BaseClient) CreateCertificate(ctx context.Context, vaultBaseURL str Constraints: []validation.Constraint{{Target: "parameters.CertificatePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "CreateCertificate", err.Error()) @@ -1212,7 +1212,7 @@ func (client BaseClient) GetCertificateIssuers(ctx context.Context, vaultBaseURL {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateIssuers", err.Error()) } @@ -1496,7 +1496,7 @@ func (client BaseClient) GetCertificates(ctx context.Context, vaultBaseURL strin {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificates", err.Error()) } @@ -1623,7 +1623,7 @@ func (client BaseClient) GetCertificateVersions(ctx context.Context, vaultBaseUR {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateVersions", err.Error()) } @@ -1834,7 +1834,7 @@ func (client BaseClient) GetKeys(ctx context.Context, vaultBaseURL string, maxre {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeys", err.Error()) } @@ -1961,7 +1961,7 @@ func (client BaseClient) GetKeyVersions(ctx context.Context, vaultBaseURL string {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeyVersions", err.Error()) } @@ -2172,7 +2172,7 @@ func (client BaseClient) GetSecrets(ctx context.Context, vaultBaseURL string, ma {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecrets", err.Error()) } @@ -2299,7 +2299,7 @@ func (client BaseClient) GetSecretVersions(ctx context.Context, vaultBaseURL str {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecretVersions", err.Error()) } @@ -2433,7 +2433,7 @@ func (client BaseClient) ImportCertificate(ctx context.Context, vaultBaseURL str {Target: "parameters.CertificatePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "ImportCertificate", err.Error()) diff --git a/services/keyvault/2016-10-01/keyvault/client.go b/services/keyvault/2016-10-01/keyvault/client.go index 501c1f2a48b7..b953218c30b8 100644 --- a/services/keyvault/2016-10-01/keyvault/client.go +++ b/services/keyvault/2016-10-01/keyvault/client.go @@ -237,7 +237,7 @@ func (client BaseClient) CreateCertificate(ctx context.Context, vaultBaseURL str Constraints: []validation.Constraint{{Target: "parameters.CertificatePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "CreateCertificate", err.Error()) @@ -1498,7 +1498,7 @@ func (client BaseClient) GetCertificateIssuers(ctx context.Context, vaultBaseURL {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateIssuers", err.Error()) } @@ -1785,7 +1785,7 @@ func (client BaseClient) GetCertificates(ctx context.Context, vaultBaseURL strin {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificates", err.Error()) } @@ -1913,7 +1913,7 @@ func (client BaseClient) GetCertificateVersions(ctx context.Context, vaultBaseUR {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateVersions", err.Error()) } @@ -2127,7 +2127,7 @@ func (client BaseClient) GetDeletedCertificates(ctx context.Context, vaultBaseUR {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedCertificates", err.Error()) } @@ -2337,7 +2337,7 @@ func (client BaseClient) GetDeletedKeys(ctx context.Context, vaultBaseURL string {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedKeys", err.Error()) } @@ -2544,7 +2544,7 @@ func (client BaseClient) GetDeletedSecrets(ctx context.Context, vaultBaseURL str {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedSecrets", err.Error()) } @@ -2755,7 +2755,7 @@ func (client BaseClient) GetKeys(ctx context.Context, vaultBaseURL string, maxre {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeys", err.Error()) } @@ -2883,7 +2883,7 @@ func (client BaseClient) GetKeyVersions(ctx context.Context, vaultBaseURL string {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeyVersions", err.Error()) } @@ -3107,7 +3107,7 @@ func (client BaseClient) GetSasDefinitions(ctx context.Context, vaultBaseURL str {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSasDefinitions", err.Error()) } @@ -3321,7 +3321,7 @@ func (client BaseClient) GetSecrets(ctx context.Context, vaultBaseURL string, ma {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecrets", err.Error()) } @@ -3449,7 +3449,7 @@ func (client BaseClient) GetSecretVersions(ctx context.Context, vaultBaseURL str {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecretVersions", err.Error()) } @@ -3666,7 +3666,7 @@ func (client BaseClient) GetStorageAccounts(ctx context.Context, vaultBaseURL st {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetStorageAccounts", err.Error()) } @@ -3798,7 +3798,7 @@ func (client BaseClient) ImportCertificate(ctx context.Context, vaultBaseURL str {Target: "parameters.CertificatePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "ImportCertificate", err.Error()) diff --git a/services/keyvault/v7.0/keyvault/client.go b/services/keyvault/v7.0/keyvault/client.go index 2ca7fd7754b4..e74f993e45f7 100644 --- a/services/keyvault/v7.0/keyvault/client.go +++ b/services/keyvault/v7.0/keyvault/client.go @@ -397,7 +397,7 @@ func (client BaseClient) CreateCertificate(ctx context.Context, vaultBaseURL str Constraints: []validation.Constraint{{Target: "parameters.CertificatePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "CreateCertificate", err.Error()) @@ -1658,7 +1658,7 @@ func (client BaseClient) GetCertificateIssuers(ctx context.Context, vaultBaseURL {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateIssuers", err.Error()) } @@ -1946,7 +1946,7 @@ func (client BaseClient) GetCertificates(ctx context.Context, vaultBaseURL strin {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificates", err.Error()) } @@ -2077,7 +2077,7 @@ func (client BaseClient) GetCertificateVersions(ctx context.Context, vaultBaseUR {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetCertificateVersions", err.Error()) } @@ -2292,7 +2292,7 @@ func (client BaseClient) GetDeletedCertificates(ctx context.Context, vaultBaseUR {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedCertificates", err.Error()) } @@ -2505,7 +2505,7 @@ func (client BaseClient) GetDeletedKeys(ctx context.Context, vaultBaseURL string {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedKeys", err.Error()) } @@ -2725,7 +2725,7 @@ func (client BaseClient) GetDeletedSasDefinitions(ctx context.Context, vaultBase {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedSasDefinitions", err.Error()) } @@ -2936,7 +2936,7 @@ func (client BaseClient) GetDeletedSecrets(ctx context.Context, vaultBaseURL str {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedSecrets", err.Error()) } @@ -3149,7 +3149,7 @@ func (client BaseClient) GetDeletedStorageAccounts(ctx context.Context, vaultBas {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetDeletedStorageAccounts", err.Error()) } @@ -3360,7 +3360,7 @@ func (client BaseClient) GetKeys(ctx context.Context, vaultBaseURL string, maxre {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeys", err.Error()) } @@ -3488,7 +3488,7 @@ func (client BaseClient) GetKeyVersions(ctx context.Context, vaultBaseURL string {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetKeyVersions", err.Error()) } @@ -3712,7 +3712,7 @@ func (client BaseClient) GetSasDefinitions(ctx context.Context, vaultBaseURL str {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSasDefinitions", err.Error()) } @@ -3926,7 +3926,7 @@ func (client BaseClient) GetSecrets(ctx context.Context, vaultBaseURL string, ma {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecrets", err.Error()) } @@ -4054,7 +4054,7 @@ func (client BaseClient) GetSecretVersions(ctx context.Context, vaultBaseURL str {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetSecretVersions", err.Error()) } @@ -4271,7 +4271,7 @@ func (client BaseClient) GetStorageAccounts(ctx context.Context, vaultBaseURL st {TargetValue: maxresults, Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "GetStorageAccounts", err.Error()) } @@ -4403,7 +4403,7 @@ func (client BaseClient) ImportCertificate(ctx context.Context, vaultBaseURL str {Target: "parameters.CertificatePolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.CertificatePolicy.X509CertificateProperties.ValidityInMonths", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("keyvault.BaseClient", "ImportCertificate", err.Error()) diff --git a/services/keyvault/v7.0/keyvault/models.go b/services/keyvault/v7.0/keyvault/models.go index 79fed73a9c9e..a57e7269b15e 100644 --- a/services/keyvault/v7.0/keyvault/models.go +++ b/services/keyvault/v7.0/keyvault/models.go @@ -2045,7 +2045,7 @@ type IssuerCredentials struct { type IssuerParameters struct { // Name - Name of the referenced issuer object or reserved names; for example, 'Self' or 'Unknown'. Name *string `json:"name,omitempty"` - // CertificateType - Type of certificate to be requested from the issuer provider. + // CertificateType - Certificate type as supported by the provider (optional); for example 'OV-SSL', 'EV-SSL' CertificateType *string `json:"cty,omitempty"` // CertificateTransparency - Indicates if the certificates generated under this policy should be published to certificate transparency logs. CertificateTransparency *bool `json:"cert_transparency,omitempty"` diff --git a/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go b/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go index d47daf1562ab..77db4da07423 100644 --- a/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go +++ b/services/machinelearning/mgmt/2017-01-01/webservices/webservices.go @@ -68,7 +68,7 @@ func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName strin Chain: []validation.Constraint{{Target: "createOrUpdatePayload.Properties.RealtimeConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.InclusiveMaximum, Rule: int64(200), Chain: nil}, - {Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.InclusiveMinimum, Rule: 4, Chain: nil}, + {Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil}, }}, }}, {Target: "createOrUpdatePayload.Properties.MachineLearningWorkspace", Name: validation.Null, Rule: false, diff --git a/services/mariadb/mgmt/2018-06-01/mariadb/servers.go b/services/mariadb/mgmt/2018-06-01/mariadb/servers.go index 7ca2cf261955..c01879a7e452 100644 --- a/services/mariadb/mgmt/2018-06-01/mariadb/servers.go +++ b/services/mariadb/mgmt/2018-06-01/mariadb/servers.go @@ -62,7 +62,7 @@ func (client ServersClient) Create(ctx context.Context, resourceGroupName string {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { diff --git a/services/mysql/mgmt/2017-12-01/mysql/models.go b/services/mysql/mgmt/2017-12-01/mysql/models.go index 43cea5eed431..a5eafc915802 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/models.go +++ b/services/mysql/mgmt/2017-12-01/mysql/models.go @@ -120,6 +120,8 @@ func PossibleServerStateValues() []ServerState { type ServerVersion string const ( + // EightFullStopZero ... + EightFullStopZero ServerVersion = "8.0" // FiveFullStopSeven ... FiveFullStopSeven ServerVersion = "5.7" // FiveFullStopSix ... @@ -128,7 +130,7 @@ const ( // PossibleServerVersionValues returns an array of possible values for the ServerVersion const type. func PossibleServerVersionValues() []ServerVersion { - return []ServerVersion{FiveFullStopSeven, FiveFullStopSix} + return []ServerVersion{EightFullStopZero, FiveFullStopSeven, FiveFullStopSix} } // SkuTier enumerates the values for sku tier. @@ -1037,7 +1039,7 @@ type ServerListResult struct { type ServerProperties struct { // AdministratorLogin - The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). AdministratorLogin *string `json:"administratorLogin,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1068,7 +1070,7 @@ type BasicServerPropertiesForCreate interface { // ServerPropertiesForCreate the properties used to create a new server. type ServerPropertiesForCreate struct { - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1182,7 +1184,7 @@ type ServerPropertiesForDefaultCreate struct { AdministratorLogin *string `json:"administratorLogin,omitempty"` // AdministratorLoginPassword - The password of the administrator login. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1252,7 +1254,7 @@ func (spfdc ServerPropertiesForDefaultCreate) AsBasicServerPropertiesForCreate() type ServerPropertiesForGeoRestore struct { // SourceServerID - The source server id to restore from. SourceServerID *string `json:"sourceServerId,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1318,7 +1320,7 @@ func (spfgr ServerPropertiesForGeoRestore) AsBasicServerPropertiesForCreate() (B type ServerPropertiesForReplica struct { // SourceServerID - The master server id to create replica from. SourceServerID *string `json:"sourceServerId,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1386,7 +1388,7 @@ type ServerPropertiesForRestore struct { SourceServerID *string `json:"sourceServerId,omitempty"` // RestorePointInTime - Restore point creation time (ISO8601 format), specifying the time to restore from. RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1730,7 +1732,7 @@ type ServerUpdateParametersProperties struct { StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // AdministratorLoginPassword - The password of the administrator login. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - The version of a server. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - The version of a server. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` diff --git a/services/mysql/mgmt/2017-12-01/mysql/servers.go b/services/mysql/mgmt/2017-12-01/mysql/servers.go index f81ee4eef330..7aafb12950d0 100644 --- a/services/mysql/mgmt/2017-12-01/mysql/servers.go +++ b/services/mysql/mgmt/2017-12-01/mysql/servers.go @@ -64,7 +64,7 @@ func (client ServersClient) Create(ctx context.Context, resourceGroupName string {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { diff --git a/services/netapp/mgmt/2019-05-01/netapp/pools.go b/services/netapp/mgmt/2019-05-01/netapp/pools.go index c441f7e40d85..77e1d2468581 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-05-01/netapp/pools.go @@ -69,7 +69,7 @@ func (client PoolsClient) CreateOrUpdate(ctx context.Context, body CapacityPool, }}, {Target: "body.PoolProperties.Size", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.PoolProperties.Size", Name: validation.InclusiveMaximum, Rule: int64(549755813888000), Chain: nil}, - {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: 4398046511104, Chain: nil}, + {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: int64(4398046511104), Chain: nil}, }}, }}}}, {TargetValue: resourceGroupName, diff --git a/services/netapp/mgmt/2019-05-01/netapp/volumes.go b/services/netapp/mgmt/2019-05-01/netapp/volumes.go index 76f9eb558d7a..1fcf2562c763 100644 --- a/services/netapp/mgmt/2019-05-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-05-01/netapp/volumes.go @@ -71,7 +71,7 @@ func (client VolumesClient) CreateOrUpdate(ctx context.Context, body Volume, res {Target: "body.VolumeProperties.CreationToken", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.VolumeProperties.UsageThreshold", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMaximum, Rule: int64(109951162777600), Chain: nil}, - {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: 107374182400, Chain: nil}, + {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: int64(107374182400), Chain: nil}, }}, {Target: "body.VolumeProperties.SnapshotID", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.VolumeProperties.SnapshotID", Name: validation.MaxLength, Rule: 36, Chain: nil}, diff --git a/services/netapp/mgmt/2019-06-01/netapp/pools.go b/services/netapp/mgmt/2019-06-01/netapp/pools.go index db89051d41d9..bdd8e5cb14d0 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-06-01/netapp/pools.go @@ -69,7 +69,7 @@ func (client PoolsClient) CreateOrUpdate(ctx context.Context, body CapacityPool, }}, {Target: "body.PoolProperties.Size", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.PoolProperties.Size", Name: validation.InclusiveMaximum, Rule: int64(549755813888000), Chain: nil}, - {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: 4398046511104, Chain: nil}, + {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: int64(4398046511104), Chain: nil}, }}, }}}}, {TargetValue: resourceGroupName, diff --git a/services/netapp/mgmt/2019-06-01/netapp/volumes.go b/services/netapp/mgmt/2019-06-01/netapp/volumes.go index 5005c61e6b7b..91efe92d08c2 100644 --- a/services/netapp/mgmt/2019-06-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-06-01/netapp/volumes.go @@ -71,7 +71,7 @@ func (client VolumesClient) CreateOrUpdate(ctx context.Context, body Volume, res {Target: "body.VolumeProperties.CreationToken", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.VolumeProperties.UsageThreshold", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMaximum, Rule: int64(109951162777600), Chain: nil}, - {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: 107374182400, Chain: nil}, + {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: int64(107374182400), Chain: nil}, }}, {Target: "body.VolumeProperties.SnapshotID", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.VolumeProperties.SnapshotID", Name: validation.MaxLength, Rule: 36, Chain: nil}, diff --git a/services/netapp/mgmt/2019-07-01/netapp/pools.go b/services/netapp/mgmt/2019-07-01/netapp/pools.go index b565a03ad3d6..acccfc8b7ee5 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-07-01/netapp/pools.go @@ -69,7 +69,7 @@ func (client PoolsClient) CreateOrUpdate(ctx context.Context, body CapacityPool, }}, {Target: "body.PoolProperties.Size", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.PoolProperties.Size", Name: validation.InclusiveMaximum, Rule: int64(549755813888000), Chain: nil}, - {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: 4398046511104, Chain: nil}, + {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: int64(4398046511104), Chain: nil}, }}, }}}}, {TargetValue: resourceGroupName, diff --git a/services/netapp/mgmt/2019-07-01/netapp/volumes.go b/services/netapp/mgmt/2019-07-01/netapp/volumes.go index 9114e5dbb534..c9c31adecd4b 100644 --- a/services/netapp/mgmt/2019-07-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-07-01/netapp/volumes.go @@ -71,7 +71,7 @@ func (client VolumesClient) CreateOrUpdate(ctx context.Context, body Volume, res {Target: "body.VolumeProperties.CreationToken", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.VolumeProperties.UsageThreshold", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMaximum, Rule: int64(109951162777600), Chain: nil}, - {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: 107374182400, Chain: nil}, + {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: int64(107374182400), Chain: nil}, }}, {Target: "body.VolumeProperties.SnapshotID", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.VolumeProperties.SnapshotID", Name: validation.MaxLength, Rule: 36, Chain: nil}, diff --git a/services/netapp/mgmt/2019-08-01/netapp/pools.go b/services/netapp/mgmt/2019-08-01/netapp/pools.go index 6452217337c9..0d3876e34ed4 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/pools.go +++ b/services/netapp/mgmt/2019-08-01/netapp/pools.go @@ -69,7 +69,7 @@ func (client PoolsClient) CreateOrUpdate(ctx context.Context, body CapacityPool, }}, {Target: "body.PoolProperties.Size", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.PoolProperties.Size", Name: validation.InclusiveMaximum, Rule: int64(549755813888000), Chain: nil}, - {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: 4398046511104, Chain: nil}, + {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: int64(4398046511104), Chain: nil}, }}, }}}}, {TargetValue: resourceGroupName, diff --git a/services/netapp/mgmt/2019-08-01/netapp/volumes.go b/services/netapp/mgmt/2019-08-01/netapp/volumes.go index c5fbbdfea70b..af20eef487f9 100644 --- a/services/netapp/mgmt/2019-08-01/netapp/volumes.go +++ b/services/netapp/mgmt/2019-08-01/netapp/volumes.go @@ -71,7 +71,7 @@ func (client VolumesClient) CreateOrUpdate(ctx context.Context, body Volume, res {Target: "body.VolumeProperties.CreationToken", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.VolumeProperties.UsageThreshold", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMaximum, Rule: int64(109951162777600), Chain: nil}, - {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: 107374182400, Chain: nil}, + {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: int64(107374182400), Chain: nil}, }}, {Target: "body.VolumeProperties.SnapshotID", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.VolumeProperties.SnapshotID", Name: validation.MaxLength, Rule: 36, Chain: nil}, diff --git a/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go index fa8862a447c2..f8a727d961c2 100644 --- a/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2016-09-01/network/virtualnetworkgatewayconnections.go @@ -509,7 +509,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go index d6023512603d..9386c13e440b 100644 --- a/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2016-12-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go index ea71e4b117ef..ed1e5b7299af 100644 --- a/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-03-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go index 592d01222229..d8c1561cf377 100644 --- a/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-06-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go index 49161118ce9a..8e9c91f3d1bd 100644 --- a/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-08-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go index ee463df29f62..95f70354b9af 100644 --- a/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-09-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go index f6588c5986ae..21468c98c1b4 100644 --- a/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go index 6b337dedd0fc..c2dca71876aa 100644 --- a/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go index c06d424934bc..2107b772e0b4 100644 --- a/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2017-11-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go index f86c59df9c90..be4edb083753 100644 --- a/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2017-11-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-01-01/network/applicationgateways.go b/services/network/mgmt/2018-01-01/network/applicationgateways.go index 20bf258918ed..422ceea7d0de 100644 --- a/services/network/mgmt/2018-01-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-01-01/network/applicationgateways.go @@ -147,7 +147,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go index f10b8622a556..714fdefd933c 100644 --- a/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-01-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go index 71929a2a4ae3..5334eb2ef6ea 100644 --- a/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-01-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-02-01/network/applicationgateways.go b/services/network/mgmt/2018-02-01/network/applicationgateways.go index d522dfe038c4..c50993c75f63 100644 --- a/services/network/mgmt/2018-02-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-02-01/network/applicationgateways.go @@ -147,7 +147,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go index 3d3c9861794e..5cf6c455f676 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go index cac64155ad03..f365d5cb6298 100644 --- a/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-02-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go index 521667f830b4..29e8c93b680c 100644 --- a/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-02-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-04-01/network/applicationgateways.go b/services/network/mgmt/2018-04-01/network/applicationgateways.go index ae01e8aef804..5cbd1635e143 100644 --- a/services/network/mgmt/2018-04-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-04-01/network/applicationgateways.go @@ -147,7 +147,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, diff --git a/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go index 3b99b862c44c..fa8e2db18e6b 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go index df5549d5247c..effc23c9ded7 100644 --- a/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-04-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go index 6b7a0c0bc523..8629c287d094 100644 --- a/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-04-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-06-01/network/applicationgateways.go b/services/network/mgmt/2018-06-01/network/applicationgateways.go index 34e4f93b4496..1ffd5b0a88ac 100644 --- a/services/network/mgmt/2018-06-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-06-01/network/applicationgateways.go @@ -147,7 +147,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, diff --git a/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go index 9eeac966e6de..80a76576fc0b 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go index fc0d4202ad7c..c4904b97dcb8 100644 --- a/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-06-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go index be72bf4fd9ce..2b97e5367e5f 100644 --- a/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-06-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-07-01/network/applicationgateways.go b/services/network/mgmt/2018-07-01/network/applicationgateways.go index 0489a791ce0d..feb1f8d43395 100644 --- a/services/network/mgmt/2018-07-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-07-01/network/applicationgateways.go @@ -147,7 +147,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, diff --git a/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go index fa8a0cf69cab..9ac73859a217 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go index 503a9f5d4e64..93867d0f8aaa 100644 --- a/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-07-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go index 71dced7f43a2..b888d0cf1ce6 100644 --- a/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-07-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-08-01/network/applicationgateways.go b/services/network/mgmt/2018-08-01/network/applicationgateways.go index 9ab38fb4f889..94fbc884fedc 100644 --- a/services/network/mgmt/2018-08-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-08-01/network/applicationgateways.go @@ -147,20 +147,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go index 786ea36dcdf5..d5fd220e0cfe 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go index e94979fb42f2..954773121f28 100644 --- a/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go index 71436a8da9d8..25f01057f291 100644 --- a/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-10-01/network/applicationgateways.go b/services/network/mgmt/2018-10-01/network/applicationgateways.go index ead98d25bffc..baae0dd35f7d 100644 --- a/services/network/mgmt/2018-10-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-10-01/network/applicationgateways.go @@ -147,20 +147,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go index dfd80f2e586d..2547c8830e55 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go index 6e35ab2d83a8..bf2cc5b7c29b 100644 --- a/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-10-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go index dbe1e3cde9e3..58deedfadb35 100644 --- a/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-10-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-11-01/network/applicationgateways.go b/services/network/mgmt/2018-11-01/network/applicationgateways.go index 72660f2b0818..a37ab8cca99e 100644 --- a/services/network/mgmt/2018-11-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-11-01/network/applicationgateways.go @@ -147,22 +147,22 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go index 7aa2b132e975..7d11625dcb9b 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go index da695ce7f627..69bb033ea767 100644 --- a/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-11-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go index cee2c9ea7083..f705bee65c66 100644 --- a/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-11-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2018-12-01/network/applicationgateways.go b/services/network/mgmt/2018-12-01/network/applicationgateways.go index 85f5e82c1bec..cc48a66c2980 100644 --- a/services/network/mgmt/2018-12-01/network/applicationgateways.go +++ b/services/network/mgmt/2018-12-01/network/applicationgateways.go @@ -147,22 +147,22 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go index ac1d930f7dc0..f3d156793ef5 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go index 9e1b80580984..8b2a926cfd0f 100644 --- a/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go index dac3ea9c1566..1ee9bc8b3453 100644 --- a/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2019-02-01/network/applicationgateways.go b/services/network/mgmt/2019-02-01/network/applicationgateways.go index d8fc69064f66..417f87571112 100644 --- a/services/network/mgmt/2019-02-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-02-01/network/applicationgateways.go @@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go index 06e087f64dbb..5f9bf3b57d34 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go index c4a9513434cd..ec17d6654368 100644 --- a/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-02-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go index 6ab9e590a240..249a7bfbcad3 100644 --- a/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-02-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2019-04-01/network/applicationgateways.go b/services/network/mgmt/2019-04-01/network/applicationgateways.go index bc0186069dc2..cdf7eaf18c0f 100644 --- a/services/network/mgmt/2019-04-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-04-01/network/applicationgateways.go @@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go index fad1d314818d..e1beb1bd051c 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go index e18403008c03..ff16998f0fc7 100644 --- a/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-04-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go index b5a72cab95d7..609c49d2152d 100644 --- a/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-04-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2019-06-01/network/applicationgateways.go b/services/network/mgmt/2019-06-01/network/applicationgateways.go index b3c1d5aa88b0..6b6c47a88cd6 100644 --- a/services/network/mgmt/2019-06-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-06-01/network/applicationgateways.go @@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go index 42e165667b9e..cc610324c7b6 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go index c0b32ea762d8..91eb42137855 100644 --- a/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go index 989c3d1635d0..842078d852da 100644 --- a/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go @@ -63,7 +63,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context, Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, - {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: 100, Chain: nil}, + {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go index 7875cf5ea19d..3b5e71c3a82d 100644 --- a/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2019-07-01/network/applicationgateways.go b/services/network/mgmt/2019-07-01/network/applicationgateways.go index 98594f46ea05..2d5cee49e567 100644 --- a/services/network/mgmt/2019-07-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-07-01/network/applicationgateways.go @@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go index 1a63f4afbbe4..5ccd0e23f006 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go index 39b9a4eefe0a..e78344a992d5 100644 --- a/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-07-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go index 1714fa0120d0..84e8bf1c8659 100644 --- a/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-07-01/network/firewallpolicyrulegroups.go @@ -63,7 +63,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context, Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, - {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: 100, Chain: nil}, + {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go index c020c80cfa13..8acdd67a472d 100644 --- a/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-07-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go b/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go index 2d1a6c78ce06..d03c3794f6e4 100644 --- a/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go +++ b/services/network/mgmt/2019-07-01/network/virtualrouterpeerings.go @@ -63,7 +63,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, re Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRouterPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-07-01/network/virtualrouters.go b/services/network/mgmt/2019-07-01/network/virtualrouters.go index 247dd594efe3..36118636f752 100644 --- a/services/network/mgmt/2019-07-01/network/virtualrouters.go +++ b/services/network/mgmt/2019-07-01/network/virtualrouters.go @@ -62,7 +62,7 @@ func (client VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRoutersClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-08-01/network/applicationgateways.go b/services/network/mgmt/2019-08-01/network/applicationgateways.go index b21d4bf507d8..4575e80cc7de 100644 --- a/services/network/mgmt/2019-08-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-08-01/network/applicationgateways.go @@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go index 989fa107f6f3..f1a6f552835e 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go index f03f189b4932..4b4dd9ddbe62 100644 --- a/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-08-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go index ee3a5036613f..dcb16a148438 100644 --- a/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-08-01/network/firewallpolicyrulegroups.go @@ -63,7 +63,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context, Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, - {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: 100, Chain: nil}, + {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-08-01/network/models.go b/services/network/mgmt/2019-08-01/network/models.go index 8fb81ab6a486..0ebb690a5e1f 100644 --- a/services/network/mgmt/2019-08-01/network/models.go +++ b/services/network/mgmt/2019-08-01/network/models.go @@ -21541,14 +21541,14 @@ func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error { type P2SVpnGatewayProperties struct { // VirtualHub - The VirtualHub to which the gateway belongs. VirtualHub *SubResource `json:"virtualHub,omitempty"` - // P2sConnectionConfigurations - List of all p2s connection configurations of the gateway. - P2sConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2sConnectionConfigurations,omitempty"` + // P2SConnectionConfigurations - List of all p2s connection configurations of the gateway. + P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` // ProvisioningState - The provisioning state of the P2S VPN gateway resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway. VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` // VpnServerConfiguration - The VpnServerConfiguration to which the p2sVpnGateway is attached to. - VpnServerConfiguration *VpnServerConfiguration `json:"vpnServerConfiguration,omitempty"` + VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status. VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` } @@ -33540,14 +33540,14 @@ type VpnServerConfigurationProperties struct { VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` // VpnAuthenticationTypes - VPN authentication types for the VpnServerConfiguration. VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - // VpnServerConfigVpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration. - VpnServerConfigVpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnServerConfigVpnClientRootCertificates,omitempty"` - // VpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration. - VpnServerConfigVpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnServerConfigVpnClientRevokedCertificates,omitempty"` - // VpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration. - VpnServerConfigRadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"vpnServerConfigRadiusServerRootCertificates,omitempty"` - // VpnServerConfigRadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration. - VpnServerConfigRadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"vpnServerConfigRadiusClientRootCertificates,omitempty"` + // VpnClientRootCertificates - VPN client root certificate of VpnServerConfiguration. + VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` + // VpnClientRevokedCertificates - VPN client revoked certificate of VpnServerConfiguration. + VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` + // RadiusServerRootCertificates - Radius Server root certificate of VpnServerConfiguration. + RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"` + // RadiusClientRootCertificates - Radius client root certificate of VpnServerConfiguration. + RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"` // VpnClientIpsecPolicies - VpnClientIpsecPolicies for VpnServerConfiguration. VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` // RadiusServerAddress - The radius server address property of the VpnServerConfiguration resource for point to site client connection. diff --git a/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go index d5f000cc321d..7cb492478205 100644 --- a/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-08-01/network/virtualnetworkgatewayconnections.go @@ -503,7 +503,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go b/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go index 55dd313274dc..ed5cb97aefe8 100644 --- a/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go +++ b/services/network/mgmt/2019-08-01/network/virtualrouterpeerings.go @@ -63,7 +63,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, re Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRouterPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-08-01/network/virtualrouters.go b/services/network/mgmt/2019-08-01/network/virtualrouters.go index ee236acb095e..08ef58c4e840 100644 --- a/services/network/mgmt/2019-08-01/network/virtualrouters.go +++ b/services/network/mgmt/2019-08-01/network/virtualrouters.go @@ -62,7 +62,7 @@ func (client VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRoutersClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go index 61fe4a39c76b..6d6220a7fa87 100644 --- a/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-08-01/network/webapplicationfirewallpolicies.go @@ -66,10 +66,10 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Co Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.ManagedRules", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.ManagedRules.ManagedRuleSets", Name: validation.Null, Rule: true, Chain: nil}}}, diff --git a/services/network/mgmt/2019-09-01/network/applicationgateways.go b/services/network/mgmt/2019-09-01/network/applicationgateways.go index 68c717dd567e..8e2e3f25221d 100644 --- a/services/network/mgmt/2019-09-01/network/applicationgateways.go +++ b/services/network/mgmt/2019-09-01/network/applicationgateways.go @@ -232,20 +232,20 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go b/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go index 1951a68d601b..5889f2f03458 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecircuitpeerings.go @@ -63,7 +63,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go b/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go index af377b2c878d..c18b9029d2f7 100644 --- a/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go +++ b/services/network/mgmt/2019-09-01/network/expressroutecrossconnectionpeerings.go @@ -66,7 +66,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go b/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go index 21f4f726575a..1f9d711f63d8 100644 --- a/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go +++ b/services/network/mgmt/2019-09-01/network/firewallpolicyrulegroups.go @@ -63,7 +63,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context, Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMaximum, Rule: int64(65000), Chain: nil}, - {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: 100, Chain: nil}, + {Target: "parameters.FirewallPolicyRuleGroupProperties.Priority", Name: validation.InclusiveMinimum, Rule: int64(100), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-09-01/network/models.go b/services/network/mgmt/2019-09-01/network/models.go index 087ff4995acf..a75fb13510ee 100644 --- a/services/network/mgmt/2019-09-01/network/models.go +++ b/services/network/mgmt/2019-09-01/network/models.go @@ -8841,6 +8841,8 @@ type ConnectivityParameters struct { Protocol Protocol `json:"protocol,omitempty"` // ProtocolConfiguration - Configuration of the protocol. ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` + // PreferredIPVersion - Preferred IP version of the connection. Possible values include: 'IPv4', 'IPv6' + PreferredIPVersion IPVersion `json:"preferredIPVersion,omitempty"` } // ConnectivitySource parameters that define the source of the connection. diff --git a/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go b/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go index 6e5d3efc3f2d..28425f557f63 100644 --- a/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go +++ b/services/network/mgmt/2019-09-01/network/virtualnetworkgatewayconnections.go @@ -504,7 +504,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.KeyLength", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", err.Error()) } diff --git a/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go b/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go index dde9185772d7..edf837845395 100644 --- a/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go +++ b/services/network/mgmt/2019-09-01/network/virtualrouterpeerings.go @@ -63,7 +63,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, re Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualRouterPeeringProperties.PeerAsn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRouterPeeringsClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-09-01/network/virtualrouters.go b/services/network/mgmt/2019-09-01/network/virtualrouters.go index 5235125ca060..ed42d5b28ace 100644 --- a/services/network/mgmt/2019-09-01/network/virtualrouters.go +++ b/services/network/mgmt/2019-09-01/network/virtualrouters.go @@ -62,7 +62,7 @@ func (client VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceG Constraints: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.VirtualRouterPropertiesFormat.VirtualRouterAsn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualRoutersClient", "CreateOrUpdate", err.Error()) diff --git a/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go b/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go index 94d0bd6e1614..9f0e270160d6 100644 --- a/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go +++ b/services/network/mgmt/2019-09-01/network/webapplicationfirewallpolicies.go @@ -66,10 +66,10 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Co Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, + {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, }}, {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.ManagedRules", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.ManagedRules.ManagedRuleSets", Name: validation.Null, Rule: true, Chain: nil}}}, diff --git a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go index c14989217454..58c3d761c746 100644 --- a/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go +++ b/services/operationalinsights/mgmt/2015-03-20/operationalinsights/savedsearches.go @@ -70,7 +70,7 @@ func (client SavedSearchesClient) CreateOrUpdate(ctx context.Context, resourceGr {Target: "parameters.SavedSearchProperties.Query", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.SavedSearchProperties.Version", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.SavedSearchProperties.Version", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "parameters.SavedSearchProperties.Version", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.SavedSearchProperties.Version", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("operationalinsights.SavedSearchesClient", "CreateOrUpdate", err.Error()) diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go index d4c4421f66e2..28c2d9196d15 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/policyevents.go @@ -145,7 +145,7 @@ func (client PolicyEventsClient) ListQueryResultsForManagementGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -261,7 +261,7 @@ func (client PolicyEventsClient) ListQueryResultsForPolicyDefinition(ctx context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForPolicyDefinition", err.Error()) } @@ -378,7 +378,7 @@ func (client PolicyEventsClient) ListQueryResultsForPolicySetDefinition(ctx cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForPolicySetDefinition", err.Error()) } @@ -494,7 +494,7 @@ func (client PolicyEventsClient) ListQueryResultsForResource(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResource", err.Error()) } @@ -609,7 +609,7 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -727,7 +727,7 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroupLevelPolicyAssi if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -844,7 +844,7 @@ func (client PolicyEventsClient) ListQueryResultsForSubscription(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForSubscription", err.Error()) } @@ -960,7 +960,7 @@ func (client PolicyEventsClient) ListQueryResultsForSubscriptionLevelPolicyAssig if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForSubscriptionLevelPolicyAssignment", err.Error()) } diff --git a/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go b/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go index 707db3082ee3..2f8d0fa20e30 100644 --- a/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go +++ b/services/policyinsights/mgmt/2018-04-04/policyinsights/policystates.go @@ -147,7 +147,7 @@ func (client PolicyStatesClient) ListQueryResultsForManagementGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -265,7 +265,7 @@ func (client PolicyStatesClient) ListQueryResultsForPolicyDefinition(ctx context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForPolicyDefinition", err.Error()) } @@ -384,7 +384,7 @@ func (client PolicyStatesClient) ListQueryResultsForPolicySetDefinition(ctx cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForPolicySetDefinition", err.Error()) } @@ -502,7 +502,7 @@ func (client PolicyStatesClient) ListQueryResultsForResource(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResource", err.Error()) } @@ -619,7 +619,7 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -739,7 +739,7 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroupLevelPolicyAssi if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -858,7 +858,7 @@ func (client PolicyStatesClient) ListQueryResultsForSubscription(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForSubscription", err.Error()) } @@ -976,7 +976,7 @@ func (client PolicyStatesClient) ListQueryResultsForSubscriptionLevelPolicyAssig if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForSubscriptionLevelPolicyAssignment", err.Error()) } @@ -1087,7 +1087,7 @@ func (client PolicyStatesClient) SummarizeForManagementGroup(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForManagementGroup", err.Error()) } @@ -1189,7 +1189,7 @@ func (client PolicyStatesClient) SummarizeForPolicyDefinition(ctx context.Contex if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForPolicyDefinition", err.Error()) } @@ -1292,7 +1292,7 @@ func (client PolicyStatesClient) SummarizeForPolicySetDefinition(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForPolicySetDefinition", err.Error()) } @@ -1394,7 +1394,7 @@ func (client PolicyStatesClient) SummarizeForResource(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResource", err.Error()) } @@ -1495,7 +1495,7 @@ func (client PolicyStatesClient) SummarizeForResourceGroup(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResourceGroup", err.Error()) } @@ -1599,7 +1599,7 @@ func (client PolicyStatesClient) SummarizeForResourceGroupLevelPolicyAssignment( if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -1702,7 +1702,7 @@ func (client PolicyStatesClient) SummarizeForSubscription(ctx context.Context, s if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForSubscription", err.Error()) } @@ -1803,7 +1803,7 @@ func (client PolicyStatesClient) SummarizeForSubscriptionLevelPolicyAssignment(c if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForSubscriptionLevelPolicyAssignment", err.Error()) } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/models.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/models.go index 214dcc0b1605..15f282b5cf59 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/models.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/models.go @@ -45,6 +45,22 @@ func PossiblePolicyStatesResourceValues() []PolicyStatesResource { return []PolicyStatesResource{Default, Latest} } +// ResourceDiscoveryMode enumerates the values for resource discovery mode. +type ResourceDiscoveryMode string + +const ( + // ExistingNonCompliant Remediate resources that are already known to be non-compliant. + ExistingNonCompliant ResourceDiscoveryMode = "ExistingNonCompliant" + // ReEvaluateCompliance Re-evaluate the compliance state of resources and then remediate the resources + // found to be non-compliant. + ReEvaluateCompliance ResourceDiscoveryMode = "ReEvaluateCompliance" +) + +// PossibleResourceDiscoveryModeValues returns an array of possible values for the ResourceDiscoveryMode const type. +func PossibleResourceDiscoveryModeValues() []ResourceDiscoveryMode { + return []ResourceDiscoveryMode{ExistingNonCompliant, ReEvaluateCompliance} +} + // ComplianceDetail the compliance state rollup. type ComplianceDetail struct { // ComplianceState - The compliance state. @@ -645,6 +661,262 @@ type PolicyGroupSummary struct { Results *SummaryResults `json:"results,omitempty"` } +// PolicyMetadata policy metadata resource definition. +type PolicyMetadata struct { + autorest.Response `json:"-"` + // PolicyMetadataProperties - Properties of the policy metadata. + *PolicyMetadataProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The ID of the policy metadata. + ID *string `json:"id,omitempty"` + // Type - READ-ONLY; The type of the policy metadata. + Type *string `json:"type,omitempty"` + // Name - READ-ONLY; The name of the policy metadata. + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for PolicyMetadata. +func (pm PolicyMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pm.PolicyMetadataProperties != nil { + objectMap["properties"] = pm.PolicyMetadataProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PolicyMetadata struct. +func (pm *PolicyMetadata) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var policyMetadataProperties PolicyMetadataProperties + err = json.Unmarshal(*v, &policyMetadataProperties) + if err != nil { + return err + } + pm.PolicyMetadataProperties = &policyMetadataProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pm.ID = &ID + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pm.Type = &typeVar + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pm.Name = &name + } + } + } + + return nil +} + +// PolicyMetadataCollection collection of policy metadata resources. +type PolicyMetadataCollection struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of policy metadata definitions. + Value *[]SlimPolicyMetadata `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// PolicyMetadataCollectionIterator provides access to a complete listing of SlimPolicyMetadata values. +type PolicyMetadataCollectionIterator struct { + i int + page PolicyMetadataCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *PolicyMetadataCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PolicyMetadataCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *PolicyMetadataCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PolicyMetadataCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter PolicyMetadataCollectionIterator) Response() PolicyMetadataCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter PolicyMetadataCollectionIterator) Value() SlimPolicyMetadata { + if !iter.page.NotDone() { + return SlimPolicyMetadata{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PolicyMetadataCollectionIterator type. +func NewPolicyMetadataCollectionIterator(page PolicyMetadataCollectionPage) PolicyMetadataCollectionIterator { + return PolicyMetadataCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pmc PolicyMetadataCollection) IsEmpty() bool { + return pmc.Value == nil || len(*pmc.Value) == 0 +} + +// policyMetadataCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pmc PolicyMetadataCollection) policyMetadataCollectionPreparer(ctx context.Context) (*http.Request, error) { + if pmc.NextLink == nil || len(to.String(pmc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pmc.NextLink))) +} + +// PolicyMetadataCollectionPage contains a page of SlimPolicyMetadata values. +type PolicyMetadataCollectionPage struct { + fn func(context.Context, PolicyMetadataCollection) (PolicyMetadataCollection, error) + pmc PolicyMetadataCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *PolicyMetadataCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PolicyMetadataCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pmc) + if err != nil { + return err + } + page.pmc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *PolicyMetadataCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PolicyMetadataCollectionPage) NotDone() bool { + return !page.pmc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PolicyMetadataCollectionPage) Response() PolicyMetadataCollection { + return page.pmc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PolicyMetadataCollectionPage) Values() []SlimPolicyMetadata { + if page.pmc.IsEmpty() { + return nil + } + return *page.pmc.Value +} + +// Creates a new instance of the PolicyMetadataCollectionPage type. +func NewPolicyMetadataCollectionPage(getNextPage func(context.Context, PolicyMetadataCollection) (PolicyMetadataCollection, error)) PolicyMetadataCollectionPage { + return PolicyMetadataCollectionPage{fn: getNextPage} +} + +// PolicyMetadataProperties the properties of the policy metadata. +type PolicyMetadataProperties struct { + // Description - READ-ONLY; The description of the policy metadata. + Description *string `json:"description,omitempty"` + // Requirements - READ-ONLY; The requirements of the policy metadata. + Requirements *string `json:"requirements,omitempty"` + // MetadataID - READ-ONLY; The policy metadata identifier. + MetadataID *string `json:"metadataId,omitempty"` + // Category - READ-ONLY; The category of the policy metadata. + Category *string `json:"category,omitempty"` + // Title - READ-ONLY; The title of the policy metadata. + Title *string `json:"title,omitempty"` + // Owner - READ-ONLY; The owner of the policy metadata. + Owner *string `json:"owner,omitempty"` + // AdditionalContentURL - READ-ONLY; Url for getting additional content about the resource metadata. + AdditionalContentURL *string `json:"additionalContentUrl,omitempty"` + // Metadata - READ-ONLY; Additional metadata. + Metadata interface{} `json:"metadata,omitempty"` +} + +// PolicyMetadataSlimProperties the properties of the policy metadata, excluding properties containing +// large strings +type PolicyMetadataSlimProperties struct { + // MetadataID - READ-ONLY; The policy metadata identifier. + MetadataID *string `json:"metadataId,omitempty"` + // Category - READ-ONLY; The category of the policy metadata. + Category *string `json:"category,omitempty"` + // Title - READ-ONLY; The title of the policy metadata. + Title *string `json:"title,omitempty"` + // Owner - READ-ONLY; The owner of the policy metadata. + Owner *string `json:"owner,omitempty"` + // AdditionalContentURL - READ-ONLY; Url for getting additional content about the resource metadata. + AdditionalContentURL *string `json:"additionalContentUrl,omitempty"` + // Metadata - READ-ONLY; Additional metadata. + Metadata interface{} `json:"metadata,omitempty"` +} + // PolicyState policy state record. type PolicyState struct { // AdditionalProperties - Unmatched properties from the message are deserialized this collection @@ -1534,11 +1806,11 @@ func NewRemediationDeploymentsListResultPage(getNextPage func(context.Context, R // RemediationDeploymentSummary the deployment status summary for all deployments created by the // remediation. type RemediationDeploymentSummary struct { - // TotalDeployments - The number of deployments required by the remediation. + // TotalDeployments - READ-ONLY; The number of deployments required by the remediation. TotalDeployments *int32 `json:"totalDeployments,omitempty"` - // SuccessfulDeployments - The number of deployments required by the remediation that have succeeded. + // SuccessfulDeployments - READ-ONLY; The number of deployments required by the remediation that have succeeded. SuccessfulDeployments *int32 `json:"successfulDeployments,omitempty"` - // FailedDeployments - The number of deployments required by the remediation that have failed. + // FailedDeployments - READ-ONLY; The number of deployments required by the remediation that have failed. FailedDeployments *int32 `json:"failedDeployments,omitempty"` } @@ -1700,6 +1972,8 @@ type RemediationProperties struct { PolicyAssignmentID *string `json:"policyAssignmentId,omitempty"` // PolicyDefinitionReferenceID - The policy definition reference ID of the individual definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition. PolicyDefinitionReferenceID *string `json:"policyDefinitionReferenceId,omitempty"` + // ResourceDiscoveryMode - The way resources to remediate are discovered. Defaults to ExistingNonCompliant if not specified. Possible values include: 'ExistingNonCompliant', 'ReEvaluateCompliance' + ResourceDiscoveryMode ResourceDiscoveryMode `json:"resourceDiscoveryMode,omitempty"` // ProvisioningState - READ-ONLY; The status of the remediation. ProvisioningState *string `json:"provisioningState,omitempty"` // CreatedOn - READ-ONLY; The time at which the remediation was created. @@ -1708,10 +1982,83 @@ type RemediationProperties struct { LastUpdatedOn *date.Time `json:"lastUpdatedOn,omitempty"` // Filters - The filters that will be applied to determine which resources to remediate. Filters *RemediationFilters `json:"filters,omitempty"` - // DeploymentStatus - The deployment status summary for all deployments created by the remediation. + // DeploymentStatus - READ-ONLY; The deployment status summary for all deployments created by the remediation. DeploymentStatus *RemediationDeploymentSummary `json:"deploymentStatus,omitempty"` } +// SlimPolicyMetadata slim version of policy metadata resource definition, excluding properties with large +// strings +type SlimPolicyMetadata struct { + // PolicyMetadataSlimProperties - Properties of the policy metadata. + *PolicyMetadataSlimProperties `json:"properties,omitempty"` + // ID - READ-ONLY; The ID of the policy metadata. + ID *string `json:"id,omitempty"` + // Type - READ-ONLY; The type of the policy metadata. + Type *string `json:"type,omitempty"` + // Name - READ-ONLY; The name of the policy metadata. + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for SlimPolicyMetadata. +func (spm SlimPolicyMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if spm.PolicyMetadataSlimProperties != nil { + objectMap["properties"] = spm.PolicyMetadataSlimProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SlimPolicyMetadata struct. +func (spm *SlimPolicyMetadata) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var policyMetadataSlimProperties PolicyMetadataSlimProperties + err = json.Unmarshal(*v, &policyMetadataSlimProperties) + if err != nil { + return err + } + spm.PolicyMetadataSlimProperties = &policyMetadataSlimProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + spm.ID = &ID + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + spm.Type = &typeVar + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + spm.Name = &name + } + } + } + + return nil +} + // String ... type String struct { autorest.Response `json:"-"` diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go index d4c4421f66e2..28c2d9196d15 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyevents.go @@ -145,7 +145,7 @@ func (client PolicyEventsClient) ListQueryResultsForManagementGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -261,7 +261,7 @@ func (client PolicyEventsClient) ListQueryResultsForPolicyDefinition(ctx context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForPolicyDefinition", err.Error()) } @@ -378,7 +378,7 @@ func (client PolicyEventsClient) ListQueryResultsForPolicySetDefinition(ctx cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForPolicySetDefinition", err.Error()) } @@ -494,7 +494,7 @@ func (client PolicyEventsClient) ListQueryResultsForResource(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResource", err.Error()) } @@ -609,7 +609,7 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -727,7 +727,7 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroupLevelPolicyAssi if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -844,7 +844,7 @@ func (client PolicyEventsClient) ListQueryResultsForSubscription(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForSubscription", err.Error()) } @@ -960,7 +960,7 @@ func (client PolicyEventsClient) ListQueryResultsForSubscriptionLevelPolicyAssig if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForSubscriptionLevelPolicyAssignment", err.Error()) } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go index aeb5b3244156..33bcb444986b 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policyinsightsapi/interfaces.go @@ -106,3 +106,11 @@ type OperationsClientAPI interface { } var _ OperationsClientAPI = (*policyinsights.OperationsClient)(nil) + +// PolicyMetadataClientAPI contains the set of methods on the PolicyMetadataClient type. +type PolicyMetadataClientAPI interface { + GetResource(ctx context.Context, resourceName string) (result policyinsights.PolicyMetadata, err error) + List(ctx context.Context, top *int32) (result policyinsights.PolicyMetadataCollectionPage, err error) +} + +var _ PolicyMetadataClientAPI = (*policyinsights.PolicyMetadataClient)(nil) diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go new file mode 100644 index 000000000000..a8cbc80533f5 --- /dev/null +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policymetadata.go @@ -0,0 +1,234 @@ +package policyinsights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PolicyMetadataClient is the client for the PolicyMetadata methods of the Policyinsights service. +type PolicyMetadataClient struct { + BaseClient +} + +// NewPolicyMetadataClient creates an instance of the PolicyMetadataClient client. +func NewPolicyMetadataClient() PolicyMetadataClient { + return NewPolicyMetadataClientWithBaseURI(DefaultBaseURI) +} + +// NewPolicyMetadataClientWithBaseURI creates an instance of the PolicyMetadataClient client. +func NewPolicyMetadataClientWithBaseURI(baseURI string) PolicyMetadataClient { + return PolicyMetadataClient{NewWithBaseURI(baseURI)} +} + +// GetResource get policy metadata resource. +// Parameters: +// resourceName - the name of the policy metadata resource. +func (client PolicyMetadataClient) GetResource(ctx context.Context, resourceName string) (result PolicyMetadata, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PolicyMetadataClient.GetResource") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetResourcePreparer(ctx, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "GetResource", nil, "Failure preparing request") + return + } + + resp, err := client.GetResourceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "GetResource", resp, "Failure sending request") + return + } + + result, err = client.GetResourceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "GetResource", resp, "Failure responding to request") + } + + return +} + +// GetResourcePreparer prepares the GetResource request. +func (client PolicyMetadataClient) GetResourcePreparer(ctx context.Context, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceName": resourceName, + } + + const APIVersion = "2019-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/providers/Microsoft.PolicyInsights/policyMetadata/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetResourceSender sends the GetResource request. The method will close the +// http.Response Body if it receives an error. +func (client PolicyMetadataClient) GetResourceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResourceResponder handles the response to the GetResource request. The method always +// closes the http.Response Body. +func (client PolicyMetadataClient) GetResourceResponder(resp *http.Response) (result PolicyMetadata, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get a list of the policy metadata resources. +// Parameters: +// top - maximum number of records to return. +func (client PolicyMetadataClient) List(ctx context.Context, top *int32) (result PolicyMetadataCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PolicyMetadataClient.List") + defer func() { + sc := -1 + if result.pmc.Response.Response != nil { + sc = result.pmc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: top, + Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("policyinsights.PolicyMetadataClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, top) + if err != nil { + err = autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pmc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "List", resp, "Failure sending request") + return + } + + result.pmc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PolicyMetadataClient) ListPreparer(ctx context.Context, top *int32) (*http.Request, error) { + const APIVersion = "2019-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.PolicyInsights/policyMetadata"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PolicyMetadataClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PolicyMetadataClient) ListResponder(resp *http.Response) (result PolicyMetadataCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client PolicyMetadataClient) listNextResults(ctx context.Context, lastResults PolicyMetadataCollection) (result PolicyMetadataCollection, err error) { + req, err := lastResults.policyMetadataCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "policyinsights.PolicyMetadataClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PolicyMetadataClient) ListComplete(ctx context.Context, top *int32) (result PolicyMetadataCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PolicyMetadataClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, top) + return +} diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go index 3ddb69eb24dc..8c51cec8ba9e 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policystates.go @@ -72,7 +72,7 @@ func (client PolicyStatesClient) ListQueryResultsForManagementGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -190,7 +190,7 @@ func (client PolicyStatesClient) ListQueryResultsForPolicyDefinition(ctx context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForPolicyDefinition", err.Error()) } @@ -309,7 +309,7 @@ func (client PolicyStatesClient) ListQueryResultsForPolicySetDefinition(ctx cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForPolicySetDefinition", err.Error()) } @@ -429,7 +429,7 @@ func (client PolicyStatesClient) ListQueryResultsForResource(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResource", err.Error()) } @@ -549,7 +549,7 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -669,7 +669,7 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroupLevelPolicyAssi if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -788,7 +788,7 @@ func (client PolicyStatesClient) ListQueryResultsForSubscription(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForSubscription", err.Error()) } @@ -906,7 +906,7 @@ func (client PolicyStatesClient) ListQueryResultsForSubscriptionLevelPolicyAssig if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForSubscriptionLevelPolicyAssignment", err.Error()) } @@ -1017,7 +1017,7 @@ func (client PolicyStatesClient) SummarizeForManagementGroup(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForManagementGroup", err.Error()) } @@ -1119,7 +1119,7 @@ func (client PolicyStatesClient) SummarizeForPolicyDefinition(ctx context.Contex if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForPolicyDefinition", err.Error()) } @@ -1222,7 +1222,7 @@ func (client PolicyStatesClient) SummarizeForPolicySetDefinition(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForPolicySetDefinition", err.Error()) } @@ -1324,7 +1324,7 @@ func (client PolicyStatesClient) SummarizeForResource(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResource", err.Error()) } @@ -1425,7 +1425,7 @@ func (client PolicyStatesClient) SummarizeForResourceGroup(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResourceGroup", err.Error()) } @@ -1529,7 +1529,7 @@ func (client PolicyStatesClient) SummarizeForResourceGroupLevelPolicyAssignment( if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -1632,7 +1632,7 @@ func (client PolicyStatesClient) SummarizeForSubscription(ctx context.Context, s if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForSubscription", err.Error()) } @@ -1733,7 +1733,7 @@ func (client PolicyStatesClient) SummarizeForSubscriptionLevelPolicyAssignment(c if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForSubscriptionLevelPolicyAssignment", err.Error()) } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go index cfcb71c32715..dd5a4ecd9183 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/policytrackedresources.go @@ -60,7 +60,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForManagementGroup(ct if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -189,7 +189,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForResource(ctx conte if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForResource", err.Error()) } @@ -318,7 +318,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForResourceGroup(ctx if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -447,7 +447,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForSubscription(ctx c if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForSubscription", err.Error()) } diff --git a/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go b/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go index 84f777ab2c87..da8443891771 100644 --- a/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go +++ b/services/policyinsights/mgmt/2019-10-01/policyinsights/remediations.go @@ -85,7 +85,7 @@ func (client RemediationsClient) CancelAtManagementGroupPreparer(ctx context.Con "remediationName": autorest.Encode("path", remediationName), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -161,7 +161,7 @@ func (client RemediationsClient) CancelAtResourcePreparer(ctx context.Context, r "resourceId": resourceID, } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -239,7 +239,7 @@ func (client RemediationsClient) CancelAtResourceGroupPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client RemediationsClient) CancelAtSubscriptionPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -393,7 +393,7 @@ func (client RemediationsClient) CreateOrUpdateAtManagementGroupPreparer(ctx con "remediationName": autorest.Encode("path", remediationName), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -475,7 +475,7 @@ func (client RemediationsClient) CreateOrUpdateAtResourcePreparer(ctx context.Co "resourceId": resourceID, } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -559,7 +559,7 @@ func (client RemediationsClient) CreateOrUpdateAtResourceGroupPreparer(ctx conte "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -641,7 +641,7 @@ func (client RemediationsClient) CreateOrUpdateAtSubscriptionPreparer(ctx contex "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -723,7 +723,7 @@ func (client RemediationsClient) DeleteAtManagementGroupPreparer(ctx context.Con "remediationName": autorest.Encode("path", remediationName), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -799,7 +799,7 @@ func (client RemediationsClient) DeleteAtResourcePreparer(ctx context.Context, r "resourceId": resourceID, } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -877,7 +877,7 @@ func (client RemediationsClient) DeleteAtResourceGroupPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -953,7 +953,7 @@ func (client RemediationsClient) DeleteAtSubscriptionPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1030,7 +1030,7 @@ func (client RemediationsClient) GetAtManagementGroupPreparer(ctx context.Contex "remediationName": autorest.Encode("path", remediationName), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1106,7 +1106,7 @@ func (client RemediationsClient) GetAtResourcePreparer(ctx context.Context, reso "resourceId": resourceID, } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1184,7 +1184,7 @@ func (client RemediationsClient) GetAtResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1260,7 +1260,7 @@ func (client RemediationsClient) GetAtSubscriptionPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1312,7 +1312,7 @@ func (client RemediationsClient) ListDeploymentsAtManagementGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtManagementGroup", err.Error()) } @@ -1346,7 +1346,7 @@ func (client RemediationsClient) ListDeploymentsAtManagementGroupPreparer(ctx co "remediationName": autorest.Encode("path", remediationName), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1438,7 +1438,7 @@ func (client RemediationsClient) ListDeploymentsAtResource(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtResource", err.Error()) } @@ -1471,7 +1471,7 @@ func (client RemediationsClient) ListDeploymentsAtResourcePreparer(ctx context.C "resourceId": resourceID, } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1564,7 +1564,7 @@ func (client RemediationsClient) ListDeploymentsAtResourceGroup(ctx context.Cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtResourceGroup", err.Error()) } @@ -1598,7 +1598,7 @@ func (client RemediationsClient) ListDeploymentsAtResourceGroupPreparer(ctx cont "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1690,7 +1690,7 @@ func (client RemediationsClient) ListDeploymentsAtSubscription(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtSubscription", err.Error()) } @@ -1723,7 +1723,7 @@ func (client RemediationsClient) ListDeploymentsAtSubscriptionPreparer(ctx conte "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1815,7 +1815,7 @@ func (client RemediationsClient) ListForManagementGroup(ctx context.Context, man if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForManagementGroup", err.Error()) } @@ -1848,7 +1848,7 @@ func (client RemediationsClient) ListForManagementGroupPreparer(ctx context.Cont "managementGroupsNamespace": autorest.Encode("path", "Microsoft.Management"), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1943,7 +1943,7 @@ func (client RemediationsClient) ListForResource(ctx context.Context, resourceID if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForResource", err.Error()) } @@ -1975,7 +1975,7 @@ func (client RemediationsClient) ListForResourcePreparer(ctx context.Context, re "resourceId": resourceID, } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2071,7 +2071,7 @@ func (client RemediationsClient) ListForResourceGroup(ctx context.Context, subsc if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForResourceGroup", err.Error()) } @@ -2104,7 +2104,7 @@ func (client RemediationsClient) ListForResourceGroupPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2199,7 +2199,7 @@ func (client RemediationsClient) ListForSubscription(ctx context.Context, subscr if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForSubscription", err.Error()) } @@ -2231,7 +2231,7 @@ func (client RemediationsClient) ListForSubscriptionPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", subscriptionID), } - const APIVersion = "2018-07-01-preview" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/services/postgresql/mgmt/2017-12-01/postgresql/servers.go b/services/postgresql/mgmt/2017-12-01/postgresql/servers.go index 00a77fe82e6b..43f6cdd1e997 100644 --- a/services/postgresql/mgmt/2017-12-01/postgresql/servers.go +++ b/services/postgresql/mgmt/2017-12-01/postgresql/servers.go @@ -64,7 +64,7 @@ func (client ServersClient) Create(ctx context.Context, resourceGroupName string {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/api.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/api.go index 1d86bb6acf28..2bca8bb0f917 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/api.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/api.go @@ -338,10 +338,10 @@ func (client APIClient) List(ctx context.Context, apimBaseURL string, filter str if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apioperation.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apioperation.go index ea35a24a3123..e19134c3f1c0 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apioperation.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apioperation.go @@ -357,10 +357,10 @@ func (client APIOperationClient) ListByAPI(ctx context.Context, apimBaseURL stri {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "ListByAPI", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apiproduct.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apiproduct.go index 50b767f04dc3..315a71904ee1 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apiproduct.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/apiproduct.go @@ -64,10 +64,10 @@ func (client APIProductClient) ListByApis(ctx context.Context, apimBaseURL strin {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIProductClient", "ListByApis", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/authorizationserver.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/authorizationserver.go index 411df2f6af46..0a4cf07e87ef 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/authorizationserver.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/authorizationserver.go @@ -326,10 +326,10 @@ func (client AuthorizationServerClient) List(ctx context.Context, apimBaseURL st if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/backend.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/backend.go index 5a1feca64428..66349dd8eeff 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/backend.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/backend.go @@ -329,10 +329,10 @@ func (client BackendClient) List(ctx context.Context, apimBaseURL string, filter if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/certificate.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/certificate.go index d355ea6fa8b8..af0f2c0d3e75 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/certificate.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/certificate.go @@ -343,10 +343,10 @@ func (client CertificateClient) List(ctx context.Context, apimBaseURL string, fi if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/emailtemplate.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/emailtemplate.go index 8e67eefe2b35..6af536e7cf3e 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/emailtemplate.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/emailtemplate.go @@ -315,10 +315,10 @@ func (client EmailTemplateClient) List(ctx context.Context, apimBaseURL string, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.EmailTemplateClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/group.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/group.go index 60aae11d0de5..ebd77658f376 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/group.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/group.go @@ -336,10 +336,10 @@ func (client GroupClient) List(ctx context.Context, apimBaseURL string, filter s if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/groupuser.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/groupuser.go index ce397cb46d90..555043dbd556 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/groupuser.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/groupuser.go @@ -257,10 +257,10 @@ func (client GroupUserClient) List(ctx context.Context, apimBaseURL string, grou {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/logger.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/logger.go index 12e37d45b237..e8e17350f2b9 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/logger.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/logger.go @@ -326,10 +326,10 @@ func (client LoggerClient) List(ctx context.Context, apimBaseURL string, filter if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/openidconnectprovider.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/openidconnectprovider.go index 740d6c525846..8ba9912bb214 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/openidconnectprovider.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/openidconnectprovider.go @@ -326,10 +326,10 @@ func (client OpenIDConnectProviderClient) List(ctx context.Context, apimBaseURL if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OpenIDConnectProviderClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/product.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/product.go index 157089437b44..fdcf17bef27c 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/product.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/product.go @@ -338,10 +338,10 @@ func (client ProductClient) List(ctx context.Context, apimBaseURL string, filter if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productapi.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productapi.go index 897c33224f4e..73855faa19b8 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productapi.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productapi.go @@ -255,10 +255,10 @@ func (client ProductAPIClient) ListByProduct(ctx context.Context, apimBaseURL st {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductAPIClient", "ListByProduct", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productgroup.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productgroup.go index 1e7b86f7c12e..3b007e7a9c50 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productgroup.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productgroup.go @@ -254,10 +254,10 @@ func (client ProductGroupClient) ListByProduct(ctx context.Context, apimBaseURL {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "ListByProduct", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productsubscriptions.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productsubscriptions.go index 0a4542c03c2b..7ac1c97b8426 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productsubscriptions.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/productsubscriptions.go @@ -69,10 +69,10 @@ func (client ProductSubscriptionsClient) List(ctx context.Context, apimBaseURL s {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductSubscriptionsClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/property.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/property.go index 457ed88a8c77..4f2f351eb6f7 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/property.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/property.go @@ -326,10 +326,10 @@ func (client PropertyClient) List(ctx context.Context, apimBaseURL string, filte if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/reports.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/reports.go index dfbf98fd2ae8..15f87a4240af 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/reports.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/reports.go @@ -57,10 +57,10 @@ func (client ReportsClient) ListByAPI(ctx context.Context, apimBaseURL string, f if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByAPI", err.Error()) } @@ -190,10 +190,10 @@ func (client ReportsClient) ListByGeo(ctx context.Context, apimBaseURL string, f if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByGeo", err.Error()) } @@ -325,10 +325,10 @@ func (client ReportsClient) ListByOperation(ctx context.Context, apimBaseURL str if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByOperation", err.Error()) } @@ -458,10 +458,10 @@ func (client ReportsClient) ListByProduct(ctx context.Context, apimBaseURL strin if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByProduct", err.Error()) } @@ -591,10 +591,10 @@ func (client ReportsClient) ListByRequest(ctx context.Context, apimBaseURL strin if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByRequest", err.Error()) } @@ -686,10 +686,10 @@ func (client ReportsClient) ListBySubscription(ctx context.Context, apimBaseURL if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListBySubscription", err.Error()) } @@ -824,10 +824,10 @@ func (client ReportsClient) ListByTime(ctx context.Context, apimBaseURL string, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByTime", err.Error()) } @@ -960,10 +960,10 @@ func (client ReportsClient) ListByUser(ctx context.Context, apimBaseURL string, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByUser", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/subscription.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/subscription.go index c5936f7668fe..5b07d98f4eb4 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/subscription.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/subscription.go @@ -354,10 +354,10 @@ func (client SubscriptionClient) List(ctx context.Context, apimBaseURL string, f if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/user.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/user.go index 1d96e83e265a..2ec398ca1f6f 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/user.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/user.go @@ -541,10 +541,10 @@ func (client UserClient) List(ctx context.Context, apimBaseURL string, filter st if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usergroup.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usergroup.go index 993e7bfa4c86..b49809de1b15 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usergroup.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usergroup.go @@ -66,10 +66,10 @@ func (client UserGroupClient) List(ctx context.Context, apimBaseURL string, UID {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserGroupClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usersubscription.go b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usersubscription.go index abe4759a6e5d..37f04b5ac212 100644 --- a/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usersubscription.go +++ b/services/preview/apimanagement/ctrl/2017-03-01/apimanagement/usersubscription.go @@ -69,10 +69,10 @@ func (client UserSubscriptionClient) List(ctx context.Context, apimBaseURL strin {Target: "UID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserSubscriptionClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go index c525c394a53e..4f4768b74409 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go @@ -456,10 +456,10 @@ func (client APIClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByService", err.Error()) } @@ -613,10 +613,10 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIClient", "ListByTags", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go index c09262e95287..48c13201d05f 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go @@ -79,7 +79,7 @@ func (client APIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGr {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, @@ -509,10 +509,10 @@ func (client APIDiagnosticClient) ListByService(ctx context.Context, resourceGro {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIDiagnosticClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go index c1132a657e3a..6f8b1d14a03c 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go @@ -484,10 +484,10 @@ func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go index 807f24c6d131..ad0e7f29cd2c 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go @@ -507,10 +507,10 @@ func (client APIIssueAttachmentClient) ListByService(ctx context.Context, resour {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueAttachmentClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go index 1d459535818d..038cb9f4723d 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go @@ -506,10 +506,10 @@ func (client APIIssueCommentClient) ListByService(ctx context.Context, resourceG {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIIssueCommentClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go index 4e8c7a7201a0..75a484ecd459 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go @@ -496,10 +496,10 @@ func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupNam {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIOperationClient", "ListByAPI", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go index 58f0eb7e7b08..04bcd8a8e457 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go @@ -74,10 +74,10 @@ func (client APIProductClient) ListByApis(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIProductClient", "ListByApis", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go index 754cdccc9927..9ff1e8c234d4 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go @@ -473,10 +473,10 @@ func (client APIReleaseClient) List(ctx context.Context, resourceGroupName strin {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIReleaseClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go index 4e42ba63cdc2..c52f948ead91 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go @@ -74,10 +74,10 @@ func (client APIRevisionsClient) List(ctx context.Context, resourceGroupName str {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIRevisionsClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go index fc8910a2e369..99181a0fffb7 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go @@ -483,10 +483,10 @@ func (client APISchemaClient) ListByAPI(ctx context.Context, resourceGroupName s {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APISchemaClient", "ListByAPI", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go index bee57c9beece..371aef7fce1c 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go @@ -447,10 +447,10 @@ func (client APIVersionSetClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.APIVersionSetClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go index e75297f1db3d..6a8557fcb3fe 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go @@ -454,10 +454,10 @@ func (client AuthorizationServerClient) ListByService(ctx context.Context, resou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.AuthorizationServerClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go index 2ec19087759a..f73f1d4326dd 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go @@ -451,10 +451,10 @@ func (client BackendClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.BackendClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go index 88c8d7b5e71c..5658af282ad5 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/cache.go @@ -451,10 +451,10 @@ func (client CacheClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CacheClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go index d85c555d034c..7fa5a017a11e 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go @@ -454,10 +454,10 @@ func (client CertificateClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.CertificateClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go index e4844af49dca..f067d77fb587 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go @@ -74,7 +74,7 @@ func (client DiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroup {Target: "parameters.DiagnosticContractProperties.Sampling", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.DiagnosticContractProperties.Sampling.Percentage", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.DiagnosticContractProperties.Frontend", Name: validation.Null, Rule: false, @@ -480,10 +480,10 @@ func (client DiagnosticClient) ListByService(ctx context.Context, resourceGroupN {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.DiagnosticClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go index 01f0dee29195..70509ba4d52e 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go @@ -435,10 +435,10 @@ func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGro {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.EmailTemplateClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go index 1ae3ea1f7fd4..bd197ac4a1c6 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go @@ -452,10 +452,10 @@ func (client GroupClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go index 14e56a444cae..039c015ae585 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go @@ -368,10 +368,10 @@ func (client GroupUserClient) List(ctx context.Context, resourceGroupName string {Target: "groupID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.GroupUserClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go index 56735c58dc8c..8a7abe57d03a 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/issue.go @@ -165,10 +165,10 @@ func (client IssueClient) ListByService(ctx context.Context, resourceGroupName s {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.IssueClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go index 84b877728971..d1c28346ccfb 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go @@ -451,10 +451,10 @@ func (client LoggerClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.LoggerClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go index e296db8fe406..08c9496aa30c 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go @@ -244,10 +244,10 @@ func (client NotificationClient) ListByService(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.NotificationClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go index 0a41e66f4202..26907d0a9e63 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go @@ -446,10 +446,10 @@ func (client OpenIDConnectProviderClient) ListByService(ctx context.Context, res {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OpenIDConnectProviderClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go index e6d9ea45bf2b..f2a21e0ad3fb 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go @@ -81,10 +81,10 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.OperationClient", "ListByTags", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go index bd2bc06a03a2..012f0403d105 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go @@ -461,10 +461,10 @@ func (client ProductClient) ListByService(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "ListByService", err.Error()) } @@ -616,10 +616,10 @@ func (client ProductClient) ListByTags(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductClient", "ListByTags", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go index bd147339158b..a15a9cda55ae 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go @@ -370,10 +370,10 @@ func (client ProductAPIClient) ListByProduct(ctx context.Context, resourceGroupN {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductAPIClient", "ListByProduct", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go index daf51b7e9ee4..2cb96a28a548 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go @@ -365,10 +365,10 @@ func (client ProductGroupClient) ListByProduct(ctx context.Context, resourceGrou {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductGroupClient", "ListByProduct", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go index ccb49c53806c..6193312abd6b 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go @@ -82,10 +82,10 @@ func (client ProductSubscriptionsClient) List(ctx context.Context, resourceGroup {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ProductSubscriptionsClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go index 882ef27ad05d..69fdab7d7a82 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go @@ -451,10 +451,10 @@ func (client PropertyClient) ListByService(ctx context.Context, resourceGroupNam {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.PropertyClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go index bb8693e9e3d9..3dc0f32b031b 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go @@ -66,10 +66,10 @@ func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByAPI", err.Error()) } @@ -205,10 +205,10 @@ func (client ReportsClient) ListByGeo(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByGeo", err.Error()) } @@ -346,10 +346,10 @@ func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupNa {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByOperation", err.Error()) } @@ -485,10 +485,10 @@ func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByProduct", err.Error()) } @@ -624,10 +624,10 @@ func (client ReportsClient) ListByRequest(ctx context.Context, resourceGroupName {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByRequest", err.Error()) } @@ -725,10 +725,10 @@ func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGrou {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListBySubscription", err.Error()) } @@ -869,10 +869,10 @@ func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByTime", err.Error()) } @@ -1011,10 +1011,10 @@ func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.ReportsClient", "ListByUser", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go index 030774d7596e..254dce88fbdd 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go @@ -472,10 +472,10 @@ func (client SubscriptionClient) List(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.SubscriptionClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go index 0a610effc44d..ec6828fe12cc 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go @@ -1650,10 +1650,10 @@ func (client TagClient) ListByAPI(ctx context.Context, resourceGroupName string, {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByAPI", err.Error()) } @@ -1808,10 +1808,10 @@ func (client TagClient) ListByOperation(ctx context.Context, resourceGroupName s {Target: "operationID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByOperation", err.Error()) } @@ -1960,10 +1960,10 @@ func (client TagClient) ListByProduct(ctx context.Context, resourceGroupName str {Target: "productID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByProduct", err.Error()) } @@ -2107,10 +2107,10 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go index 6c8fa87c3db6..bd3217ed79db 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go @@ -483,10 +483,10 @@ func (client TagDescriptionClient) ListByAPI(ctx context.Context, resourceGroupN {Target: "apiid", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagDescriptionClient", "ListByAPI", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go index 3d5c703315f9..976b3f8a8fc7 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go @@ -81,10 +81,10 @@ func (client TagResourceClient) ListByService(ctx context.Context, resourceGroup {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.TagResourceClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go index b76b0b2c0e8e..d05939dd2c69 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go @@ -660,10 +660,10 @@ func (client UserClient) ListByService(ctx context.Context, resourceGroupName st {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserClient", "ListByService", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go index 20cf9c36c8f3..8071b17824f5 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go @@ -76,10 +76,10 @@ func (client UserGroupClient) List(ctx context.Context, resourceGroupName string {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserGroupClient", "List", err.Error()) } diff --git a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go index da6bf62a311c..0babd5fa78a9 100644 --- a/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go +++ b/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go @@ -80,10 +80,10 @@ func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName {Target: "userID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("apimanagement.UserSubscriptionClient", "List", err.Error()) } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go index db69e51e29ce..ed3dd18b4f23 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/appplatformapi/interfaces.go @@ -26,7 +26,7 @@ import ( // ServicesClientAPI contains the set of methods on the ServicesClient type. type ServicesClientAPI interface { CheckNameAvailability(ctx context.Context, location string, availabilityParameters appplatform.NameAvailabilityParameters) (result appplatform.NameAvailability, err error) - CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource *appplatform.ServiceResource) (result appplatform.ServicesCreateOrUpdateFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource appplatform.ServiceResource) (result appplatform.ServicesCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.ServicesDeleteFuture, err error) DisableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) EnableTestEndpoint(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.TestKeys, err error) @@ -34,38 +34,38 @@ type ServicesClientAPI interface { List(ctx context.Context, resourceGroupName string) (result appplatform.ServiceResourceListPage, err error) ListBySubscription(ctx context.Context) (result appplatform.ServiceResourceListPage, err error) ListTestKeys(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.TestKeys, err error) - RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest *appplatform.RegenerateTestKeyRequestPayload) (result appplatform.TestKeys, err error) - Update(ctx context.Context, resourceGroupName string, serviceName string, resource *appplatform.ServiceResource) (result appplatform.ServicesUpdateFuture, err error) + RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest appplatform.RegenerateTestKeyRequestPayload) (result appplatform.TestKeys, err error) + Update(ctx context.Context, resourceGroupName string, serviceName string, resource appplatform.ServiceResource) (result appplatform.ServicesUpdateFuture, err error) } var _ ServicesClientAPI = (*appplatform.ServicesClient)(nil) // AppsClientAPI contains the set of methods on the AppsClient type. type AppsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource *appplatform.AppResource) (result appplatform.AppsCreateOrUpdateFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource appplatform.AppResource) (result appplatform.AppsCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, appName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, syncStatus string) (result appplatform.AppResource, err error) GetResourceUploadURL(ctx context.Context, resourceGroupName string, serviceName string, appName string) (result appplatform.ResourceUploadDefinition, err error) List(ctx context.Context, resourceGroupName string, serviceName string) (result appplatform.AppResourceCollectionPage, err error) - Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource *appplatform.AppResource) (result appplatform.AppsUpdateFuture, err error) + Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource appplatform.AppResource) (result appplatform.AppsUpdateFuture, err error) } var _ AppsClientAPI = (*appplatform.AppsClient)(nil) // BindingsClientAPI contains the set of methods on the BindingsClient type. type BindingsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource *appplatform.BindingResource) (result appplatform.BindingResource, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource appplatform.BindingResource) (result appplatform.BindingResource, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string) (result appplatform.BindingResource, err error) List(ctx context.Context, resourceGroupName string, serviceName string, appName string) (result appplatform.BindingResourceCollectionPage, err error) - Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource *appplatform.BindingResource) (result appplatform.BindingResource, err error) + Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource appplatform.BindingResource) (result appplatform.BindingResource, err error) } var _ BindingsClientAPI = (*appplatform.BindingsClient)(nil) // DeploymentsClientAPI contains the set of methods on the DeploymentsClient type. type DeploymentsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource *appplatform.DeploymentResource) (result appplatform.DeploymentsCreateOrUpdateFuture, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource appplatform.DeploymentResource) (result appplatform.DeploymentsCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result autorest.Response, err error) Get(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentResource, err error) GetLogFileURL(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.LogFileURLResponse, err error) @@ -74,7 +74,7 @@ type DeploymentsClientAPI interface { Restart(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentsRestartFuture, err error) Start(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentsStartFuture, err error) Stop(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string) (result appplatform.DeploymentsStopFuture, err error) - Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource *appplatform.DeploymentResource) (result appplatform.DeploymentsUpdateFuture, err error) + Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource appplatform.DeploymentResource) (result appplatform.DeploymentsUpdateFuture, err error) } var _ DeploymentsClientAPI = (*appplatform.DeploymentsClient)(nil) diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go index decc2c25efcc..901e66480740 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/apps.go @@ -48,7 +48,7 @@ func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient // serviceName - the name of the Service resource. // appName - the name of the App resource. // appResource - parameters for the create or update operation -func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource *AppResource) (result AppsCreateOrUpdateFuture, err error) { +func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource) (result AppsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdate") defer func() { @@ -61,25 +61,23 @@ func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName s } if err := validation.Validate([]validation.Validation{ {TargetValue: appResource, - Constraints: []validation.Constraint{{Target: "appResource", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appResource.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appResource.Properties.TemporaryDisk", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appResource.Properties.TemporaryDisk.SizeInGB", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appResource.Properties.TemporaryDisk.SizeInGB", Name: validation.InclusiveMaximum, Rule: int64(5), Chain: nil}, - {Target: "appResource.Properties.TemporaryDisk.SizeInGB", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}, + Constraints: []validation.Constraint{{Target: "appResource.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "appResource.Properties.TemporaryDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "appResource.Properties.TemporaryDisk.SizeInGB", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "appResource.Properties.TemporaryDisk.SizeInGB", Name: validation.InclusiveMaximum, Rule: int64(5), Chain: nil}, + {Target: "appResource.Properties.TemporaryDisk.SizeInGB", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, - {Target: "appResource.Properties.PersistentDisk", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appResource.Properties.PersistentDisk.SizeInGB", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appResource.Properties.PersistentDisk.SizeInGB", Name: validation.InclusiveMaximum, Rule: int64(50), Chain: nil}, - {Target: "appResource.Properties.PersistentDisk.SizeInGB", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}, - {Target: "appResource.Properties.PersistentDisk.UsedInGB", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "appResource.Properties.PersistentDisk.UsedInGB", Name: validation.InclusiveMaximum, Rule: int64(50), Chain: nil}, - {Target: "appResource.Properties.PersistentDisk.UsedInGB", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}, - }}, }}, + {Target: "appResource.Properties.PersistentDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "appResource.Properties.PersistentDisk.SizeInGB", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "appResource.Properties.PersistentDisk.SizeInGB", Name: validation.InclusiveMaximum, Rule: int64(50), Chain: nil}, + {Target: "appResource.Properties.PersistentDisk.SizeInGB", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "appResource.Properties.PersistentDisk.UsedInGB", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "appResource.Properties.PersistentDisk.UsedInGB", Name: validation.InclusiveMaximum, Rule: int64(50), Chain: nil}, + {Target: "appResource.Properties.PersistentDisk.UsedInGB", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, }}}}}); err != nil { return result, validation.NewError("appplatform.AppsClient", "CreateOrUpdate", err.Error()) } @@ -100,7 +98,7 @@ func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName s } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource *AppResource) (*http.Request, error) { +func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "appName": autorest.Encode("path", appName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -118,11 +116,8 @@ func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGro autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}", pathParameters), + autorest.WithJSON(appResource), autorest.WithQueryParameters(queryParameters)) - if appResource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(appResource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -518,7 +513,7 @@ func (client AppsClient) ListComplete(ctx context.Context, resourceGroupName str // serviceName - the name of the Service resource. // appName - the name of the App resource. // appResource - parameters for the update operation -func (client AppsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource *AppResource) (result AppsUpdateFuture, err error) { +func (client AppsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource) (result AppsUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Update") defer func() { @@ -545,7 +540,7 @@ func (client AppsClient) Update(ctx context.Context, resourceGroupName string, s } // UpdatePreparer prepares the Update request. -func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource *AppResource) (*http.Request, error) { +func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, appResource AppResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "appName": autorest.Encode("path", appName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -563,11 +558,8 @@ func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName s autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}", pathParameters), + autorest.WithJSON(appResource), autorest.WithQueryParameters(queryParameters)) - if appResource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(appResource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go index b03a7c626007..dd8a40ebcad7 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/bindings.go @@ -48,7 +48,7 @@ func NewBindingsClientWithBaseURI(baseURI string, subscriptionID string) Binding // appName - the name of the App resource. // bindingName - the name of the Binding resource. // bindingResource - parameters for the create or update operation -func (client BindingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource *BindingResource) (result BindingResource, err error) { +func (client BindingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource) (result BindingResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BindingsClient.CreateOrUpdate") defer func() { @@ -81,7 +81,7 @@ func (client BindingsClient) CreateOrUpdate(ctx context.Context, resourceGroupNa } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client BindingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource *BindingResource) (*http.Request, error) { +func (client BindingsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "appName": autorest.Encode("path", appName), "bindingName": autorest.Encode("path", bindingName), @@ -100,11 +100,8 @@ func (client BindingsClient) CreateOrUpdatePreparer(ctx context.Context, resourc autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}", pathParameters), + autorest.WithJSON(bindingResource), autorest.WithQueryParameters(queryParameters)) - if bindingResource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(bindingResource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -417,7 +414,7 @@ func (client BindingsClient) ListComplete(ctx context.Context, resourceGroupName // appName - the name of the App resource. // bindingName - the name of the Binding resource. // bindingResource - parameters for the update operation -func (client BindingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource *BindingResource) (result BindingResource, err error) { +func (client BindingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource) (result BindingResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BindingsClient.Update") defer func() { @@ -450,7 +447,7 @@ func (client BindingsClient) Update(ctx context.Context, resourceGroupName strin } // UpdatePreparer prepares the Update request. -func (client BindingsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource *BindingResource) (*http.Request, error) { +func (client BindingsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, bindingName string, bindingResource BindingResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "appName": autorest.Encode("path", appName), "bindingName": autorest.Encode("path", bindingName), @@ -469,11 +466,8 @@ func (client BindingsClient) UpdatePreparer(ctx context.Context, resourceGroupNa autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}", pathParameters), + autorest.WithJSON(bindingResource), autorest.WithQueryParameters(queryParameters)) - if bindingResource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(bindingResource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go index a1837b1c1a02..5b701f3829bc 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/deployments.go @@ -49,7 +49,7 @@ func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) Depl // appName - the name of the App resource. // deploymentName - the name of the Deployment resource. // deploymentResource - parameters for the create or update operation -func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource *DeploymentResource) (result DeploymentsCreateOrUpdateFuture, err error) { +func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource) (result DeploymentsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CreateOrUpdate") defer func() { @@ -62,22 +62,20 @@ func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGrou } if err := validation.Validate([]validation.Validation{ {TargetValue: deploymentResource, - Constraints: []validation.Constraint{{Target: "deploymentResource", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "deploymentResource.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.CPU", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.CPU", Name: validation.InclusiveMaximum, Rule: int64(4), Chain: nil}, - {Target: "deploymentResource.Properties.DeploymentSettings.CPU", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, - }}, - {Target: "deploymentResource.Properties.DeploymentSettings.MemoryInGB", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.MemoryInGB", Name: validation.InclusiveMaximum, Rule: int64(8), Chain: nil}, - {Target: "deploymentResource.Properties.DeploymentSettings.MemoryInGB", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, - }}, - {Target: "deploymentResource.Properties.DeploymentSettings.InstanceCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.InstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "deploymentResource.Properties.DeploymentSettings.InstanceCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, - }}, + Constraints: []validation.Constraint{{Target: "deploymentResource.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.CPU", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.CPU", Name: validation.InclusiveMaximum, Rule: int64(4), Chain: nil}, + {Target: "deploymentResource.Properties.DeploymentSettings.CPU", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, + {Target: "deploymentResource.Properties.DeploymentSettings.MemoryInGB", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.MemoryInGB", Name: validation.InclusiveMaximum, Rule: int64(8), Chain: nil}, + {Target: "deploymentResource.Properties.DeploymentSettings.MemoryInGB", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, + {Target: "deploymentResource.Properties.DeploymentSettings.InstanceCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "deploymentResource.Properties.DeploymentSettings.InstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, + {Target: "deploymentResource.Properties.DeploymentSettings.InstanceCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}, }}, }}}}}); err != nil { return result, validation.NewError("appplatform.DeploymentsClient", "CreateOrUpdate", err.Error()) @@ -99,7 +97,7 @@ func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGrou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource *DeploymentResource) (*http.Request, error) { +func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "appName": autorest.Encode("path", appName), "deploymentName": autorest.Encode("path", deploymentName), @@ -118,11 +116,8 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}", pathParameters), + autorest.WithJSON(deploymentResource), autorest.WithQueryParameters(queryParameters)) - if deploymentResource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(deploymentResource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -890,7 +885,7 @@ func (client DeploymentsClient) StopResponder(resp *http.Response) (result autor // appName - the name of the App resource. // deploymentName - the name of the Deployment resource. // deploymentResource - parameters for the update operation -func (client DeploymentsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource *DeploymentResource) (result DeploymentsUpdateFuture, err error) { +func (client DeploymentsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource) (result DeploymentsUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Update") defer func() { @@ -917,7 +912,7 @@ func (client DeploymentsClient) Update(ctx context.Context, resourceGroupName st } // UpdatePreparer prepares the Update request. -func (client DeploymentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource *DeploymentResource) (*http.Request, error) { +func (client DeploymentsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, appName string, deploymentName string, deploymentResource DeploymentResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "appName": autorest.Encode("path", appName), "deploymentName": autorest.Encode("path", deploymentName), @@ -936,11 +931,8 @@ func (client DeploymentsClient) UpdatePreparer(ctx context.Context, resourceGrou autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}", pathParameters), + autorest.WithJSON(deploymentResource), autorest.WithQueryParameters(queryParameters)) - if deploymentResource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(deploymentResource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go index 6f2c3a817fec..7c3229668f90 100644 --- a/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go +++ b/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform/services.go @@ -132,7 +132,7 @@ func (client ServicesClient) CheckNameAvailabilityResponder(resp *http.Response) // from the Azure Resource Manager API or the portal. // serviceName - the name of the Service resource. // resource - parameters for the create or update operation -func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource *ServiceResource) (result ServicesCreateOrUpdateFuture, err error) { +func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource) (result ServicesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.CreateOrUpdate") defer func() { @@ -145,13 +145,11 @@ func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa } if err := validation.Validate([]validation.Validation{ {TargetValue: resource, - Constraints: []validation.Constraint{{Target: "resource", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "resource.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties.ConfigServer", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties.ConfigServer.GitProperty", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties.ConfigServer.GitProperty.URI", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, + Constraints: []validation.Constraint{{Target: "resource.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties.ConfigServer", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties.ConfigServer.GitProperty", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "resource.Properties.ConfigServerProperties.ConfigServer.GitProperty.URI", Name: validation.Null, Rule: true, Chain: nil}}}, }}, }}, }}}}}); err != nil { @@ -174,7 +172,7 @@ func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, resource *ServiceResource) (*http.Request, error) { +func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), @@ -191,11 +189,8 @@ func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourc autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}", pathParameters), + autorest.WithJSON(resource), autorest.WithQueryParameters(queryParameters)) - if resource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(resource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -843,7 +838,7 @@ func (client ServicesClient) ListTestKeysResponder(resp *http.Response) (result // from the Azure Resource Manager API or the portal. // serviceName - the name of the Service resource. // regenerateTestKeyRequest - parameters for the operation -func (client ServicesClient) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest *RegenerateTestKeyRequestPayload) (result TestKeys, err error) { +func (client ServicesClient) RegenerateTestKey(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload) (result TestKeys, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.RegenerateTestKey") defer func() { @@ -876,7 +871,7 @@ func (client ServicesClient) RegenerateTestKey(ctx context.Context, resourceGrou } // RegenerateTestKeyPreparer prepares the RegenerateTestKey request. -func (client ServicesClient) RegenerateTestKeyPreparer(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest *RegenerateTestKeyRequestPayload) (*http.Request, error) { +func (client ServicesClient) RegenerateTestKeyPreparer(ctx context.Context, resourceGroupName string, serviceName string, regenerateTestKeyRequest RegenerateTestKeyRequestPayload) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), @@ -893,11 +888,8 @@ func (client ServicesClient) RegenerateTestKeyPreparer(ctx context.Context, reso autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/regenerateTestKey", pathParameters), + autorest.WithJSON(regenerateTestKeyRequest), autorest.WithQueryParameters(queryParameters)) - if regenerateTestKeyRequest != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(regenerateTestKeyRequest)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -927,7 +919,7 @@ func (client ServicesClient) RegenerateTestKeyResponder(resp *http.Response) (re // from the Azure Resource Manager API or the portal. // serviceName - the name of the Service resource. // resource - parameters for the update operation -func (client ServicesClient) Update(ctx context.Context, resourceGroupName string, serviceName string, resource *ServiceResource) (result ServicesUpdateFuture, err error) { +func (client ServicesClient) Update(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource) (result ServicesUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.Update") defer func() { @@ -954,7 +946,7 @@ func (client ServicesClient) Update(ctx context.Context, resourceGroupName strin } // UpdatePreparer prepares the Update request. -func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, resource *ServiceResource) (*http.Request, error) { +func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, resource ServiceResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serviceName": autorest.Encode("path", serviceName), @@ -971,11 +963,8 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupNa autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}", pathParameters), + autorest.WithJSON(resource), autorest.WithQueryParameters(queryParameters)) - if resource != nil { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithJSON(resource)) - } return preparer.Prepare((&http.Request{}).WithContext(ctx)) } diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go new file mode 100644 index 000000000000..666c6350b0c5 --- /dev/null +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/azuredataapi/interfaces.go @@ -0,0 +1,53 @@ +package azuredataapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata" + "github.com/Azure/go-autorest/autorest" +) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result azuredata.OperationListResultPage, err error) +} + +var _ OperationsClientAPI = (*azuredata.OperationsClient)(nil) + +// SQLServerRegistrationsClientAPI contains the set of methods on the SQLServerRegistrationsClient type. +type SQLServerRegistrationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, parameters azuredata.SQLServerRegistration) (result azuredata.SQLServerRegistration, err error) + Delete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (result azuredata.SQLServerRegistration, err error) + List(ctx context.Context) (result azuredata.SQLServerRegistrationListResultPage, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result azuredata.SQLServerRegistrationListResultPage, err error) + Update(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, parameters azuredata.SQLServerRegistrationUpdate) (result azuredata.SQLServerRegistration, err error) +} + +var _ SQLServerRegistrationsClientAPI = (*azuredata.SQLServerRegistrationsClient)(nil) + +// SQLServersClientAPI contains the set of methods on the SQLServersClient type. +type SQLServersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string, parameters azuredata.SQLServer) (result azuredata.SQLServer, err error) + Delete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string, expand string) (result azuredata.SQLServer, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, expand string) (result azuredata.SQLServerListResultPage, err error) +} + +var _ SQLServersClientAPI = (*azuredata.SQLServersClient)(nil) diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go new file mode 100644 index 000000000000..ce715030929f --- /dev/null +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/client.go @@ -0,0 +1,52 @@ +// Package azuredata implements the Azure ARM Azuredata service API version 2017-03-01-preview. +// +// The AzureData management API provides a RESTful set of web APIs to manage Azure Data Resources. For example, +// register, delete and retrieve a SQL Server, SQL Server registration. +package azuredata + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Azuredata + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Azuredata. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/models.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/models.go new file mode 100644 index 000000000000..cf5a00aeee06 --- /dev/null +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/models.go @@ -0,0 +1,774 @@ +package azuredata + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata" + +// OperationOrigin enumerates the values for operation origin. +type OperationOrigin string + +const ( + // System ... + System OperationOrigin = "system" + // User ... + User OperationOrigin = "user" +) + +// PossibleOperationOriginValues returns an array of possible values for the OperationOrigin const type. +func PossibleOperationOriginValues() []OperationOrigin { + return []OperationOrigin{System, User} +} + +// Operation SQL REST API operation definition. +type Operation struct { + // Name - READ-ONLY; The name of the operation being performed on this particular object. + Name *string `json:"name,omitempty"` + // Display - READ-ONLY; The localized display information for this particular operation / action. + Display *OperationDisplay `json:"display,omitempty"` + // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'User', 'System' + Origin OperationOrigin `json:"origin,omitempty"` + // Properties - READ-ONLY; Additional descriptions for the operation. + Properties map[string]interface{} `json:"properties"` +} + +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// OperationDisplay display metadata associated with the operation. +type OperationDisplay struct { + // Provider - READ-ONLY; The localized friendly form of the resource provider name. + Provider *string `json:"provider,omitempty"` + // Resource - READ-ONLY; The localized friendly form of the resource type related to this action/operation. + Resource *string `json:"resource,omitempty"` + // Operation - READ-ONLY; The localized friendly name for the operation. + Operation *string `json:"operation,omitempty"` + // Description - READ-ONLY; The localized friendly description for the operation. + Description *string `json:"description,omitempty"` +} + +// OperationListResult result of the request to list SQL operations. +type OperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]Operation `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultIterator provides access to a complete listing of Operation values. +type OperationListResultIterator struct { + i int + page OperationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OperationListResultIterator) Response() OperationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OperationListResultIterator) Value() Operation { + if !iter.page.NotDone() { + return Operation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (olr OperationListResult) IsEmpty() bool { + return olr.Value == nil || len(*olr.Value) == 0 +} + +// operationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(olr.NextLink))) +} + +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationListResultPage) Response() OperationListResult { + return page.olr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { + return nil + } + return *page.olr.Value +} + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + +// ProxyResource ARM proxy resource. +type ProxyResource struct { + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// Resource ARM resource. +type Resource struct { + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// SQLServer a SQL server. +type SQLServer struct { + autorest.Response `json:"-"` + // SQLServerProperties - Resource properties. + *SQLServerProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLServer. +func (ss SQLServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ss.SQLServerProperties != nil { + objectMap["properties"] = ss.SQLServerProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLServer struct. +func (ss *SQLServer) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var SQLServerProperties SQLServerProperties + err = json.Unmarshal(*v, &SQLServerProperties) + if err != nil { + return err + } + ss.SQLServerProperties = &SQLServerProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ss.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ss.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ss.Type = &typeVar + } + } + } + + return nil +} + +// SQLServerListResult a list of SQL servers. +type SQLServerListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLServer `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SQLServerListResultIterator provides access to a complete listing of SQLServer values. +type SQLServerListResultIterator struct { + i int + page SQLServerListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SQLServerListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SQLServerListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLServerListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SQLServerListResultIterator) Response() SQLServerListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SQLServerListResultIterator) Value() SQLServer { + if !iter.page.NotDone() { + return SQLServer{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLServerListResultIterator type. +func NewSQLServerListResultIterator(page SQLServerListResultPage) SQLServerListResultIterator { + return SQLServerListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sslr SQLServerListResult) IsEmpty() bool { + return sslr.Value == nil || len(*sslr.Value) == 0 +} + +// sQLServerListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sslr SQLServerListResult) sQLServerListResultPreparer(ctx context.Context) (*http.Request, error) { + if sslr.NextLink == nil || len(to.String(sslr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sslr.NextLink))) +} + +// SQLServerListResultPage contains a page of SQLServer values. +type SQLServerListResultPage struct { + fn func(context.Context, SQLServerListResult) (SQLServerListResult, error) + sslr SQLServerListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SQLServerListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.sslr) + if err != nil { + return err + } + page.sslr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SQLServerListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLServerListResultPage) NotDone() bool { + return !page.sslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLServerListResultPage) Response() SQLServerListResult { + return page.sslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLServerListResultPage) Values() []SQLServer { + if page.sslr.IsEmpty() { + return nil + } + return *page.sslr.Value +} + +// Creates a new instance of the SQLServerListResultPage type. +func NewSQLServerListResultPage(getNextPage func(context.Context, SQLServerListResult) (SQLServerListResult, error)) SQLServerListResultPage { + return SQLServerListResultPage{fn: getNextPage} +} + +// SQLServerProperties the SQL server properties. +type SQLServerProperties struct { + // Cores - Cores of the Sql Server. + Cores *int32 `json:"cores,omitempty"` + // Version - Version of the Sql Server. + Version *string `json:"version,omitempty"` + // Edition - Sql Server Edition. + Edition *string `json:"edition,omitempty"` + // RegistrationID - ID for Parent Sql Server Registration. + RegistrationID *string `json:"registrationID,omitempty"` + // PropertyBag - Sql Server Json Property Bag. + PropertyBag *string `json:"propertyBag,omitempty"` +} + +// SQLServerRegistration a SQL server registration. +type SQLServerRegistration struct { + autorest.Response `json:"-"` + // SQLServerRegistrationProperties - Resource properties. + *SQLServerRegistrationProperties `json:"properties,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for SQLServerRegistration. +func (ssr SQLServerRegistration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssr.SQLServerRegistrationProperties != nil { + objectMap["properties"] = ssr.SQLServerRegistrationProperties + } + if ssr.Location != nil { + objectMap["location"] = ssr.Location + } + if ssr.Tags != nil { + objectMap["tags"] = ssr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SQLServerRegistration struct. +func (ssr *SQLServerRegistration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var SQLServerRegistrationProperties SQLServerRegistrationProperties + err = json.Unmarshal(*v, &SQLServerRegistrationProperties) + if err != nil { + return err + } + ssr.SQLServerRegistrationProperties = &SQLServerRegistrationProperties + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ssr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ssr.Tags = tags + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ssr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ssr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ssr.Type = &typeVar + } + } + } + + return nil +} + +// SQLServerRegistrationListResult server. +type SQLServerRegistrationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]SQLServerRegistration `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// SQLServerRegistrationListResultIterator provides access to a complete listing of SQLServerRegistration +// values. +type SQLServerRegistrationListResultIterator struct { + i int + page SQLServerRegistrationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SQLServerRegistrationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SQLServerRegistrationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SQLServerRegistrationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SQLServerRegistrationListResultIterator) Response() SQLServerRegistrationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SQLServerRegistrationListResultIterator) Value() SQLServerRegistration { + if !iter.page.NotDone() { + return SQLServerRegistration{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SQLServerRegistrationListResultIterator type. +func NewSQLServerRegistrationListResultIterator(page SQLServerRegistrationListResultPage) SQLServerRegistrationListResultIterator { + return SQLServerRegistrationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ssrlr SQLServerRegistrationListResult) IsEmpty() bool { + return ssrlr.Value == nil || len(*ssrlr.Value) == 0 +} + +// sQLServerRegistrationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ssrlr SQLServerRegistrationListResult) sQLServerRegistrationListResultPreparer(ctx context.Context) (*http.Request, error) { + if ssrlr.NextLink == nil || len(to.String(ssrlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ssrlr.NextLink))) +} + +// SQLServerRegistrationListResultPage contains a page of SQLServerRegistration values. +type SQLServerRegistrationListResultPage struct { + fn func(context.Context, SQLServerRegistrationListResult) (SQLServerRegistrationListResult, error) + ssrlr SQLServerRegistrationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SQLServerRegistrationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ssrlr) + if err != nil { + return err + } + page.ssrlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SQLServerRegistrationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SQLServerRegistrationListResultPage) NotDone() bool { + return !page.ssrlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SQLServerRegistrationListResultPage) Response() SQLServerRegistrationListResult { + return page.ssrlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SQLServerRegistrationListResultPage) Values() []SQLServerRegistration { + if page.ssrlr.IsEmpty() { + return nil + } + return *page.ssrlr.Value +} + +// Creates a new instance of the SQLServerRegistrationListResultPage type. +func NewSQLServerRegistrationListResultPage(getNextPage func(context.Context, SQLServerRegistrationListResult) (SQLServerRegistrationListResult, error)) SQLServerRegistrationListResultPage { + return SQLServerRegistrationListResultPage{fn: getNextPage} +} + +// SQLServerRegistrationProperties the SQL server Registration properties. +type SQLServerRegistrationProperties struct { + // SubscriptionID - Subscription Id + SubscriptionID *uuid.UUID `json:"subscriptionId,omitempty"` + // ResourceGroup - Resource Group Name + ResourceGroup *string `json:"resourceGroup,omitempty"` + // PropertyBag - Optional Properties as JSON string + PropertyBag *string `json:"propertyBag,omitempty"` +} + +// SQLServerRegistrationUpdate an update to a SQL Server Registration. +type SQLServerRegistrationUpdate struct { + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for SQLServerRegistrationUpdate. +func (ssru SQLServerRegistrationUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ssru.Tags != nil { + objectMap["tags"] = ssru.Tags + } + return json.Marshal(objectMap) +} + +// TrackedResource ARM tracked top level resource. +type TrackedResource struct { + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for TrackedResource. +func (tr TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Location != nil { + objectMap["location"] = tr.Location + } + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + return json.Marshal(objectMap) +} diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go new file mode 100644 index 000000000000..28e7bd30911f --- /dev/null +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/operations.go @@ -0,0 +1,148 @@ +package azuredata + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the the AzureData management API provides a RESTful set of web APIs to manage Azure Data +// Resources. For example, register, delete and retrieve a SQL Server, SQL Server registration. +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available SQL Server Registration API operations. +func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.olr.Response.Response != nil { + sc = result.olr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.olr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.olr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.AzureData/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.operationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "azuredata.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "azuredata.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go new file mode 100644 index 000000000000..e6a988feae73 --- /dev/null +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlserverregistrations.go @@ -0,0 +1,583 @@ +package azuredata + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SQLServerRegistrationsClient is the the AzureData management API provides a RESTful set of web APIs to manage Azure +// Data Resources. For example, register, delete and retrieve a SQL Server, SQL Server registration. +type SQLServerRegistrationsClient struct { + BaseClient +} + +// NewSQLServerRegistrationsClient creates an instance of the SQLServerRegistrationsClient client. +func NewSQLServerRegistrationsClient(subscriptionID string) SQLServerRegistrationsClient { + return NewSQLServerRegistrationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLServerRegistrationsClientWithBaseURI creates an instance of the SQLServerRegistrationsClient client. +func NewSQLServerRegistrationsClientWithBaseURI(baseURI string, subscriptionID string) SQLServerRegistrationsClient { + return SQLServerRegistrationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a SQL Server registration. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +// parameters - the SQL Server registration to be created or updated. +func (client SQLServerRegistrationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, parameters SQLServerRegistration) (result SQLServerRegistration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, SQLServerRegistrationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLServerRegistrationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, parameters SQLServerRegistration) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServerRegistrationsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLServerRegistrationsClient) CreateOrUpdateResponder(resp *http.Response) (result SQLServerRegistration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a SQL Server registration. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +func (client SQLServerRegistrationsClient) Delete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, SQLServerRegistrationName) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLServerRegistrationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServerRegistrationsClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLServerRegistrationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a SQL Server registration. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +func (client SQLServerRegistrationsClient) Get(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (result SQLServerRegistration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, SQLServerRegistrationName) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLServerRegistrationsClient) GetPreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServerRegistrationsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLServerRegistrationsClient) GetResponder(resp *http.Response) (result SQLServerRegistration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all SQL Server registrations in a subscription. +func (client SQLServerRegistrationsClient) List(ctx context.Context) (result SQLServerRegistrationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.List") + defer func() { + sc := -1 + if result.ssrlr.Response.Response != nil { + sc = result.ssrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ssrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "List", resp, "Failure sending request") + return + } + + result.ssrlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client SQLServerRegistrationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.AzureData/sqlServerRegistrations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServerRegistrationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SQLServerRegistrationsClient) ListResponder(resp *http.Response) (result SQLServerRegistrationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client SQLServerRegistrationsClient) listNextResults(ctx context.Context, lastResults SQLServerRegistrationListResult) (result SQLServerRegistrationListResult, err error) { + req, err := lastResults.sQLServerRegistrationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLServerRegistrationsClient) ListComplete(ctx context.Context) (result SQLServerRegistrationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup gets all SQL Server registrations in a resource group. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +func (client SQLServerRegistrationsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SQLServerRegistrationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ssrlr.Response.Response != nil { + sc = result.ssrlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ssrlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ssrlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SQLServerRegistrationsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServerRegistrationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SQLServerRegistrationsClient) ListByResourceGroupResponder(resp *http.Response) (result SQLServerRegistrationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client SQLServerRegistrationsClient) listByResourceGroupNextResults(ctx context.Context, lastResults SQLServerRegistrationListResult) (result SQLServerRegistrationListResult, err error) { + req, err := lastResults.sQLServerRegistrationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLServerRegistrationsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SQLServerRegistrationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// Update updates SQL Server Registration tags. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +// parameters - the SQL Server Registration. +func (client SQLServerRegistrationsClient) Update(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, parameters SQLServerRegistrationUpdate) (result SQLServerRegistration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServerRegistrationsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, SQLServerRegistrationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServerRegistrationsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client SQLServerRegistrationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, parameters SQLServerRegistrationUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServerRegistrationsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SQLServerRegistrationsClient) UpdateResponder(resp *http.Response) (result SQLServerRegistration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go new file mode 100644 index 000000000000..d468ae57e832 --- /dev/null +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/sqlservers.go @@ -0,0 +1,408 @@ +package azuredata + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SQLServersClient is the the AzureData management API provides a RESTful set of web APIs to manage Azure Data +// Resources. For example, register, delete and retrieve a SQL Server, SQL Server registration. +type SQLServersClient struct { + BaseClient +} + +// NewSQLServersClient creates an instance of the SQLServersClient client. +func NewSQLServersClient(subscriptionID string) SQLServersClient { + return NewSQLServersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSQLServersClientWithBaseURI creates an instance of the SQLServersClient client. +func NewSQLServersClientWithBaseURI(baseURI string, subscriptionID string) SQLServersClient { + return SQLServersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a SQL Server. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +// SQLServerName - name of the SQL Server. +// parameters - the SQL Server to be created or updated. +func (client SQLServersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string, parameters SQLServer) (result SQLServer, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, SQLServerRegistrationName, SQLServerName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SQLServersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string, parameters SQLServer) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerName": autorest.Encode("path", SQLServerName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers/{sqlServerName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SQLServersClient) CreateOrUpdateResponder(resp *http.Response) (result SQLServer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a SQL Server. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +// SQLServerName - name of the SQL Server. +func (client SQLServersClient) Delete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServersClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, SQLServerRegistrationName, SQLServerName) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SQLServersClient) DeletePreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerName": autorest.Encode("path", SQLServerName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers/{sqlServerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServersClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SQLServersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a SQL Server. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +// SQLServerName - name of the SQL Server. +// expand - the child resources to include in the response. +func (client SQLServersClient) Get(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string, expand string) (result SQLServer, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, SQLServerRegistrationName, SQLServerName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SQLServersClient) GetPreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, SQLServerName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerName": autorest.Encode("path", SQLServerName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers/{sqlServerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SQLServersClient) GetResponder(resp *http.Response) (result SQLServer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup gets all SQL Servers in a SQL Server Registration. +// Parameters: +// resourceGroupName - name of the resource group that contains the resource. You can obtain this value from +// the Azure Resource Manager API or the portal. +// SQLServerRegistrationName - name of the SQL Server registration. +// expand - the child resources to include in the response. +func (client SQLServersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, expand string) (result SQLServerListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.sslr.Response.Response != nil { + sc = result.sslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, SQLServerRegistrationName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.sslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.sslr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SQLServersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "sqlServerRegistrationName": autorest.Encode("path", SQLServerRegistrationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client SQLServersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SQLServersClient) ListByResourceGroupResponder(resp *http.Response) (result SQLServerListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client SQLServersClient) listByResourceGroupNextResults(ctx context.Context, lastResults SQLServerListResult) (result SQLServerListResult, err error) { + req, err := lastResults.sQLServerListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "azuredata.SQLServersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client SQLServersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, SQLServerRegistrationName string, expand string) (result SQLServerListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SQLServersClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, SQLServerRegistrationName, expand) + return +} diff --git a/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/version.go b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/version.go new file mode 100644 index 000000000000..2cf01b88e3f9 --- /dev/null +++ b/services/preview/azuredata/mgmt/2017-03-01-preview/azuredata/version.go @@ -0,0 +1,30 @@ +package azuredata + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " azuredata/2017-03-01-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go index f122a0bc4339..cdf765d0babb 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/clusters.go @@ -360,7 +360,7 @@ func (client ClustersClient) List(ctx context.Context, filter string, selectPara {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.ClustersClient", "List", err.Error()) } @@ -497,7 +497,7 @@ func (client ClustersClient) ListByResourceGroup(ctx context.Context, resourceGr {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.ClustersClient", "ListByResourceGroup", err.Error()) } diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go index 69d092195740..861d6fd2e11d 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/fileservers.go @@ -346,7 +346,7 @@ func (client FileServersClient) List(ctx context.Context, filter string, selectP {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.FileServersClient", "List", err.Error()) } @@ -484,7 +484,7 @@ func (client FileServersClient) ListByResourceGroup(ctx context.Context, resourc {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.FileServersClient", "ListByResourceGroup", err.Error()) } diff --git a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go index 198240819a71..1b94df13f957 100644 --- a/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go +++ b/services/preview/batchai/mgmt/2017-09-01-preview/batchai/jobs.go @@ -361,7 +361,7 @@ func (client JobsClient) List(ctx context.Context, filter string, selectParamete {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "List", err.Error()) } @@ -498,7 +498,7 @@ func (client JobsClient) ListByResourceGroup(ctx context.Context, resourceGroupN {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "ListByResourceGroup", err.Error()) } @@ -645,12 +645,12 @@ func (client JobsClient) ListOutputFiles(ctx context.Context, resourceGroupName {TargetValue: linkexpiryinminutes, Constraints: []validation.Constraint{{Target: "linkexpiryinminutes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "linkexpiryinminutes", Name: validation.InclusiveMaximum, Rule: int64(600), Chain: nil}, - {Target: "linkexpiryinminutes", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "linkexpiryinminutes", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("batchai.JobsClient", "ListOutputFiles", err.Error()) } diff --git a/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go b/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go index d8455dcc59e0..866f909f13d9 100644 --- a/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go +++ b/services/preview/billing/mgmt/2017-02-27-preview/billing/invoices.go @@ -220,7 +220,7 @@ func (client InvoicesClient) List(ctx context.Context, expand string, filter str {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("billing.InvoicesClient", "List", err.Error()) } diff --git a/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go b/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go index 068d1a09ea2f..924eadeeb3cd 100644 --- a/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go +++ b/services/preview/billing/mgmt/2017-04-24-preview/billing/invoices.go @@ -220,7 +220,7 @@ func (client InvoicesClient) List(ctx context.Context, expand string, filter str {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("billing.InvoicesClient", "List", err.Error()) } diff --git a/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go b/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go index ce2364b95413..5494ab385ae6 100644 --- a/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go +++ b/services/preview/billing/mgmt/2017-04-24-preview/billing/periods.go @@ -141,7 +141,7 @@ func (client PeriodsClient) List(ctx context.Context, filter string, skiptoken s {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("billing.PeriodsClient", "List", err.Error()) } diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go index dcad6de44ced..5b8278b4d4f4 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/invoices.go @@ -221,7 +221,7 @@ func (client InvoicesClient) List(ctx context.Context, expand string, filter str {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("billing.InvoicesClient", "List", err.Error()) } diff --git a/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go b/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go index 3597327b92ef..c3a7bdca4b14 100644 --- a/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go +++ b/services/preview/billing/mgmt/2018-03-01-preview/billing/periods.go @@ -142,7 +142,7 @@ func (client PeriodsClient) List(ctx context.Context, filter string, skiptoken s {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("billing.PeriodsClient", "List", err.Error()) } diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/models.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/models.go index f4602b5c1f7a..3a127245afe6 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/models.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/models.go @@ -30,23 +30,23 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cdn/mgmt/2019-06-15-preview/cdn" -// Action enumerates the values for action. -type Action string +// ActionType enumerates the values for action type. +type ActionType string const ( // Allow ... - Allow Action = "Allow" + Allow ActionType = "Allow" // Block ... - Block Action = "Block" + Block ActionType = "Block" // Log ... - Log Action = "Log" + Log ActionType = "Log" // Redirect ... - Redirect Action = "Redirect" + Redirect ActionType = "Redirect" ) -// PossibleActionValues returns an array of possible values for the Action const type. -func PossibleActionValues() []Action { - return []Action{Allow, Block, Log, Redirect} +// PossibleActionTypeValues returns an array of possible values for the ActionType const type. +func PossibleActionTypeValues() []ActionType { + return []ActionType{Allow, Block, Log, Redirect} } // CacheBehavior enumerates the values for cache behavior. @@ -98,6 +98,35 @@ func PossibleCertificateTypeValues() []CertificateType { return []CertificateType{Dedicated, Shared} } +// CookiesOperator enumerates the values for cookies operator. +type CookiesOperator string + +const ( + // Any ... + Any CookiesOperator = "Any" + // BeginsWith ... + BeginsWith CookiesOperator = "BeginsWith" + // Contains ... + Contains CookiesOperator = "Contains" + // EndsWith ... + EndsWith CookiesOperator = "EndsWith" + // Equal ... + Equal CookiesOperator = "Equal" + // GreaterThan ... + GreaterThan CookiesOperator = "GreaterThan" + // GreaterThanOrEqual ... + GreaterThanOrEqual CookiesOperator = "GreaterThanOrEqual" + // LessThan ... + LessThan CookiesOperator = "LessThan" + // LessThanOrEqual ... + LessThanOrEqual CookiesOperator = "LessThanOrEqual" +) + +// PossibleCookiesOperatorValues returns an array of possible values for the CookiesOperator const type. +func PossibleCookiesOperatorValues() []CookiesOperator { + return []CookiesOperator{Any, BeginsWith, Contains, EndsWith, Equal, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual} +} + // CustomDomainResourceState enumerates the values for custom domain resource state. type CustomDomainResourceState string @@ -298,12 +327,33 @@ func PossibleMatchVariableValues() []MatchVariable { return []MatchVariable{Cookies, Country, PostArgs, QueryString, RemoteAddr, RequestBody, RequestHeader, RequestMethod, RequestURI} } +// MinimumTLSVersion enumerates the values for minimum tls version. +type MinimumTLSVersion string + +const ( + // None ... + None MinimumTLSVersion = "None" + // TLS10 ... + TLS10 MinimumTLSVersion = "TLS10" + // TLS12 ... + TLS12 MinimumTLSVersion = "TLS12" +) + +// PossibleMinimumTLSVersionValues returns an array of possible values for the MinimumTLSVersion const type. +func PossibleMinimumTLSVersionValues() []MinimumTLSVersion { + return []MinimumTLSVersion{None, TLS10, TLS12} +} + // Name enumerates the values for name. type Name string const ( + // NameCookies ... + NameCookies Name = "Cookies" // NameDeliveryRuleCondition ... NameDeliveryRuleCondition Name = "DeliveryRuleCondition" + // NameHTTPVersion ... + NameHTTPVersion Name = "HttpVersion" // NameIsDevice ... NameIsDevice Name = "IsDevice" // NamePostArgs ... @@ -332,7 +382,7 @@ const ( // PossibleNameValues returns an array of possible values for the Name const type. func PossibleNameValues() []Name { - return []Name{NameDeliveryRuleCondition, NameIsDevice, NamePostArgs, NameQueryString, NameRemoteAddress, NameRequestBody, NameRequestHeader, NameRequestMethod, NameRequestScheme, NameRequestURI, NameURLFileExtension, NameURLFileName, NameURLPath} + return []Name{NameCookies, NameDeliveryRuleCondition, NameHTTPVersion, NameIsDevice, NamePostArgs, NameQueryString, NameRemoteAddress, NameRequestBody, NameRequestHeader, NameRequestMethod, NameRequestScheme, NameRequestURI, NameURLFileExtension, NameURLFileName, NameURLPath} } // NameBasicDeliveryRuleAction enumerates the values for name basic delivery rule action. @@ -341,6 +391,8 @@ type NameBasicDeliveryRuleAction string const ( // NameCacheExpiration ... NameCacheExpiration NameBasicDeliveryRuleAction = "CacheExpiration" + // NameCacheKeyQueryString ... + NameCacheKeyQueryString NameBasicDeliveryRuleAction = "CacheKeyQueryString" // NameDeliveryRuleAction ... NameDeliveryRuleAction NameBasicDeliveryRuleAction = "DeliveryRuleAction" // NameModifyRequestHeader ... @@ -349,46 +401,48 @@ const ( NameModifyResponseHeader NameBasicDeliveryRuleAction = "ModifyResponseHeader" // NameURLRedirect ... NameURLRedirect NameBasicDeliveryRuleAction = "UrlRedirect" + // NameURLRewrite ... + NameURLRewrite NameBasicDeliveryRuleAction = "UrlRewrite" ) // PossibleNameBasicDeliveryRuleActionValues returns an array of possible values for the NameBasicDeliveryRuleAction const type. func PossibleNameBasicDeliveryRuleActionValues() []NameBasicDeliveryRuleAction { - return []NameBasicDeliveryRuleAction{NameCacheExpiration, NameDeliveryRuleAction, NameModifyRequestHeader, NameModifyResponseHeader, NameURLRedirect} + return []NameBasicDeliveryRuleAction{NameCacheExpiration, NameCacheKeyQueryString, NameDeliveryRuleAction, NameModifyRequestHeader, NameModifyResponseHeader, NameURLRedirect, NameURLRewrite} } // Operator enumerates the values for operator. type Operator string const ( - // Any ... - Any Operator = "Any" - // BeginsWith ... - BeginsWith Operator = "BeginsWith" - // Contains ... - Contains Operator = "Contains" - // EndsWith ... - EndsWith Operator = "EndsWith" - // Equal ... - Equal Operator = "Equal" - // GeoMatch ... - GeoMatch Operator = "GeoMatch" - // GreaterThan ... - GreaterThan Operator = "GreaterThan" - // GreaterThanOrEqual ... - GreaterThanOrEqual Operator = "GreaterThanOrEqual" - // IPMatch ... - IPMatch Operator = "IPMatch" - // LessThan ... - LessThan Operator = "LessThan" - // LessThanOrEqual ... - LessThanOrEqual Operator = "LessThanOrEqual" - // RegEx ... - RegEx Operator = "RegEx" + // OperatorAny ... + OperatorAny Operator = "Any" + // OperatorBeginsWith ... + OperatorBeginsWith Operator = "BeginsWith" + // OperatorContains ... + OperatorContains Operator = "Contains" + // OperatorEndsWith ... + OperatorEndsWith Operator = "EndsWith" + // OperatorEqual ... + OperatorEqual Operator = "Equal" + // OperatorGeoMatch ... + OperatorGeoMatch Operator = "GeoMatch" + // OperatorGreaterThan ... + OperatorGreaterThan Operator = "GreaterThan" + // OperatorGreaterThanOrEqual ... + OperatorGreaterThanOrEqual Operator = "GreaterThanOrEqual" + // OperatorIPMatch ... + OperatorIPMatch Operator = "IPMatch" + // OperatorLessThan ... + OperatorLessThan Operator = "LessThan" + // OperatorLessThanOrEqual ... + OperatorLessThanOrEqual Operator = "LessThanOrEqual" + // OperatorRegEx ... + OperatorRegEx Operator = "RegEx" ) // PossibleOperatorValues returns an array of possible values for the Operator const type. func PossibleOperatorValues() []Operator { - return []Operator{Any, BeginsWith, Contains, EndsWith, Equal, GeoMatch, GreaterThan, GreaterThanOrEqual, IPMatch, LessThan, LessThanOrEqual, RegEx} + return []Operator{OperatorAny, OperatorBeginsWith, OperatorContains, OperatorEndsWith, OperatorEqual, OperatorGeoMatch, OperatorGreaterThan, OperatorGreaterThanOrEqual, OperatorIPMatch, OperatorLessThan, OperatorLessThanOrEqual, OperatorRegEx} } // OptimizationType enumerates the values for optimization type. @@ -562,6 +616,25 @@ func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateFailed, ProvisioningStateSucceeded} } +// QueryStringBehavior enumerates the values for query string behavior. +type QueryStringBehavior string + +const ( + // Exclude ... + Exclude QueryStringBehavior = "Exclude" + // ExcludeAll ... + ExcludeAll QueryStringBehavior = "ExcludeAll" + // Include ... + Include QueryStringBehavior = "Include" + // IncludeAll ... + IncludeAll QueryStringBehavior = "IncludeAll" +) + +// PossibleQueryStringBehaviorValues returns an array of possible values for the QueryStringBehavior const type. +func PossibleQueryStringBehaviorValues() []QueryStringBehavior { + return []QueryStringBehavior{Exclude, ExcludeAll, Include, IncludeAll} +} + // QueryStringCachingBehavior enumerates the values for query string caching behavior. type QueryStringCachingBehavior string @@ -752,6 +825,8 @@ type SkuName string const ( // CustomVerizon ... CustomVerizon SkuName = "Custom_Verizon" + // PremiumChinaCdn ... + PremiumChinaCdn SkuName = "Premium_ChinaCdn" // PremiumVerizon ... PremiumVerizon SkuName = "Premium_Verizon" // StandardAkamai ... @@ -766,7 +841,7 @@ const ( // PossibleSkuNameValues returns an array of possible values for the SkuName const type. func PossibleSkuNameValues() []SkuName { - return []SkuName{CustomVerizon, PremiumVerizon, StandardAkamai, StandardChinaCdn, StandardMicrosoft, StandardVerizon} + return []SkuName{CustomVerizon, PremiumChinaCdn, PremiumVerizon, StandardAkamai, StandardChinaCdn, StandardMicrosoft, StandardVerizon} } // Transform enumerates the values for transform. @@ -784,6 +859,29 @@ func PossibleTransformValues() []Transform { return []Transform{Lowercase, Uppercase} } +// TransformType enumerates the values for transform type. +type TransformType string + +const ( + // TransformTypeLowercase ... + TransformTypeLowercase TransformType = "Lowercase" + // TransformTypeRemoveNulls ... + TransformTypeRemoveNulls TransformType = "RemoveNulls" + // TransformTypeTrim ... + TransformTypeTrim TransformType = "Trim" + // TransformTypeUppercase ... + TransformTypeUppercase TransformType = "Uppercase" + // TransformTypeURLDecode ... + TransformTypeURLDecode TransformType = "UrlDecode" + // TransformTypeURLEncode ... + TransformTypeURLEncode TransformType = "UrlEncode" +) + +// PossibleTransformTypeValues returns an array of possible values for the TransformType const type. +func PossibleTransformTypeValues() []TransformType { + return []TransformType{TransformTypeLowercase, TransformTypeRemoveNulls, TransformTypeTrim, TransformTypeUppercase, TransformTypeURLDecode, TransformTypeURLEncode} +} + // URLFileExtensionOperator enumerates the values for url file extension operator. type URLFileExtensionOperator string @@ -873,18 +971,6 @@ func PossibleURLPathOperatorValues() []URLPathOperator { return []URLPathOperator{URLPathOperatorAny, URLPathOperatorBeginsWith, URLPathOperatorContains, URLPathOperatorEndsWith, URLPathOperatorEqual, URLPathOperatorGreaterThan, URLPathOperatorGreaterThanOrEqual, URLPathOperatorLessThan, URLPathOperatorLessThanOrEqual, URLPathOperatorWildcard} } -// ActionType defines the action to take on rule match. -type ActionType struct { - // ActionType - Describes type of action. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' - ActionType Action `json:"actionType,omitempty"` - // RedirectURL - If action type is redirect, this field represents URL to be re-directed. - RedirectURL *string `json:"redirectUrl,omitempty"` - // CustomBlockResponseStatusCode - If the action type is block, customer can override the response status code. - CustomBlockResponseStatusCode *int32 `json:"customBlockResponseStatusCode,omitempty"` - // CustomBlockResponseBody - If the action type is block, customer can override the response body. The body must be specified in base64 encoding. - CustomBlockResponseBody *string `json:"customBlockResponseBody,omitempty"` -} - // CacheExpirationActionParameters defines the parameters for the cache expiration action. type CacheExpirationActionParameters struct { OdataType *string `json:"@odata.type,omitempty"` @@ -896,6 +982,15 @@ type CacheExpirationActionParameters struct { CacheDuration *string `json:"cacheDuration,omitempty"` } +// CacheKeyQueryStringActionParameters defines the parameters for the cache-key query string action. +type CacheKeyQueryStringActionParameters struct { + OdataType *string `json:"@odata.type,omitempty"` + // QueryStringBehavior - Caching behavior for the requests. Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + QueryStringBehavior QueryStringBehavior `json:"queryStringBehavior,omitempty"` + // QueryParameters - query parameters to include or exclude (comma separated). + QueryParameters *string `json:"queryParameters,omitempty"` +} + // CertificateSourceParameters defines the parameters for using CDN managed certificate for securing custom // domain. type CertificateSourceParameters struct { @@ -931,6 +1026,21 @@ type CidrIPAddress struct { PrefixLength *int32 `json:"prefixLength,omitempty"` } +// CookiesMatchConditionParameters defines the parameters for Cookies match conditions +type CookiesMatchConditionParameters struct { + OdataType *string `json:"@odata.type,omitempty"` + // Selector - Name of Cookies to be matched + Selector *string `json:"selector,omitempty"` + // Operator - Describes operator to be matched. Possible values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + Operator CookiesOperator `json:"operator,omitempty"` + // NegateCondition - Describes if this is negate condition or not + NegateCondition *bool `json:"negateCondition,omitempty"` + // MatchValues - The match value for the condition of the delivery rule + MatchValues *[]string `json:"matchValues,omitempty"` + // Transforms - List of transforms + Transforms *[]Transform `json:"transforms,omitempty"` +} + // CustomDomain friendly domain name mapping to the endpoint hostname that the customer provides for // branding purposes, e.g. www.contoso.com. type CustomDomain struct { @@ -1015,6 +1125,8 @@ type BasicCustomDomainHTTPSParameters interface { type CustomDomainHTTPSParameters struct { // ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' ProtocolType ProtocolType `json:"protocolType,omitempty"` + // MinimumTLSVersion - TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', 'TLS12' + MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` // CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault' CertificateSource CertificateSource `json:"certificateSource,omitempty"` } @@ -1067,6 +1179,9 @@ func (cdhp CustomDomainHTTPSParameters) MarshalJSON() ([]byte, error) { if cdhp.ProtocolType != "" { objectMap["protocolType"] = cdhp.ProtocolType } + if cdhp.MinimumTLSVersion != "" { + objectMap["minimumTlsVersion"] = cdhp.MinimumTLSVersion + } if cdhp.CertificateSource != "" { objectMap["certificateSource"] = cdhp.CertificateSource } @@ -1288,12 +1403,91 @@ type CustomDomainProperties struct { CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"` // CustomHTTPSProvisioningSubstate - READ-ONLY; Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. Possible values include: 'SubmittingDomainControlValidationRequest', 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', 'CertificateDeleted' CustomHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"` + // CustomHTTPSParameters - Certificate parameters for securing custom HTTPS + CustomHTTPSParameters BasicCustomDomainHTTPSParameters `json:"customHttpsParameters,omitempty"` // ValidationData - Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. ValidationData *string `json:"validationData,omitempty"` // ProvisioningState - READ-ONLY; Provisioning status of the custom domain. ProvisioningState *string `json:"provisioningState,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for CustomDomainProperties struct. +func (cdp *CustomDomainProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "hostName": + if v != nil { + var hostName string + err = json.Unmarshal(*v, &hostName) + if err != nil { + return err + } + cdp.HostName = &hostName + } + case "resourceState": + if v != nil { + var resourceState CustomDomainResourceState + err = json.Unmarshal(*v, &resourceState) + if err != nil { + return err + } + cdp.ResourceState = resourceState + } + case "customHttpsProvisioningState": + if v != nil { + var customHTTPSProvisioningState CustomHTTPSProvisioningState + err = json.Unmarshal(*v, &customHTTPSProvisioningState) + if err != nil { + return err + } + cdp.CustomHTTPSProvisioningState = customHTTPSProvisioningState + } + case "customHttpsProvisioningSubstate": + if v != nil { + var customHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate + err = json.Unmarshal(*v, &customHTTPSProvisioningSubstate) + if err != nil { + return err + } + cdp.CustomHTTPSProvisioningSubstate = customHTTPSProvisioningSubstate + } + case "customHttpsParameters": + if v != nil { + customHTTPSParameters, err := unmarshalBasicCustomDomainHTTPSParameters(*v) + if err != nil { + return err + } + cdp.CustomHTTPSParameters = customHTTPSParameters + } + case "validationData": + if v != nil { + var validationData string + err = json.Unmarshal(*v, &validationData) + if err != nil { + return err + } + cdp.ValidationData = &validationData + } + case "provisioningState": + if v != nil { + var provisioningState string + err = json.Unmarshal(*v, &provisioningState) + if err != nil { + return err + } + cdp.ProvisioningState = &provisioningState + } + } + } + + return nil +} + // CustomDomainPropertiesParameters the JSON object that contains the properties of the custom domain to // create. type CustomDomainPropertiesParameters struct { @@ -1369,8 +1563,8 @@ type CustomRule struct { Priority *int32 `json:"priority,omitempty"` // MatchConditions - List of match conditions. MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"` - // Action - Describes what action to be applied when rule matches - Action *ActionType `json:"action,omitempty"` + // Action - Describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + Action ActionType `json:"action,omitempty"` } // CustomRuleList defines contents of custom rules @@ -1505,15 +1699,17 @@ func (dr *DeliveryRule) UnmarshalJSON(body []byte) error { // BasicDeliveryRuleAction an action for the delivery rule. type BasicDeliveryRuleAction interface { AsURLRedirectAction() (*URLRedirectAction, bool) + AsURLRewriteAction() (*URLRewriteAction, bool) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) + AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) } // DeliveryRuleAction an action for the delivery rule. type DeliveryRuleAction struct { - // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration' + // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString' Name NameBasicDeliveryRuleAction `json:"name,omitempty"` } @@ -1529,6 +1725,10 @@ func unmarshalBasicDeliveryRuleAction(body []byte) (BasicDeliveryRuleAction, err var ura URLRedirectAction err := json.Unmarshal(body, &ura) return ura, err + case string(NameURLRewrite): + var ura URLRewriteAction + err := json.Unmarshal(body, &ura) + return ura, err case string(NameModifyRequestHeader): var drrha DeliveryRuleRequestHeaderAction err := json.Unmarshal(body, &drrha) @@ -1541,6 +1741,10 @@ func unmarshalBasicDeliveryRuleAction(body []byte) (BasicDeliveryRuleAction, err var drcea DeliveryRuleCacheExpirationAction err := json.Unmarshal(body, &drcea) return drcea, err + case string(NameCacheKeyQueryString): + var drckqsa DeliveryRuleCacheKeyQueryStringAction + err := json.Unmarshal(body, &drckqsa) + return drckqsa, err default: var dra DeliveryRuleAction err := json.Unmarshal(body, &dra) @@ -1581,6 +1785,11 @@ func (dra DeliveryRuleAction) AsURLRedirectAction() (*URLRedirectAction, bool) { return nil, false } +// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction. +func (dra DeliveryRuleAction) AsURLRewriteAction() (*URLRewriteAction, bool) { + return nil, false +} + // AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction. func (dra DeliveryRuleAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) { return nil, false @@ -1596,6 +1805,11 @@ func (dra DeliveryRuleAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRu return nil, false } +// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction. +func (dra DeliveryRuleAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) { + return nil, false +} + // AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleAction. func (dra DeliveryRuleAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) { return &dra, true @@ -1610,7 +1824,7 @@ func (dra DeliveryRuleAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleActi type DeliveryRuleCacheExpirationAction struct { // Parameters - Defines the parameters for the action. Parameters *CacheExpirationActionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration' + // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString' Name NameBasicDeliveryRuleAction `json:"name,omitempty"` } @@ -1632,6 +1846,11 @@ func (drcea DeliveryRuleCacheExpirationAction) AsURLRedirectAction() (*URLRedire return nil, false } +// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction. +func (drcea DeliveryRuleCacheExpirationAction) AsURLRewriteAction() (*URLRewriteAction, bool) { + return nil, false +} + // AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction. func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) { return nil, false @@ -1647,6 +1866,11 @@ func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleCacheExpirationActi return &drcea, true } +// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction. +func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) { + return nil, false +} + // AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheExpirationAction. func (drcea DeliveryRuleCacheExpirationAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) { return nil, false @@ -1657,6 +1881,67 @@ func (drcea DeliveryRuleCacheExpirationAction) AsBasicDeliveryRuleAction() (Basi return &drcea, true } +// DeliveryRuleCacheKeyQueryStringAction defines the cache-key query string action for the delivery rule. +type DeliveryRuleCacheKeyQueryStringAction struct { + // Parameters - Defines the parameters for the action. + Parameters *CacheKeyQueryStringActionParameters `json:"parameters,omitempty"` + // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString' + Name NameBasicDeliveryRuleAction `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) MarshalJSON() ([]byte, error) { + drckqsa.Name = NameCacheKeyQueryString + objectMap := make(map[string]interface{}) + if drckqsa.Parameters != nil { + objectMap["parameters"] = drckqsa.Parameters + } + if drckqsa.Name != "" { + objectMap["name"] = drckqsa.Name + } + return json.Marshal(objectMap) +} + +// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsURLRedirectAction() (*URLRedirectAction, bool) { + return nil, false +} + +// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsURLRewriteAction() (*URLRewriteAction, bool) { + return nil, false +} + +// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) { + return nil, false +} + +// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) { + return nil, false +} + +// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) { + return nil, false +} + +// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) { + return &drckqsa, true +} + +// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) { + return nil, false +} + +// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleCacheKeyQueryStringAction. +func (drckqsa DeliveryRuleCacheKeyQueryStringAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) { + return &drckqsa, true +} + // BasicDeliveryRuleCondition a condition for the delivery rule. type BasicDeliveryRuleCondition interface { AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) @@ -1670,13 +1955,15 @@ type BasicDeliveryRuleCondition interface { AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) + AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) + AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) } // DeliveryRuleCondition a condition for the delivery rule. type DeliveryRuleCondition struct { - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -1732,6 +2019,14 @@ func unmarshalBasicDeliveryRuleCondition(body []byte) (BasicDeliveryRuleConditio var drufnc DeliveryRuleURLFileNameCondition err := json.Unmarshal(body, &drufnc) return drufnc, err + case string(NameHTTPVersion): + var drhvc DeliveryRuleHTTPVersionCondition + err := json.Unmarshal(body, &drhvc) + return drhvc, err + case string(NameCookies): + var drcc DeliveryRuleCookiesCondition + err := json.Unmarshal(body, &drcc) + return drcc, err case string(NameIsDevice): var dridc DeliveryRuleIsDeviceCondition err := json.Unmarshal(body, &dridc) @@ -1826,6 +2121,16 @@ func (drc DeliveryRuleCondition) AsDeliveryRuleURLFileNameCondition() (*Delivery return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition. +func (drc DeliveryRuleCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition. +func (drc DeliveryRuleCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCondition. func (drc DeliveryRuleCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -1841,11 +2146,213 @@ func (drc DeliveryRuleCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRu return &drc, true } +// DeliveryRuleCookiesCondition defines the Cookies condition for the delivery rule. +type DeliveryRuleCookiesCondition struct { + // Parameters - Defines the parameters for the condition. + Parameters *CookiesMatchConditionParameters `json:"parameters,omitempty"` + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' + Name Name `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) MarshalJSON() ([]byte, error) { + drcc.Name = NameCookies + objectMap := make(map[string]interface{}) + if drcc.Parameters != nil { + objectMap["parameters"] = drcc.Parameters + } + if drcc.Name != "" { + objectMap["name"] = drcc.Name + } + return json.Marshal(objectMap) +} + +// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) { + return nil, false +} + +// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) { + return nil, false +} + +// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) { + return nil, false +} + +// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) { + return nil, false +} + +// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) { + return nil, false +} + +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return &drcc, true +} + +// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) { + return nil, false +} + +// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleCookiesCondition. +func (drcc DeliveryRuleCookiesCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) { + return &drcc, true +} + +// DeliveryRuleHTTPVersionCondition defines the HttpVersion condition for the delivery rule. +type DeliveryRuleHTTPVersionCondition struct { + // Parameters - Defines the parameters for the condition. + Parameters *HTTPVersionMatchConditionParameters `json:"parameters,omitempty"` + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' + Name Name `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) MarshalJSON() ([]byte, error) { + drhvc.Name = NameHTTPVersion + objectMap := make(map[string]interface{}) + if drhvc.Parameters != nil { + objectMap["parameters"] = drhvc.Parameters + } + if drhvc.Name != "" { + objectMap["name"] = drhvc.Name + } + return json.Marshal(objectMap) +} + +// AsDeliveryRuleRemoteAddressCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRemoteAddressCondition() (*DeliveryRuleRemoteAddressCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestMethodCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestMethodCondition() (*DeliveryRuleRequestMethodCondition, bool) { + return nil, false +} + +// AsDeliveryRuleQueryStringCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleQueryStringCondition() (*DeliveryRuleQueryStringCondition, bool) { + return nil, false +} + +// AsDeliveryRulePostArgsCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRulePostArgsCondition() (*DeliveryRulePostArgsCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestURICondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestURICondition() (*DeliveryRuleRequestURICondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestHeaderCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestHeaderCondition() (*DeliveryRuleRequestHeaderCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestBodyCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestBodyCondition() (*DeliveryRuleRequestBodyCondition, bool) { + return nil, false +} + +// AsDeliveryRuleRequestSchemeCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleRequestSchemeCondition() (*DeliveryRuleRequestSchemeCondition, bool) { + return nil, false +} + +// AsDeliveryRuleURLPathCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleURLPathCondition() (*DeliveryRuleURLPathCondition, bool) { + return nil, false +} + +// AsDeliveryRuleURLFileExtensionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleURLFileExtensionCondition() (*DeliveryRuleURLFileExtensionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleURLFileNameCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleURLFileNameCondition() (*DeliveryRuleURLFileNameCondition, bool) { + return nil, false +} + +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return &drhvc, true +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + +// AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsDeliveryRuleCondition() (*DeliveryRuleCondition, bool) { + return nil, false +} + +// AsBasicDeliveryRuleCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleHTTPVersionCondition. +func (drhvc DeliveryRuleHTTPVersionCondition) AsBasicDeliveryRuleCondition() (BasicDeliveryRuleCondition, bool) { + return &drhvc, true +} + // DeliveryRuleIsDeviceCondition defines the IsDevice condition for the delivery rule. type DeliveryRuleIsDeviceCondition struct { // Parameters - Defines the parameters for the condition. Parameters *IsDeviceMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -1917,6 +2424,16 @@ func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleURLFileNameCondition() return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition. +func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition. +func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleIsDeviceCondition. func (dridc DeliveryRuleIsDeviceCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return &dridc, true @@ -1936,7 +2453,7 @@ func (dridc DeliveryRuleIsDeviceCondition) AsBasicDeliveryRuleCondition() (Basic type DeliveryRulePostArgsCondition struct { // Parameters - Defines the parameters for the condition. Parameters *PostArgsMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2008,6 +2525,16 @@ func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleURLFileNameCondition() return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition. +func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition. +func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRulePostArgsCondition. func (drpac DeliveryRulePostArgsCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2027,7 +2554,7 @@ func (drpac DeliveryRulePostArgsCondition) AsBasicDeliveryRuleCondition() (Basic type DeliveryRuleQueryStringCondition struct { // Parameters - Defines the parameters for the condition. Parameters *QueryStringMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2099,6 +2626,16 @@ func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleURLFileNameCondition return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition. +func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition. +func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleQueryStringCondition. func (drqsc DeliveryRuleQueryStringCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2118,7 +2655,7 @@ func (drqsc DeliveryRuleQueryStringCondition) AsBasicDeliveryRuleCondition() (Ba type DeliveryRuleRemoteAddressCondition struct { // Parameters - Defines the parameters for the condition. Parameters *RemoteAddressMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2190,6 +2727,16 @@ func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleURLFileNameConditi return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition. +func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition. +func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRemoteAddressCondition. func (drrac DeliveryRuleRemoteAddressCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2209,7 +2756,7 @@ func (drrac DeliveryRuleRemoteAddressCondition) AsBasicDeliveryRuleCondition() ( type DeliveryRuleRequestBodyCondition struct { // Parameters - Defines the parameters for the condition. Parameters *RequestBodyMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2281,6 +2828,16 @@ func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleURLFileNameCondition return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition. +func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition. +func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestBodyCondition. func (drrbc DeliveryRuleRequestBodyCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2300,7 +2857,7 @@ func (drrbc DeliveryRuleRequestBodyCondition) AsBasicDeliveryRuleCondition() (Ba type DeliveryRuleRequestHeaderAction struct { // Parameters - Defines the parameters for the action. Parameters *HeaderActionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration' + // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString' Name NameBasicDeliveryRuleAction `json:"name,omitempty"` } @@ -2322,6 +2879,11 @@ func (drrha DeliveryRuleRequestHeaderAction) AsURLRedirectAction() (*URLRedirect return nil, false } +// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction. +func (drrha DeliveryRuleRequestHeaderAction) AsURLRewriteAction() (*URLRewriteAction, bool) { + return nil, false +} + // AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction. func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) { return &drrha, true @@ -2337,6 +2899,11 @@ func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleCacheExpirationAction return nil, false } +// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction. +func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) { + return nil, false +} + // AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleRequestHeaderAction. func (drrha DeliveryRuleRequestHeaderAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) { return nil, false @@ -2351,7 +2918,7 @@ func (drrha DeliveryRuleRequestHeaderAction) AsBasicDeliveryRuleAction() (BasicD type DeliveryRuleRequestHeaderCondition struct { // Parameters - Defines the parameters for the condition. Parameters *RequestHeaderMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2423,6 +2990,16 @@ func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleURLFileNameConditi return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition. +func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition. +func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestHeaderCondition. func (drrhc DeliveryRuleRequestHeaderCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2442,7 +3019,7 @@ func (drrhc DeliveryRuleRequestHeaderCondition) AsBasicDeliveryRuleCondition() ( type DeliveryRuleRequestMethodCondition struct { // Parameters - Defines the parameters for the condition. Parameters *RequestMethodMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2514,6 +3091,16 @@ func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleURLFileNameConditi return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition. +func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition. +func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestMethodCondition. func (drrmc DeliveryRuleRequestMethodCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2533,7 +3120,7 @@ func (drrmc DeliveryRuleRequestMethodCondition) AsBasicDeliveryRuleCondition() ( type DeliveryRuleRequestSchemeCondition struct { // Parameters - Defines the parameters for the condition. Parameters *RequestSchemeMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2605,6 +3192,16 @@ func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleURLFileNameConditi return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition. +func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition. +func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestSchemeCondition. func (drrsc DeliveryRuleRequestSchemeCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2624,7 +3221,7 @@ func (drrsc DeliveryRuleRequestSchemeCondition) AsBasicDeliveryRuleCondition() ( type DeliveryRuleRequestURICondition struct { // Parameters - Defines the parameters for the condition. Parameters *RequestURIMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2696,6 +3293,16 @@ func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleURLFileNameCondition( return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition. +func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition. +func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleRequestURICondition. func (drruc DeliveryRuleRequestURICondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2715,7 +3322,7 @@ func (drruc DeliveryRuleRequestURICondition) AsBasicDeliveryRuleCondition() (Bas type DeliveryRuleResponseHeaderAction struct { // Parameters - Defines the parameters for the action. Parameters *HeaderActionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration' + // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString' Name NameBasicDeliveryRuleAction `json:"name,omitempty"` } @@ -2737,6 +3344,11 @@ func (drrha DeliveryRuleResponseHeaderAction) AsURLRedirectAction() (*URLRedirec return nil, false } +// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction. +func (drrha DeliveryRuleResponseHeaderAction) AsURLRewriteAction() (*URLRewriteAction, bool) { + return nil, false +} + // AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction. func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) { return nil, false @@ -2752,6 +3364,11 @@ func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleCacheExpirationActio return nil, false } +// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction. +func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) { + return nil, false +} + // AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for DeliveryRuleResponseHeaderAction. func (drrha DeliveryRuleResponseHeaderAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) { return nil, false @@ -2766,7 +3383,7 @@ func (drrha DeliveryRuleResponseHeaderAction) AsBasicDeliveryRuleAction() (Basic type DeliveryRuleURLFileExtensionCondition struct { // Parameters - Defines the parameters for the condition. Parameters *URLFileExtensionMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2838,6 +3455,16 @@ func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleURLFileNameCon return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition. +func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition. +func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileExtensionCondition. func (drufec DeliveryRuleURLFileExtensionCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2857,7 +3484,7 @@ func (drufec DeliveryRuleURLFileExtensionCondition) AsBasicDeliveryRuleCondition type DeliveryRuleURLFileNameCondition struct { // Parameters - Defines the parameters for the condition. Parameters *URLFileNameMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -2929,6 +3556,16 @@ func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleURLFileNameConditio return &drufnc, true } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition. +func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition. +func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLFileNameCondition. func (drufnc DeliveryRuleURLFileNameCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -2948,7 +3585,7 @@ func (drufnc DeliveryRuleURLFileNameCondition) AsBasicDeliveryRuleCondition() (B type DeliveryRuleURLPathCondition struct { // Parameters - Defines the parameters for the condition. Parameters *URLPathMatchConditionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameIsDevice' + // Name - Possible values include: 'NameDeliveryRuleCondition', 'NameRemoteAddress', 'NameRequestMethod', 'NameQueryString', 'NamePostArgs', 'NameRequestURI', 'NameRequestHeader', 'NameRequestBody', 'NameRequestScheme', 'NameURLPath', 'NameURLFileExtension', 'NameURLFileName', 'NameHTTPVersion', 'NameCookies', 'NameIsDevice' Name Name `json:"name,omitempty"` } @@ -3020,6 +3657,16 @@ func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleURLFileNameCondition() ( return nil, false } +// AsDeliveryRuleHTTPVersionCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition. +func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleHTTPVersionCondition() (*DeliveryRuleHTTPVersionCondition, bool) { + return nil, false +} + +// AsDeliveryRuleCookiesCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition. +func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleCookiesCondition() (*DeliveryRuleCookiesCondition, bool) { + return nil, false +} + // AsDeliveryRuleIsDeviceCondition is the BasicDeliveryRuleCondition implementation for DeliveryRuleURLPathCondition. func (drupc DeliveryRuleURLPathCondition) AsDeliveryRuleIsDeviceCondition() (*DeliveryRuleIsDeviceCondition, bool) { return nil, false @@ -3861,6 +4508,17 @@ type HeaderActionParameters struct { Value *string `json:"value,omitempty"` } +// HTTPVersionMatchConditionParameters defines the parameters for HttpVersion match conditions +type HTTPVersionMatchConditionParameters struct { + OdataType *string `json:"@odata.type,omitempty"` + // Operator - Describes operator to be matched + Operator *string `json:"operator,omitempty"` + // NegateCondition - Describes if this is negate condition or not + NegateCondition *bool `json:"negateCondition,omitempty"` + // MatchValues - The match value for the condition of the delivery rule + MatchValues *[]string `json:"matchValues,omitempty"` +} + // IPAddressGroup CDN Ip address group type IPAddressGroup struct { // DeliveryRegion - The delivery region of the ip address group @@ -3917,6 +4575,8 @@ type ManagedHTTPSParameters struct { CertificateSourceParameters *CertificateSourceParameters `json:"certificateSourceParameters,omitempty"` // ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' ProtocolType ProtocolType `json:"protocolType,omitempty"` + // MinimumTLSVersion - TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', 'TLS12' + MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` // CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault' CertificateSource CertificateSource `json:"certificateSource,omitempty"` } @@ -3931,6 +4591,9 @@ func (mhp ManagedHTTPSParameters) MarshalJSON() ([]byte, error) { if mhp.ProtocolType != "" { objectMap["protocolType"] = mhp.ProtocolType } + if mhp.MinimumTLSVersion != "" { + objectMap["minimumTlsVersion"] = mhp.MinimumTLSVersion + } if mhp.CertificateSource != "" { objectMap["certificateSource"] = mhp.CertificateSource } @@ -3989,8 +4652,8 @@ type ManagedRuleOverride struct { RuleID *string `json:"ruleId,omitempty"` // EnabledState - Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. Possible values include: 'ManagedRuleEnabledStateDisabled', 'ManagedRuleEnabledStateEnabled' EnabledState ManagedRuleEnabledState `json:"enabledState,omitempty"` - // Action - Describes the override action to be applied when rule matches. - Action *ActionType `json:"action,omitempty"` + // Action - Describes the override action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + Action ActionType `json:"action,omitempty"` } // ManagedRuleSet defines a managed rule set. @@ -4262,12 +4925,14 @@ type MatchCondition struct { MatchVariable MatchVariable `json:"matchVariable,omitempty"` // Selector - Selector can used to match a specific key for QueryString, RequestUri, RequestHeaders or RequestBody. Selector *string `json:"selector,omitempty"` - // Operator - Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' + // Operator - Describes operator to be matched. Possible values include: 'OperatorAny', 'OperatorIPMatch', 'OperatorGeoMatch', 'OperatorEqual', 'OperatorContains', 'OperatorLessThan', 'OperatorGreaterThan', 'OperatorLessThanOrEqual', 'OperatorGreaterThanOrEqual', 'OperatorBeginsWith', 'OperatorEndsWith', 'OperatorRegEx' Operator Operator `json:"operator,omitempty"` // NegateCondition - Describes if the result of this condition should be negated. NegateCondition *bool `json:"negateCondition,omitempty"` // MatchValue - List of possible match values. MatchValue *[]string `json:"matchValue,omitempty"` + // Transforms - List of transforms. + Transforms *[]TransformType `json:"transforms,omitempty"` } // Operation CDN REST API operation @@ -5272,8 +5937,8 @@ type RateLimitRule struct { Priority *int32 `json:"priority,omitempty"` // MatchConditions - List of match conditions. MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"` - // Action - Describes what action to be applied when rule matches - Action *ActionType `json:"action,omitempty"` + // Action - Describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + Action ActionType `json:"action,omitempty"` } // RateLimitRuleList defines contents of rate limit rules @@ -5528,7 +6193,7 @@ func NewResourceUsageListResultPage(getNextPage func(context.Context, ResourceUs // Sku the pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. type Sku struct { - // Name - Name of the pricing tier. Possible values include: 'StandardVerizon', 'PremiumVerizon', 'CustomVerizon', 'StandardAkamai', 'StandardChinaCdn', 'StandardMicrosoft' + // Name - Name of the pricing tier. Possible values include: 'StandardVerizon', 'PremiumVerizon', 'CustomVerizon', 'StandardAkamai', 'StandardChinaCdn', 'StandardMicrosoft', 'PremiumChinaCdn' Name SkuName `json:"name,omitempty"` } @@ -5615,7 +6280,7 @@ type URLPathMatchConditionParameters struct { type URLRedirectAction struct { // Parameters - Defines the parameters for the action. Parameters *URLRedirectActionParameters `json:"parameters,omitempty"` - // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration' + // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString' Name NameBasicDeliveryRuleAction `json:"name,omitempty"` } @@ -5637,6 +6302,11 @@ func (ura URLRedirectAction) AsURLRedirectAction() (*URLRedirectAction, bool) { return &ura, true } +// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for URLRedirectAction. +func (ura URLRedirectAction) AsURLRewriteAction() (*URLRewriteAction, bool) { + return nil, false +} + // AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for URLRedirectAction. func (ura URLRedirectAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) { return nil, false @@ -5652,6 +6322,11 @@ func (ura URLRedirectAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRul return nil, false } +// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for URLRedirectAction. +func (ura URLRedirectAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) { + return nil, false +} + // AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRedirectAction. func (ura URLRedirectAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) { return nil, false @@ -5679,6 +6354,78 @@ type URLRedirectActionParameters struct { CustomFragment *string `json:"customFragment,omitempty"` } +// URLRewriteAction defines the url rewrite action for the delivery rule. +type URLRewriteAction struct { + // Parameters - Defines the parameters for the action. + Parameters *URLRewriteActionParameters `json:"parameters,omitempty"` + // Name - Possible values include: 'NameDeliveryRuleAction', 'NameURLRedirect', 'NameURLRewrite', 'NameModifyRequestHeader', 'NameModifyResponseHeader', 'NameCacheExpiration', 'NameCacheKeyQueryString' + Name NameBasicDeliveryRuleAction `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for URLRewriteAction. +func (ura URLRewriteAction) MarshalJSON() ([]byte, error) { + ura.Name = NameURLRewrite + objectMap := make(map[string]interface{}) + if ura.Parameters != nil { + objectMap["parameters"] = ura.Parameters + } + if ura.Name != "" { + objectMap["name"] = ura.Name + } + return json.Marshal(objectMap) +} + +// AsURLRedirectAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsURLRedirectAction() (*URLRedirectAction, bool) { + return nil, false +} + +// AsURLRewriteAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsURLRewriteAction() (*URLRewriteAction, bool) { + return &ura, true +} + +// AsDeliveryRuleRequestHeaderAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsDeliveryRuleRequestHeaderAction() (*DeliveryRuleRequestHeaderAction, bool) { + return nil, false +} + +// AsDeliveryRuleResponseHeaderAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsDeliveryRuleResponseHeaderAction() (*DeliveryRuleResponseHeaderAction, bool) { + return nil, false +} + +// AsDeliveryRuleCacheExpirationAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsDeliveryRuleCacheExpirationAction() (*DeliveryRuleCacheExpirationAction, bool) { + return nil, false +} + +// AsDeliveryRuleCacheKeyQueryStringAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsDeliveryRuleCacheKeyQueryStringAction() (*DeliveryRuleCacheKeyQueryStringAction, bool) { + return nil, false +} + +// AsDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsDeliveryRuleAction() (*DeliveryRuleAction, bool) { + return nil, false +} + +// AsBasicDeliveryRuleAction is the BasicDeliveryRuleAction implementation for URLRewriteAction. +func (ura URLRewriteAction) AsBasicDeliveryRuleAction() (BasicDeliveryRuleAction, bool) { + return &ura, true +} + +// URLRewriteActionParameters defines the parameters for the url rewrite action. +type URLRewriteActionParameters struct { + OdataType *string `json:"@odata.type,omitempty"` + // SourcePattern - define a request URI pattern that identifies the type of requests that may be rewritten. Currently, source pattern uses a prefix-based match. To match all URL paths, use "/" as the source pattern value. To match only the root directory and re-write this path, use the origin path field + SourcePattern *string `json:"sourcePattern,omitempty"` + // Destination - Define the destination path for be used in the rewrite. This will overwrite the source pattern + Destination *string `json:"destination,omitempty"` + // PreserveUnmatchedPath - If True, the remaining path after the source pattern will be appended to the new destination path. + PreserveUnmatchedPath *bool `json:"preserveUnmatchedPath,omitempty"` +} + // UserManagedHTTPSParameters defines the certificate source parameters using user's keyvault certificate // for enabling SSL. type UserManagedHTTPSParameters struct { @@ -5686,6 +6433,8 @@ type UserManagedHTTPSParameters struct { CertificateSourceParameters *KeyVaultCertificateSourceParameters `json:"certificateSourceParameters,omitempty"` // ProtocolType - Defines the TLS extension protocol that is used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' ProtocolType ProtocolType `json:"protocolType,omitempty"` + // MinimumTLSVersion - TLS protocol version that will be used for Https. Possible values include: 'None', 'TLS10', 'TLS12' + MinimumTLSVersion MinimumTLSVersion `json:"minimumTlsVersion,omitempty"` // CertificateSource - Possible values include: 'CertificateSourceCustomDomainHTTPSParameters', 'CertificateSourceCdn', 'CertificateSourceAzureKeyVault' CertificateSource CertificateSource `json:"certificateSource,omitempty"` } @@ -5700,6 +6449,9 @@ func (umhp UserManagedHTTPSParameters) MarshalJSON() ([]byte, error) { if umhp.ProtocolType != "" { objectMap["protocolType"] = umhp.ProtocolType } + if umhp.MinimumTLSVersion != "" { + objectMap["minimumTlsVersion"] = umhp.MinimumTLSVersion + } if umhp.CertificateSource != "" { objectMap["certificateSource"] = umhp.CertificateSource } @@ -6063,8 +6815,8 @@ type WebApplicationFirewallPolicyProperties struct { CustomRules *CustomRuleList `json:"customRules,omitempty"` // ManagedRules - Describes managed rules inside the policy. ManagedRules *ManagedRuleSetList `json:"managedRules,omitempty"` - // CdnEndpointLinks - READ-ONLY; Describes Azure CDN endpoints associated with this Web Application Firewall policy. - CdnEndpointLinks *[]EndpointType `json:"cdnEndpointLinks,omitempty"` + // EndpointLinks - READ-ONLY; Describes Azure CDN endpoints associated with this Web Application Firewall policy. + EndpointLinks *[]EndpointType `json:"endpointLinks,omitempty"` // ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // ResourceState - READ-ONLY; Possible values include: 'PolicyResourceStateCreating', 'PolicyResourceStateEnabling', 'PolicyResourceStateEnabled', 'PolicyResourceStateDisabling', 'PolicyResourceStateDisabled', 'PolicyResourceStateDeleting' diff --git a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go index 52943ec4f995..aadf01eb0c1a 100644 --- a/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go +++ b/services/preview/cdn/mgmt/2019-06-15-preview/cdn/policies.go @@ -69,7 +69,7 @@ func (client PoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa Chain: []validation.Constraint{{Target: "cdnWebApplicationFirewallPolicy.WebApplicationFirewallPolicyProperties.PolicySettings", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "cdnWebApplicationFirewallPolicy.WebApplicationFirewallPolicyProperties.PolicySettings.DefaultCustomBlockResponseStatusCode", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "cdnWebApplicationFirewallPolicy.WebApplicationFirewallPolicyProperties.PolicySettings.DefaultCustomBlockResponseStatusCode", Name: validation.InclusiveMaximum, Rule: int64(599), Chain: nil}, - {Target: "cdnWebApplicationFirewallPolicy.WebApplicationFirewallPolicyProperties.PolicySettings.DefaultCustomBlockResponseStatusCode", Name: validation.InclusiveMinimum, Rule: 200, Chain: nil}, + {Target: "cdnWebApplicationFirewallPolicy.WebApplicationFirewallPolicyProperties.PolicySettings.DefaultCustomBlockResponseStatusCode", Name: validation.InclusiveMinimum, Rule: int64(200), Chain: nil}, }}, {Target: "cdnWebApplicationFirewallPolicy.WebApplicationFirewallPolicyProperties.PolicySettings.DefaultCustomBlockResponseBody", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "cdnWebApplicationFirewallPolicy.WebApplicationFirewallPolicyProperties.PolicySettings.DefaultCustomBlockResponseBody", Name: validation.Pattern, Rule: `^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$`, Chain: nil}}}, diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go b/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go index c6dcaebc2fe3..df6a48977580 100644 --- a/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go +++ b/services/preview/cognitiveservices/v3.0/luis/authoring/apps.go @@ -650,11 +650,11 @@ func (client AppsClient) List(ctx context.Context, skip *int32, take *int32) (re if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.AppsClient", "List", err.Error()) } diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go b/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go index df1b8d3b6dd4..122375d3f9e1 100644 --- a/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go +++ b/services/preview/cognitiveservices/v3.0/luis/authoring/examples.go @@ -293,11 +293,11 @@ func (client ExamplesClient) List(ctx context.Context, appID uuid.UUID, versionI if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ExamplesClient", "List", err.Error()) } diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/features.go b/services/preview/cognitiveservices/v3.0/luis/authoring/features.go index 2c33b1fc74e5..5943fed8c233 100644 --- a/services/preview/cognitiveservices/v3.0/luis/authoring/features.go +++ b/services/preview/cognitiveservices/v3.0/luis/authoring/features.go @@ -445,11 +445,11 @@ func (client FeaturesClient) List(ctx context.Context, appID uuid.UUID, versionI if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.FeaturesClient", "List", err.Error()) } @@ -546,11 +546,11 @@ func (client FeaturesClient) ListPhraseLists(ctx context.Context, appID uuid.UUI if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.FeaturesClient", "ListPhraseLists", err.Error()) } diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/model.go b/services/preview/cognitiveservices/v3.0/luis/authoring/model.go index d9ac8358196b..eecdafafd55e 100644 --- a/services/preview/cognitiveservices/v3.0/luis/authoring/model.go +++ b/services/preview/cognitiveservices/v3.0/luis/authoring/model.go @@ -3501,11 +3501,11 @@ func (client ModelClient) ExamplesMethod(ctx context.Context, appID uuid.UUID, v if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ExamplesMethod", err.Error()) } @@ -5296,11 +5296,11 @@ func (client ModelClient) ListClosedLists(ctx context.Context, appID uuid.UUID, if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListClosedLists", err.Error()) } @@ -5397,11 +5397,11 @@ func (client ModelClient) ListCompositeEntities(ctx context.Context, appID uuid. if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListCompositeEntities", err.Error()) } @@ -5874,11 +5874,11 @@ func (client ModelClient) ListEntities(ctx context.Context, appID uuid.UUID, ver if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListEntities", err.Error()) } @@ -6053,7 +6053,7 @@ func (client ModelClient) ListEntitySuggestions(ctx context.Context, appID uuid. {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListEntitySuggestions", err.Error()) } @@ -6146,11 +6146,11 @@ func (client ModelClient) ListHierarchicalEntities(ctx context.Context, appID uu if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListHierarchicalEntities", err.Error()) } @@ -6323,11 +6323,11 @@ func (client ModelClient) ListIntents(ctx context.Context, appID uuid.UUID, vers if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListIntents", err.Error()) } @@ -6426,7 +6426,7 @@ func (client ModelClient) ListIntentSuggestions(ctx context.Context, appID uuid. {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListIntentSuggestions", err.Error()) } @@ -6519,11 +6519,11 @@ func (client ModelClient) ListModels(ctx context.Context, appID uuid.UUID, versi if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListModels", err.Error()) } @@ -6620,11 +6620,11 @@ func (client ModelClient) ListPatternAnyEntityInfos(ctx context.Context, appID u if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListPatternAnyEntityInfos", err.Error()) } @@ -6947,11 +6947,11 @@ func (client ModelClient) ListPrebuilts(ctx context.Context, appID uuid.UUID, ve if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListPrebuilts", err.Error()) } @@ -7048,11 +7048,11 @@ func (client ModelClient) ListRegexEntityInfos(ctx context.Context, appID uuid.U if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.ModelClient", "ListRegexEntityInfos", err.Error()) } diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go b/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go index bf4dd03ad6db..fcf45eb3d582 100644 --- a/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go +++ b/services/preview/cognitiveservices/v3.0/luis/authoring/pattern.go @@ -377,11 +377,11 @@ func (client PatternClient) ListIntentPatterns(ctx context.Context, appID uuid.U if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.PatternClient", "ListIntentPatterns", err.Error()) } @@ -479,11 +479,11 @@ func (client PatternClient) ListPatterns(ctx context.Context, appID uuid.UUID, v if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.PatternClient", "ListPatterns", err.Error()) } diff --git a/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go b/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go index 51df6b99edf3..56bb1d2f5e30 100644 --- a/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go +++ b/services/preview/cognitiveservices/v3.0/luis/authoring/versions.go @@ -516,11 +516,11 @@ func (client VersionsClient) List(ctx context.Context, appID uuid.UUID, skip *in if err := validation.Validate([]validation.Validation{ {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: take, Constraints: []validation.Constraint{{Target: "take", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "take", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "take", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "take", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("authoring.VersionsClient", "List", err.Error()) } diff --git a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go index 6cd59e7fa9da..70edd4700442 100644 --- a/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go +++ b/services/preview/consumption/mgmt/2017-04-24-preview/consumption/usagedetails.go @@ -73,7 +73,7 @@ func (client UsageDetailsClient) List(ctx context.Context, scope string, expand {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("consumption.UsageDetailsClient", "List", err.Error()) } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go index 36daff155f59..87f3984528ab 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/buildtasks.go @@ -78,7 +78,7 @@ func (client BuildTasksClient) Create(ctx context.Context, resourceGroupName str {Target: "buildTaskCreateParameters.BuildTaskProperties.Platform", Name: validation.Null, Rule: true, Chain: nil}, {Target: "buildTaskCreateParameters.BuildTaskProperties.Timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "buildTaskCreateParameters.BuildTaskProperties.Timeout", Name: validation.InclusiveMaximum, Rule: int64(28800), Chain: nil}, - {Target: "buildTaskCreateParameters.BuildTaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: 300, Chain: nil}, + {Target: "buildTaskCreateParameters.BuildTaskProperties.Timeout", Name: validation.InclusiveMinimum, Rule: int64(300), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("containerregistry.BuildTasksClient", "Create", err.Error()) diff --git a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go index a58266d7e18a..9702c6cbdc45 100644 --- a/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go +++ b/services/preview/containerservice/mgmt/2019-09-30-preview/containerservice/managedclusters.go @@ -92,7 +92,7 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go index 92757561df13..2c8d7b153ac0 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/databaseaccounts.go @@ -154,11 +154,11 @@ func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourc Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, - {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxStalenessPrefix", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMaximum, Rule: int64(86400), Chain: nil}, - {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.ConsistencyPolicy.MaxIntervalInSeconds", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil}, }}, }}, {Target: "createUpdateParameters.DatabaseAccountCreateUpdateProperties.Locations", Name: validation.Null, Rule: true, Chain: nil}, diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go index 1faaea51269c..58fa12241603 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/gremlinresources.go @@ -175,7 +175,7 @@ func (client GremlinResourcesClient) CreateUpdateGremlinGraph(ctx context.Contex {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "createUpdateGremlinGraphParameters.GremlinGraphCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go index 8616d54012c8..baf6ed44806b 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/models.go @@ -31,6 +31,21 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb" +// CompositePathSortOrder enumerates the values for composite path sort order. +type CompositePathSortOrder string + +const ( + // Ascending ... + Ascending CompositePathSortOrder = "Ascending" + // Descending ... + Descending CompositePathSortOrder = "Descending" +) + +// PossibleCompositePathSortOrderValues returns an array of possible values for the CompositePathSortOrder const type. +func PossibleCompositePathSortOrderValues() []CompositePathSortOrder { + return []CompositePathSortOrder{Ascending, Descending} +} + // ConflictResolutionMode enumerates the values for conflict resolution mode. type ConflictResolutionMode string @@ -224,6 +239,25 @@ func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeLast, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal} } +// SpatialType enumerates the values for spatial type. +type SpatialType string + +const ( + // SpatialTypeLineString ... + SpatialTypeLineString SpatialType = "LineString" + // SpatialTypeMultiPolygon ... + SpatialTypeMultiPolygon SpatialType = "MultiPolygon" + // SpatialTypePoint ... + SpatialTypePoint SpatialType = "Point" + // SpatialTypePolygon ... + SpatialTypePolygon SpatialType = "Polygon" +) + +// PossibleSpatialTypeValues returns an array of possible values for the SpatialType const type. +func PossibleSpatialTypeValues() []SpatialType { + return []SpatialType{SpatialTypeLineString, SpatialTypeMultiPolygon, SpatialTypePoint, SpatialTypePolygon} +} + // TriggerOperation enumerates the values for trigger operation. type TriggerOperation string @@ -461,6 +495,11 @@ func (ckcup CassandraKeyspaceCreateUpdateProperties) MarshalJSON() ([]byte, erro // CassandraKeyspaceGetProperties the properties of an Azure Cosmos DB Cassandra keyspace type CassandraKeyspaceGetProperties struct { + Resource *CassandraKeyspaceGetPropertiesResource `json:"resource,omitempty"` +} + +// CassandraKeyspaceGetPropertiesResource ... +type CassandraKeyspaceGetPropertiesResource struct { // ID - Name of the Cosmos DB Cassandra keyspace ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -884,6 +923,11 @@ func (ctcup CassandraTableCreateUpdateProperties) MarshalJSON() ([]byte, error) // CassandraTableGetProperties the properties of an Azure Cosmos DB Cassandra table type CassandraTableGetProperties struct { + Resource *CassandraTableGetPropertiesResource `json:"resource,omitempty"` +} + +// CassandraTableGetPropertiesResource ... +type CassandraTableGetPropertiesResource struct { // ID - Name of the Cosmos DB Cassandra table ID *string `json:"id,omitempty"` // DefaultTTL - Time to live of the Cosmos DB Cassandra table @@ -1032,6 +1076,14 @@ type Column struct { Type *string `json:"type,omitempty"` } +// CompositePath ... +type CompositePath struct { + // Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) + Path *string `json:"path,omitempty"` + // Order - Sort order for composite paths. Possible values include: 'Ascending', 'Descending' + Order CompositePathSortOrder `json:"order,omitempty"` +} + // ConflictResolutionPolicy the conflict resolution policy for the container. type ConflictResolutionPolicy struct { // Mode - Indicates the conflict resolution mode. Possible values include: 'LastWriterWins', 'Custom' @@ -1830,6 +1882,11 @@ func (gdcup GremlinDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) // GremlinDatabaseGetProperties the properties of an Azure Cosmos DB SQL database type GremlinDatabaseGetProperties struct { + Resource *GremlinDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// GremlinDatabaseGetPropertiesResource ... +type GremlinDatabaseGetPropertiesResource struct { // ID - Name of the Cosmos DB Gremlin database ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -2075,6 +2132,11 @@ func (ggcup GremlinGraphCreateUpdateProperties) MarshalJSON() ([]byte, error) { // GremlinGraphGetProperties the properties of an Azure Cosmos DB Gremlin graph type GremlinGraphGetProperties struct { + Resource *GremlinGraphGetPropertiesResource `json:"resource,omitempty"` +} + +// GremlinGraphGetPropertiesResource ... +type GremlinGraphGetPropertiesResource struct { // ID - Name of the Cosmos DB Gremlin graph ID *string `json:"id,omitempty"` // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph @@ -2408,6 +2470,10 @@ type IndexingPolicy struct { IncludedPaths *[]IncludedPath `json:"includedPaths,omitempty"` // ExcludedPaths - List of paths to exclude from indexing ExcludedPaths *[]ExcludedPath `json:"excludedPaths,omitempty"` + // CompositeIndexes - List of composite path list + CompositeIndexes *[][]CompositePath `json:"compositeIndexes,omitempty"` + // SpatialIndexes - List of spatial specifics + SpatialIndexes *[]SpatialSpec `json:"spatialIndexes,omitempty"` } // Location a region in which the Azure Cosmos DB database account is deployed. @@ -2623,6 +2689,11 @@ func (mdccup MongoDBCollectionCreateUpdateProperties) MarshalJSON() ([]byte, err // MongoDBCollectionGetProperties the properties of an Azure Cosmos DB MongoDB collection type MongoDBCollectionGetProperties struct { + Resource *MongoDBCollectionGetPropertiesResource `json:"resource,omitempty"` +} + +// MongoDBCollectionGetPropertiesResource ... +type MongoDBCollectionGetPropertiesResource struct { // ID - Name of the Cosmos DB MongoDB collection ID *string `json:"id,omitempty"` // ShardKey - A key-value pair of shard keys to be applied for the request. @@ -2637,8 +2708,8 @@ type MongoDBCollectionGetProperties struct { Etag *string `json:"_etag,omitempty"` } -// MarshalJSON is the custom marshaler for MongoDBCollectionGetProperties. -func (mdcgp MongoDBCollectionGetProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for MongoDBCollectionGetPropertiesResource. +func (mdcgp MongoDBCollectionGetPropertiesResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) if mdcgp.ID != nil { objectMap["id"] = mdcgp.ID @@ -2906,6 +2977,11 @@ func (mddcup MongoDBDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error // MongoDBDatabaseGetProperties the properties of an Azure Cosmos DB MongoDB database type MongoDBDatabaseGetProperties struct { + Resource *MongoDBDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// MongoDBDatabaseGetPropertiesResource ... +type MongoDBDatabaseGetPropertiesResource struct { // ID - Name of the Cosmos DB MongoDB database ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -3757,6 +3833,14 @@ type Resource struct { Type *string `json:"type,omitempty"` } +// SpatialSpec ... +type SpatialSpec struct { + // Path - The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) + Path *string `json:"path,omitempty"` + // Types - List of path's spatial type + Types *[]SpatialType `json:"types,omitempty"` +} + // SQLContainerCreateUpdateParameters parameters to create and update Cosmos DB container. type SQLContainerCreateUpdateParameters struct { // SQLContainerCreateUpdateProperties - Properties to create and update Azure Cosmos DB container. @@ -3878,6 +3962,11 @@ func (sccup SQLContainerCreateUpdateProperties) MarshalJSON() ([]byte, error) { // SQLContainerGetProperties the properties of an Azure Cosmos DB container type SQLContainerGetProperties struct { + Resource *SQLContainerGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLContainerGetPropertiesResource ... +type SQLContainerGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL container ID *string `json:"id,omitempty"` // IndexingPolicy - The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container @@ -4142,6 +4231,11 @@ func (sdcup SQLDatabaseCreateUpdateProperties) MarshalJSON() ([]byte, error) { // SQLDatabaseGetProperties the properties of an Azure Cosmos DB SQL database type SQLDatabaseGetProperties struct { + Resource *SQLDatabaseGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLDatabaseGetPropertiesResource ... +type SQLDatabaseGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL database ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -4709,6 +4803,11 @@ func (sspcup SQLStoredProcedureCreateUpdateProperties) MarshalJSON() ([]byte, er // SQLStoredProcedureGetProperties the properties of an Azure Cosmos DB StoredProcedure type SQLStoredProcedureGetProperties struct { + Resource *SQLStoredProcedureGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLStoredProcedureGetPropertiesResource ... +type SQLStoredProcedureGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL storedProcedure ID *string `json:"id,omitempty"` // Body - Body of the Stored Procedure @@ -4958,6 +5057,11 @@ func (stcup SQLTriggerCreateUpdateProperties) MarshalJSON() ([]byte, error) { // SQLTriggerGetProperties the properties of an Azure Cosmos DB trigger type SQLTriggerGetProperties struct { + Resource *SQLTriggerGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLTriggerGetPropertiesResource ... +type SQLTriggerGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL trigger ID *string `json:"id,omitempty"` // Body - Body of the Trigger @@ -5216,6 +5320,11 @@ func (sudfcup SQLUserDefinedFunctionCreateUpdateProperties) MarshalJSON() ([]byt // SQLUserDefinedFunctionGetProperties the properties of an Azure Cosmos DB userDefinedFunction type SQLUserDefinedFunctionGetProperties struct { + Resource *SQLUserDefinedFunctionGetPropertiesResource `json:"resource,omitempty"` +} + +// SQLUserDefinedFunctionGetPropertiesResource ... +type SQLUserDefinedFunctionGetPropertiesResource struct { // ID - Name of the Cosmos DB SQL userDefinedFunction ID *string `json:"id,omitempty"` // Body - Body of the User Defined Function @@ -5465,6 +5574,11 @@ func (tcup TableCreateUpdateProperties) MarshalJSON() ([]byte, error) { // TableGetProperties the properties of an Azure Cosmos Table type TableGetProperties struct { + Resource *TableGetPropertiesResource `json:"resource,omitempty"` +} + +// TableGetPropertiesResource ... +type TableGetPropertiesResource struct { // ID - Name of the Cosmos DB table ID *string `json:"id,omitempty"` // Rid - READ-ONLY; A system generated property. A unique identifier. @@ -5671,12 +5785,23 @@ func (future *TableResourcesUpdateTableThroughputFuture) Result(client TableReso // ThroughputSettingsGetProperties the properties of an Azure Cosmos DB resource throughput type ThroughputSettingsGetProperties struct { + Resource *ThroughputSettingsGetPropertiesResource `json:"resource,omitempty"` +} + +// ThroughputSettingsGetPropertiesResource ... +type ThroughputSettingsGetPropertiesResource struct { // Throughput - Value of the Cosmos DB resource throughput Throughput *int32 `json:"throughput,omitempty"` // MinimumThroughput - READ-ONLY; The minimum throughput of the resource MinimumThroughput *string `json:"minimumThroughput,omitempty"` // OfferReplacePending - READ-ONLY; The throughput replace is pending OfferReplacePending *string `json:"offerReplacePending,omitempty"` + // Rid - READ-ONLY; A system generated property. A unique identifier. + Rid *string `json:"_rid,omitempty"` + // Ts - READ-ONLY; A system generated property that denotes the last updated timestamp of the resource. + Ts interface{} `json:"_ts,omitempty"` + // Etag - READ-ONLY; A system generated property representing the resource etag required for optimistic concurrency control. + Etag *string `json:"_etag,omitempty"` } // ThroughputSettingsGetResults an Azure Cosmos DB resource throughput. diff --git a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go index f2ccee7326fd..6985bcb6bc85 100644 --- a/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go +++ b/services/preview/cosmos-db/mgmt/2019-08-01-preview/documentdb/sqlresources.go @@ -75,7 +75,7 @@ func (client SQLResourcesClient) CreateUpdateSQLContainer(ctx context.Context, r {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "createUpdateSQLContainerParameters.SQLContainerCreateUpdateProperties.Resource.PartitionKey.Version", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go index a0e2cb1b8467..bb446b5aba46 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/alerts.go @@ -525,7 +525,7 @@ func (client AlertsClient) List(ctx context.Context, filter string, skiptoken st {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.AlertsClient", "List", err.Error()) } @@ -663,7 +663,7 @@ func (client AlertsClient) ListByAccount(ctx context.Context, billingAccountID s {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.AlertsClient", "ListByAccount", err.Error()) } @@ -802,7 +802,7 @@ func (client AlertsClient) ListByDepartment(ctx context.Context, billingAccountI {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.AlertsClient", "ListByDepartment", err.Error()) } @@ -940,7 +940,7 @@ func (client AlertsClient) ListByEnrollment(ctx context.Context, billingAccountI {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.AlertsClient", "ListByEnrollment", err.Error()) } @@ -1077,7 +1077,7 @@ func (client AlertsClient) ListByManagementGroups(ctx context.Context, managemen {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.AlertsClient", "ListByManagementGroups", err.Error()) } @@ -1214,7 +1214,7 @@ func (client AlertsClient) ListByResourceGroupName(ctx context.Context, resource {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.AlertsClient", "ListByResourceGroupName", err.Error()) } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go index 84de0d391fae..ee70dd07786d 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/billingaccountdimensions.go @@ -67,7 +67,7 @@ func (client BillingAccountDimensionsClient) List(ctx context.Context, billingAc {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.BillingAccountDimensionsClient", "List", err.Error()) } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go index 93fcf8a5fda8..fa4b1e991772 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/resourcegroupdimensions.go @@ -67,7 +67,7 @@ func (client ResourceGroupDimensionsClient) List(ctx context.Context, resourceGr {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.ResourceGroupDimensionsClient", "List", err.Error()) } diff --git a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go index 05031911b853..6d42e66c84d9 100644 --- a/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go +++ b/services/preview/costmanagement/mgmt/2018-08-01-preview/costmanagement/subscriptiondimensions.go @@ -66,7 +66,7 @@ func (client SubscriptionDimensionsClient) List(ctx context.Context, filter stri {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.SubscriptionDimensionsClient", "List", err.Error()) } diff --git a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go index 0e7461a21dcc..72981a13db33 100644 --- a/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go +++ b/services/preview/costmanagement/mgmt/2019-03-01/costmanagement/dimensions.go @@ -67,7 +67,7 @@ func (client DimensionsClient) ListByBillingAccount(ctx context.Context, billing {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "ListByBillingAccount", err.Error()) } @@ -171,7 +171,7 @@ func (client DimensionsClient) ListByDepartment(ctx context.Context, billingAcco {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "ListByDepartment", err.Error()) } @@ -276,7 +276,7 @@ func (client DimensionsClient) ListByEnrollmentAccount(ctx context.Context, bill {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "ListByEnrollmentAccount", err.Error()) } @@ -380,7 +380,7 @@ func (client DimensionsClient) ListByManagementGroup(ctx context.Context, manage {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "ListByManagementGroup", err.Error()) } @@ -483,7 +483,7 @@ func (client DimensionsClient) ListByResourceGroup(ctx context.Context, resource {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "ListByResourceGroup", err.Error()) } @@ -586,7 +586,7 @@ func (client DimensionsClient) ListBySubscription(ctx context.Context, filter st {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("costmanagement.DimensionsClient", "ListBySubscription", err.Error()) } diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go new file mode 100644 index 000000000000..bbdbc5aa19d6 --- /dev/null +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/client.go @@ -0,0 +1,49 @@ +// Package customerlockbox implements the Azure ARM Customerlockbox service API version 2018-02-28-preview. +// +// Azure Customer Lockbox API Reference +package customerlockbox + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Customerlockbox + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Customerlockbox. +type BaseClient struct { + autorest.Client + BaseURI string +} + +// New creates an instance of the BaseClient client. +func New() BaseClient { + return NewWithBaseURI(DefaultBaseURI) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + } +} diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go new file mode 100644 index 000000000000..a4dd8fa71c6f --- /dev/null +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/customerlockboxapi/interfaces.go @@ -0,0 +1,39 @@ +package customerlockboxapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox" +) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result customerlockbox.OperationListResultPage, err error) +} + +var _ OperationsClientAPI = (*customerlockbox.OperationsClient)(nil) + +// RequestsClientAPI contains the set of methods on the RequestsClient type. +type RequestsClientAPI interface { + Get(ctx context.Context, requestID string, subscriptionID string) (result customerlockbox.LockboxRequestResponse, err error) + List(ctx context.Context, subscriptionID string, filter string) (result customerlockbox.RequestListResultPage, err error) + UpdateStatus(ctx context.Context, approval customerlockbox.Approval, subscriptionID string, requestID string) (result customerlockbox.Approval, err error) +} + +var _ RequestsClientAPI = (*customerlockbox.RequestsClient)(nil) diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/models.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/models.go new file mode 100644 index 000000000000..3a0097755374 --- /dev/null +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/models.go @@ -0,0 +1,480 @@ +package customerlockbox + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox" + +// Decision enumerates the values for decision. +type Decision string + +const ( + // Approve ... + Approve Decision = "Approve" + // Deny ... + Deny Decision = "Deny" +) + +// PossibleDecisionValues returns an array of possible values for the Decision const type. +func PossibleDecisionValues() []Decision { + return []Decision{Approve, Deny} +} + +// Status enumerates the values for status. +type Status string + +const ( + // Approved ... + Approved Status = "Approved" + // Approving ... + Approving Status = "Approving" + // Completed ... + Completed Status = "Completed" + // Completing ... + Completing Status = "Completing" + // Denied ... + Denied Status = "Denied" + // Denying ... + Denying Status = "Denying" + // Error ... + Error Status = "Error" + // Expired ... + Expired Status = "Expired" + // Initializing ... + Initializing Status = "Initializing" + // Pending ... + Pending Status = "Pending" + // Revoked ... + Revoked Status = "Revoked" + // Revoking ... + Revoking Status = "Revoking" + // Unknown ... + Unknown Status = "Unknown" +) + +// PossibleStatusValues returns an array of possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{Approved, Approving, Completed, Completing, Denied, Denying, Error, Expired, Initializing, Pending, Revoked, Revoking, Unknown} +} + +// Approval request content object, in the use of Approve or Deny a Lockbox request. +type Approval struct { + autorest.Response `json:"-"` + // Decision - Approval decision to the Lockbox request. Possible values include: 'Approve', 'Deny' + Decision Decision `json:"decision,omitempty"` + // Reason - Reason of the decision + Reason *string `json:"reason,omitempty"` +} + +// ErrorAdditionalInfo an error additional info for the Lockbox service. +type ErrorAdditionalInfo struct { + // Type - The type of error info. + Type *string `json:"type,omitempty"` + Info *ErrorAdditionalInfoInfo `json:"info,omitempty"` +} + +// ErrorAdditionalInfoInfo ... +type ErrorAdditionalInfoInfo struct { + // CurrentStatus - The current status/state of the request quired. Possible values include: 'Initializing', 'Pending', 'Approving', 'Denying', 'Approved', 'Denied', 'Expired', 'Revoking', 'Revoked', 'Error', 'Unknown', 'Completed', 'Completing' + CurrentStatus Status `json:"currentStatus,omitempty"` +} + +// ErrorBody an error response body from the Lockbox service. +type ErrorBody struct { + // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + Code *string `json:"code,omitempty"` + // Message - A message describing the error, intended to be suitable for display in a user interface. + Message *string `json:"message,omitempty"` + // Target - The target of the particular error. For example, the name of the property in error. + Target *string `json:"target,omitempty"` + // AdditionalInfo - A list of error details about the error. + AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` +} + +// ErrorResponse an error response from the Lockbox service. +type ErrorResponse struct { + Error *ErrorBody `json:"error,omitempty"` +} + +// LockboxRequestResponse a Lockbox request response object, containing all information associated with the +// request. +type LockboxRequestResponse struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; The Arm resource id of the Lockbox request. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the Lockbox request. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the Lockbox request. + Type *string `json:"type,omitempty"` + // Properties - The properties that are associated with a lockbox request. + Properties *LockboxRequestResponseProperties `json:"properties,omitempty"` +} + +// LockboxRequestResponseProperties the properties that are associated with a lockbox request. +type LockboxRequestResponseProperties struct { + // RequestID - READ-ONLY; The Lockbox request ID. + RequestID *string `json:"requestId,omitempty"` + // Justification - READ-ONLY; The justification of the requestor. + Justification *string `json:"justification,omitempty"` + // Status - The status of the request. Possible values include: 'Initializing', 'Pending', 'Approving', 'Denying', 'Approved', 'Denied', 'Expired', 'Revoking', 'Revoked', 'Error', 'Unknown', 'Completed', 'Completing' + Status Status `json:"status,omitempty"` + // CreatedDateTime - READ-ONLY; The creation time of the request. + CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` + // ExpirationDateTime - READ-ONLY; The expiration time of the request. + ExpirationDateTime *date.Time `json:"expirationDateTime,omitempty"` + // Duration - READ-ONLY; The duration of the request in hours. + Duration *int32 `json:"duration,omitempty"` + // RequestedResourceIds - READ-ONLY; A list of resource IDs associated with the Lockbox request separated by ','. + RequestedResourceIds *[]string `json:"requestedResourceIds,omitempty"` + // ResourceType - READ-ONLY; The resource type of the requested resources. + ResourceType *string `json:"resourceType,omitempty"` + // SupportRequest - READ-ONLY; The id of the support request associated. + SupportRequest *string `json:"supportRequest,omitempty"` + // SupportCaseURL - READ-ONLY; The url of the support case. + SupportCaseURL *string `json:"supportCaseUrl,omitempty"` + // SubscriptionID - READ-ONLY; The subscription ID. + SubscriptionID *string `json:"subscriptionId,omitempty"` +} + +// Operation operation result model for ARM RP +type Operation struct { + // Name - READ-ONLY; Gets or sets action name + Name *string `json:"name,omitempty"` + // IsDataAction - READ-ONLY; Gets or sets a value indicating whether it is a data plane action + IsDataAction *string `json:"isDataAction,omitempty"` + // Display - READ-ONLY; Contains the localized display information for this particular operation / action. + Display *OperationDisplay `json:"display,omitempty"` + // Properties - READ-ONLY; Gets or sets properties + Properties *string `json:"properties,omitempty"` + // Origin - READ-ONLY; Gets or sets origin + Origin *string `json:"origin,omitempty"` +} + +// OperationDisplay contains the localized display information for this particular operation / action. +type OperationDisplay struct { + // Provider - READ-ONLY; The localized friendly form of the resource provider name. + Provider *string `json:"provider,omitempty"` + // Resource - READ-ONLY; The localized friendly form of the resource type related to this action/operation. + Resource *string `json:"resource,omitempty"` + // Operation - READ-ONLY; The localized friendly name for the operation. + Operation *string `json:"operation,omitempty"` + // Description - READ-ONLY; The localized friendly description for the operation. + Description *string `json:"description,omitempty"` +} + +// OperationListResult result of the request to list Customer Lockbox operations. It contains a list of +// operations. +type OperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of Customer Lockbox operations supported by the Microsoft.StreamAnalytics resource provider. + Value *[]Operation `json:"value,omitempty"` + // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultIterator provides access to a complete listing of Operation values. +type OperationListResultIterator struct { + i int + page OperationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OperationListResultIterator) Response() OperationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OperationListResultIterator) Value() Operation { + if !iter.page.NotDone() { + return Operation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (olr OperationListResult) IsEmpty() bool { + return olr.Value == nil || len(*olr.Value) == 0 +} + +// operationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(olr.NextLink))) +} + +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationListResultPage) Response() OperationListResult { + return page.olr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { + return nil + } + return *page.olr.Value +} + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + +// RequestListResult object containing a list of streaming jobs. +type RequestListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; A list of Lockbox requests. Populated by a 'List' operation. + Value *[]LockboxRequestResponse `json:"value,omitempty"` + // NextLink - READ-ONLY; URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// RequestListResultIterator provides access to a complete listing of LockboxRequestResponse values. +type RequestListResultIterator struct { + i int + page RequestListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *RequestListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RequestListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RequestListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RequestListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter RequestListResultIterator) Response() RequestListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter RequestListResultIterator) Value() LockboxRequestResponse { + if !iter.page.NotDone() { + return LockboxRequestResponse{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RequestListResultIterator type. +func NewRequestListResultIterator(page RequestListResultPage) RequestListResultIterator { + return RequestListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rlr RequestListResult) IsEmpty() bool { + return rlr.Value == nil || len(*rlr.Value) == 0 +} + +// requestListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rlr RequestListResult) requestListResultPreparer(ctx context.Context) (*http.Request, error) { + if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rlr.NextLink))) +} + +// RequestListResultPage contains a page of LockboxRequestResponse values. +type RequestListResultPage struct { + fn func(context.Context, RequestListResult) (RequestListResult, error) + rlr RequestListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *RequestListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RequestListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rlr) + if err != nil { + return err + } + page.rlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RequestListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RequestListResultPage) NotDone() bool { + return !page.rlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RequestListResultPage) Response() RequestListResult { + return page.rlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RequestListResultPage) Values() []LockboxRequestResponse { + if page.rlr.IsEmpty() { + return nil + } + return *page.rlr.Value +} + +// Creates a new instance of the RequestListResultPage type. +func NewRequestListResultPage(getNextPage func(context.Context, RequestListResult) (RequestListResult, error)) RequestListResultPage { + return RequestListResultPage{fn: getNextPage} +} diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go new file mode 100644 index 000000000000..51cb8e1d723b --- /dev/null +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/operations.go @@ -0,0 +1,147 @@ +package customerlockbox + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the azure Customer Lockbox API Reference +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient() OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI)} +} + +// List lists all the available REST API operations. +func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.olr.Response.Response != nil { + sc = result.olr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.olr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerlockbox.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.olr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2018-02-28-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.CustomerLockbox/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.operationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "customerlockbox.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "customerlockbox.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go new file mode 100644 index 000000000000..f4ceaa49a32e --- /dev/null +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/requests.go @@ -0,0 +1,313 @@ +package customerlockbox + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RequestsClient is the azure Customer Lockbox API Reference +type RequestsClient struct { + BaseClient +} + +// NewRequestsClient creates an instance of the RequestsClient client. +func NewRequestsClient() RequestsClient { + return NewRequestsClientWithBaseURI(DefaultBaseURI) +} + +// NewRequestsClientWithBaseURI creates an instance of the RequestsClient client. +func NewRequestsClientWithBaseURI(baseURI string) RequestsClient { + return RequestsClient{NewWithBaseURI(baseURI)} +} + +// Get get Customer Lockbox request +// Parameters: +// requestID - the Lockbox request ID. +// subscriptionID - the Azure subscription ID. This is a GUID-formatted string (e.g. +// 00000000-0000-0000-0000-000000000000) +func (client RequestsClient) Get(ctx context.Context, requestID string, subscriptionID string) (result LockboxRequestResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RequestsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, requestID, subscriptionID) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RequestsClient) GetPreparer(ctx context.Context, requestID string, subscriptionID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestId": autorest.Encode("path", requestID), + "subscriptionId": autorest.Encode("path", subscriptionID), + } + + const APIVersion = "2018-02-28-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.CustomerLockbox/requests/{requestId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RequestsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RequestsClient) GetResponder(resp *http.Response) (result LockboxRequestResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the Lockbox requests in the given subscription. +// Parameters: +// subscriptionID - the Azure subscription ID. This is a GUID-formatted string (e.g. +// 00000000-0000-0000-0000-000000000000) +// filter - the $filter OData query parameter. Only filter by request status is supported, e.g +// $filter=properties/status eq 'Pending' +func (client RequestsClient) List(ctx context.Context, subscriptionID string, filter string) (result RequestListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RequestsClient.List") + defer func() { + sc := -1 + if result.rlr.Response.Response != nil { + sc = result.rlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, subscriptionID, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "List", resp, "Failure sending request") + return + } + + result.rlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client RequestsClient) ListPreparer(ctx context.Context, subscriptionID string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", subscriptionID), + } + + queryParameters := map[string]interface{}{} + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.CustomerLockbox/requests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client RequestsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RequestsClient) ListResponder(resp *http.Response) (result RequestListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client RequestsClient) listNextResults(ctx context.Context, lastResults RequestListResult) (result RequestListResult, err error) { + req, err := lastResults.requestListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client RequestsClient) ListComplete(ctx context.Context, subscriptionID string, filter string) (result RequestListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RequestsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, subscriptionID, filter) + return +} + +// UpdateStatus update Customer Lockbox request approval status API +// Parameters: +// approval - the approval object to update request status. +// subscriptionID - the Azure subscription ID. This is a GUID-formatted string (e.g. +// 00000000-0000-0000-0000-000000000000) +// requestID - the Lockbox request ID. +func (client RequestsClient) UpdateStatus(ctx context.Context, approval Approval, subscriptionID string, requestID string) (result Approval, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RequestsClient.UpdateStatus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateStatusPreparer(ctx, approval, subscriptionID, requestID) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "UpdateStatus", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "UpdateStatus", resp, "Failure sending request") + return + } + + result, err = client.UpdateStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerlockbox.RequestsClient", "UpdateStatus", resp, "Failure responding to request") + } + + return +} + +// UpdateStatusPreparer prepares the UpdateStatus request. +func (client RequestsClient) UpdateStatusPreparer(ctx context.Context, approval Approval, subscriptionID string, requestID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "requestId": autorest.Encode("path", requestID), + "subscriptionId": autorest.Encode("path", subscriptionID), + } + + const APIVersion = "2018-02-28-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.CustomerLockbox/requests/{requestId}/UpdateApproval", pathParameters), + autorest.WithJSON(approval), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateStatusSender sends the UpdateStatus request. The method will close the +// http.Response Body if it receives an error. +func (client RequestsClient) UpdateStatusSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateStatusResponder handles the response to the UpdateStatus request. The method always +// closes the http.Response Body. +func (client RequestsClient) UpdateStatusResponder(resp *http.Response) (result Approval, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/version.go b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/version.go new file mode 100644 index 000000000000..0954c67c5657 --- /dev/null +++ b/services/preview/customerlockbox/mgmt/2018-02-28-preview/customerlockbox/version.go @@ -0,0 +1,30 @@ +package customerlockbox + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " customerlockbox/2018-02-28-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go index 9300c51800b2..3514f0f74aaf 100644 --- a/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go +++ b/services/preview/datafactory/mgmt/2017-09-01-preview/datafactory/pipelines.go @@ -77,7 +77,7 @@ func (client PipelinesClient) CreateOrUpdate(ctx context.Context, resourceGroupN {TargetValue: pipeline, Constraints: []validation.Constraint{{Target: "pipeline.Pipeline", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "pipeline.Pipeline.Concurrency", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "pipeline.Pipeline.Concurrency", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "pipeline.Pipeline.Concurrency", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("datafactory.PipelinesClient", "CreateOrUpdate", err.Error()) } diff --git a/services/preview/datalake/analytics/2017-09-01-preview/job/job.go b/services/preview/datalake/analytics/2017-09-01-preview/job/job.go index ec738c306ff2..285a289e76e0 100644 --- a/services/preview/datalake/analytics/2017-09-01-preview/job/job.go +++ b/services/preview/datalake/analytics/2017-09-01-preview/job/job.go @@ -559,10 +559,10 @@ func (client Client) List(ctx context.Context, accountName string, filter string if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("job.Client", "List", err.Error()) } diff --git a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/models.go b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/models.go index 69f7c1eac0ee..9952b58f15e2 100644 --- a/services/preview/datashare/mgmt/2018-11-01-preview/datashare/models.go +++ b/services/preview/datashare/mgmt/2018-11-01-preview/datashare/models.go @@ -5850,6 +5850,8 @@ type ProviderShareSubscriptionProperties struct { ConsumerTenantName *string `json:"consumerTenantName,omitempty"` // CreatedAt - READ-ONLY; created at CreatedAt *date.Time `json:"createdAt,omitempty"` + // ProviderEmail - READ-ONLY; Email of the provider who created the share + ProviderEmail *string `json:"providerEmail,omitempty"` // ProviderName - READ-ONLY; Name of the provider who created the share ProviderName *string `json:"providerName,omitempty"` // SharedAt - READ-ONLY; Shared at diff --git a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go index e406e8c21295..df0b7cb9b477 100644 --- a/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go +++ b/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub/namespaces.go @@ -70,13 +70,13 @@ func (client NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.EHNamespaceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("eventhub.NamespacesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go index edb7e01634df..6125a546f78f 100644 --- a/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go +++ b/services/preview/hanaonazure/mgmt/2017-11-03-preview/hanaonazure/models.go @@ -935,8 +935,14 @@ type SapMonitorProperties struct { ProvisioningState HanaProvisioningStatesEnum `json:"provisioningState,omitempty"` // ManagedResourceGroupName - READ-ONLY; The name of the resource group the SAP Monitor resources get deployed into. ManagedResourceGroupName *string `json:"managedResourceGroupName,omitempty"` - // LogAnalyticsWorkspaceArmID - READ-ONLY; The ARM ID of the Log Analytics Workspace that is used for monitoring + // LogAnalyticsWorkspaceArmID - The ARM ID of the Log Analytics Workspace that is used for monitoring LogAnalyticsWorkspaceArmID *string `json:"logAnalyticsWorkspaceArmId,omitempty"` + // EnableCustomerAnalytics - The value indicating whether to send analytics to Microsoft + EnableCustomerAnalytics *bool `json:"enableCustomerAnalytics,omitempty"` + // LogAnalyticsWorkspaceID - The workspace ID of the log analytics workspace to be used for monitoring + LogAnalyticsWorkspaceID *string `json:"logAnalyticsWorkspaceId,omitempty"` + // LogAnalyticsWorkspaceSharedKey - The shared key of the log analytics workspace that is used for monitoring + LogAnalyticsWorkspaceSharedKey *string `json:"logAnalyticsWorkspaceSharedKey,omitempty"` } // SapMonitorsCreateFuture an abstraction for monitoring and retrieving the results of a long-running diff --git a/services/preview/hdinsight/2018-11-01-preview/hdinsight/job.go b/services/preview/hdinsight/2018-11-01-preview/hdinsight/job.go index ea916f02dedb..f4d7f5b4a81b 100644 --- a/services/preview/hdinsight/2018-11-01-preview/hdinsight/job.go +++ b/services/preview/hdinsight/2018-11-01-preview/hdinsight/job.go @@ -361,7 +361,7 @@ func (client JobClient) ListAfterJobID(ctx context.Context, jobid string, numrec if err := validation.Validate([]validation.Validation{ {TargetValue: numrecords, Constraints: []validation.Constraint{{Target: "numrecords", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "numrecords", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "numrecords", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("hdinsight.JobClient", "ListAfterJobID", err.Error()) } diff --git a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go index f8c95695134c..32cd6b0803a5 100644 --- a/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go +++ b/services/preview/healthcareapis/mgmt/2018-08-20-preview/healthcareapis/services.go @@ -155,13 +155,13 @@ func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa {Target: "serviceDescription.Properties.CosmosDbConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.InclusiveMaximum, Rule: int64(10000), Chain: nil}, - {Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.InclusiveMinimum, Rule: 400, Chain: nil}, + {Target: "serviceDescription.Properties.CosmosDbConfiguration.OfferThroughput", Name: validation.InclusiveMinimum, Rule: int64(400), Chain: nil}, }}, }}, {Target: "serviceDescription.Properties.CorsConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.InclusiveMaximum, Rule: int64(99999), Chain: nil}, - {Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "serviceDescription.Properties.CorsConfiguration.MaxAge", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go b/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go index 317768d01ebe..279bb326a5c8 100644 --- a/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go +++ b/services/preview/iothub/mgmt/2018-12-01-preview/devices/iothubresource.go @@ -241,12 +241,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go b/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go index 8cdb7b39aab8..7d1747026199 100644 --- a/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go +++ b/services/preview/iothub/mgmt/2019-03-22-preview/devices/iothubresource.go @@ -241,12 +241,12 @@ func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceG {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}, diff --git a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go index 84b33af964fc..49423963093f 100644 --- a/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go +++ b/services/preview/machinelearning/mgmt/2016-05-01-preview/webservices/webservices.go @@ -68,7 +68,7 @@ func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName strin Chain: []validation.Constraint{{Target: "createOrUpdatePayload.Properties.RealtimeConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.InclusiveMaximum, Rule: int64(200), Chain: nil}, - {Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.InclusiveMinimum, Rule: 4, Chain: nil}, + {Target: "createOrUpdatePayload.Properties.RealtimeConfiguration.MaxConcurrentCalls", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil}, }}, }}, {Target: "createOrUpdatePayload.Properties.MachineLearningWorkspace", Name: validation.Null, Rule: false, diff --git a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go index e8a7e14ef5b8..ab04b276ab31 100644 --- a/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go +++ b/services/preview/machinelearning/mgmt/2017-08-01-preview/compute/operationalizationclusters.go @@ -170,11 +170,11 @@ func (client OperationalizationClustersClient) CreateOrUpdate(ctx context.Contex }}, {Target: "parameters.OperationalizationClusterProperties.ContainerService.MasterCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.OperationalizationClusterProperties.ContainerService.MasterCount", Name: validation.InclusiveMaximum, Rule: int64(5), Chain: nil}, - {Target: "parameters.OperationalizationClusterProperties.ContainerService.MasterCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.OperationalizationClusterProperties.ContainerService.MasterCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "parameters.OperationalizationClusterProperties.ContainerService.AgentCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.OperationalizationClusterProperties.ContainerService.AgentCount", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.OperationalizationClusterProperties.ContainerService.AgentCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.OperationalizationClusterProperties.ContainerService.AgentCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, {Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration", Name: validation.Null, Rule: false, @@ -184,9 +184,9 @@ func (client OperationalizationClustersClient) CreateOrUpdate(ctx context.Contex }}, {Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration.AutoScale", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration.AutoScale.MinReplicas", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration.AutoScale.MinReplicas", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration.AutoScale.MinReplicas", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, {Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration.AutoScale.MaxReplicas", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration.AutoScale.MaxReplicas", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.OperationalizationClusterProperties.GlobalServiceConfiguration.AutoScale.MaxReplicas", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}, }}, }}}}}); err != nil { diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go index 3dc627a19697..0a8e16ec3863 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/groups.go @@ -308,7 +308,7 @@ func (client GroupsClient) ListByManagedNetwork(ctx context.Context, resourceGro {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("managednetwork.GroupsClient", "ListByManagedNetwork", err.Error()) } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go index c8f386b685fb..7c8863c4bc82 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/managednetworks.go @@ -302,7 +302,7 @@ func (client ManagedNetworksClient) ListByResourceGroup(ctx context.Context, res {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("managednetwork.ManagedNetworksClient", "ListByResourceGroup", err.Error()) } @@ -434,7 +434,7 @@ func (client ManagedNetworksClient) ListBySubscription(ctx context.Context, top {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("managednetwork.ManagedNetworksClient", "ListBySubscription", err.Error()) } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go index c3a952335c4c..f65ece446706 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/models.go @@ -352,7 +352,7 @@ type GroupProperties struct { VirtualNetworks *[]ResourceID `json:"virtualNetworks,omitempty"` // Subnets - The collection of subnets covered by the Managed Network Subnets *[]ResourceID `json:"subnets,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' + // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -419,7 +419,7 @@ type HubAndSpokePeeringPolicyProperties struct { Spokes *[]ResourceID `json:"spokes,omitempty"` // Mesh - Gets or sets the mesh group IDs Mesh *[]ResourceID `json:"mesh,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' + // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -735,7 +735,7 @@ type MeshPeeringPolicyProperties struct { Spokes *[]ResourceID `json:"spokes,omitempty"` // Mesh - Gets or sets the mesh group IDs Mesh *[]ResourceID `json:"mesh,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' + // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -1130,7 +1130,7 @@ type PeeringPolicyProperties struct { Spokes *[]ResourceID `json:"spokes,omitempty"` // Mesh - Gets or sets the mesh group IDs Mesh *[]ResourceID `json:"mesh,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' + // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -1142,7 +1142,7 @@ type Properties struct { Scope *Scope `json:"scope,omitempty"` // Connectivity - READ-ONLY; The collection of groups and policies concerned with connectivity Connectivity *ConnectivityCollection `json:"connectivity,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' + // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -1181,7 +1181,7 @@ type ResourceID struct { // ResourceProperties base for resource properties. type ResourceProperties struct { - // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' + // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -1437,7 +1437,7 @@ func NewScopeAssignmentListResultPage(getNextPage func(context.Context, ScopeAss type ScopeAssignmentProperties struct { // AssignedManagedNetwork - The managed network ID with scope will be assigned to. AssignedManagedNetwork *string `json:"assignedManagedNetwork,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' + // ProvisioningState - READ-ONLY; Provisioning state of the ManagedNetwork resource. Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go index a4281b3da967..e6242d4e9823 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/peeringpolicies.go @@ -308,7 +308,7 @@ func (client PeeringPoliciesClient) ListByManagedNetwork(ctx context.Context, re {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("managednetwork.PeeringPoliciesClient", "ListByManagedNetwork", err.Error()) } diff --git a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go index 0c4741c9de5b..e22fe1142fec 100644 --- a/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go +++ b/services/preview/managednetwork/mgmt/2019-06-01-preview/managednetwork/scopeassignments.go @@ -46,9 +46,9 @@ func NewScopeAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) // Parameters: // parameters - parameters supplied to the specify which Managed Network this scope is being assigned // scope - the base resource of the scope assignment to create. The scope can be any REST resource instance. -// For example, use '/subscriptions/{subscription-id}/' for a subscription, -// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and -// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' +// For example, use 'subscriptions/{subscription-id}' for a subscription, +// 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and +// 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' // for a resource. // scopeAssignmentName - the name of the scope assignment to create. func (client ScopeAssignmentsClient) CreateOrUpdate(ctx context.Context, parameters ScopeAssignment, scope string, scopeAssignmentName string) (result ScopeAssignment, err error) { diff --git a/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go b/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go index 6060395c2df3..e96cea0a6184 100644 --- a/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2017-05-01-preview/insights/logprofiles.go @@ -64,7 +64,7 @@ func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileNa {Target: "parameters.LogProfileProperties.RetentionPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("insights.LogProfilesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go index 6060395c2df3..e96cea0a6184 100644 --- a/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go @@ -64,7 +64,7 @@ func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileNa {Target: "parameters.LogProfileProperties.RetentionPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("insights.LogProfilesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go index 6060395c2df3..e96cea0a6184 100644 --- a/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-09-01/insights/logprofiles.go @@ -64,7 +64,7 @@ func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileNa {Target: "parameters.LogProfileProperties.RetentionPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("insights.LogProfilesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go b/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go index 6060395c2df3..e96cea0a6184 100644 --- a/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2018-11-01-preview/insights/logprofiles.go @@ -64,7 +64,7 @@ func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileNa {Target: "parameters.LogProfileProperties.RetentionPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("insights.LogProfilesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go index 6060395c2df3..e96cea0a6184 100644 --- a/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2019-03-01/insights/logprofiles.go @@ -64,7 +64,7 @@ func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileNa {Target: "parameters.LogProfileProperties.RetentionPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("insights.LogProfilesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go b/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go index 6060395c2df3..e96cea0a6184 100644 --- a/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go +++ b/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go @@ -64,7 +64,7 @@ func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileNa {Target: "parameters.LogProfileProperties.RetentionPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Enabled", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.LogProfileProperties.RetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, }}}}}); err != nil { return result, validation.NewError("insights.LogProfilesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/models.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/models.go index 504b3d0d5f8e..81a24a3c8e83 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/models.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/models.go @@ -68,6 +68,19 @@ func PossibleGeoRedundantBackupValues() []GeoRedundantBackup { return []GeoRedundantBackup{Disabled, Enabled} } +// IdentityType enumerates the values for identity type. +type IdentityType string + +const ( + // SystemAssigned ... + SystemAssigned IdentityType = "SystemAssigned" +) + +// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{SystemAssigned} +} + // OperationOrigin enumerates the values for operation origin. type OperationOrigin string @@ -121,6 +134,8 @@ func PossibleServerStateValues() []ServerState { type ServerVersion string const ( + // EightFullStopZero ... + EightFullStopZero ServerVersion = "8.0" // FiveFullStopSeven ... FiveFullStopSeven ServerVersion = "5.7" // FiveFullStopSix ... @@ -129,7 +144,7 @@ const ( // PossibleServerVersionValues returns an array of possible values for the ServerVersion const type. func PossibleServerVersionValues() []ServerVersion { - return []ServerVersion{FiveFullStopSeven, FiveFullStopSix} + return []ServerVersion{EightFullStopZero, FiveFullStopSeven, FiveFullStopSix} } // SkuTier enumerates the values for sku tier. @@ -816,6 +831,16 @@ type ProxyResource struct { Type *string `json:"type,omitempty"` } +// ResourceIdentity azure Active Directory identity configuration for a resource. +type ResourceIdentity struct { + // PrincipalID - READ-ONLY; The Azure Active Directory principal id. + PrincipalID *uuid.UUID `json:"principalId,omitempty"` + // Type - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' + Type IdentityType `json:"type,omitempty"` + // TenantID - READ-ONLY; The Azure Active Directory tenant id. + TenantID *uuid.UUID `json:"tenantId,omitempty"` +} + // SecurityAlertPolicyProperties properties of a security alert policy. type SecurityAlertPolicyProperties struct { // State - Specifies the state of the policy, whether it is enabled or disabled. Possible values include: 'ServerSecurityAlertPolicyStateEnabled', 'ServerSecurityAlertPolicyStateDisabled' @@ -837,6 +862,8 @@ type SecurityAlertPolicyProperties struct { // Server represents a server. type Server struct { autorest.Response `json:"-"` + // Identity - The Azure Active Directory identity of the server. + Identity *ResourceIdentity `json:"identity,omitempty"` // Sku - The SKU (pricing tier) of the server. Sku *Sku `json:"sku,omitempty"` // ServerProperties - Properties of the server. @@ -856,6 +883,9 @@ type Server struct { // MarshalJSON is the custom marshaler for Server. func (s Server) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if s.Identity != nil { + objectMap["identity"] = s.Identity + } if s.Sku != nil { objectMap["sku"] = s.Sku } @@ -880,6 +910,15 @@ func (s *Server) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "identity": + if v != nil { + var identity ResourceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + s.Identity = &identity + } case "sku": if v != nil { var sku Sku @@ -1188,7 +1227,7 @@ type ServerListResult struct { type ServerProperties struct { // AdministratorLogin - The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). AdministratorLogin *string `json:"administratorLogin,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1219,7 +1258,7 @@ type BasicServerPropertiesForCreate interface { // ServerPropertiesForCreate the properties used to create a new server. type ServerPropertiesForCreate struct { - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1333,7 +1372,7 @@ type ServerPropertiesForDefaultCreate struct { AdministratorLogin *string `json:"administratorLogin,omitempty"` // AdministratorLoginPassword - The password of the administrator login. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1403,7 +1442,7 @@ func (spfdc ServerPropertiesForDefaultCreate) AsBasicServerPropertiesForCreate() type ServerPropertiesForGeoRestore struct { // SourceServerID - The source server id to restore from. SourceServerID *string `json:"sourceServerId,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1469,7 +1508,7 @@ func (spfgr ServerPropertiesForGeoRestore) AsBasicServerPropertiesForCreate() (B type ServerPropertiesForReplica struct { // SourceServerID - The master server id to create replica from. SourceServerID *string `json:"sourceServerId,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1537,7 +1576,7 @@ type ServerPropertiesForRestore struct { SourceServerID *string `json:"sourceServerId,omitempty"` // RestorePointInTime - Restore point creation time (ISO8601 format), specifying the time to restore from. RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` - // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - Server version. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` @@ -1881,7 +1920,7 @@ type ServerUpdateParametersProperties struct { StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // AdministratorLoginPassword - The password of the administrator login. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - // Version - The version of a server. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven' + // Version - The version of a server. Possible values include: 'FiveFullStopSix', 'FiveFullStopSeven', 'EightFullStopZero' Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` diff --git a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go index 129025737fd0..825447fd9f74 100644 --- a/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go +++ b/services/preview/mysql/mgmt/2017-12-01-preview/mysql/servers.go @@ -64,7 +64,7 @@ func (client ServersClient) Create(ctx context.Context, resourceGroupName string {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go b/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go index 292291e4ee79..952b2983f795 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/pools.go @@ -69,7 +69,7 @@ func (client PoolsClient) CreateOrUpdate(ctx context.Context, body CapacityPool, }}, {Target: "body.PoolProperties.Size", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.PoolProperties.Size", Name: validation.InclusiveMaximum, Rule: int64(549755813888000), Chain: nil}, - {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: 4398046511104, Chain: nil}, + {Target: "body.PoolProperties.Size", Name: validation.InclusiveMinimum, Rule: int64(4398046511104), Chain: nil}, }}, }}}}, {TargetValue: resourceGroupName, diff --git a/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go b/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go index 8ee25171a429..bf7da3deecd4 100644 --- a/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go +++ b/services/preview/netapp/mgmt/2017-08-15/netapp/volumes.go @@ -71,7 +71,7 @@ func (client VolumesClient) CreateOrUpdate(ctx context.Context, body Volume, res {Target: "body.VolumeProperties.CreationToken", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.VolumeProperties.UsageThreshold", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMaximum, Rule: int64(109951162777600), Chain: nil}, - {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: 107374182400, Chain: nil}, + {Target: "body.VolumeProperties.UsageThreshold", Name: validation.InclusiveMinimum, Rule: int64(107374182400), Chain: nil}, }}, }}}}, {TargetValue: resourceGroupName, diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go index 0e358882a44f..9f5a4766d789 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go @@ -66,7 +66,7 @@ func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroup Constraints: []validation.Constraint{{Target: "parameters.WorkspaceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.InclusiveMaximum, Rule: int64(730), Chain: nil}, - {Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.InclusiveMinimum, Rule: -1, Chain: nil}, + {Target: "parameters.WorkspaceProperties.RetentionInDays", Name: validation.InclusiveMinimum, Rule: int64(-1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("operationalinsights.WorkspacesClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go index a8b2c712d483..25bb0093cfca 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/clientgroups.go @@ -286,7 +286,7 @@ func (client ClientGroupsClient) ListMembers(ctx context.Context, resourceGroupN {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(200), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicemap.ClientGroupsClient", "ListMembers", err.Error()) } diff --git a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go index 17ce0aede646..7e0e22f38b13 100644 --- a/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go +++ b/services/preview/operationalinsights/mgmt/2015-11-01-preview/servicemap/machines.go @@ -287,7 +287,7 @@ func (client MachinesClient) ListByWorkspace(ctx context.Context, resourceGroupN {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(200), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicemap.MachinesClient", "ListByWorkspace", err.Error()) } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go index d4c4421f66e2..28c2d9196d15 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policyevents.go @@ -145,7 +145,7 @@ func (client PolicyEventsClient) ListQueryResultsForManagementGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -261,7 +261,7 @@ func (client PolicyEventsClient) ListQueryResultsForPolicyDefinition(ctx context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForPolicyDefinition", err.Error()) } @@ -378,7 +378,7 @@ func (client PolicyEventsClient) ListQueryResultsForPolicySetDefinition(ctx cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForPolicySetDefinition", err.Error()) } @@ -494,7 +494,7 @@ func (client PolicyEventsClient) ListQueryResultsForResource(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResource", err.Error()) } @@ -609,7 +609,7 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -727,7 +727,7 @@ func (client PolicyEventsClient) ListQueryResultsForResourceGroupLevelPolicyAssi if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -844,7 +844,7 @@ func (client PolicyEventsClient) ListQueryResultsForSubscription(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForSubscription", err.Error()) } @@ -960,7 +960,7 @@ func (client PolicyEventsClient) ListQueryResultsForSubscriptionLevelPolicyAssig if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyEventsClient", "ListQueryResultsForSubscriptionLevelPolicyAssignment", err.Error()) } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go index 628532999469..1d23d206102d 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policystates.go @@ -147,7 +147,7 @@ func (client PolicyStatesClient) ListQueryResultsForManagementGroup(ctx context. if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -265,7 +265,7 @@ func (client PolicyStatesClient) ListQueryResultsForPolicyDefinition(ctx context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForPolicyDefinition", err.Error()) } @@ -384,7 +384,7 @@ func (client PolicyStatesClient) ListQueryResultsForPolicySetDefinition(ctx cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForPolicySetDefinition", err.Error()) } @@ -504,7 +504,7 @@ func (client PolicyStatesClient) ListQueryResultsForResource(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResource", err.Error()) } @@ -624,7 +624,7 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -744,7 +744,7 @@ func (client PolicyStatesClient) ListQueryResultsForResourceGroupLevelPolicyAssi if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -863,7 +863,7 @@ func (client PolicyStatesClient) ListQueryResultsForSubscription(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForSubscription", err.Error()) } @@ -981,7 +981,7 @@ func (client PolicyStatesClient) ListQueryResultsForSubscriptionLevelPolicyAssig if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "ListQueryResultsForSubscriptionLevelPolicyAssignment", err.Error()) } @@ -1092,7 +1092,7 @@ func (client PolicyStatesClient) SummarizeForManagementGroup(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForManagementGroup", err.Error()) } @@ -1194,7 +1194,7 @@ func (client PolicyStatesClient) SummarizeForPolicyDefinition(ctx context.Contex if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForPolicyDefinition", err.Error()) } @@ -1297,7 +1297,7 @@ func (client PolicyStatesClient) SummarizeForPolicySetDefinition(ctx context.Con if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForPolicySetDefinition", err.Error()) } @@ -1399,7 +1399,7 @@ func (client PolicyStatesClient) SummarizeForResource(ctx context.Context, resou if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResource", err.Error()) } @@ -1500,7 +1500,7 @@ func (client PolicyStatesClient) SummarizeForResourceGroup(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResourceGroup", err.Error()) } @@ -1604,7 +1604,7 @@ func (client PolicyStatesClient) SummarizeForResourceGroupLevelPolicyAssignment( if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForResourceGroupLevelPolicyAssignment", err.Error()) } @@ -1707,7 +1707,7 @@ func (client PolicyStatesClient) SummarizeForSubscription(ctx context.Context, s if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForSubscription", err.Error()) } @@ -1808,7 +1808,7 @@ func (client PolicyStatesClient) SummarizeForSubscriptionLevelPolicyAssignment(c if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyStatesClient", "SummarizeForSubscriptionLevelPolicyAssignment", err.Error()) } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go index cfcb71c32715..dd5a4ecd9183 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/policytrackedresources.go @@ -60,7 +60,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForManagementGroup(ct if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForManagementGroup", err.Error()) } @@ -189,7 +189,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForResource(ctx conte if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForResource", err.Error()) } @@ -318,7 +318,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForResourceGroup(ctx if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForResourceGroup", err.Error()) } @@ -447,7 +447,7 @@ func (client PolicyTrackedResourcesClient) ListQueryResultsForSubscription(ctx c if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.PolicyTrackedResourcesClient", "ListQueryResultsForSubscription", err.Error()) } diff --git a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go index 84f777ab2c87..af8bdb9c2715 100644 --- a/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go +++ b/services/preview/policyinsights/mgmt/2018-07-01-preview/policyinsights/remediations.go @@ -1312,7 +1312,7 @@ func (client RemediationsClient) ListDeploymentsAtManagementGroup(ctx context.Co if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtManagementGroup", err.Error()) } @@ -1438,7 +1438,7 @@ func (client RemediationsClient) ListDeploymentsAtResource(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtResource", err.Error()) } @@ -1564,7 +1564,7 @@ func (client RemediationsClient) ListDeploymentsAtResourceGroup(ctx context.Cont if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtResourceGroup", err.Error()) } @@ -1690,7 +1690,7 @@ func (client RemediationsClient) ListDeploymentsAtSubscription(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListDeploymentsAtSubscription", err.Error()) } @@ -1815,7 +1815,7 @@ func (client RemediationsClient) ListForManagementGroup(ctx context.Context, man if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForManagementGroup", err.Error()) } @@ -1943,7 +1943,7 @@ func (client RemediationsClient) ListForResource(ctx context.Context, resourceID if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForResource", err.Error()) } @@ -2071,7 +2071,7 @@ func (client RemediationsClient) ListForResourceGroup(ctx context.Context, subsc if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForResourceGroup", err.Error()) } @@ -2199,7 +2199,7 @@ func (client RemediationsClient) ListForSubscription(ctx context.Context, subscr if err := validation.Validate([]validation.Validation{ {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("policyinsights.RemediationsClient", "ListForSubscription", err.Error()) } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go index 853ba11d2c91..41249399842b 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go @@ -68,6 +68,19 @@ func PossibleGeoRedundantBackupValues() []GeoRedundantBackup { return []GeoRedundantBackup{Disabled, Enabled} } +// IdentityType enumerates the values for identity type. +type IdentityType string + +const ( + // SystemAssigned ... + SystemAssigned IdentityType = "SystemAssigned" +) + +// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{SystemAssigned} +} + // OperationOrigin enumerates the values for operation origin. type OperationOrigin string @@ -824,6 +837,16 @@ type ProxyResource struct { Type *string `json:"type,omitempty"` } +// ResourceIdentity azure Active Directory identity configuration for a resource. +type ResourceIdentity struct { + // PrincipalID - READ-ONLY; The Azure Active Directory principal id. + PrincipalID *uuid.UUID `json:"principalId,omitempty"` + // Type - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' + Type IdentityType `json:"type,omitempty"` + // TenantID - READ-ONLY; The Azure Active Directory tenant id. + TenantID *uuid.UUID `json:"tenantId,omitempty"` +} + // SecurityAlertPolicyProperties properties of a security alert policy. type SecurityAlertPolicyProperties struct { // State - Specifies the state of the policy, whether it is enabled or disabled. Possible values include: 'ServerSecurityAlertPolicyStateEnabled', 'ServerSecurityAlertPolicyStateDisabled' @@ -845,6 +868,8 @@ type SecurityAlertPolicyProperties struct { // Server represents a server. type Server struct { autorest.Response `json:"-"` + // Identity - The Azure Active Directory identity of the server. + Identity *ResourceIdentity `json:"identity,omitempty"` // Sku - The SKU (pricing tier) of the server. Sku *Sku `json:"sku,omitempty"` // ServerProperties - Properties of the server. @@ -864,6 +889,9 @@ type Server struct { // MarshalJSON is the custom marshaler for Server. func (s Server) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if s.Identity != nil { + objectMap["identity"] = s.Identity + } if s.Sku != nil { objectMap["sku"] = s.Sku } @@ -888,6 +916,15 @@ func (s *Server) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "identity": + if v != nil { + var identity ResourceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + s.Identity = &identity + } case "sku": if v != nil { var sku Sku diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go index 6100d12369f9..73fbb1bd824e 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/servers.go @@ -64,7 +64,7 @@ func (client ServersClient) Create(ctx context.Context, resourceGroupName string {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { diff --git a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go index ed8e2e4d8161..628c6b2865ea 100644 --- a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go +++ b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/client.go @@ -154,7 +154,7 @@ func (client BaseClient) ResourceChanges(ctx context.Context, parameters Resourc {Target: "parameters.Interval", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "parameters.Top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.Top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("resourcegraph.BaseClient", "ResourceChanges", err.Error()) } @@ -238,10 +238,10 @@ func (client BaseClient) Resources(ctx context.Context, query QueryRequest) (res {Target: "query.Options", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "query.Options.Top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "query.Options.Top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "query.Options.Top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "query.Options.Top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "query.Options.Skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "query.Options.Skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "query.Options.Skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("resourcegraph.BaseClient", "Resources", err.Error()) } diff --git a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go index 28f8e2326337..97607a265bfc 100644 --- a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go +++ b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/graphquery.go @@ -102,7 +102,7 @@ func (client GraphQueryClient) CreateOrUpdatePreparer(ctx context.Context, resou autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), autorest.WithJSON(properties), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -180,7 +180,7 @@ func (client GraphQueryClient) DeletePreparer(ctx context.Context, resourceGroup preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -256,7 +256,7 @@ func (client GraphQueryClient) GetPreparer(ctx context.Context, resourceGroupNam preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -332,7 +332,7 @@ func (client GraphQueryClient) ListPreparer(ctx context.Context, resourceGroupNa preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -444,12 +444,11 @@ func (client GraphQueryClient) UpdatePreparer(ctx context.Context, resourceGroup "api-version": APIVersion, } - body.ETag = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}", pathParameters), autorest.WithJSON(body), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) diff --git a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/models.go b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/models.go index 2cfc54533c8f..8851b392325c 100644 --- a/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/models.go +++ b/services/preview/resourcegraph/mgmt/2018-09-01/resourcegraph/models.go @@ -611,8 +611,6 @@ type GraphQueryPropertiesUpdateParameters struct { Description *string `json:"description,omitempty"` // Query - KQL query that will be graph. Query *string `json:"query,omitempty"` - // ResultKind - Enum indicating a type of graph query. Possible values include: 'Basic' - ResultKind ResultKind `json:"resultKind,omitempty"` } // GraphQueryResource graph Query entity definition. @@ -626,7 +624,7 @@ type GraphQueryResource struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // ETag - READ-ONLY; This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. + // ETag - This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. ETag *string `json:"eTag,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` @@ -638,6 +636,9 @@ func (gqr GraphQueryResource) MarshalJSON() ([]byte, error) { if gqr.GraphQueryProperties != nil { objectMap["properties"] = gqr.GraphQueryProperties } + if gqr.ETag != nil { + objectMap["eTag"] = gqr.ETag + } if gqr.Tags != nil { objectMap["tags"] = gqr.Tags } @@ -718,7 +719,7 @@ func (gqr *GraphQueryResource) UnmarshalJSON(body []byte) error { type GraphQueryUpdateParameters struct { // Tags - Resource tags Tags map[string]*string `json:"tags"` - // ETag - READ-ONLY; This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. + // ETag - This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. ETag *string `json:"eTag,omitempty"` // GraphQueryPropertiesUpdateParameters - Metadata describing a graph query for an Azure resource. *GraphQueryPropertiesUpdateParameters `json:"properties,omitempty"` @@ -730,6 +731,9 @@ func (gqup GraphQueryUpdateParameters) MarshalJSON() ([]byte, error) { if gqup.Tags != nil { objectMap["tags"] = gqup.Tags } + if gqup.ETag != nil { + objectMap["eTag"] = gqup.ETag + } if gqup.GraphQueryPropertiesUpdateParameters != nil { objectMap["properties"] = gqup.GraphQueryPropertiesUpdateParameters } @@ -1062,7 +1066,7 @@ type Resource struct { Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` - // ETag - READ-ONLY; This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. + // ETag - This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. ETag *string `json:"eTag,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` @@ -1071,6 +1075,9 @@ type Resource struct { // MarshalJSON is the custom marshaler for Resource. func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if r.ETag != nil { + objectMap["eTag"] = r.ETag + } if r.Tags != nil { objectMap["tags"] = r.Tags } diff --git a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go index 57a4e7e71afc..1fbbbbcb75f9 100644 --- a/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go +++ b/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go @@ -366,7 +366,7 @@ func (client Client) GetDescendantsPreparer(ctx context.Context, groupID string, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/descendants", pathParameters), autorest.WithQueryParameters(queryParameters)) diff --git a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go index 627a1a0ff13a..357f80eaa8a1 100644 --- a/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go +++ b/services/preview/resources/mgmt/2019-11-01/managementgroups/managementgroups.go @@ -366,7 +366,7 @@ func (client Client) GetDescendantsPreparer(ctx context.Context, groupID string, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/descendants", pathParameters), autorest.WithQueryParameters(queryParameters)) diff --git a/services/preview/security/mgmt/v1.0/security/alerts.go b/services/preview/security/mgmt/v1.0/security/alerts.go index fb6af65cb174..5934b920847d 100644 --- a/services/preview/security/mgmt/v1.0/security/alerts.go +++ b/services/preview/security/mgmt/v1.0/security/alerts.go @@ -746,15 +746,14 @@ func (client AlertsClient) ListSubscriptionLevelAlertsByRegionComplete(ctx conte return } -// UpdateResourceGroupLevelAlertState update the alert's state +// UpdateResourceGroupLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object -// alertUpdateActionType - type of the action to do on the alert // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. -func (client AlertsClient) UpdateResourceGroupLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertState") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -770,38 +769,125 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertState(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertState", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateResourceGroupLevelAlertStatePreparer(ctx, alertName, alertUpdateActionType, resourceGroupName) + req, err := client.UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx, alertName, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateResourceGroupLevelAlertStateSender(req) + resp, err := client.UpdateResourceGroupLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateResourceGroupLevelAlertStateResponder(resp) + result, err = client.UpdateResourceGroupLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateResourceGroupLevelAlertStatePreparer prepares the UpdateResourceGroupLevelAlertState request. -func (client AlertsClient) UpdateResourceGroupLevelAlertStatePreparer(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (*http.Request, error) { +// UpdateResourceGroupLevelAlertStateToDismissPreparer prepares the UpdateResourceGroupLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "alertName": autorest.Encode("path", alertName), - "alertUpdateActionType": autorest.Encode("path", alertUpdateActionType), - "ascLocation": autorest.Encode("path", client.AscLocation), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateResourceGroupLevelAlertStateToDismissSender sends the UpdateResourceGroupLevelAlertStateToDismiss request. The method will close the +// http.Response Body if it receives an error. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResourceGroupLevelAlertStateToDismissResponder handles the response to the UpdateResourceGroupLevelAlertStateToDismiss request. The method always +// closes the http.Response Body. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateResourceGroupLevelAlertStateToReactivate update the alert's state +// Parameters: +// alertName - name of the alert object +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToReactivate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", err.Error()) + } + + req, err := client.UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx, alertName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateResourceGroupLevelAlertStateToReactivateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure sending request") + return + } + + result, err = client.UpdateResourceGroupLevelAlertStateToReactivateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure responding to request") + } + + return +} + +// UpdateResourceGroupLevelAlertStateToReactivatePreparer prepares the UpdateResourceGroupLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2015-06-01-preview" @@ -812,21 +898,21 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertStatePreparer(ctx contex preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateResourceGroupLevelAlertStateSender sends the UpdateResourceGroupLevelAlertState request. The method will close the +// UpdateResourceGroupLevelAlertStateToReactivateSender sends the UpdateResourceGroupLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateResourceGroupLevelAlertStateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// UpdateResourceGroupLevelAlertStateResponder handles the response to the UpdateResourceGroupLevelAlertState request. The method always +// UpdateResourceGroupLevelAlertStateToReactivateResponder handles the response to the UpdateResourceGroupLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateResourceGroupLevelAlertStateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -836,13 +922,12 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertStateResponder(resp *htt return } -// UpdateSubscriptionLevelAlertState update the alert's state +// UpdateSubscriptionLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object -// alertUpdateActionType - type of the action to do on the alert -func (client AlertsClient) UpdateSubscriptionLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertState") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -854,37 +939,117 @@ func (client AlertsClient) UpdateSubscriptionLevelAlertState(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertState", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateSubscriptionLevelAlertStatePreparer(ctx, alertName, alertUpdateActionType) + req, err := client.UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx, alertName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateSubscriptionLevelAlertStateSender(req) + resp, err := client.UpdateSubscriptionLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateSubscriptionLevelAlertStateResponder(resp) + result, err = client.UpdateSubscriptionLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateSubscriptionLevelAlertStatePreparer prepares the UpdateSubscriptionLevelAlertState request. -func (client AlertsClient) UpdateSubscriptionLevelAlertStatePreparer(ctx context.Context, alertName string, alertUpdateActionType string) (*http.Request, error) { +// UpdateSubscriptionLevelAlertStateToDismissPreparer prepares the UpdateSubscriptionLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx context.Context, alertName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "alertName": autorest.Encode("path", alertName), - "alertUpdateActionType": autorest.Encode("path", alertUpdateActionType), - "ascLocation": autorest.Encode("path", client.AscLocation), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSubscriptionLevelAlertStateToDismissSender sends the UpdateSubscriptionLevelAlertStateToDismiss request. The method will close the +// http.Response Body if it receives an error. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateSubscriptionLevelAlertStateToDismissResponder handles the response to the UpdateSubscriptionLevelAlertStateToDismiss request. The method always +// closes the http.Response Body. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateSubscriptionLevelAlertStateToReactivate update the alert's state +// Parameters: +// alertName - name of the alert object +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToReactivate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", err.Error()) + } + + req, err := client.UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx, alertName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSubscriptionLevelAlertStateToReactivateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure sending request") + return + } + + result, err = client.UpdateSubscriptionLevelAlertStateToReactivateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure responding to request") + } + + return +} + +// UpdateSubscriptionLevelAlertStateToReactivatePreparer prepares the UpdateSubscriptionLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2015-06-01-preview" @@ -895,21 +1060,21 @@ func (client AlertsClient) UpdateSubscriptionLevelAlertStatePreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateSubscriptionLevelAlertStateSender sends the UpdateSubscriptionLevelAlertState request. The method will close the +// UpdateSubscriptionLevelAlertStateToReactivateSender sends the UpdateSubscriptionLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateSubscriptionLevelAlertStateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// UpdateSubscriptionLevelAlertStateResponder handles the response to the UpdateSubscriptionLevelAlertState request. The method always +// UpdateSubscriptionLevelAlertStateToReactivateResponder handles the response to the UpdateSubscriptionLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateSubscriptionLevelAlertStateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/services/preview/security/mgmt/v1.0/security/models.go b/services/preview/security/mgmt/v1.0/security/models.go index f19291c333e0..b7968b0584ce 100644 --- a/services/preview/security/mgmt/v1.0/security/models.go +++ b/services/preview/security/mgmt/v1.0/security/models.go @@ -3944,6 +3944,12 @@ type EffectiveNetworkSecurityGroups struct { NetworkSecurityGroups *[]string `json:"networkSecurityGroups,omitempty"` } +// ETag entity tag is used for comparing two or more entities from the same requested resource. +type ETag struct { + // Etag - Entity tag is used for comparing two or more entities from the same requested resource. + Etag *string `json:"etag,omitempty"` +} + // BasicExternalSecuritySolution represents a security solution external to Azure Security Center which sends // information to an OMS workspace and whose data is displayed by Azure Security Center. type BasicExternalSecuritySolution interface { @@ -6850,6 +6856,21 @@ type SubAssessmentStatus struct { Severity Severity `json:"severity,omitempty"` } +// Tags a list of key value pairs that describe the resource. +type Tags struct { + // Tags - A list of key value pairs that describe the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Tags. +func (t Tags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if t.Tags != nil { + objectMap["tags"] = t.Tags + } + return json.Marshal(objectMap) +} + // Task security task that we recommend to do in order to strengthen security type Task struct { autorest.Response `json:"-"` @@ -7438,6 +7459,39 @@ type TopologySingleResourceParent struct { ResourceID *string `json:"resourceId,omitempty"` } +// TrackedResource describes an Azure tracked resource. +type TrackedResource struct { + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; Location where the resource is stored + Location *string `json:"location,omitempty"` + // Kind - Kind of the resource + Kind *string `json:"kind,omitempty"` + // Etag - Entity tag is used for comparing two or more entities from the same requested resource. + Etag *string `json:"etag,omitempty"` + // Tags - A list of key value pairs that describe the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TrackedResource. +func (tr TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Kind != nil { + objectMap["kind"] = tr.Kind + } + if tr.Etag != nil { + objectMap["etag"] = tr.Etag + } + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + return json.Marshal(objectMap) +} + // UserRecommendation represents a user that is recommended to be allowed for a certain rule type UserRecommendation struct { // Username - Represents a user that is recommended to be allowed for a certain rule diff --git a/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go index 811063e3ef89..f5068b92147a 100644 --- a/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v1.0/security/securityapi/interfaces.go @@ -179,8 +179,10 @@ type AlertsClientAPI interface { ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) ListSubscriptionLevelAlertsByRegion(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) - UpdateResourceGroupLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (result autorest.Response, err error) - UpdateSubscriptionLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string) (result autorest.Response, err error) + UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) } var _ AlertsClientAPI = (*security.AlertsClient)(nil) diff --git a/services/preview/security/mgmt/v2.0/security/alerts.go b/services/preview/security/mgmt/v2.0/security/alerts.go index f41504c09789..c7f9d8aab297 100644 --- a/services/preview/security/mgmt/v2.0/security/alerts.go +++ b/services/preview/security/mgmt/v2.0/security/alerts.go @@ -746,15 +746,14 @@ func (client AlertsClient) ListSubscriptionLevelAlertsByRegionComplete(ctx conte return } -// UpdateResourceGroupLevelAlertState update the alert's state +// UpdateResourceGroupLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object -// alertUpdateActionType - type of the action to do on the alert // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. -func (client AlertsClient) UpdateResourceGroupLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertState") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -770,38 +769,125 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertState(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertState", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateResourceGroupLevelAlertStatePreparer(ctx, alertName, alertUpdateActionType, resourceGroupName) + req, err := client.UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx, alertName, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateResourceGroupLevelAlertStateSender(req) + resp, err := client.UpdateResourceGroupLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateResourceGroupLevelAlertStateResponder(resp) + result, err = client.UpdateResourceGroupLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateResourceGroupLevelAlertStatePreparer prepares the UpdateResourceGroupLevelAlertState request. -func (client AlertsClient) UpdateResourceGroupLevelAlertStatePreparer(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (*http.Request, error) { +// UpdateResourceGroupLevelAlertStateToDismissPreparer prepares the UpdateResourceGroupLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "alertName": autorest.Encode("path", alertName), - "alertUpdateActionType": autorest.Encode("path", alertUpdateActionType), - "ascLocation": autorest.Encode("path", client.AscLocation), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateResourceGroupLevelAlertStateToDismissSender sends the UpdateResourceGroupLevelAlertStateToDismiss request. The method will close the +// http.Response Body if it receives an error. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResourceGroupLevelAlertStateToDismissResponder handles the response to the UpdateResourceGroupLevelAlertStateToDismiss request. The method always +// closes the http.Response Body. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateResourceGroupLevelAlertStateToReactivate update the alert's state +// Parameters: +// alertName - name of the alert object +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToReactivate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", err.Error()) + } + + req, err := client.UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx, alertName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateResourceGroupLevelAlertStateToReactivateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure sending request") + return + } + + result, err = client.UpdateResourceGroupLevelAlertStateToReactivateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure responding to request") + } + + return +} + +// UpdateResourceGroupLevelAlertStateToReactivatePreparer prepares the UpdateResourceGroupLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-01-01" @@ -812,21 +898,21 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertStatePreparer(ctx contex preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateResourceGroupLevelAlertStateSender sends the UpdateResourceGroupLevelAlertState request. The method will close the +// UpdateResourceGroupLevelAlertStateToReactivateSender sends the UpdateResourceGroupLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateResourceGroupLevelAlertStateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// UpdateResourceGroupLevelAlertStateResponder handles the response to the UpdateResourceGroupLevelAlertState request. The method always +// UpdateResourceGroupLevelAlertStateToReactivateResponder handles the response to the UpdateResourceGroupLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateResourceGroupLevelAlertStateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -836,13 +922,12 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertStateResponder(resp *htt return } -// UpdateSubscriptionLevelAlertState update the alert's state +// UpdateSubscriptionLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object -// alertUpdateActionType - type of the action to do on the alert -func (client AlertsClient) UpdateSubscriptionLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertState") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -854,37 +939,117 @@ func (client AlertsClient) UpdateSubscriptionLevelAlertState(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertState", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateSubscriptionLevelAlertStatePreparer(ctx, alertName, alertUpdateActionType) + req, err := client.UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx, alertName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateSubscriptionLevelAlertStateSender(req) + resp, err := client.UpdateSubscriptionLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateSubscriptionLevelAlertStateResponder(resp) + result, err = client.UpdateSubscriptionLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateSubscriptionLevelAlertStatePreparer prepares the UpdateSubscriptionLevelAlertState request. -func (client AlertsClient) UpdateSubscriptionLevelAlertStatePreparer(ctx context.Context, alertName string, alertUpdateActionType string) (*http.Request, error) { +// UpdateSubscriptionLevelAlertStateToDismissPreparer prepares the UpdateSubscriptionLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx context.Context, alertName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "alertName": autorest.Encode("path", alertName), - "alertUpdateActionType": autorest.Encode("path", alertUpdateActionType), - "ascLocation": autorest.Encode("path", client.AscLocation), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSubscriptionLevelAlertStateToDismissSender sends the UpdateSubscriptionLevelAlertStateToDismiss request. The method will close the +// http.Response Body if it receives an error. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateSubscriptionLevelAlertStateToDismissResponder handles the response to the UpdateSubscriptionLevelAlertStateToDismiss request. The method always +// closes the http.Response Body. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateSubscriptionLevelAlertStateToReactivate update the alert's state +// Parameters: +// alertName - name of the alert object +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToReactivate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", err.Error()) + } + + req, err := client.UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx, alertName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSubscriptionLevelAlertStateToReactivateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure sending request") + return + } + + result, err = client.UpdateSubscriptionLevelAlertStateToReactivateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure responding to request") + } + + return +} + +// UpdateSubscriptionLevelAlertStateToReactivatePreparer prepares the UpdateSubscriptionLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-01-01" @@ -895,21 +1060,21 @@ func (client AlertsClient) UpdateSubscriptionLevelAlertStatePreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateSubscriptionLevelAlertStateSender sends the UpdateSubscriptionLevelAlertState request. The method will close the +// UpdateSubscriptionLevelAlertStateToReactivateSender sends the UpdateSubscriptionLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateSubscriptionLevelAlertStateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// UpdateSubscriptionLevelAlertStateResponder handles the response to the UpdateSubscriptionLevelAlertState request. The method always +// UpdateSubscriptionLevelAlertStateToReactivateResponder handles the response to the UpdateSubscriptionLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateSubscriptionLevelAlertStateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/services/preview/security/mgmt/v2.0/security/models.go b/services/preview/security/mgmt/v2.0/security/models.go index b6c26676de8d..a2cbf07902a2 100644 --- a/services/preview/security/mgmt/v2.0/security/models.go +++ b/services/preview/security/mgmt/v2.0/security/models.go @@ -4055,6 +4055,12 @@ type EffectiveNetworkSecurityGroups struct { NetworkSecurityGroups *[]string `json:"networkSecurityGroups,omitempty"` } +// ETag entity tag is used for comparing two or more entities from the same requested resource. +type ETag struct { + // Etag - Entity tag is used for comparing two or more entities from the same requested resource. + Etag *string `json:"etag,omitempty"` +} + // BasicExternalSecuritySolution represents a security solution external to Azure Security Center which sends // information to an OMS workspace and whose data is displayed by Azure Security Center. type BasicExternalSecuritySolution interface { @@ -7796,6 +7802,21 @@ type SubAssessmentStatus struct { Severity Severity `json:"severity,omitempty"` } +// Tags a list of key value pairs that describe the resource. +type Tags struct { + // Tags - A list of key value pairs that describe the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Tags. +func (t Tags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if t.Tags != nil { + objectMap["tags"] = t.Tags + } + return json.Marshal(objectMap) +} + // TagsResource a container holding only the Tags for a resource, allowing the user to update the tags. type TagsResource struct { // Tags - Resource tags @@ -8399,6 +8420,39 @@ type TopologySingleResourceParent struct { ResourceID *string `json:"resourceId,omitempty"` } +// TrackedResource describes an Azure tracked resource. +type TrackedResource struct { + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; Location where the resource is stored + Location *string `json:"location,omitempty"` + // Kind - Kind of the resource + Kind *string `json:"kind,omitempty"` + // Etag - Entity tag is used for comparing two or more entities from the same requested resource. + Etag *string `json:"etag,omitempty"` + // Tags - A list of key value pairs that describe the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TrackedResource. +func (tr TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Kind != nil { + objectMap["kind"] = tr.Kind + } + if tr.Etag != nil { + objectMap["etag"] = tr.Etag + } + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + return json.Marshal(objectMap) +} + // UpdateIotSecuritySolutionData ... type UpdateIotSecuritySolutionData struct { UserDefinedResources *UserDefinedResourcesProperties `json:"userDefinedResources,omitempty"` diff --git a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go index dec22bd03f50..d644808b3439 100644 --- a/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v2.0/security/securityapi/interfaces.go @@ -237,8 +237,10 @@ type AlertsClientAPI interface { ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) ListSubscriptionLevelAlertsByRegion(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) - UpdateResourceGroupLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (result autorest.Response, err error) - UpdateSubscriptionLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string) (result autorest.Response, err error) + UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) } var _ AlertsClientAPI = (*security.AlertsClient)(nil) diff --git a/services/preview/security/mgmt/v3.0/security/alerts.go b/services/preview/security/mgmt/v3.0/security/alerts.go index f41504c09789..c7f9d8aab297 100644 --- a/services/preview/security/mgmt/v3.0/security/alerts.go +++ b/services/preview/security/mgmt/v3.0/security/alerts.go @@ -746,15 +746,14 @@ func (client AlertsClient) ListSubscriptionLevelAlertsByRegionComplete(ctx conte return } -// UpdateResourceGroupLevelAlertState update the alert's state +// UpdateResourceGroupLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object -// alertUpdateActionType - type of the action to do on the alert // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. -func (client AlertsClient) UpdateResourceGroupLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertState") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -770,38 +769,125 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertState(ctx context.Contex Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertState", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateResourceGroupLevelAlertStatePreparer(ctx, alertName, alertUpdateActionType, resourceGroupName) + req, err := client.UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx, alertName, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateResourceGroupLevelAlertStateSender(req) + resp, err := client.UpdateResourceGroupLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateResourceGroupLevelAlertStateResponder(resp) + result, err = client.UpdateResourceGroupLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertState", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateResourceGroupLevelAlertStatePreparer prepares the UpdateResourceGroupLevelAlertState request. -func (client AlertsClient) UpdateResourceGroupLevelAlertStatePreparer(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (*http.Request, error) { +// UpdateResourceGroupLevelAlertStateToDismissPreparer prepares the UpdateResourceGroupLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissPreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "alertName": autorest.Encode("path", alertName), - "alertUpdateActionType": autorest.Encode("path", alertUpdateActionType), - "ascLocation": autorest.Encode("path", client.AscLocation), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateResourceGroupLevelAlertStateToDismissSender sends the UpdateResourceGroupLevelAlertStateToDismiss request. The method will close the +// http.Response Body if it receives an error. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResourceGroupLevelAlertStateToDismissResponder handles the response to the UpdateResourceGroupLevelAlertStateToDismiss request. The method always +// closes the http.Response Body. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateResourceGroupLevelAlertStateToReactivate update the alert's state +// Parameters: +// alertName - name of the alert object +// resourceGroupName - the name of the resource group within the user's subscription. The name is case +// insensitive. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertStateToReactivate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}, + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", err.Error()) + } + + req, err := client.UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx, alertName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateResourceGroupLevelAlertStateToReactivateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure sending request") + return + } + + result, err = client.UpdateResourceGroupLevelAlertStateToReactivateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateResourceGroupLevelAlertStateToReactivate", resp, "Failure responding to request") + } + + return +} + +// UpdateResourceGroupLevelAlertStateToReactivatePreparer prepares the UpdateResourceGroupLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-01-01" @@ -812,21 +898,21 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertStatePreparer(ctx contex preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateResourceGroupLevelAlertStateSender sends the UpdateResourceGroupLevelAlertState request. The method will close the +// UpdateResourceGroupLevelAlertStateToReactivateSender sends the UpdateResourceGroupLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateResourceGroupLevelAlertStateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// UpdateResourceGroupLevelAlertStateResponder handles the response to the UpdateResourceGroupLevelAlertState request. The method always +// UpdateResourceGroupLevelAlertStateToReactivateResponder handles the response to the UpdateResourceGroupLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateResourceGroupLevelAlertStateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateResourceGroupLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -836,13 +922,12 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertStateResponder(resp *htt return } -// UpdateSubscriptionLevelAlertState update the alert's state +// UpdateSubscriptionLevelAlertStateToDismiss update the alert's state // Parameters: // alertName - name of the alert object -// alertUpdateActionType - type of the action to do on the alert -func (client AlertsClient) UpdateSubscriptionLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertState") + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToDismiss") defer func() { sc := -1 if result.Response != nil { @@ -854,37 +939,117 @@ func (client AlertsClient) UpdateSubscriptionLevelAlertState(ctx context.Context if err := validation.Validate([]validation.Validation{ {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { - return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertState", err.Error()) + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", err.Error()) } - req, err := client.UpdateSubscriptionLevelAlertStatePreparer(ctx, alertName, alertUpdateActionType) + req, err := client.UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx, alertName) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", nil, "Failure preparing request") return } - resp, err := client.UpdateSubscriptionLevelAlertStateSender(req) + resp, err := client.UpdateSubscriptionLevelAlertStateToDismissSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure sending request") return } - result, err = client.UpdateSubscriptionLevelAlertStateResponder(resp) + result, err = client.UpdateSubscriptionLevelAlertStateToDismissResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertState", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToDismiss", resp, "Failure responding to request") } return } -// UpdateSubscriptionLevelAlertStatePreparer prepares the UpdateSubscriptionLevelAlertState request. -func (client AlertsClient) UpdateSubscriptionLevelAlertStatePreparer(ctx context.Context, alertName string, alertUpdateActionType string) (*http.Request, error) { +// UpdateSubscriptionLevelAlertStateToDismissPreparer prepares the UpdateSubscriptionLevelAlertStateToDismiss request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissPreparer(ctx context.Context, alertName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "alertName": autorest.Encode("path", alertName), - "alertUpdateActionType": autorest.Encode("path", alertUpdateActionType), - "ascLocation": autorest.Encode("path", client.AscLocation), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-01-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/dismiss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSubscriptionLevelAlertStateToDismissSender sends the UpdateSubscriptionLevelAlertStateToDismiss request. The method will close the +// http.Response Body if it receives an error. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateSubscriptionLevelAlertStateToDismissResponder handles the response to the UpdateSubscriptionLevelAlertStateToDismiss request. The method always +// closes the http.Response Body. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToDismissResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateSubscriptionLevelAlertStateToReactivate update the alert's state +// Parameters: +// alertName - name of the alert object +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertStateToReactivate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", err.Error()) + } + + req, err := client.UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx, alertName) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSubscriptionLevelAlertStateToReactivateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure sending request") + return + } + + result, err = client.UpdateSubscriptionLevelAlertStateToReactivateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "security.AlertsClient", "UpdateSubscriptionLevelAlertStateToReactivate", resp, "Failure responding to request") + } + + return +} + +// UpdateSubscriptionLevelAlertStateToReactivatePreparer prepares the UpdateSubscriptionLevelAlertStateToReactivate request. +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivatePreparer(ctx context.Context, alertName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertName": autorest.Encode("path", alertName), + "ascLocation": autorest.Encode("path", client.AscLocation), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-01-01" @@ -895,21 +1060,21 @@ func (client AlertsClient) UpdateSubscriptionLevelAlertStatePreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/reactivate", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// UpdateSubscriptionLevelAlertStateSender sends the UpdateSubscriptionLevelAlertState request. The method will close the +// UpdateSubscriptionLevelAlertStateToReactivateSender sends the UpdateSubscriptionLevelAlertStateToReactivate request. The method will close the // http.Response Body if it receives an error. -func (client AlertsClient) UpdateSubscriptionLevelAlertStateSender(req *http.Request) (*http.Response, error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// UpdateSubscriptionLevelAlertStateResponder handles the response to the UpdateSubscriptionLevelAlertState request. The method always +// UpdateSubscriptionLevelAlertStateToReactivateResponder handles the response to the UpdateSubscriptionLevelAlertStateToReactivate request. The method always // closes the http.Response Body. -func (client AlertsClient) UpdateSubscriptionLevelAlertStateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AlertsClient) UpdateSubscriptionLevelAlertStateToReactivateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/services/preview/security/mgmt/v3.0/security/models.go b/services/preview/security/mgmt/v3.0/security/models.go index 656cd2a88cbe..673e41e438de 100644 --- a/services/preview/security/mgmt/v3.0/security/models.go +++ b/services/preview/security/mgmt/v3.0/security/models.go @@ -827,6 +827,21 @@ func PossibleTypeValues() []Type { return []Type{BinarySignature, File, FileHash, ProductSignature, PublisherSignature, VersionAndAboveSignature} } +// UnmaskedIPLoggingStatus enumerates the values for unmasked ip logging status. +type UnmaskedIPLoggingStatus string + +const ( + // UnmaskedIPLoggingStatusDisabled Unmasked IP logging is disabled + UnmaskedIPLoggingStatusDisabled UnmaskedIPLoggingStatus = "Disabled" + // UnmaskedIPLoggingStatusEnabled Unmasked IP logging is enabled + UnmaskedIPLoggingStatusEnabled UnmaskedIPLoggingStatus = "Enabled" +) + +// PossibleUnmaskedIPLoggingStatusValues returns an array of possible values for the UnmaskedIPLoggingStatus const type. +func PossibleUnmaskedIPLoggingStatusValues() []UnmaskedIPLoggingStatus { + return []UnmaskedIPLoggingStatus{UnmaskedIPLoggingStatusDisabled, UnmaskedIPLoggingStatusEnabled} +} + // ValueType enumerates the values for value type. type ValueType string @@ -4019,6 +4034,12 @@ type DiscoveredSecuritySolutionProperties struct { Sku *string `json:"sku,omitempty"` } +// ETag entity tag is used for comparing two or more entities from the same requested resource. +type ETag struct { + // Etag - Entity tag is used for comparing two or more entities from the same requested resource. + Etag *string `json:"etag,omitempty"` +} + // BasicExternalSecuritySolution represents a security solution external to Azure Security Center which sends // information to an OMS workspace and whose data is displayed by Azure Security Center. type BasicExternalSecuritySolution interface { @@ -5466,6 +5487,8 @@ type IoTSecuritySolutionProperties struct { // AutoDiscoveredResources - READ-ONLY; List of resources that were automatically discovered as relevant to the security solution. AutoDiscoveredResources *[]string `json:"autoDiscoveredResources,omitempty"` RecommendationsConfiguration *[]RecommendationConfigurationProperties `json:"recommendationsConfiguration,omitempty"` + // UnmaskedIPLoggingStatus - Unmasked IP address logging status. Possible values include: 'UnmaskedIPLoggingStatusDisabled', 'UnmaskedIPLoggingStatusEnabled' + UnmaskedIPLoggingStatus UnmaskedIPLoggingStatus `json:"unmaskedIpLoggingStatus,omitempty"` } // IoTSecuritySolutionsList list of IoT Security solutions. @@ -7818,6 +7841,21 @@ type SubAssessmentStatus struct { Severity Severity `json:"severity,omitempty"` } +// Tags a list of key value pairs that describe the resource. +type Tags struct { + // Tags - A list of key value pairs that describe the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Tags. +func (t Tags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if t.Tags != nil { + objectMap["tags"] = t.Tags + } + return json.Marshal(objectMap) +} + // TagsResource a container holding only the Tags for a resource, allowing the user to update the tags. type TagsResource struct { // Tags - Resource tags @@ -8421,6 +8459,39 @@ type TopologySingleResourceParent struct { ResourceID *string `json:"resourceId,omitempty"` } +// TrackedResource describes an Azure tracked resource. +type TrackedResource struct { + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - READ-ONLY; Location where the resource is stored + Location *string `json:"location,omitempty"` + // Kind - Kind of the resource + Kind *string `json:"kind,omitempty"` + // Etag - Entity tag is used for comparing two or more entities from the same requested resource. + Etag *string `json:"etag,omitempty"` + // Tags - A list of key value pairs that describe the resource. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for TrackedResource. +func (tr TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tr.Kind != nil { + objectMap["kind"] = tr.Kind + } + if tr.Etag != nil { + objectMap["etag"] = tr.Etag + } + if tr.Tags != nil { + objectMap["tags"] = tr.Tags + } + return json.Marshal(objectMap) +} + // UpdateIotSecuritySolutionData ... type UpdateIotSecuritySolutionData struct { // UpdateIoTSecuritySolutionProperties - Security Solution data diff --git a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go index 3b70713dc7cb..22e5109dcd51 100644 --- a/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go +++ b/services/preview/security/mgmt/v3.0/security/securityapi/interfaces.go @@ -48,8 +48,10 @@ type AlertsClientAPI interface { ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) ListSubscriptionLevelAlertsByRegion(ctx context.Context, filter string, selectParameter string, expand string) (result security.AlertListPage, err error) - UpdateResourceGroupLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (result autorest.Response, err error) - UpdateSubscriptionLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string) (result autorest.Response, err error) + UpdateResourceGroupLevelAlertStateToDismiss(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + UpdateResourceGroupLevelAlertStateToReactivate(ctx context.Context, alertName string, resourceGroupName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToDismiss(ctx context.Context, alertName string) (result autorest.Response, err error) + UpdateSubscriptionLevelAlertStateToReactivate(ctx context.Context, alertName string) (result autorest.Response, err error) } var _ AlertsClientAPI = (*security.AlertsClient)(nil) diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go index 20f8c8a83f39..5b3213d2123d 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/bookmarks.go @@ -79,6 +79,11 @@ func (client BookmarksClient) CreateOrUpdate(ctx context.Context, resourceGroupN {Target: "bookmark.BookmarkProperties.Query", Name: validation.Null, Rule: true, Chain: nil}, {Target: "bookmark.BookmarkProperties.UpdatedBy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "bookmark.BookmarkProperties.UpdatedBy.ObjectID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "bookmark.BookmarkProperties.IncidentInfo", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "bookmark.BookmarkProperties.IncidentInfo.IncidentID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "bookmark.BookmarkProperties.IncidentInfo.Title", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "bookmark.BookmarkProperties.IncidentInfo.RelationName", Name: validation.Null, Rule: true, Chain: nil}, + }}, }}}}}); err != nil { return result, validation.NewError("securityinsight.BookmarksClient", "CreateOrUpdate", err.Error()) } diff --git a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go index 7c5aaa59b0f4..aefecbfc34e6 100644 --- a/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go +++ b/services/preview/securityinsight/mgmt/2017-08-01-preview/securityinsight/models.go @@ -416,6 +416,27 @@ func PossibleFileHashAlgorithmValues() []FileHashAlgorithm { return []FileHashAlgorithm{MD5, SHA1, SHA256, SHA256AC, Unknown} } +// IncidentSeverity enumerates the values for incident severity. +type IncidentSeverity string + +const ( + // IncidentSeverityCritical Critical severity + IncidentSeverityCritical IncidentSeverity = "Critical" + // IncidentSeverityHigh High severity + IncidentSeverityHigh IncidentSeverity = "High" + // IncidentSeverityInformational Informational severity + IncidentSeverityInformational IncidentSeverity = "Informational" + // IncidentSeverityLow Low severity + IncidentSeverityLow IncidentSeverity = "Low" + // IncidentSeverityMedium Medium severity + IncidentSeverityMedium IncidentSeverity = "Medium" +) + +// PossibleIncidentSeverityValues returns an array of possible values for the IncidentSeverity const type. +func PossibleIncidentSeverityValues() []IncidentSeverity { + return []IncidentSeverity{IncidentSeverityCritical, IncidentSeverityHigh, IncidentSeverityInformational, IncidentSeverityLow, IncidentSeverityMedium} +} + // KillChainIntent enumerates the values for kill chain intent. type KillChainIntent string @@ -3209,6 +3230,8 @@ type BookmarkProperties struct { Updated *date.Time `json:"updated,omitempty"` // UpdatedBy - Describes a user that updated the bookmark UpdatedBy *UserInfo `json:"updatedBy,omitempty"` + // IncidentInfo - Describes an incident that relates to bookmark + IncidentInfo *IncidentInfo `json:"incidentInfo,omitempty"` } // BookmarkRelation represents a bookmark relation @@ -6809,6 +6832,18 @@ func (hep HostEntityProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// IncidentInfo describes related incident information for the bookmark +type IncidentInfo struct { + // IncidentID - Incident Id + IncidentID *string `json:"incidentId,omitempty"` + // Severity - The severity of the incident. Possible values include: 'IncidentSeverityCritical', 'IncidentSeverityHigh', 'IncidentSeverityMedium', 'IncidentSeverityLow', 'IncidentSeverityInformational' + Severity IncidentSeverity `json:"severity,omitempty"` + // Title - The title of the incident + Title *string `json:"title,omitempty"` + // RelationName - Relation Name + RelationName *string `json:"relationName,omitempty"` +} + // IPEntity represents an ip entity. type IPEntity struct { // IPEntityProperties - Ip entity properties diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go index f387fb0dd9d9..929e09a004e0 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/clusters.go @@ -84,25 +84,25 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go index 5dcbe8025ab6..3b566911b8af 100644 --- a/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go +++ b/services/preview/servicefabric/mgmt/2017-07-01-preview/servicefabric/models.go @@ -991,7 +991,7 @@ type ClusterProperties struct { // ClusterPropertiesUpdateParameters describes the cluster resource properties that can be updated during // PATCH operation. type ClusterPropertiesUpdateParameters struct { - // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). Possible values include: 'ReliabilityLevel1Bronze', 'ReliabilityLevel1Silver', 'ReliabilityLevel1Gold' + // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). Possible values include: 'ReliabilityLevel1Bronze', 'ReliabilityLevel1Silver', 'ReliabilityLevel1Gold' ReliabilityLevel ReliabilityLevel1 `json:"reliabilityLevel,omitempty"` // UpgradeMode - The upgrade mode of the cluster. This indicates if the cluster should be automatically upgraded when new Service Fabric runtime version is available. Possible values include: 'UpgradeMode1Automatic', 'UpgradeMode1Manual' UpgradeMode UpgradeMode1 `json:"upgradeMode,omitempty"` diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go index 82e30df9d6d1..595076949907 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/clusters.go @@ -83,25 +83,25 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/models.go b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/models.go index b4a34e62c15a..3e1948957372 100644 --- a/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/models.go +++ b/services/preview/servicefabric/mgmt/2019-03-01-preview/servicefabric/models.go @@ -1712,7 +1712,7 @@ type ClusterProperties struct { NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the cluster resource. Possible values include: 'Updating', 'Succeeded', 'Failed', 'Canceled' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // - Silver - Run the System services with a target replica set count of 5. @@ -1756,7 +1756,7 @@ type ClusterPropertiesUpdateParameters struct { FabricSettings *[]SettingsSectionDescription `json:"fabricSettings,omitempty"` // NodeTypes - The list of node types in the cluster. This will overwrite the existing list. NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"` - // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // - Silver - Run the System services with a target replica set count of 5. @@ -2055,7 +2055,7 @@ type NodeTypeDescription struct { ClientConnectionEndpointPort *int32 `json:"clientConnectionEndpointPort,omitempty"` // HTTPGatewayEndpointPort - The HTTP cluster management endpoint port. HTTPGatewayEndpointPort *int32 `json:"httpGatewayEndpointPort,omitempty"` - // DurabilityLevel - The durability level of the node type. Learn about [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // DurabilityLevel - The durability level of the node type. Learn about [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - Bronze - No privileges. This is the default. // - Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. // - Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled only on full node VM skus like D15_V2, G5 etc. diff --git a/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go b/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go index dfae755be82b..4574ff9a80dd 100644 --- a/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go +++ b/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go @@ -1718,7 +1718,7 @@ func NewDatabaseBlobAuditingPolicyListResultPage(getNextPage func(context.Contex type DatabaseBlobAuditingPolicyProperties struct { // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` @@ -1798,6 +1798,9 @@ type DatabaseBlobAuditingPolicyProperties struct { // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` } // DatabaseListResult represents the response to a list database request. diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go index ce3fa15903af..abf17916beb0 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/managedinstanceadministrators.go @@ -49,9 +49,8 @@ func NewManagedInstanceAdministratorsClientWithBaseURI(baseURI string, subscript // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value // from the Azure Resource Manager API or the portal. // managedInstanceName - the name of the managed instance. -// administratorName - the requested administrator name. // parameters - the requested administrator parameters. -func (client ManagedInstanceAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string, parameters ManagedInstanceAdministrator) (result ManagedInstanceAdministratorsCreateOrUpdateFuture, err error) { +func (client ManagedInstanceAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceAdministrator) (result ManagedInstanceAdministratorsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.CreateOrUpdate") defer func() { @@ -72,7 +71,7 @@ func (client ManagedInstanceAdministratorsClient) CreateOrUpdate(ctx context.Con return result, validation.NewError("sql.ManagedInstanceAdministratorsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, administratorName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -88,9 +87,9 @@ func (client ManagedInstanceAdministratorsClient) CreateOrUpdate(ctx context.Con } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagedInstanceAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string, parameters ManagedInstanceAdministrator) (*http.Request, error) { +func (client ManagedInstanceAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceAdministrator) (*http.Request, error) { pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", administratorName), + "administratorName": autorest.Encode("path", "ActiveDirectory"), "managedInstanceName": autorest.Encode("path", managedInstanceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -142,8 +141,7 @@ func (client ManagedInstanceAdministratorsClient) CreateOrUpdateResponder(resp * // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value // from the Azure Resource Manager API or the portal. // managedInstanceName - the name of the managed instance. -// administratorName - the administrator name. -func (client ManagedInstanceAdministratorsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string) (result ManagedInstanceAdministratorsDeleteFuture, err error) { +func (client ManagedInstanceAdministratorsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceAdministratorsDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.Delete") defer func() { @@ -154,7 +152,7 @@ func (client ManagedInstanceAdministratorsClient) Delete(ctx context.Context, re tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName, administratorName) + req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName) if err != nil { err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "Delete", nil, "Failure preparing request") return @@ -170,9 +168,9 @@ func (client ManagedInstanceAdministratorsClient) Delete(ctx context.Context, re } // DeletePreparer prepares the Delete request. -func (client ManagedInstanceAdministratorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string) (*http.Request, error) { +func (client ManagedInstanceAdministratorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", administratorName), + "administratorName": autorest.Encode("path", "ActiveDirectory"), "managedInstanceName": autorest.Encode("path", managedInstanceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -221,8 +219,7 @@ func (client ManagedInstanceAdministratorsClient) DeleteResponder(resp *http.Res // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value // from the Azure Resource Manager API or the portal. // managedInstanceName - the name of the managed instance. -// administratorName - the administrator name. -func (client ManagedInstanceAdministratorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string) (result ManagedInstanceAdministrator, err error) { +func (client ManagedInstanceAdministratorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceAdministrator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceAdministratorsClient.Get") defer func() { @@ -233,7 +230,7 @@ func (client ManagedInstanceAdministratorsClient) Get(ctx context.Context, resou tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName, administratorName) + req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName) if err != nil { err = autorest.NewErrorWithError(err, "sql.ManagedInstanceAdministratorsClient", "Get", nil, "Failure preparing request") return @@ -255,9 +252,9 @@ func (client ManagedInstanceAdministratorsClient) Get(ctx context.Context, resou } // GetPreparer prepares the Get request. -func (client ManagedInstanceAdministratorsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string) (*http.Request, error) { +func (client ManagedInstanceAdministratorsClient) GetPreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", administratorName), + "administratorName": autorest.Encode("path", "ActiveDirectory"), "managedInstanceName": autorest.Encode("path", managedInstanceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go index e01108b3867f..651614bc4e39 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/models.go @@ -2257,7 +2257,7 @@ func NewDatabaseBlobAuditingPolicyListResultPage(getNextPage func(context.Contex type DatabaseBlobAuditingPolicyProperties struct { // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` @@ -2337,6 +2337,9 @@ type DatabaseBlobAuditingPolicyProperties struct { // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` } // DatabaseListResult represents the response to a list database request. @@ -3328,7 +3331,7 @@ func NewDatabaseVulnerabilityAssessmentListResultPage(getNextPage func(context.C type DatabaseVulnerabilityAssessmentProperties struct { // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set StorageContainerPath *string `json:"storageContainerPath,omitempty"` - // StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. + // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` @@ -4752,7 +4755,7 @@ type ExtendedDatabaseBlobAuditingPolicyProperties struct { PredicateExpression *string `json:"predicateExpression,omitempty"` // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` @@ -4832,6 +4835,9 @@ type ExtendedDatabaseBlobAuditingPolicyProperties struct { // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` } // ExtendedServerBlobAuditingPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the @@ -4942,7 +4948,7 @@ type ExtendedServerBlobAuditingPolicyProperties struct { PredicateExpression *string `json:"predicateExpression,omitempty"` // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` @@ -5022,6 +5028,9 @@ type ExtendedServerBlobAuditingPolicyProperties struct { // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` } // FailoverGroup a failover group. @@ -11441,7 +11450,7 @@ func NewServerBlobAuditingPolicyListResultPage(getNextPage func(context.Context, type ServerBlobAuditingPolicyProperties struct { // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled' State BlobAuditingPolicyState `json:"state,omitempty"` - // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` @@ -11521,6 +11530,9 @@ type ServerBlobAuditingPolicyProperties struct { // For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) // or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) IsAzureMonitorTargetEnabled *bool `json:"isAzureMonitorTargetEnabled,omitempty"` + // QueueDelayMs - Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + // The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + QueueDelayMs *int32 `json:"queueDelayMs,omitempty"` } // ServerCommunicationLink server communication link. diff --git a/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go index 2725b915863e..d604ea456065 100644 --- a/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/2017-03-01-preview/sql/sqlapi/interfaces.go @@ -582,9 +582,9 @@ var _ SensitivityLabelsClientAPI = (*sql.SensitivityLabelsClient)(nil) // ManagedInstanceAdministratorsClientAPI contains the set of methods on the ManagedInstanceAdministratorsClient type. type ManagedInstanceAdministratorsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string, parameters sql.ManagedInstanceAdministrator) (result sql.ManagedInstanceAdministratorsCreateOrUpdateFuture, err error) - Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string) (result sql.ManagedInstanceAdministratorsDeleteFuture, err error) - Get(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName string) (result sql.ManagedInstanceAdministrator, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters sql.ManagedInstanceAdministrator) (result sql.ManagedInstanceAdministratorsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministrator, err error) ListByInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceAdministratorListResultPage, err error) } diff --git a/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go b/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go index 55481992c85a..f9171f4e4af6 100644 --- a/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go +++ b/services/preview/sql/mgmt/2017-10-01-preview/sql/models.go @@ -1796,7 +1796,7 @@ func NewDatabaseVulnerabilityAssessmentListResultPage(getNextPage func(context.C type DatabaseVulnerabilityAssessmentProperties struct { // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set StorageContainerPath *string `json:"storageContainerPath,omitempty"` - // StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. + // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go new file mode 100644 index 000000000000..36385f858806 --- /dev/null +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/managedinstanceoperations.go @@ -0,0 +1,159 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ManagedInstanceOperationsClient is the the Azure SQL Database management API provides a RESTful set of web services +// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, +// update, and delete databases. +type ManagedInstanceOperationsClient struct { + BaseClient +} + +// NewManagedInstanceOperationsClient creates an instance of the ManagedInstanceOperationsClient client. +func NewManagedInstanceOperationsClient(subscriptionID string) ManagedInstanceOperationsClient { + return NewManagedInstanceOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewManagedInstanceOperationsClientWithBaseURI creates an instance of the ManagedInstanceOperationsClient client. +func NewManagedInstanceOperationsClientWithBaseURI(baseURI string, subscriptionID string) ManagedInstanceOperationsClient { + return ManagedInstanceOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByManagedInstance gets a list of operations performed on the managed instance. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// managedInstanceName - the name of the managed instance. +func (client ManagedInstanceOperationsClient) ListByManagedInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceOperationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.ListByManagedInstance") + defer func() { + sc := -1 + if result.miolr.Response.Response != nil { + sc = result.miolr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByManagedInstanceNextResults + req, err := client.ListByManagedInstancePreparer(ctx, resourceGroupName, managedInstanceName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", nil, "Failure preparing request") + return + } + + resp, err := client.ListByManagedInstanceSender(req) + if err != nil { + result.miolr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", resp, "Failure sending request") + return + } + + result.miolr, err = client.ListByManagedInstanceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "ListByManagedInstance", resp, "Failure responding to request") + } + + return +} + +// ListByManagedInstancePreparer prepares the ListByManagedInstance request. +func (client ManagedInstanceOperationsClient) ListByManagedInstancePreparer(ctx context.Context, resourceGroupName string, managedInstanceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "managedInstanceName": autorest.Encode("path", managedInstanceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByManagedInstanceSender sends the ListByManagedInstance request. The method will close the +// http.Response Body if it receives an error. +func (client ManagedInstanceOperationsClient) ListByManagedInstanceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByManagedInstanceResponder handles the response to the ListByManagedInstance request. The method always +// closes the http.Response Body. +func (client ManagedInstanceOperationsClient) ListByManagedInstanceResponder(resp *http.Response) (result ManagedInstanceOperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByManagedInstanceNextResults retrieves the next set of results, if any. +func (client ManagedInstanceOperationsClient) listByManagedInstanceNextResults(ctx context.Context, lastResults ManagedInstanceOperationListResult) (result ManagedInstanceOperationListResult, err error) { + req, err := lastResults.managedInstanceOperationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByManagedInstanceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByManagedInstanceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ManagedInstanceOperationsClient", "listByManagedInstanceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByManagedInstanceComplete enumerates all values, automatically crossing page boundaries as required. +func (client ManagedInstanceOperationsClient) ListByManagedInstanceComplete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstanceOperationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationsClient.ListByManagedInstance") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByManagedInstance(ctx, resourceGroupName, managedInstanceName) + return +} diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go index 6a41d0d53f0b..5df7559689a6 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/models.go @@ -166,6 +166,29 @@ func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode { return []ManagedServerCreateMode{ManagedServerCreateModeDefault, ManagedServerCreateModePointInTimeRestore} } +// ManagementOperationState enumerates the values for management operation state. +type ManagementOperationState string + +const ( + // CancelInProgress ... + CancelInProgress ManagementOperationState = "CancelInProgress" + // Cancelled ... + Cancelled ManagementOperationState = "Cancelled" + // Failed ... + Failed ManagementOperationState = "Failed" + // InProgress ... + InProgress ManagementOperationState = "InProgress" + // Pending ... + Pending ManagementOperationState = "Pending" + // Succeeded ... + Succeeded ManagementOperationState = "Succeeded" +) + +// PossibleManagementOperationStateValues returns an array of possible values for the ManagementOperationState const type. +func PossibleManagementOperationStateValues() []ManagementOperationState { + return []ManagementOperationState{CancelInProgress, Cancelled, Failed, InProgress, Pending, Succeeded} +} + // ReplicaType enumerates the values for replica type. type ReplicaType string @@ -213,6 +236,165 @@ func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource { return []SensitivityLabelSource{Current, Recommended} } +// AdministratorListResult a list of active directory administrators. +type AdministratorListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ServerAzureADAdministrator `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AdministratorListResultIterator provides access to a complete listing of ServerAzureADAdministrator +// values. +type AdministratorListResultIterator struct { + i int + page AdministratorListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AdministratorListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdministratorListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AdministratorListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AdministratorListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter AdministratorListResultIterator) Response() AdministratorListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AdministratorListResultIterator) Value() ServerAzureADAdministrator { + if !iter.page.NotDone() { + return ServerAzureADAdministrator{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AdministratorListResultIterator type. +func NewAdministratorListResultIterator(page AdministratorListResultPage) AdministratorListResultIterator { + return AdministratorListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (alr AdministratorListResult) IsEmpty() bool { + return alr.Value == nil || len(*alr.Value) == 0 +} + +// administratorListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (alr AdministratorListResult) administratorListResultPreparer(ctx context.Context) (*http.Request, error) { + if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(alr.NextLink))) +} + +// AdministratorListResultPage contains a page of ServerAzureADAdministrator values. +type AdministratorListResultPage struct { + fn func(context.Context, AdministratorListResult) (AdministratorListResult, error) + alr AdministratorListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AdministratorListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdministratorListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.alr) + if err != nil { + return err + } + page.alr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AdministratorListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AdministratorListResultPage) NotDone() bool { + return !page.alr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AdministratorListResultPage) Response() AdministratorListResult { + return page.alr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AdministratorListResultPage) Values() []ServerAzureADAdministrator { + if page.alr.IsEmpty() { + return nil + } + return *page.alr.Value +} + +// Creates a new instance of the AdministratorListResultPage type. +func NewAdministratorListResultPage(getNextPage func(context.Context, AdministratorListResult) (AdministratorListResult, error)) AdministratorListResultPage { + return AdministratorListResultPage{fn: getNextPage} +} + +// AdministratorProperties properties of a active directory administrator. +type AdministratorProperties struct { + // AdministratorType - Type of the sever administrator. + AdministratorType *string `json:"administratorType,omitempty"` + // Login - Login name of the server administrator. + Login *string `json:"login,omitempty"` + // Sid - SID (object ID) of the server administrator. + Sid *uuid.UUID `json:"sid,omitempty"` + // TenantID - Tenant ID of the administrator. + TenantID *uuid.UUID `json:"tenantId,omitempty"` +} + // CompleteDatabaseRestoreDefinition contains the information necessary to perform a complete database // restore operation. type CompleteDatabaseRestoreDefinition struct { @@ -1661,6 +1843,255 @@ func NewManagedInstanceListResultPage(getNextPage func(context.Context, ManagedI return ManagedInstanceListResultPage{fn: getNextPage} } +// ManagedInstanceOperation a managed instance operation. +type ManagedInstanceOperation struct { + // ManagedInstanceOperationProperties - Resource properties. + *ManagedInstanceOperationProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManagedInstanceOperation. +func (mio ManagedInstanceOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mio.ManagedInstanceOperationProperties != nil { + objectMap["properties"] = mio.ManagedInstanceOperationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ManagedInstanceOperation struct. +func (mio *ManagedInstanceOperation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var managedInstanceOperationProperties ManagedInstanceOperationProperties + err = json.Unmarshal(*v, &managedInstanceOperationProperties) + if err != nil { + return err + } + mio.ManagedInstanceOperationProperties = &managedInstanceOperationProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mio.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + mio.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mio.Type = &typeVar + } + } + } + + return nil +} + +// ManagedInstanceOperationListResult the response to a list managed instance operations request +type ManagedInstanceOperationListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ManagedInstanceOperation `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ManagedInstanceOperationListResultIterator provides access to a complete listing of +// ManagedInstanceOperation values. +type ManagedInstanceOperationListResultIterator struct { + i int + page ManagedInstanceOperationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ManagedInstanceOperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ManagedInstanceOperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ManagedInstanceOperationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ManagedInstanceOperationListResultIterator) Response() ManagedInstanceOperationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ManagedInstanceOperationListResultIterator) Value() ManagedInstanceOperation { + if !iter.page.NotDone() { + return ManagedInstanceOperation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ManagedInstanceOperationListResultIterator type. +func NewManagedInstanceOperationListResultIterator(page ManagedInstanceOperationListResultPage) ManagedInstanceOperationListResultIterator { + return ManagedInstanceOperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (miolr ManagedInstanceOperationListResult) IsEmpty() bool { + return miolr.Value == nil || len(*miolr.Value) == 0 +} + +// managedInstanceOperationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (miolr ManagedInstanceOperationListResult) managedInstanceOperationListResultPreparer(ctx context.Context) (*http.Request, error) { + if miolr.NextLink == nil || len(to.String(miolr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(miolr.NextLink))) +} + +// ManagedInstanceOperationListResultPage contains a page of ManagedInstanceOperation values. +type ManagedInstanceOperationListResultPage struct { + fn func(context.Context, ManagedInstanceOperationListResult) (ManagedInstanceOperationListResult, error) + miolr ManagedInstanceOperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ManagedInstanceOperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstanceOperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.miolr) + if err != nil { + return err + } + page.miolr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ManagedInstanceOperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ManagedInstanceOperationListResultPage) NotDone() bool { + return !page.miolr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ManagedInstanceOperationListResultPage) Response() ManagedInstanceOperationListResult { + return page.miolr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ManagedInstanceOperationListResultPage) Values() []ManagedInstanceOperation { + if page.miolr.IsEmpty() { + return nil + } + return *page.miolr.Value +} + +// Creates a new instance of the ManagedInstanceOperationListResultPage type. +func NewManagedInstanceOperationListResultPage(getNextPage func(context.Context, ManagedInstanceOperationListResult) (ManagedInstanceOperationListResult, error)) ManagedInstanceOperationListResultPage { + return ManagedInstanceOperationListResultPage{fn: getNextPage} +} + +// ManagedInstanceOperationProperties the properties of a managed instance operation. +type ManagedInstanceOperationProperties struct { + // ManagedInstanceName - READ-ONLY; The name of the managed instance the operation is being performed on. + ManagedInstanceName *string `json:"managedInstanceName,omitempty"` + // Operation - READ-ONLY; The name of operation. + Operation *string `json:"operation,omitempty"` + // OperationFriendlyName - READ-ONLY; The friendly name of operation. + OperationFriendlyName *string `json:"operationFriendlyName,omitempty"` + // PercentComplete - READ-ONLY; The percentage of the operation completed. + PercentComplete *int32 `json:"percentComplete,omitempty"` + // StartTime - READ-ONLY; The operation start time. + StartTime *date.Time `json:"startTime,omitempty"` + // State - READ-ONLY; The operation state. Possible values include: 'Pending', 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', 'Cancelled' + State ManagementOperationState `json:"state,omitempty"` + // ErrorCode - READ-ONLY; The operation error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorDescription - READ-ONLY; The operation error description. + ErrorDescription *string `json:"errorDescription,omitempty"` + // ErrorSeverity - READ-ONLY; The operation error severity. + ErrorSeverity *int32 `json:"errorSeverity,omitempty"` + // IsUserError - READ-ONLY; Whether or not the error is a user error. + IsUserError *bool `json:"isUserError,omitempty"` + // EstimatedCompletionTime - READ-ONLY; The estimated completion time of the operation. + EstimatedCompletionTime *date.Time `json:"estimatedCompletionTime,omitempty"` + // Description - READ-ONLY; The operation description. + Description *string `json:"description,omitempty"` + // IsCancellable - READ-ONLY; Whether the operation can be cancelled. + IsCancellable *bool `json:"isCancellable,omitempty"` +} + // ManagedInstanceProperties the properties of a managed instance. type ManagedInstanceProperties struct { // ManagedInstanceCreateMode - Specifies the mode of database creation. @@ -2085,7 +2516,7 @@ func NewManagedInstanceVulnerabilityAssessmentListResultPage(getNextPage func(co type ManagedInstanceVulnerabilityAssessmentProperties struct { // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). StorageContainerPath *string `json:"storageContainerPath,omitempty"` - // StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. + // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` @@ -2682,6 +3113,131 @@ type SensitivityLabelProperties struct { IsDisabled *bool `json:"isDisabled,omitempty"` } +// ServerAzureADAdministrator azure Active Directory administrator. +type ServerAzureADAdministrator struct { + autorest.Response `json:"-"` + // AdministratorProperties - Resource properties. + *AdministratorProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServerAzureADAdministrator. +func (saaa ServerAzureADAdministrator) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if saaa.AdministratorProperties != nil { + objectMap["properties"] = saaa.AdministratorProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServerAzureADAdministrator struct. +func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var administratorProperties AdministratorProperties + err = json.Unmarshal(*v, &administratorProperties) + if err != nil { + return err + } + saaa.AdministratorProperties = &administratorProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + saaa.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + saaa.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + saaa.Type = &typeVar + } + } + } + + return nil +} + +// ServerAzureADAdministratorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ServerAzureADAdministratorsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServerAzureADAdministratorsCreateOrUpdateFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent { + saaa, err = client.CreateOrUpdateResponder(saaa.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsCreateOrUpdateFuture", "Result", saaa.Response.Response, "Failure responding to request") + } + } + return +} + +// ServerAzureADAdministratorsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ServerAzureADAdministratorsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + // ServerVulnerabilityAssessment a server vulnerability assessment. type ServerVulnerabilityAssessment struct { autorest.Response `json:"-"` @@ -2906,7 +3462,7 @@ func NewServerVulnerabilityAssessmentListResultPage(getNextPage func(context.Con type ServerVulnerabilityAssessmentProperties struct { // StorageContainerPath - A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). StorageContainerPath *string `json:"storageContainerPath,omitempty"` - // StorageContainerSasKey - A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. + // StorageContainerSasKey - A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. StorageContainerSasKey *string `json:"storageContainerSasKey,omitempty"` // StorageAccountAccessKey - Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go new file mode 100644 index 000000000000..86bac5697df3 --- /dev/null +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/serverazureadadministrators.go @@ -0,0 +1,410 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ServerAzureADAdministratorsClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type ServerAzureADAdministratorsClient struct { + BaseClient +} + +// NewServerAzureADAdministratorsClient creates an instance of the ServerAzureADAdministratorsClient client. +func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAdministratorsClient { + return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client. +func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { + return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a new Server Active Directory Administrator or updates an existing server Active Directory +// Administrator. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// parameters - the required parameters for creating or updating an Active Directory Administrator. +func (client ServerAzureADAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAzureADAdministrator) (result ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.AdministratorProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AdministratorProperties.AdministratorType", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AdministratorProperties.Login", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AdministratorProperties.Sid", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAzureADAdministrator) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "administratorName": autorest.Encode("path", "ActiveDirectory"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) CreateOrUpdateSender(req *http.Request) (future ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an existing server Active Directory Administrator. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +func (client ServerAzureADAdministratorsClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServerAzureADAdministratorsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ServerAzureADAdministratorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "administratorName": autorest.Encode("path", "ActiveDirectory"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) DeleteSender(req *http.Request) (future ServerAzureADAdministratorsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a server Administrator. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +func (client ServerAzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerAzureADAdministrator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServerAzureADAdministratorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "administratorName": autorest.Encode("path", "ActiveDirectory"), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) GetResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets a list of server Administrators. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +func (client ServerAzureADAdministratorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result AdministratorListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.ListByServer") + defer func() { + sc := -1 + if result.alr.Response.Response != nil { + sc = result.alr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByServerNextResults + req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.alr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure sending request") + return + } + + result.alr, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client ServerAzureADAdministratorsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result AdministratorListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByServerNextResults retrieves the next set of results, if any. +func (client ServerAzureADAdministratorsClient) listByServerNextResults(ctx context.Context, lastResults AdministratorListResult) (result AdministratorListResult, err error) { + req, err := lastResults.administratorListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServerAzureADAdministratorsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result AdministratorListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) + return +} diff --git a/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go index e448e7707d38..75484c3546bf 100644 --- a/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/2018-06-01-preview/sql/sqlapi/interfaces.go @@ -55,6 +55,13 @@ type ManagedInstanceVulnerabilityAssessmentsClientAPI interface { var _ ManagedInstanceVulnerabilityAssessmentsClientAPI = (*sql.ManagedInstanceVulnerabilityAssessmentsClient)(nil) +// ManagedInstanceOperationsClientAPI contains the set of methods on the ManagedInstanceOperationsClient type. +type ManagedInstanceOperationsClientAPI interface { + ListByManagedInstance(ctx context.Context, resourceGroupName string, managedInstanceName string) (result sql.ManagedInstanceOperationListResultPage, err error) +} + +var _ ManagedInstanceOperationsClientAPI = (*sql.ManagedInstanceOperationsClient)(nil) + // ServerVulnerabilityAssessmentsClientAPI contains the set of methods on the ServerVulnerabilityAssessmentsClient type. type ServerVulnerabilityAssessmentsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerVulnerabilityAssessment) (result sql.ServerVulnerabilityAssessment, err error) @@ -139,3 +146,13 @@ type PrivateEndpointConnectionsClientAPI interface { } var _ PrivateEndpointConnectionsClientAPI = (*sql.PrivateEndpointConnectionsClient)(nil) + +// ServerAzureADAdministratorsClientAPI contains the set of methods on the ServerAzureADAdministratorsClient type. +type ServerAzureADAdministratorsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerAzureADAdministrator) (result sql.ServerAzureADAdministratorsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministratorsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministrator, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.AdministratorListResultPage, err error) +} + +var _ ServerAzureADAdministratorsClientAPI = (*sql.ServerAzureADAdministratorsClient)(nil) diff --git a/services/preview/sql/mgmt/v3.0/sql/models.go b/services/preview/sql/mgmt/v3.0/sql/models.go index bebcdc009350..07520c189f18 100644 --- a/services/preview/sql/mgmt/v3.0/sql/models.go +++ b/services/preview/sql/mgmt/v3.0/sql/models.go @@ -1692,6 +1692,165 @@ func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAsses return []VulnerabilityAssessmentScanTriggerType{VulnerabilityAssessmentScanTriggerTypeOnDemand, VulnerabilityAssessmentScanTriggerTypeRecurring} } +// AdministratorListResult a list of active directory administrators. +type AdministratorListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]ServerAzureADAdministrator `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AdministratorListResultIterator provides access to a complete listing of ServerAzureADAdministrator +// values. +type AdministratorListResultIterator struct { + i int + page AdministratorListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AdministratorListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdministratorListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AdministratorListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AdministratorListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter AdministratorListResultIterator) Response() AdministratorListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AdministratorListResultIterator) Value() ServerAzureADAdministrator { + if !iter.page.NotDone() { + return ServerAzureADAdministrator{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AdministratorListResultIterator type. +func NewAdministratorListResultIterator(page AdministratorListResultPage) AdministratorListResultIterator { + return AdministratorListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (alr AdministratorListResult) IsEmpty() bool { + return alr.Value == nil || len(*alr.Value) == 0 +} + +// administratorListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (alr AdministratorListResult) administratorListResultPreparer(ctx context.Context) (*http.Request, error) { + if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(alr.NextLink))) +} + +// AdministratorListResultPage contains a page of ServerAzureADAdministrator values. +type AdministratorListResultPage struct { + fn func(context.Context, AdministratorListResult) (AdministratorListResult, error) + alr AdministratorListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AdministratorListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AdministratorListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.alr) + if err != nil { + return err + } + page.alr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AdministratorListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AdministratorListResultPage) NotDone() bool { + return !page.alr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AdministratorListResultPage) Response() AdministratorListResult { + return page.alr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AdministratorListResultPage) Values() []ServerAzureADAdministrator { + if page.alr.IsEmpty() { + return nil + } + return *page.alr.Value +} + +// Creates a new instance of the AdministratorListResultPage type. +func NewAdministratorListResultPage(getNextPage func(context.Context, AdministratorListResult) (AdministratorListResult, error)) AdministratorListResultPage { + return AdministratorListResultPage{fn: getNextPage} +} + +// AdministratorProperties properties of a active directory administrator. +type AdministratorProperties struct { + // AdministratorType - Type of the sever administrator. + AdministratorType *string `json:"administratorType,omitempty"` + // Login - Login name of the server administrator. + Login *string `json:"login,omitempty"` + // Sid - SID (object ID) of the server administrator. + Sid *uuid.UUID `json:"sid,omitempty"` + // TenantID - Tenant ID of the administrator. + TenantID *uuid.UUID `json:"tenantId,omitempty"` +} + // AutomaticTuningOptions automatic tuning properties for individual advisors. type AutomaticTuningOptions struct { // DesiredState - Automatic tuning option desired state. Possible values include: 'AutomaticTuningOptionModeDesiredOff', 'AutomaticTuningOptionModeDesiredOn', 'AutomaticTuningOptionModeDesiredDefault' @@ -15491,25 +15650,6 @@ func (s *Server) UnmarshalJSON(body []byte) error { return nil } -// ServerAdministratorListResult the response to a list Active Directory Administrators request. -type ServerAdministratorListResult struct { - autorest.Response `json:"-"` - // Value - The list of server Active Directory Administrators for the server. - Value *[]ServerAzureADAdministrator `json:"value,omitempty"` -} - -// ServerAdministratorProperties the properties of an server Administrator. -type ServerAdministratorProperties struct { - // AdministratorType - The type of administrator. - AdministratorType *string `json:"administratorType,omitempty"` - // Login - The server administrator login value. - Login *string `json:"login,omitempty"` - // Sid - The server administrator Sid (Secure ID). - Sid *uuid.UUID `json:"sid,omitempty"` - // TenantID - The server Active Directory Administrator tenant id. - TenantID *uuid.UUID `json:"tenantId,omitempty"` -} - // ServerAutomaticTuning server-level Automatic Tuning. type ServerAutomaticTuning struct { autorest.Response `json:"-"` @@ -15583,11 +15723,11 @@ func (sat *ServerAutomaticTuning) UnmarshalJSON(body []byte) error { return nil } -// ServerAzureADAdministrator an server Active Directory Administrator. +// ServerAzureADAdministrator azure Active Directory administrator. type ServerAzureADAdministrator struct { autorest.Response `json:"-"` - // ServerAdministratorProperties - The properties of the resource. - *ServerAdministratorProperties `json:"properties,omitempty"` + // AdministratorProperties - Resource properties. + *AdministratorProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -15599,8 +15739,8 @@ type ServerAzureADAdministrator struct { // MarshalJSON is the custom marshaler for ServerAzureADAdministrator. func (saaa ServerAzureADAdministrator) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if saaa.ServerAdministratorProperties != nil { - objectMap["properties"] = saaa.ServerAdministratorProperties + if saaa.AdministratorProperties != nil { + objectMap["properties"] = saaa.AdministratorProperties } return json.Marshal(objectMap) } @@ -15616,12 +15756,12 @@ func (saaa *ServerAzureADAdministrator) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var serverAdministratorProperties ServerAdministratorProperties - err = json.Unmarshal(*v, &serverAdministratorProperties) + var administratorProperties AdministratorProperties + err = json.Unmarshal(*v, &administratorProperties) if err != nil { return err } - saaa.ServerAdministratorProperties = &serverAdministratorProperties + saaa.AdministratorProperties = &administratorProperties } case "id": if v != nil { @@ -15693,7 +15833,7 @@ type ServerAzureADAdministratorsDeleteFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (saaa ServerAzureADAdministrator, err error) { +func (future *ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzureADAdministratorsClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { @@ -15704,13 +15844,7 @@ func (future *ServerAzureADAdministratorsDeleteFuture) Result(client ServerAzure err = azure.NewAsyncOpIncompleteError("sql.ServerAzureADAdministratorsDeleteFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if saaa.Response.Response, err = future.GetResult(sender); err == nil && saaa.Response.Response.StatusCode != http.StatusNoContent { - saaa, err = client.DeleteResponder(saaa.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsDeleteFuture", "Result", saaa.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } @@ -21197,3 +21331,579 @@ type VulnerabilityAssessmentScanRecordProperties struct { // NumberOfFailedSecurityChecks - READ-ONLY; The number of failed security checks. NumberOfFailedSecurityChecks *int32 `json:"numberOfFailedSecurityChecks,omitempty"` } + +// WorkloadClassifier workload classifier operations for a data warehouse +type WorkloadClassifier struct { + autorest.Response `json:"-"` + // WorkloadClassifierProperties - Resource properties. + *WorkloadClassifierProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkloadClassifier. +func (wc WorkloadClassifier) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wc.WorkloadClassifierProperties != nil { + objectMap["properties"] = wc.WorkloadClassifierProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkloadClassifier struct. +func (wc *WorkloadClassifier) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var workloadClassifierProperties WorkloadClassifierProperties + err = json.Unmarshal(*v, &workloadClassifierProperties) + if err != nil { + return err + } + wc.WorkloadClassifierProperties = &workloadClassifierProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wc.Type = &typeVar + } + } + } + + return nil +} + +// WorkloadClassifierListResult a list of workload classifiers for a workload group. +type WorkloadClassifierListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]WorkloadClassifier `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkloadClassifierListResultIterator provides access to a complete listing of WorkloadClassifier values. +type WorkloadClassifierListResultIterator struct { + i int + page WorkloadClassifierListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkloadClassifierListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifierListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkloadClassifierListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkloadClassifierListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkloadClassifierListResultIterator) Response() WorkloadClassifierListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkloadClassifierListResultIterator) Value() WorkloadClassifier { + if !iter.page.NotDone() { + return WorkloadClassifier{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkloadClassifierListResultIterator type. +func NewWorkloadClassifierListResultIterator(page WorkloadClassifierListResultPage) WorkloadClassifierListResultIterator { + return WorkloadClassifierListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wclr WorkloadClassifierListResult) IsEmpty() bool { + return wclr.Value == nil || len(*wclr.Value) == 0 +} + +// workloadClassifierListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wclr WorkloadClassifierListResult) workloadClassifierListResultPreparer(ctx context.Context) (*http.Request, error) { + if wclr.NextLink == nil || len(to.String(wclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wclr.NextLink))) +} + +// WorkloadClassifierListResultPage contains a page of WorkloadClassifier values. +type WorkloadClassifierListResultPage struct { + fn func(context.Context, WorkloadClassifierListResult) (WorkloadClassifierListResult, error) + wclr WorkloadClassifierListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkloadClassifierListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifierListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wclr) + if err != nil { + return err + } + page.wclr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkloadClassifierListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkloadClassifierListResultPage) NotDone() bool { + return !page.wclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkloadClassifierListResultPage) Response() WorkloadClassifierListResult { + return page.wclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkloadClassifierListResultPage) Values() []WorkloadClassifier { + if page.wclr.IsEmpty() { + return nil + } + return *page.wclr.Value +} + +// Creates a new instance of the WorkloadClassifierListResultPage type. +func NewWorkloadClassifierListResultPage(getNextPage func(context.Context, WorkloadClassifierListResult) (WorkloadClassifierListResult, error)) WorkloadClassifierListResultPage { + return WorkloadClassifierListResultPage{fn: getNextPage} +} + +// WorkloadClassifierProperties workload classifier definition. For more information look at +// sys.workload_management_workload_classifiers (DMV). +type WorkloadClassifierProperties struct { + // MemberName - The workload classifier member name. + MemberName *string `json:"memberName,omitempty"` + // Label - The workload classifier label. + Label *string `json:"label,omitempty"` + // Context - The workload classifier context. + Context *string `json:"context,omitempty"` + // StartTime - The workload classifier start time for classification. + StartTime *string `json:"startTime,omitempty"` + // EndTime - The workload classifier end time for classification. + EndTime *string `json:"endTime,omitempty"` + // Importance - The workload classifier importance. + Importance *string `json:"importance,omitempty"` +} + +// WorkloadClassifiersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkloadClassifiersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *WorkloadClassifiersCreateOrUpdateFuture) Result(client WorkloadClassifiersClient) (wc WorkloadClassifier, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.WorkloadClassifiersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if wc.Response.Response, err = future.GetResult(sender); err == nil && wc.Response.Response.StatusCode != http.StatusNoContent { + wc, err = client.CreateOrUpdateResponder(wc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersCreateOrUpdateFuture", "Result", wc.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkloadClassifiersDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkloadClassifiersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *WorkloadClassifiersDeleteFuture) Result(client WorkloadClassifiersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.WorkloadClassifiersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// WorkloadGroup workload group operations for a data warehouse +type WorkloadGroup struct { + autorest.Response `json:"-"` + // WorkloadGroupProperties - Resource properties. + *WorkloadGroupProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkloadGroup. +func (wg WorkloadGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wg.WorkloadGroupProperties != nil { + objectMap["properties"] = wg.WorkloadGroupProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkloadGroup struct. +func (wg *WorkloadGroup) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var workloadGroupProperties WorkloadGroupProperties + err = json.Unmarshal(*v, &workloadGroupProperties) + if err != nil { + return err + } + wg.WorkloadGroupProperties = &workloadGroupProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wg.Type = &typeVar + } + } + } + + return nil +} + +// WorkloadGroupListResult a list of workload groups. +type WorkloadGroupListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; Array of results. + Value *[]WorkloadGroup `json:"value,omitempty"` + // NextLink - READ-ONLY; Link to retrieve next page of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkloadGroupListResultIterator provides access to a complete listing of WorkloadGroup values. +type WorkloadGroupListResultIterator struct { + i int + page WorkloadGroupListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkloadGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkloadGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkloadGroupListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkloadGroupListResultIterator) Response() WorkloadGroupListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkloadGroupListResultIterator) Value() WorkloadGroup { + if !iter.page.NotDone() { + return WorkloadGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkloadGroupListResultIterator type. +func NewWorkloadGroupListResultIterator(page WorkloadGroupListResultPage) WorkloadGroupListResultIterator { + return WorkloadGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wglr WorkloadGroupListResult) IsEmpty() bool { + return wglr.Value == nil || len(*wglr.Value) == 0 +} + +// workloadGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wglr WorkloadGroupListResult) workloadGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if wglr.NextLink == nil || len(to.String(wglr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wglr.NextLink))) +} + +// WorkloadGroupListResultPage contains a page of WorkloadGroup values. +type WorkloadGroupListResultPage struct { + fn func(context.Context, WorkloadGroupListResult) (WorkloadGroupListResult, error) + wglr WorkloadGroupListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkloadGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wglr) + if err != nil { + return err + } + page.wglr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkloadGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkloadGroupListResultPage) NotDone() bool { + return !page.wglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkloadGroupListResultPage) Response() WorkloadGroupListResult { + return page.wglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkloadGroupListResultPage) Values() []WorkloadGroup { + if page.wglr.IsEmpty() { + return nil + } + return *page.wglr.Value +} + +// Creates a new instance of the WorkloadGroupListResultPage type. +func NewWorkloadGroupListResultPage(getNextPage func(context.Context, WorkloadGroupListResult) (WorkloadGroupListResult, error)) WorkloadGroupListResultPage { + return WorkloadGroupListResultPage{fn: getNextPage} +} + +// WorkloadGroupProperties workload group definition. For more information look at +// sys.workload_management_workload_groups (DMV). +type WorkloadGroupProperties struct { + // MinResourcePercent - The workload group minimum percentage resource. + MinResourcePercent *int32 `json:"minResourcePercent,omitempty"` + // MaxResourcePercent - The workload group cap percentage resource. + MaxResourcePercent *int32 `json:"maxResourcePercent,omitempty"` + // MinResourcePercentPerRequest - The workload group request minimum grant percentage. + MinResourcePercentPerRequest *float64 `json:"minResourcePercentPerRequest,omitempty"` + // MaxResourcePercentPerRequest - The workload group request maximum grant percentage. + MaxResourcePercentPerRequest *float64 `json:"maxResourcePercentPerRequest,omitempty"` + // Importance - The workload group importance level. + Importance *string `json:"importance,omitempty"` + // QueryExecutionTimeout - The workload group query execution timeout. + QueryExecutionTimeout *int32 `json:"queryExecutionTimeout,omitempty"` +} + +// WorkloadGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WorkloadGroupsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *WorkloadGroupsCreateOrUpdateFuture) Result(client WorkloadGroupsClient) (wg WorkloadGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.WorkloadGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if wg.Response.Response, err = future.GetResult(sender); err == nil && wg.Response.Response.StatusCode != http.StatusNoContent { + wg, err = client.CreateOrUpdateResponder(wg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsCreateOrUpdateFuture", "Result", wg.Response.Response, "Failure responding to request") + } + } + return +} + +// WorkloadGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type WorkloadGroupsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *WorkloadGroupsDeleteFuture) Result(client WorkloadGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("sql.WorkloadGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} diff --git a/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go b/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go index 8f68bc664109..86bac5697df3 100644 --- a/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go +++ b/services/preview/sql/mgmt/v3.0/sql/serverazureadadministrators.go @@ -49,8 +49,8 @@ func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptio // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value // from the Azure Resource Manager API or the portal. // serverName - the name of the server. -// properties - the required parameters for creating or updating an Active Directory Administrator. -func (client ServerAzureADAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, properties ServerAzureADAdministrator) (result ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { +// parameters - the required parameters for creating or updating an Active Directory Administrator. +func (client ServerAzureADAdministratorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAzureADAdministrator) (result ServerAzureADAdministratorsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.CreateOrUpdate") defer func() { @@ -62,17 +62,16 @@ func (client ServerAzureADAdministratorsClient) CreateOrUpdate(ctx context.Conte }() } if err := validation.Validate([]validation.Validation{ - {TargetValue: properties, - Constraints: []validation.Constraint{{Target: "properties.ServerAdministratorProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "properties.ServerAdministratorProperties.AdministratorType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.ServerAdministratorProperties.Login", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.ServerAdministratorProperties.Sid", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "properties.ServerAdministratorProperties.TenantID", Name: validation.Null, Rule: true, Chain: nil}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.AdministratorProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AdministratorProperties.AdministratorType", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AdministratorProperties.Login", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AdministratorProperties.Sid", Name: validation.Null, Rule: true, Chain: nil}, }}}}}); err != nil { return result, validation.NewError("sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, properties) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -88,15 +87,15 @@ func (client ServerAzureADAdministratorsClient) CreateOrUpdate(ctx context.Conte } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, properties ServerAzureADAdministrator) (*http.Request, error) { +func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAzureADAdministrator) (*http.Request, error) { pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "activeDirectory"), + "administratorName": autorest.Encode("path", "ActiveDirectory"), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2018-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -106,7 +105,7 @@ func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(ctx conte autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), - autorest.WithJSON(properties), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } @@ -171,13 +170,13 @@ func (client ServerAzureADAdministratorsClient) Delete(ctx context.Context, reso // DeletePreparer prepares the Delete request. func (client ServerAzureADAdministratorsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "activeDirectory"), + "administratorName": autorest.Encode("path", "ActiveDirectory"), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2018-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -205,18 +204,17 @@ func (client ServerAzureADAdministratorsClient) DeleteSender(req *http.Request) // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) DeleteResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { +func (client ServerAzureADAdministratorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// Get returns an server Administrator. +// Get gets a server Administrator. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value // from the Azure Resource Manager API or the portal. @@ -256,13 +254,13 @@ func (client ServerAzureADAdministratorsClient) Get(ctx context.Context, resourc // GetPreparer prepares the Get request. func (client ServerAzureADAdministratorsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "administratorName": autorest.Encode("path", "activeDirectory"), + "administratorName": autorest.Encode("path", "ActiveDirectory"), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2018-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -295,22 +293,23 @@ func (client ServerAzureADAdministratorsClient) GetResponder(resp *http.Response return } -// ListByServer returns a list of server Administrators. +// ListByServer gets a list of server Administrators. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value // from the Azure Resource Manager API or the portal. // serverName - the name of the server. -func (client ServerAzureADAdministratorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerAdministratorListResult, err error) { +func (client ServerAzureADAdministratorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result AdministratorListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.ListByServer") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.alr.Response.Response != nil { + sc = result.alr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } + result.fn = client.listByServerNextResults req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) if err != nil { err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", nil, "Failure preparing request") @@ -319,12 +318,12 @@ func (client ServerAzureADAdministratorsClient) ListByServer(ctx context.Context resp, err := client.ListByServerSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} + result.alr.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure sending request") return } - result, err = client.ListByServerResponder(resp) + result.alr, err = client.ListByServerResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure responding to request") } @@ -340,7 +339,7 @@ func (client ServerAzureADAdministratorsClient) ListByServerPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2018-06-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -362,7 +361,7 @@ func (client ServerAzureADAdministratorsClient) ListByServerSender(req *http.Req // ListByServerResponder handles the response to the ListByServer request. The method always // closes the http.Response Body. -func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result ServerAdministratorListResult, err error) { +func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result AdministratorListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -372,3 +371,40 @@ func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http result.Response = autorest.Response{Response: resp} return } + +// listByServerNextResults retrieves the next set of results, if any. +func (client ServerAzureADAdministratorsClient) listByServerNextResults(ctx context.Context, lastResults AdministratorListResult) (result AdministratorListResult, err error) { + req, err := lastResults.administratorListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "listByServerNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServerAzureADAdministratorsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result AdministratorListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServerAzureADAdministratorsClient.ListByServer") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) + return +} diff --git a/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go b/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go index 747b54663c5e..1b844ab2f946 100644 --- a/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go +++ b/services/preview/sql/mgmt/v3.0/sql/sqlapi/interfaces.go @@ -161,16 +161,6 @@ type ReplicationLinksClientAPI interface { var _ ReplicationLinksClientAPI = (*sql.ReplicationLinksClient)(nil) -// ServerAzureADAdministratorsClientAPI contains the set of methods on the ServerAzureADAdministratorsClient type. -type ServerAzureADAdministratorsClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, properties sql.ServerAzureADAdministrator) (result sql.ServerAzureADAdministratorsCreateOrUpdateFuture, err error) - Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministratorsDeleteFuture, err error) - Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministrator, err error) - ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAdministratorListResult, err error) -} - -var _ ServerAzureADAdministratorsClientAPI = (*sql.ServerAzureADAdministratorsClient)(nil) - // ServerCommunicationLinksClientAPI contains the set of methods on the ServerCommunicationLinksClient type. type ServerCommunicationLinksClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, parameters sql.ServerCommunicationLink) (result sql.ServerCommunicationLinksCreateOrUpdateFuture, err error) @@ -861,3 +851,33 @@ type PrivateLinkResourcesClientAPI interface { } var _ PrivateLinkResourcesClientAPI = (*sql.PrivateLinkResourcesClient)(nil) + +// ServerAzureADAdministratorsClientAPI contains the set of methods on the ServerAzureADAdministratorsClient type. +type ServerAzureADAdministratorsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters sql.ServerAzureADAdministrator) (result sql.ServerAzureADAdministratorsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministratorsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string) (result sql.ServerAzureADAdministrator, err error) + ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.AdministratorListResultPage, err error) +} + +var _ ServerAzureADAdministratorsClientAPI = (*sql.ServerAzureADAdministratorsClient)(nil) + +// WorkloadGroupsClientAPI contains the set of methods on the WorkloadGroupsClient type. +type WorkloadGroupsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, parameters sql.WorkloadGroup) (result sql.WorkloadGroupsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result sql.WorkloadGroupsDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result sql.WorkloadGroup, err error) + ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result sql.WorkloadGroupListResultPage, err error) +} + +var _ WorkloadGroupsClientAPI = (*sql.WorkloadGroupsClient)(nil) + +// WorkloadClassifiersClientAPI contains the set of methods on the WorkloadClassifiersClient type. +type WorkloadClassifiersClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, parameters sql.WorkloadClassifier) (result sql.WorkloadClassifiersCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (result sql.WorkloadClassifiersDeleteFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (result sql.WorkloadClassifier, err error) + ListByWorkloadGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result sql.WorkloadClassifierListResultPage, err error) +} + +var _ WorkloadClassifiersClientAPI = (*sql.WorkloadClassifiersClient)(nil) diff --git a/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go b/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go new file mode 100644 index 000000000000..fefa2e77b2d2 --- /dev/null +++ b/services/preview/sql/mgmt/v3.0/sql/workloadclassifiers.go @@ -0,0 +1,425 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// WorkloadClassifiersClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type WorkloadClassifiersClient struct { + BaseClient +} + +// NewWorkloadClassifiersClient creates an instance of the WorkloadClassifiersClient client. +func NewWorkloadClassifiersClient(subscriptionID string) WorkloadClassifiersClient { + return NewWorkloadClassifiersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkloadClassifiersClientWithBaseURI creates an instance of the WorkloadClassifiersClient client. +func NewWorkloadClassifiersClientWithBaseURI(baseURI string, subscriptionID string) WorkloadClassifiersClient { + return WorkloadClassifiersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a workload classifier. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +// workloadGroupName - the name of the workload group from which to receive the classifier from. +// workloadClassifierName - the name of the workload classifier to create/update. +// parameters - the properties of the workload classifier. +func (client WorkloadClassifiersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier) (result WorkloadClassifiersCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifiersClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WorkloadClassifierProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WorkloadClassifierProperties.MemberName", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("sql.WorkloadClassifiersClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkloadClassifiersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadClassifierName": autorest.Encode("path", workloadClassifierName), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadClassifiersClient) CreateOrUpdateSender(req *http.Request) (future WorkloadClassifiersCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkloadClassifiersClient) CreateOrUpdateResponder(resp *http.Response) (result WorkloadClassifier, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a workload classifier. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +// workloadGroupName - the name of the workload group from which to receive the classifier from. +// workloadClassifierName - the name of the workload classifier to delete. +func (client WorkloadClassifiersClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (result WorkloadClassifiersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifiersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WorkloadClassifiersClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadClassifierName": autorest.Encode("path", workloadClassifierName), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadClassifiersClient) DeleteSender(req *http.Request) (future WorkloadClassifiersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WorkloadClassifiersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a workload classifier +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +// workloadGroupName - the name of the workload group from which to receive the classifier from. +// workloadClassifierName - the name of the workload classifier. +func (client WorkloadClassifiersClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (result WorkloadClassifier, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifiersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, workloadClassifierName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkloadClassifiersClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadClassifierName": autorest.Encode("path", workloadClassifierName), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadClassifiersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkloadClassifiersClient) GetResponder(resp *http.Response) (result WorkloadClassifier, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkloadGroup gets the list of workload classifiers for a workload group +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +// workloadGroupName - the name of the workload group from which to receive the classifiers from. +func (client WorkloadClassifiersClient) ListByWorkloadGroup(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result WorkloadClassifierListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifiersClient.ListByWorkloadGroup") + defer func() { + sc := -1 + if result.wclr.Response.Response != nil { + sc = result.wclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByWorkloadGroupNextResults + req, err := client.ListByWorkloadGroupPreparer(ctx, resourceGroupName, serverName, databaseName, workloadGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "ListByWorkloadGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkloadGroupSender(req) + if err != nil { + result.wclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "ListByWorkloadGroup", resp, "Failure sending request") + return + } + + result.wclr, err = client.ListByWorkloadGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "ListByWorkloadGroup", resp, "Failure responding to request") + } + + return +} + +// ListByWorkloadGroupPreparer prepares the ListByWorkloadGroup request. +func (client WorkloadClassifiersClient) ListByWorkloadGroupPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByWorkloadGroupSender sends the ListByWorkloadGroup request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadClassifiersClient) ListByWorkloadGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByWorkloadGroupResponder handles the response to the ListByWorkloadGroup request. The method always +// closes the http.Response Body. +func (client WorkloadClassifiersClient) ListByWorkloadGroupResponder(resp *http.Response) (result WorkloadClassifierListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByWorkloadGroupNextResults retrieves the next set of results, if any. +func (client WorkloadClassifiersClient) listByWorkloadGroupNextResults(ctx context.Context, lastResults WorkloadClassifierListResult) (result WorkloadClassifierListResult, err error) { + req, err := lastResults.workloadClassifierListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "listByWorkloadGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByWorkloadGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "listByWorkloadGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByWorkloadGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadClassifiersClient", "listByWorkloadGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByWorkloadGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkloadClassifiersClient) ListByWorkloadGroupComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result WorkloadClassifierListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadClassifiersClient.ListByWorkloadGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByWorkloadGroup(ctx, resourceGroupName, serverName, databaseName, workloadGroupName) + return +} diff --git a/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go b/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go new file mode 100644 index 000000000000..8c8abf00ffe6 --- /dev/null +++ b/services/preview/sql/mgmt/v3.0/sql/workloadgroups.go @@ -0,0 +1,420 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// WorkloadGroupsClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type WorkloadGroupsClient struct { + BaseClient +} + +// NewWorkloadGroupsClient creates an instance of the WorkloadGroupsClient client. +func NewWorkloadGroupsClient(subscriptionID string) WorkloadGroupsClient { + return NewWorkloadGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkloadGroupsClientWithBaseURI creates an instance of the WorkloadGroupsClient client. +func NewWorkloadGroupsClientWithBaseURI(baseURI string, subscriptionID string) WorkloadGroupsClient { + return WorkloadGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a workload group. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +// workloadGroupName - the name of the workload group. +// parameters - the requested workload group state. +func (client WorkloadGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, parameters WorkloadGroup) (result WorkloadGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WorkloadGroupProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WorkloadGroupProperties.MinResourcePercent", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.WorkloadGroupProperties.MaxResourcePercent", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.WorkloadGroupProperties.MinResourcePercentPerRequest", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("sql.WorkloadGroupsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, workloadGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WorkloadGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, parameters WorkloadGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadGroupsClient) CreateOrUpdateSender(req *http.Request) (future WorkloadGroupsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WorkloadGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result WorkloadGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a workload group. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +// workloadGroupName - the name of the workload group to delete. +func (client WorkloadGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result WorkloadGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName, workloadGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WorkloadGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadGroupsClient) DeleteSender(req *http.Request) (future WorkloadGroupsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WorkloadGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a workload group +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +// workloadGroupName - the name of the workload group. +func (client WorkloadGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (result WorkloadGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, workloadGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client WorkloadGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workloadGroupName": autorest.Encode("path", workloadGroupName), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WorkloadGroupsClient) GetResponder(resp *http.Response) (result WorkloadGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabase gets the list of workload groups +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serverName - the name of the server. +// databaseName - the name of the database. +func (client WorkloadGroupsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result WorkloadGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupsClient.ListByDatabase") + defer func() { + sc := -1 + if result.wglr.Response.Response != nil { + sc = result.wglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByDatabaseNextResults + req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.wglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result.wglr, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client WorkloadGroupsClient) ListByDatabasePreparer(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadGroupsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client WorkloadGroupsClient) ListByDatabaseResponder(resp *http.Response) (result WorkloadGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByDatabaseNextResults retrieves the next set of results, if any. +func (client WorkloadGroupsClient) listByDatabaseNextResults(ctx context.Context, lastResults WorkloadGroupListResult) (result WorkloadGroupListResult, err error) { + req, err := lastResults.workloadGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "listByDatabaseNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "listByDatabaseNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.WorkloadGroupsClient", "listByDatabaseNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByDatabaseComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkloadGroupsClient) ListByDatabaseComplete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result WorkloadGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadGroupsClient.ListByDatabase") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByDatabase(ctx, resourceGroupName, serverName, databaseName) + return +} diff --git a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/models.go b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/models.go index 2be41094dae8..0983c33e0199 100644 --- a/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/models.go +++ b/services/preview/sqlvirtualmachine/mgmt/2017-03-01-preview/sqlvirtualmachine/models.go @@ -231,13 +231,15 @@ type SQLServerLicenseType string const ( // AHUB ... AHUB SQLServerLicenseType = "AHUB" + // DR ... + DR SQLServerLicenseType = "DR" // PAYG ... PAYG SQLServerLicenseType = "PAYG" ) // PossibleSQLServerLicenseTypeValues returns an array of possible values for the SQLServerLicenseType const type. func PossibleSQLServerLicenseTypeValues() []SQLServerLicenseType { - return []SQLServerLicenseType{AHUB, PAYG} + return []SQLServerLicenseType{AHUB, DR, PAYG} } // SQLVMGroupImageSku enumerates the values for sqlvm group image sku. @@ -1347,7 +1349,7 @@ type Properties struct { ProvisioningState *string `json:"provisioningState,omitempty"` // SQLImageOffer - SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016. SQLImageOffer *string `json:"sqlImageOffer,omitempty"` - // SQLServerLicenseType - SQL Server license type. Possible values include: 'PAYG', 'AHUB' + // SQLServerLicenseType - SQL Server license type. Possible values include: 'PAYG', 'AHUB', 'DR' SQLServerLicenseType SQLServerLicenseType `json:"sqlServerLicenseType,omitempty"` // SQLManagement - SQL Server Management type. Possible values include: 'Full', 'LightWeight', 'NoAgent' SQLManagement SQLManagementMode `json:"sqlManagement,omitempty"` diff --git a/services/preview/storage/datalake/2018-06-17/storagedatalake/filesystem.go b/services/preview/storage/datalake/2018-06-17/storagedatalake/filesystem.go index 50cf18837eb4..d0d40fa84890 100644 --- a/services/preview/storage/datalake/2018-06-17/storagedatalake/filesystem.go +++ b/services/preview/storage/datalake/2018-06-17/storagedatalake/filesystem.go @@ -66,7 +66,7 @@ func (client FilesystemClient) Create(ctx context.Context, filesystem string, xM Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "Create", err.Error()) } @@ -190,7 +190,7 @@ func (client FilesystemClient) Delete(ctx context.Context, filesystem string, if Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "Delete", err.Error()) } @@ -307,7 +307,7 @@ func (client FilesystemClient) GetProperties(ctx context.Context, filesystem str Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "GetProperties", err.Error()) } @@ -417,13 +417,13 @@ func (client FilesystemClient) List(ctx context.Context, prefix string, continua if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: xMsClientRequestID, Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false, Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "List", err.Error()) } @@ -549,7 +549,7 @@ func (client FilesystemClient) SetProperties(ctx context.Context, filesystem str Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "SetProperties", err.Error()) } diff --git a/services/preview/storage/datalake/2018-06-17/storagedatalake/path.go b/services/preview/storage/datalake/2018-06-17/storagedatalake/path.go index bd6d15d277a2..9fc7cc0547fa 100644 --- a/services/preview/storage/datalake/2018-06-17/storagedatalake/path.go +++ b/services/preview/storage/datalake/2018-06-17/storagedatalake/path.go @@ -136,7 +136,7 @@ func (client PathClient) Create(ctx context.Context, filesystem string, pathPara Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Create", err.Error()) } @@ -368,7 +368,7 @@ func (client PathClient) Delete(ctx context.Context, filesystem string, pathPara Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Delete", err.Error()) } @@ -518,7 +518,7 @@ func (client PathClient) GetProperties(ctx context.Context, filesystem string, p Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "GetProperties", err.Error()) } @@ -681,7 +681,7 @@ func (client PathClient) Lease(ctx context.Context, xMsLeaseAction PathLeaseActi Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Lease", err.Error()) } @@ -829,13 +829,13 @@ func (client PathClient) List(ctx context.Context, recursive bool, filesystem st if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: xMsClientRequestID, Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false, Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "List", err.Error()) } @@ -970,7 +970,7 @@ func (client PathClient) Read(ctx context.Context, filesystem string, pathParame Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Read", err.Error()) } @@ -1182,7 +1182,7 @@ func (client PathClient) Update(ctx context.Context, action PathUpdateAction, fi Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Update", err.Error()) } diff --git a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go index 6e81986e4be1..fdda60049e0d 100644 --- a/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go +++ b/services/preview/timeseriesinsights/mgmt/2017-02-28-preview/timeseriesinsights/environments.go @@ -66,7 +66,7 @@ func (client EnvironmentsClient) CreateOrUpdate(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, {Target: "parameters.EnvironmentCreationProperties", Name: validation.Null, Rule: true, diff --git a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go index 3c2ed91511f3..0b32fb932fde 100644 --- a/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go +++ b/services/preview/timeseriesinsights/mgmt/2018-08-15-preview/timeseriesinsights/environments.go @@ -66,7 +66,7 @@ func (client EnvironmentsClient) CreateOrUpdate(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("timeseriesinsights.EnvironmentsClient", "CreateOrUpdate", err.Error()) diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/models.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/models.go index 57a46decd575..5e299148a93f 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/models.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/models.go @@ -87,27 +87,6 @@ func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{Creating, Deleting, Failed, Succeeded, Updating} } -// ProvisioningState1 enumerates the values for provisioning state 1. -type ProvisioningState1 string - -const ( - // ProvisioningState1Creating ... - ProvisioningState1Creating ProvisioningState1 = "Creating" - // ProvisioningState1Deleting ... - ProvisioningState1Deleting ProvisioningState1 = "Deleting" - // ProvisioningState1Failed ... - ProvisioningState1Failed ProvisioningState1 = "Failed" - // ProvisioningState1Succeeded ... - ProvisioningState1Succeeded ProvisioningState1 = "Succeeded" - // ProvisioningState1Updating ... - ProvisioningState1Updating ProvisioningState1 = "Updating" -) - -// PossibleProvisioningState1Values returns an array of possible values for the ProvisioningState1 const type. -func PossibleProvisioningState1Values() []ProvisioningState1 { - return []ProvisioningState1{ProvisioningState1Creating, ProvisioningState1Deleting, ProvisioningState1Failed, ProvisioningState1Succeeded, ProvisioningState1Updating} -} - // ResourceIdentityType enumerates the values for resource identity type. type ResourceIdentityType string @@ -246,9 +225,10 @@ type APIErrorBase struct { Message *string `json:"message,omitempty"` } -// ImageTemplate ... +// ImageTemplate image template is an ARM resource managed by Microsoft.VirtualMachineImages provider type ImageTemplate struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // ImageTemplateProperties - The properties of the image template *ImageTemplateProperties `json:"properties,omitempty"` // Identity - The identity of the image template, if configured. Identity *ImageTemplateIdentity `json:"identity,omitempty"` @@ -360,7 +340,7 @@ func (it *ImageTemplate) UnmarshalJSON(body []byte) error { return nil } -// BasicImageTemplateCustomizer ... +// BasicImageTemplateCustomizer describes a unit of image customization type BasicImageTemplateCustomizer interface { AsImageTemplateShellCustomizer() (*ImageTemplateShellCustomizer, bool) AsImageTemplateRestartCustomizer() (*ImageTemplateRestartCustomizer, bool) @@ -369,7 +349,7 @@ type BasicImageTemplateCustomizer interface { AsImageTemplateCustomizer() (*ImageTemplateCustomizer, bool) } -// ImageTemplateCustomizer ... +// ImageTemplateCustomizer describes a unit of image customization type ImageTemplateCustomizer struct { // Name - Friendly Name to provide context on what this customization step does Name *string `json:"name,omitempty"` @@ -578,6 +558,8 @@ func (itd ImageTemplateDistributor) AsBasicImageTemplateDistributor() (BasicImag type ImageTemplateFileCustomizer struct { // SourceURI - The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc SourceURI *string `json:"sourceUri,omitempty"` + // Sha256Checksum - SHA256 checksum of the file provided in the sourceUri field above + Sha256Checksum *string `json:"sha256Checksum,omitempty"` // Destination - The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM Destination *string `json:"destination,omitempty"` // Name - Friendly Name to provide context on what this customization step does @@ -593,6 +575,9 @@ func (itfc ImageTemplateFileCustomizer) MarshalJSON() ([]byte, error) { if itfc.SourceURI != nil { objectMap["sourceUri"] = itfc.SourceURI } + if itfc.Sha256Checksum != nil { + objectMap["sha256Checksum"] = itfc.Sha256Checksum + } if itfc.Destination != nil { objectMap["destination"] = itfc.Destination } @@ -720,7 +705,7 @@ func (itis ImageTemplateIsoSource) AsBasicImageTemplateSource() (BasicImageTempl return &itis, true } -// ImageTemplateLastRunStatus ... +// ImageTemplateLastRunStatus describes the latest status of running an image template type ImageTemplateLastRunStatus struct { // StartTime - Start time of the last run (UTC) StartTime *date.Time `json:"startTime,omitempty"` @@ -734,10 +719,11 @@ type ImageTemplateLastRunStatus struct { Message *string `json:"message,omitempty"` } -// ImageTemplateListResult ... +// ImageTemplateListResult the result of List image templates operation type ImageTemplateListResult struct { autorest.Response `json:"-"` - Value *[]ImageTemplate `json:"value,omitempty"` + // Value - An array of image templates + Value *[]ImageTemplate `json:"value,omitempty"` // NextLink - The continuation token. NextLink *string `json:"nextLink,omitempty"` } @@ -1064,8 +1050,12 @@ func (itpis ImageTemplatePlatformImageSource) AsBasicImageTemplateSource() (Basi type ImageTemplatePowerShellCustomizer struct { // ScriptURI - URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc ScriptURI *string `json:"scriptUri,omitempty"` + // Sha256Checksum - SHA256 checksum of the power shell script provided in the scriptUri field above + Sha256Checksum *string `json:"sha256Checksum,omitempty"` // Inline - Array of PowerShell commands to execute Inline *[]string `json:"inline,omitempty"` + // RunElevated - If specified, the PowerShell script will be run with elevated privileges + RunElevated *bool `json:"runElevated,omitempty"` // ValidExitCodes - Valid exit codes for the PowerShell script. [Default: 0] ValidExitCodes *[]int32 `json:"validExitCodes,omitempty"` // Name - Friendly Name to provide context on what this customization step does @@ -1081,9 +1071,15 @@ func (itpsc ImageTemplatePowerShellCustomizer) MarshalJSON() ([]byte, error) { if itpsc.ScriptURI != nil { objectMap["scriptUri"] = itpsc.ScriptURI } + if itpsc.Sha256Checksum != nil { + objectMap["sha256Checksum"] = itpsc.Sha256Checksum + } if itpsc.Inline != nil { objectMap["inline"] = itpsc.Inline } + if itpsc.RunElevated != nil { + objectMap["runElevated"] = itpsc.RunElevated + } if itpsc.ValidExitCodes != nil { objectMap["validExitCodes"] = itpsc.ValidExitCodes } @@ -1126,7 +1122,7 @@ func (itpsc ImageTemplatePowerShellCustomizer) AsBasicImageTemplateCustomizer() return &itpsc, true } -// ImageTemplateProperties ... +// ImageTemplateProperties describes the properties of an image template type ImageTemplateProperties struct { // Source - Specifies the properties used to describe the source image. Source BasicImageTemplateSource `json:"source,omitempty"` @@ -1140,8 +1136,10 @@ type ImageTemplateProperties struct { ProvisioningError *ProvisioningError `json:"provisioningError,omitempty"` // LastRunStatus - READ-ONLY; State of 'run' that is currently executing or was last executed. LastRunStatus *ImageTemplateLastRunStatus `json:"lastRunStatus,omitempty"` - // BuildTimeoutInMinutes - Maximum duration to wait while building the image template. Omit or specify 0 to use the default (60 minutes). + // BuildTimeoutInMinutes - Maximum duration to wait while building the image template. Omit or specify 0 to use the default (4 hours). BuildTimeoutInMinutes *int32 `json:"buildTimeoutInMinutes,omitempty"` + // VMProfile - Describes how virtual machine is set up to build images + VMProfile *ImageTemplateVMProfile `json:"vmProfile,omitempty"` } // UnmarshalJSON is the custom unmarshaler for ImageTemplateProperties struct. @@ -1213,6 +1211,15 @@ func (itp *ImageTemplateProperties) UnmarshalJSON(body []byte) error { } itp.BuildTimeoutInMinutes = &buildTimeoutInMinutes } + case "vmProfile": + if v != nil { + var VMProfile ImageTemplateVMProfile + err = json.Unmarshal(*v, &VMProfile) + if err != nil { + return err + } + itp.VMProfile = &VMProfile + } } } @@ -1289,7 +1296,8 @@ func (itrc ImageTemplateRestartCustomizer) AsBasicImageTemplateCustomizer() (Bas // ImageTemplateSharedImageDistributor distribute via Shared Image Gallery. type ImageTemplateSharedImageDistributor struct { // GalleryImageID - Resource Id of the Shared Image Gallery image - GalleryImageID *string `json:"galleryImageId,omitempty"` + GalleryImageID *string `json:"galleryImageId,omitempty"` + // ReplicationRegions - A list of regions that the image will be replicated to ReplicationRegions *[]string `json:"replicationRegions,omitempty"` // RunOutputName - The name to be used for the associated RunOutput. RunOutputName *string `json:"runOutputName,omitempty"` @@ -1403,6 +1411,8 @@ func (itsivs ImageTemplateSharedImageVersionSource) AsBasicImageTemplateSource() type ImageTemplateShellCustomizer struct { // ScriptURI - URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc ScriptURI *string `json:"scriptUri,omitempty"` + // Sha256Checksum - SHA256 checksum of the shell script provided in the scriptUri field + Sha256Checksum *string `json:"sha256Checksum,omitempty"` // Inline - Array of shell commands to execute Inline *[]string `json:"inline,omitempty"` // Name - Friendly Name to provide context on what this customization step does @@ -1418,6 +1428,9 @@ func (itsc ImageTemplateShellCustomizer) MarshalJSON() ([]byte, error) { if itsc.ScriptURI != nil { objectMap["scriptUri"] = itsc.ScriptURI } + if itsc.Sha256Checksum != nil { + objectMap["sha256Checksum"] = itsc.Sha256Checksum + } if itsc.Inline != nil { objectMap["inline"] = itsc.Inline } @@ -1460,7 +1473,7 @@ func (itsc ImageTemplateShellCustomizer) AsBasicImageTemplateCustomizer() (Basic return &itsc, true } -// BasicImageTemplateSource ... +// BasicImageTemplateSource describes a virtual machine image source for building, customizing and distributing type BasicImageTemplateSource interface { AsImageTemplateIsoSource() (*ImageTemplateIsoSource, bool) AsImageTemplatePlatformImageSource() (*ImageTemplatePlatformImageSource, bool) @@ -1469,7 +1482,7 @@ type BasicImageTemplateSource interface { AsImageTemplateSource() (*ImageTemplateSource, bool) } -// ImageTemplateSource ... +// ImageTemplateSource describes a virtual machine image source for building, customizing and distributing type ImageTemplateSource struct { // Type - Possible values include: 'TypeImageTemplateSource', 'TypeISO', 'TypePlatformImage', 'TypeManagedImage', 'TypeSharedImageVersion' Type Type `json:"type,omitempty"` @@ -1635,6 +1648,12 @@ func (itvd ImageTemplateVhdDistributor) AsBasicImageTemplateDistributor() (Basic return &itvd, true } +// ImageTemplateVMProfile describes the virtual machine used to build, customize and capture images +type ImageTemplateVMProfile struct { + // VMSize - Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2). + VMSize *string `json:"vmSize,omitempty"` +} + // InnerError inner error details. type InnerError struct { // ExceptionType - The exception type. @@ -1805,7 +1824,7 @@ func NewOperationListResultPage(getNextPage func(context.Context, OperationListR return OperationListResultPage{fn: getNextPage} } -// ProvisioningError ... +// ProvisioningError describes the error happened when create or update an image template type ProvisioningError struct { // ProvisioningErrorCode - Error code of the provisioning failure. Possible values include: 'BadSourceType', 'BadPIRSource', 'BadISOSource', 'BadManagedImageSource', 'BadSharedImageVersionSource', 'BadCustomizerType', 'UnsupportedCustomizerType', 'NoCustomizerScript', 'BadDistributeType', 'BadSharedImageDistribute', 'ServerError', 'Other' ProvisioningErrorCode ProvisioningErrorCode `json:"provisioningErrorCode,omitempty"` @@ -1841,7 +1860,8 @@ func (r Resource) MarshalJSON() ([]byte, error) { // RunOutput represents an output that was created by running an image template. type RunOutput struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // RunOutputProperties - The properties of the run output *RunOutputProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` @@ -1914,10 +1934,11 @@ func (ro *RunOutput) UnmarshalJSON(body []byte) error { return nil } -// RunOutputCollection ... +// RunOutputCollection the result of List run outputs operation type RunOutputCollection struct { autorest.Response `json:"-"` - Value *[]RunOutput `json:"value,omitempty"` + // Value - An array of run outputs + Value *[]RunOutput `json:"value,omitempty"` // NextLink - The continuation token. NextLink *string `json:"nextLink,omitempty"` } @@ -2059,14 +2080,14 @@ func NewRunOutputCollectionPage(getNextPage func(context.Context, RunOutputColle return RunOutputCollectionPage{fn: getNextPage} } -// RunOutputProperties ... +// RunOutputProperties describes the properties of a run output type RunOutputProperties struct { // ArtifactID - The resource id of the artifact. ArtifactID *string `json:"artifactId,omitempty"` // ArtifactURI - The location URI of the artifact. ArtifactURI *string `json:"artifactUri,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the resource. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Succeeded', 'ProvisioningState1Failed', 'ProvisioningState1Deleting' - ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the resource. Possible values include: 'Creating', 'Updating', 'Succeeded', 'Failed', 'Deleting' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } // SubResource the Sub Resource model definition. diff --git a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go index 17c6a5921e88..c1fa130572ad 100644 --- a/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go +++ b/services/preview/virtualmachineimagebuilder/mgmt/2019-05-01-preview/virtualmachineimagebuilder/virtualmachineimagetemplates.go @@ -65,7 +65,7 @@ func (client VirtualMachineImageTemplatesClient) CreateOrUpdate(ctx context.Cont {Target: "parameters.ImageTemplateProperties.Distribute", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.ImageTemplateProperties.BuildTimeoutInMinutes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ImageTemplateProperties.BuildTimeoutInMinutes", Name: validation.InclusiveMaximum, Rule: int64(960), Chain: nil}, - {Target: "parameters.ImageTemplateProperties.BuildTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ImageTemplateProperties.BuildTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: imageTemplateName, diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go b/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go index 8a0c7af940db..4eb6d9d38497 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/backupapi/interfaces.go @@ -23,124 +23,6 @@ import ( "github.com/Azure/go-autorest/autorest" ) -// ResourceVaultConfigsClientAPI contains the set of methods on the ResourceVaultConfigsClient type. -type ResourceVaultConfigsClientAPI interface { - Get(ctx context.Context, vaultName string, resourceGroupName string) (result backup.ResourceVaultConfigResource, err error) - Update(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.ResourceVaultConfigResource) (result backup.ResourceVaultConfigResource, err error) -} - -var _ ResourceVaultConfigsClientAPI = (*backup.ResourceVaultConfigsClient)(nil) - -// ProtectedItemsClientAPI contains the set of methods on the ProtectedItemsClient type. -type ProtectedItemsClientAPI interface { - CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters backup.ProtectedItemResource) (result backup.ProtectedItemResource, err error) - Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (result autorest.Response, err error) - Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.ProtectedItemResource, err error) -} - -var _ ProtectedItemsClientAPI = (*backup.ProtectedItemsClient)(nil) - -// ProtectedItemOperationResultsClientAPI contains the set of methods on the ProtectedItemOperationResultsClient type. -type ProtectedItemOperationResultsClientAPI interface { - Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result backup.ProtectedItemResource, err error) -} - -var _ ProtectedItemOperationResultsClientAPI = (*backup.ProtectedItemOperationResultsClient)(nil) - -// RecoveryPointsClientAPI contains the set of methods on the RecoveryPointsClient type. -type RecoveryPointsClientAPI interface { - Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result backup.RecoveryPointResource, err error) - List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.RecoveryPointResourceListPage, err error) -} - -var _ RecoveryPointsClientAPI = (*backup.RecoveryPointsClient)(nil) - -// RestoresClientAPI contains the set of methods on the RestoresClient type. -type RestoresClientAPI interface { - Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters backup.RestoreRequestResource) (result autorest.Response, err error) -} - -var _ RestoresClientAPI = (*backup.RestoresClient)(nil) - -// PoliciesClientAPI contains the set of methods on the PoliciesClient type. -type PoliciesClientAPI interface { - List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionPolicyResourceListPage, err error) -} - -var _ PoliciesClientAPI = (*backup.PoliciesClient)(nil) - -// ProtectionPoliciesClientAPI contains the set of methods on the ProtectionPoliciesClient type. -type ProtectionPoliciesClientAPI interface { - CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters backup.ProtectionPolicyResource) (result backup.ProtectionPolicyResource, err error) - Delete(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) - Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result backup.ProtectionPolicyResource, err error) -} - -var _ ProtectionPoliciesClientAPI = (*backup.ProtectionPoliciesClient)(nil) - -// ProtectionPolicyOperationResultsClientAPI contains the set of methods on the ProtectionPolicyOperationResultsClient type. -type ProtectionPolicyOperationResultsClientAPI interface { - Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result backup.ProtectionPolicyResource, err error) -} - -var _ ProtectionPolicyOperationResultsClientAPI = (*backup.ProtectionPolicyOperationResultsClient)(nil) - -// JobsClientAPI contains the set of methods on the JobsClient type. -type JobsClientAPI interface { - List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListPage, err error) -} - -var _ JobsClientAPI = (*backup.JobsClient)(nil) - -// JobDetailsClientAPI contains the set of methods on the JobDetailsClient type. -type JobDetailsClientAPI interface { - Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result backup.JobResource, err error) -} - -var _ JobDetailsClientAPI = (*backup.JobDetailsClient)(nil) - -// JobCancellationsClientAPI contains the set of methods on the JobCancellationsClient type. -type JobCancellationsClientAPI interface { - Trigger(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result autorest.Response, err error) -} - -var _ JobCancellationsClientAPI = (*backup.JobCancellationsClient)(nil) - -// JobOperationResultsClientAPI contains the set of methods on the JobOperationResultsClient type. -type JobOperationResultsClientAPI interface { - Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string) (result autorest.Response, err error) -} - -var _ JobOperationResultsClientAPI = (*backup.JobOperationResultsClient)(nil) - -// ExportJobsOperationResultsClientAPI contains the set of methods on the ExportJobsOperationResultsClient type. -type ExportJobsOperationResultsClientAPI interface { - Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result backup.OperationResultInfoBaseResource, err error) -} - -var _ ExportJobsOperationResultsClientAPI = (*backup.ExportJobsOperationResultsClient)(nil) - -// JobsGroupClientAPI contains the set of methods on the JobsGroupClient type. -type JobsGroupClientAPI interface { - Export(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result autorest.Response, err error) -} - -var _ JobsGroupClientAPI = (*backup.JobsGroupClient)(nil) - -// ProtectedItemsGroupClientAPI contains the set of methods on the ProtectedItemsGroupClient type. -type ProtectedItemsGroupClientAPI interface { - List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListPage, err error) -} - -var _ ProtectedItemsGroupClientAPI = (*backup.ProtectedItemsGroupClient)(nil) - -// OperationClientAPI contains the set of methods on the OperationClient type. -type OperationClientAPI interface { - Validate(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.BasicValidateOperationRequest) (result backup.ValidateOperationsResponse, err error) -} - -var _ OperationClientAPI = (*backup.OperationClient)(nil) - // ProtectionIntentClientAPI contains the set of methods on the ProtectionIntentClient type. type ProtectionIntentClientAPI interface { CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters backup.ProtectionIntentResource) (result backup.ProtectionIntentResource, err error) @@ -262,6 +144,13 @@ type OperationStatusesClientAPI interface { var _ OperationStatusesClientAPI = (*backup.OperationStatusesClient)(nil) +// ProtectionPoliciesClientAPI contains the set of methods on the ProtectionPoliciesClient type. +type ProtectionPoliciesClientAPI interface { + Delete(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) +} + +var _ ProtectionPoliciesClientAPI = (*backup.ProtectionPoliciesClient)(nil) + // ProtectionPolicyOperationStatusesClientAPI contains the set of methods on the ProtectionPolicyOperationStatusesClient type. type ProtectionPolicyOperationStatusesClientAPI interface { Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result backup.OperationStatus, err error) diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/models.go b/services/recoveryservices/mgmt/2017-07-01/backup/models.go index 5f12336f208d..2fd8c888b709 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/models.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/models.go @@ -125,44 +125,6 @@ func PossibleContainerTypeBasicProtectionContainerValues() []ContainerTypeBasicP return []ContainerTypeBasicProtectionContainer{ContainerTypeAzureBackupServerContainer1, ContainerTypeAzureSQLContainer1, ContainerTypeAzureWorkloadContainer, ContainerTypeDPMContainer1, ContainerTypeGenericContainer1, ContainerTypeIaaSVMContainer, ContainerTypeMicrosoftClassicComputevirtualMachines, ContainerTypeMicrosoftComputevirtualMachines, ContainerTypeProtectionContainer, ContainerTypeSQLAGWorkLoadContainer1, ContainerTypeStorageContainer1, ContainerTypeVMAppContainer1, ContainerTypeWindows1} } -// CopyOptions enumerates the values for copy options. -type CopyOptions string - -const ( - // CopyOptionsCreateCopy ... - CopyOptionsCreateCopy CopyOptions = "CreateCopy" - // CopyOptionsFailOnConflict ... - CopyOptionsFailOnConflict CopyOptions = "FailOnConflict" - // CopyOptionsInvalid ... - CopyOptionsInvalid CopyOptions = "Invalid" - // CopyOptionsOverwrite ... - CopyOptionsOverwrite CopyOptions = "Overwrite" - // CopyOptionsSkip ... - CopyOptionsSkip CopyOptions = "Skip" -) - -// PossibleCopyOptionsValues returns an array of possible values for the CopyOptions const type. -func PossibleCopyOptionsValues() []CopyOptions { - return []CopyOptions{CopyOptionsCreateCopy, CopyOptionsFailOnConflict, CopyOptionsInvalid, CopyOptionsOverwrite, CopyOptionsSkip} -} - -// CreateMode enumerates the values for create mode. -type CreateMode string - -const ( - // CreateModeDefault ... - CreateModeDefault CreateMode = "Default" - // CreateModeInvalid ... - CreateModeInvalid CreateMode = "Invalid" - // CreateModeRecover ... - CreateModeRecover CreateMode = "Recover" -) - -// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. -func PossibleCreateModeValues() []CreateMode { - return []CreateMode{CreateModeDefault, CreateModeInvalid, CreateModeRecover} -} - // DataSourceType enumerates the values for data source type. type DataSourceType string @@ -204,31 +166,6 @@ func PossibleDataSourceTypeValues() []DataSourceType { return []DataSourceType{DataSourceTypeAzureFileShare, DataSourceTypeAzureSQLDb, DataSourceTypeClient, DataSourceTypeExchange, DataSourceTypeFileFolder, DataSourceTypeGenericDataSource, DataSourceTypeInvalid, DataSourceTypeSAPAseDatabase, DataSourceTypeSAPHanaDatabase, DataSourceTypeSharepoint, DataSourceTypeSQLDataBase, DataSourceTypeSQLDB, DataSourceTypeSystemState, DataSourceTypeVM, DataSourceTypeVMwareVM} } -// DayOfWeek enumerates the values for day of week. -type DayOfWeek string - -const ( - // Friday ... - Friday DayOfWeek = "Friday" - // Monday ... - Monday DayOfWeek = "Monday" - // Saturday ... - Saturday DayOfWeek = "Saturday" - // Sunday ... - Sunday DayOfWeek = "Sunday" - // Thursday ... - Thursday DayOfWeek = "Thursday" - // Tuesday ... - Tuesday DayOfWeek = "Tuesday" - // Wednesday ... - Wednesday DayOfWeek = "Wednesday" -) - -// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. -func PossibleDayOfWeekValues() []DayOfWeek { - return []DayOfWeek{Friday, Monday, Saturday, Sunday, Thursday, Tuesday, Wednesday} -} - // EngineType enumerates the values for engine type. type EngineType string @@ -246,23 +183,6 @@ func PossibleEngineTypeValues() []EngineType { return []EngineType{BackupEngineTypeAzureBackupServerEngine, BackupEngineTypeBackupEngineBase, BackupEngineTypeDpmBackupEngine} } -// EnhancedSecurityState enumerates the values for enhanced security state. -type EnhancedSecurityState string - -const ( - // EnhancedSecurityStateDisabled ... - EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" - // EnhancedSecurityStateEnabled ... - EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" - // EnhancedSecurityStateInvalid ... - EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" -) - -// PossibleEnhancedSecurityStateValues returns an array of possible values for the EnhancedSecurityState const type. -func PossibleEnhancedSecurityStateValues() []EnhancedSecurityState { - return []EnhancedSecurityState{EnhancedSecurityStateDisabled, EnhancedSecurityStateEnabled, EnhancedSecurityStateInvalid} -} - // FabricName enumerates the values for fabric name. type FabricName string @@ -295,149 +215,6 @@ func PossibleFeatureTypeValues() []FeatureType { return []FeatureType{FeatureTypeAzureBackupGoals, FeatureTypeAzureVMResourceBackup, FeatureTypeFeatureSupportRequest} } -// HealthState enumerates the values for health state. -type HealthState string - -const ( - // HealthStateActionRequired ... - HealthStateActionRequired HealthState = "ActionRequired" - // HealthStateActionSuggested ... - HealthStateActionSuggested HealthState = "ActionSuggested" - // HealthStateInvalid ... - HealthStateInvalid HealthState = "Invalid" - // HealthStatePassed ... - HealthStatePassed HealthState = "Passed" -) - -// PossibleHealthStateValues returns an array of possible values for the HealthState const type. -func PossibleHealthStateValues() []HealthState { - return []HealthState{HealthStateActionRequired, HealthStateActionSuggested, HealthStateInvalid, HealthStatePassed} -} - -// HealthStatus enumerates the values for health status. -type HealthStatus string - -const ( - // HealthStatusActionRequired ... - HealthStatusActionRequired HealthStatus = "ActionRequired" - // HealthStatusActionSuggested ... - HealthStatusActionSuggested HealthStatus = "ActionSuggested" - // HealthStatusInvalid ... - HealthStatusInvalid HealthStatus = "Invalid" - // HealthStatusPassed ... - HealthStatusPassed HealthStatus = "Passed" -) - -// PossibleHealthStatusValues returns an array of possible values for the HealthStatus const type. -func PossibleHealthStatusValues() []HealthStatus { - return []HealthStatus{HealthStatusActionRequired, HealthStatusActionSuggested, HealthStatusInvalid, HealthStatusPassed} -} - -// HTTPStatusCode enumerates the values for http status code. -type HTTPStatusCode string - -const ( - // Accepted ... - Accepted HTTPStatusCode = "Accepted" - // Ambiguous ... - Ambiguous HTTPStatusCode = "Ambiguous" - // BadGateway ... - BadGateway HTTPStatusCode = "BadGateway" - // BadRequest ... - BadRequest HTTPStatusCode = "BadRequest" - // Conflict ... - Conflict HTTPStatusCode = "Conflict" - // Continue ... - Continue HTTPStatusCode = "Continue" - // Created ... - Created HTTPStatusCode = "Created" - // ExpectationFailed ... - ExpectationFailed HTTPStatusCode = "ExpectationFailed" - // Forbidden ... - Forbidden HTTPStatusCode = "Forbidden" - // Found ... - Found HTTPStatusCode = "Found" - // GatewayTimeout ... - GatewayTimeout HTTPStatusCode = "GatewayTimeout" - // Gone ... - Gone HTTPStatusCode = "Gone" - // HTTPVersionNotSupported ... - HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" - // InternalServerError ... - InternalServerError HTTPStatusCode = "InternalServerError" - // LengthRequired ... - LengthRequired HTTPStatusCode = "LengthRequired" - // MethodNotAllowed ... - MethodNotAllowed HTTPStatusCode = "MethodNotAllowed" - // Moved ... - Moved HTTPStatusCode = "Moved" - // MovedPermanently ... - MovedPermanently HTTPStatusCode = "MovedPermanently" - // MultipleChoices ... - MultipleChoices HTTPStatusCode = "MultipleChoices" - // NoContent ... - NoContent HTTPStatusCode = "NoContent" - // NonAuthoritativeInformation ... - NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" - // NotAcceptable ... - NotAcceptable HTTPStatusCode = "NotAcceptable" - // NotFound ... - NotFound HTTPStatusCode = "NotFound" - // NotImplemented ... - NotImplemented HTTPStatusCode = "NotImplemented" - // NotModified ... - NotModified HTTPStatusCode = "NotModified" - // OK ... - OK HTTPStatusCode = "OK" - // PartialContent ... - PartialContent HTTPStatusCode = "PartialContent" - // PaymentRequired ... - PaymentRequired HTTPStatusCode = "PaymentRequired" - // PreconditionFailed ... - PreconditionFailed HTTPStatusCode = "PreconditionFailed" - // ProxyAuthenticationRequired ... - ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" - // Redirect ... - Redirect HTTPStatusCode = "Redirect" - // RedirectKeepVerb ... - RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" - // RedirectMethod ... - RedirectMethod HTTPStatusCode = "RedirectMethod" - // RequestedRangeNotSatisfiable ... - RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" - // RequestEntityTooLarge ... - RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" - // RequestTimeout ... - RequestTimeout HTTPStatusCode = "RequestTimeout" - // RequestURITooLong ... - RequestURITooLong HTTPStatusCode = "RequestUriTooLong" - // ResetContent ... - ResetContent HTTPStatusCode = "ResetContent" - // SeeOther ... - SeeOther HTTPStatusCode = "SeeOther" - // ServiceUnavailable ... - ServiceUnavailable HTTPStatusCode = "ServiceUnavailable" - // SwitchingProtocols ... - SwitchingProtocols HTTPStatusCode = "SwitchingProtocols" - // TemporaryRedirect ... - TemporaryRedirect HTTPStatusCode = "TemporaryRedirect" - // Unauthorized ... - Unauthorized HTTPStatusCode = "Unauthorized" - // UnsupportedMediaType ... - UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" - // Unused ... - Unused HTTPStatusCode = "Unused" - // UpgradeRequired ... - UpgradeRequired HTTPStatusCode = "UpgradeRequired" - // UseProxy ... - UseProxy HTTPStatusCode = "UseProxy" -) - -// PossibleHTTPStatusCodeValues returns an array of possible values for the HTTPStatusCode const type. -func PossibleHTTPStatusCodeValues() []HTTPStatusCode { - return []HTTPStatusCode{Accepted, Ambiguous, BadGateway, BadRequest, Conflict, Continue, Created, ExpectationFailed, Forbidden, Found, GatewayTimeout, Gone, HTTPVersionNotSupported, InternalServerError, LengthRequired, MethodNotAllowed, Moved, MovedPermanently, MultipleChoices, NoContent, NonAuthoritativeInformation, NotAcceptable, NotFound, NotImplemented, NotModified, OK, PartialContent, PaymentRequired, PreconditionFailed, ProxyAuthenticationRequired, Redirect, RedirectKeepVerb, RedirectMethod, RequestedRangeNotSatisfiable, RequestEntityTooLarge, RequestTimeout, RequestURITooLong, ResetContent, SeeOther, ServiceUnavailable, SwitchingProtocols, TemporaryRedirect, Unauthorized, UnsupportedMediaType, Unused, UpgradeRequired, UseProxy} -} - // InquiryStatus enumerates the values for inquiry status. type InquiryStatus string @@ -513,62 +290,6 @@ func PossibleItemTypeValues() []ItemType { return []ItemType{ItemTypeAzureFileShare, ItemTypeAzureSQLDb, ItemTypeClient, ItemTypeExchange, ItemTypeFileFolder, ItemTypeGenericDataSource, ItemTypeInvalid, ItemTypeSAPAseDatabase, ItemTypeSAPHanaDatabase, ItemTypeSharepoint, ItemTypeSQLDataBase, ItemTypeSQLDB, ItemTypeSystemState, ItemTypeVM, ItemTypeVMwareVM} } -// JobOperationType enumerates the values for job operation type. -type JobOperationType string - -const ( - // JobOperationTypeBackup ... - JobOperationTypeBackup JobOperationType = "Backup" - // JobOperationTypeConfigureBackup ... - JobOperationTypeConfigureBackup JobOperationType = "ConfigureBackup" - // JobOperationTypeCrossRegionRestore ... - JobOperationTypeCrossRegionRestore JobOperationType = "CrossRegionRestore" - // JobOperationTypeDeleteBackupData ... - JobOperationTypeDeleteBackupData JobOperationType = "DeleteBackupData" - // JobOperationTypeDisableBackup ... - JobOperationTypeDisableBackup JobOperationType = "DisableBackup" - // JobOperationTypeInvalid ... - JobOperationTypeInvalid JobOperationType = "Invalid" - // JobOperationTypeRegister ... - JobOperationTypeRegister JobOperationType = "Register" - // JobOperationTypeRestore ... - JobOperationTypeRestore JobOperationType = "Restore" - // JobOperationTypeUndelete ... - JobOperationTypeUndelete JobOperationType = "Undelete" - // JobOperationTypeUnRegister ... - JobOperationTypeUnRegister JobOperationType = "UnRegister" -) - -// PossibleJobOperationTypeValues returns an array of possible values for the JobOperationType const type. -func PossibleJobOperationTypeValues() []JobOperationType { - return []JobOperationType{JobOperationTypeBackup, JobOperationTypeConfigureBackup, JobOperationTypeCrossRegionRestore, JobOperationTypeDeleteBackupData, JobOperationTypeDisableBackup, JobOperationTypeInvalid, JobOperationTypeRegister, JobOperationTypeRestore, JobOperationTypeUndelete, JobOperationTypeUnRegister} -} - -// JobStatus enumerates the values for job status. -type JobStatus string - -const ( - // JobStatusCancelled ... - JobStatusCancelled JobStatus = "Cancelled" - // JobStatusCancelling ... - JobStatusCancelling JobStatus = "Cancelling" - // JobStatusCompleted ... - JobStatusCompleted JobStatus = "Completed" - // JobStatusCompletedWithWarnings ... - JobStatusCompletedWithWarnings JobStatus = "CompletedWithWarnings" - // JobStatusFailed ... - JobStatusFailed JobStatus = "Failed" - // JobStatusInProgress ... - JobStatusInProgress JobStatus = "InProgress" - // JobStatusInvalid ... - JobStatusInvalid JobStatus = "Invalid" -) - -// PossibleJobStatusValues returns an array of possible values for the JobStatus const type. -func PossibleJobStatusValues() []JobStatus { - return []JobStatus{JobStatusCancelled, JobStatusCancelling, JobStatusCompleted, JobStatusCompletedWithWarnings, JobStatusFailed, JobStatusInProgress, JobStatusInvalid} -} - // JobSupportedAction enumerates the values for job supported action. type JobSupportedAction string @@ -609,25 +330,6 @@ func PossibleJobTypeValues() []JobType { return []JobType{JobTypeAzureIaaSVMJob, JobTypeAzureStorageJob, JobTypeAzureWorkloadJob, JobTypeDpmJob, JobTypeJob, JobTypeMabJob} } -// LastBackupStatus enumerates the values for last backup status. -type LastBackupStatus string - -const ( - // LastBackupStatusHealthy ... - LastBackupStatusHealthy LastBackupStatus = "Healthy" - // LastBackupStatusInvalid ... - LastBackupStatusInvalid LastBackupStatus = "Invalid" - // LastBackupStatusIRPending ... - LastBackupStatusIRPending LastBackupStatus = "IRPending" - // LastBackupStatusUnhealthy ... - LastBackupStatusUnhealthy LastBackupStatus = "Unhealthy" -) - -// PossibleLastBackupStatusValues returns an array of possible values for the LastBackupStatus const type. -func PossibleLastBackupStatusValues() []LastBackupStatus { - return []LastBackupStatus{LastBackupStatusHealthy, LastBackupStatusInvalid, LastBackupStatusIRPending, LastBackupStatusUnhealthy} -} - // MabServerType enumerates the values for mab server type. type MabServerType string @@ -698,83 +400,23 @@ func PossibleManagementTypeValues() []ManagementType { return []ManagementType{ManagementTypeAzureBackupServer, ManagementTypeAzureIaasVM, ManagementTypeAzureSQL, ManagementTypeAzureStorage, ManagementTypeAzureWorkload, ManagementTypeDefaultBackup, ManagementTypeDPM, ManagementTypeInvalid, ManagementTypeMAB} } -// ManagementTypeBasicProtectionPolicy enumerates the values for management type basic protection policy. -type ManagementTypeBasicProtectionPolicy string - -const ( - // BackupManagementTypeAzureIaasVM ... - BackupManagementTypeAzureIaasVM ManagementTypeBasicProtectionPolicy = "AzureIaasVM" - // BackupManagementTypeAzureSQL ... - BackupManagementTypeAzureSQL ManagementTypeBasicProtectionPolicy = "AzureSql" - // BackupManagementTypeAzureStorage ... - BackupManagementTypeAzureStorage ManagementTypeBasicProtectionPolicy = "AzureStorage" - // BackupManagementTypeAzureWorkload ... - BackupManagementTypeAzureWorkload ManagementTypeBasicProtectionPolicy = "AzureWorkload" - // BackupManagementTypeGenericProtectionPolicy ... - BackupManagementTypeGenericProtectionPolicy ManagementTypeBasicProtectionPolicy = "GenericProtectionPolicy" - // BackupManagementTypeMAB ... - BackupManagementTypeMAB ManagementTypeBasicProtectionPolicy = "MAB" - // BackupManagementTypeProtectionPolicy ... - BackupManagementTypeProtectionPolicy ManagementTypeBasicProtectionPolicy = "ProtectionPolicy" -) - -// PossibleManagementTypeBasicProtectionPolicyValues returns an array of possible values for the ManagementTypeBasicProtectionPolicy const type. -func PossibleManagementTypeBasicProtectionPolicyValues() []ManagementTypeBasicProtectionPolicy { - return []ManagementTypeBasicProtectionPolicy{BackupManagementTypeAzureIaasVM, BackupManagementTypeAzureSQL, BackupManagementTypeAzureStorage, BackupManagementTypeAzureWorkload, BackupManagementTypeGenericProtectionPolicy, BackupManagementTypeMAB, BackupManagementTypeProtectionPolicy} -} - -// MonthOfYear enumerates the values for month of year. -type MonthOfYear string - -const ( - // MonthOfYearApril ... - MonthOfYearApril MonthOfYear = "April" - // MonthOfYearAugust ... - MonthOfYearAugust MonthOfYear = "August" - // MonthOfYearDecember ... - MonthOfYearDecember MonthOfYear = "December" - // MonthOfYearFebruary ... - MonthOfYearFebruary MonthOfYear = "February" - // MonthOfYearInvalid ... - MonthOfYearInvalid MonthOfYear = "Invalid" - // MonthOfYearJanuary ... - MonthOfYearJanuary MonthOfYear = "January" - // MonthOfYearJuly ... - MonthOfYearJuly MonthOfYear = "July" - // MonthOfYearJune ... - MonthOfYearJune MonthOfYear = "June" - // MonthOfYearMarch ... - MonthOfYearMarch MonthOfYear = "March" - // MonthOfYearMay ... - MonthOfYearMay MonthOfYear = "May" - // MonthOfYearNovember ... - MonthOfYearNovember MonthOfYear = "November" - // MonthOfYearOctober ... - MonthOfYearOctober MonthOfYear = "October" - // MonthOfYearSeptember ... - MonthOfYearSeptember MonthOfYear = "September" -) - -// PossibleMonthOfYearValues returns an array of possible values for the MonthOfYear const type. -func PossibleMonthOfYearValues() []MonthOfYear { - return []MonthOfYear{MonthOfYearApril, MonthOfYearAugust, MonthOfYearDecember, MonthOfYearFebruary, MonthOfYearInvalid, MonthOfYearJanuary, MonthOfYearJuly, MonthOfYearJune, MonthOfYearMarch, MonthOfYearMay, MonthOfYearNovember, MonthOfYearOctober, MonthOfYearSeptember} -} - // ObjectType enumerates the values for object type. type ObjectType string const ( - // ObjectTypeExportJobsOperationResultInfo ... - ObjectTypeExportJobsOperationResultInfo ObjectType = "ExportJobsOperationResultInfo" - // ObjectTypeOperationResultInfo ... - ObjectTypeOperationResultInfo ObjectType = "OperationResultInfo" - // ObjectTypeOperationResultInfoBase ... - ObjectTypeOperationResultInfoBase ObjectType = "OperationResultInfoBase" + // ObjectTypeAzureFileShareBackupRequest ... + ObjectTypeAzureFileShareBackupRequest ObjectType = "AzureFileShareBackupRequest" + // ObjectTypeAzureWorkloadBackupRequest ... + ObjectTypeAzureWorkloadBackupRequest ObjectType = "AzureWorkloadBackupRequest" + // ObjectTypeBackupRequest ... + ObjectTypeBackupRequest ObjectType = "BackupRequest" + // ObjectTypeIaasVMBackupRequest ... + ObjectTypeIaasVMBackupRequest ObjectType = "IaasVMBackupRequest" ) // PossibleObjectTypeValues returns an array of possible values for the ObjectType const type. func PossibleObjectTypeValues() []ObjectType { - return []ObjectType{ObjectTypeExportJobsOperationResultInfo, ObjectTypeOperationResultInfo, ObjectTypeOperationResultInfoBase} + return []ObjectType{ObjectTypeAzureFileShareBackupRequest, ObjectTypeAzureWorkloadBackupRequest, ObjectTypeBackupRequest, ObjectTypeIaasVMBackupRequest} } // ObjectTypeBasicILRRequest enumerates the values for object type basic ilr request. @@ -818,97 +460,13 @@ func PossibleObjectTypeBasicOperationStatusExtendedInfoValues() []ObjectTypeBasi type ObjectTypeBasicRecoveryPoint string const ( - // ObjectTypeAzureFileShareRecoveryPoint ... - ObjectTypeAzureFileShareRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureFileShareRecoveryPoint" - // ObjectTypeAzureWorkloadPointInTimeRecoveryPoint ... - ObjectTypeAzureWorkloadPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadPointInTimeRecoveryPoint" - // ObjectTypeAzureWorkloadRecoveryPoint ... - ObjectTypeAzureWorkloadRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadRecoveryPoint" - // ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint ... - ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" - // ObjectTypeAzureWorkloadSAPHanaRecoveryPoint ... - ObjectTypeAzureWorkloadSAPHanaRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSAPHanaRecoveryPoint" - // ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint ... - ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSQLPointInTimeRecoveryPoint" - // ObjectTypeAzureWorkloadSQLRecoveryPoint ... - ObjectTypeAzureWorkloadSQLRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSQLRecoveryPoint" - // ObjectTypeGenericRecoveryPoint ... - ObjectTypeGenericRecoveryPoint ObjectTypeBasicRecoveryPoint = "GenericRecoveryPoint" - // ObjectTypeIaasVMRecoveryPoint ... - ObjectTypeIaasVMRecoveryPoint ObjectTypeBasicRecoveryPoint = "IaasVMRecoveryPoint" // ObjectTypeRecoveryPoint ... ObjectTypeRecoveryPoint ObjectTypeBasicRecoveryPoint = "RecoveryPoint" ) // PossibleObjectTypeBasicRecoveryPointValues returns an array of possible values for the ObjectTypeBasicRecoveryPoint const type. func PossibleObjectTypeBasicRecoveryPointValues() []ObjectTypeBasicRecoveryPoint { - return []ObjectTypeBasicRecoveryPoint{ObjectTypeAzureFileShareRecoveryPoint, ObjectTypeAzureWorkloadPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadRecoveryPoint, ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadSAPHanaRecoveryPoint, ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadSQLRecoveryPoint, ObjectTypeGenericRecoveryPoint, ObjectTypeIaasVMRecoveryPoint, ObjectTypeRecoveryPoint} -} - -// ObjectTypeBasicRequest enumerates the values for object type basic request. -type ObjectTypeBasicRequest string - -const ( - // ObjectTypeAzureFileShareBackupRequest ... - ObjectTypeAzureFileShareBackupRequest ObjectTypeBasicRequest = "AzureFileShareBackupRequest" - // ObjectTypeAzureWorkloadBackupRequest ... - ObjectTypeAzureWorkloadBackupRequest ObjectTypeBasicRequest = "AzureWorkloadBackupRequest" - // ObjectTypeBackupRequest ... - ObjectTypeBackupRequest ObjectTypeBasicRequest = "BackupRequest" - // ObjectTypeIaasVMBackupRequest ... - ObjectTypeIaasVMBackupRequest ObjectTypeBasicRequest = "IaasVMBackupRequest" -) - -// PossibleObjectTypeBasicRequestValues returns an array of possible values for the ObjectTypeBasicRequest const type. -func PossibleObjectTypeBasicRequestValues() []ObjectTypeBasicRequest { - return []ObjectTypeBasicRequest{ObjectTypeAzureFileShareBackupRequest, ObjectTypeAzureWorkloadBackupRequest, ObjectTypeBackupRequest, ObjectTypeIaasVMBackupRequest} -} - -// ObjectTypeBasicRestoreRequest enumerates the values for object type basic restore request. -type ObjectTypeBasicRestoreRequest string - -const ( - // ObjectTypeAzureFileShareRestoreRequest ... - ObjectTypeAzureFileShareRestoreRequest ObjectTypeBasicRestoreRequest = "AzureFileShareRestoreRequest" - // ObjectTypeAzureWorkloadPointInTimeRestoreRequest ... - ObjectTypeAzureWorkloadPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadPointInTimeRestoreRequest" - // ObjectTypeAzureWorkloadRestoreRequest ... - ObjectTypeAzureWorkloadRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadRestoreRequest" - // ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest ... - ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" - // ObjectTypeAzureWorkloadSAPHanaRestoreRequest ... - ObjectTypeAzureWorkloadSAPHanaRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSAPHanaRestoreRequest" - // ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest ... - ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSQLPointInTimeRestoreRequest" - // ObjectTypeAzureWorkloadSQLRestoreRequest ... - ObjectTypeAzureWorkloadSQLRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSQLRestoreRequest" - // ObjectTypeIaasVMRestoreRequest ... - ObjectTypeIaasVMRestoreRequest ObjectTypeBasicRestoreRequest = "IaasVMRestoreRequest" - // ObjectTypeRestoreRequest ... - ObjectTypeRestoreRequest ObjectTypeBasicRestoreRequest = "RestoreRequest" -) - -// PossibleObjectTypeBasicRestoreRequestValues returns an array of possible values for the ObjectTypeBasicRestoreRequest const type. -func PossibleObjectTypeBasicRestoreRequestValues() []ObjectTypeBasicRestoreRequest { - return []ObjectTypeBasicRestoreRequest{ObjectTypeAzureFileShareRestoreRequest, ObjectTypeAzureWorkloadPointInTimeRestoreRequest, ObjectTypeAzureWorkloadRestoreRequest, ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest, ObjectTypeAzureWorkloadSAPHanaRestoreRequest, ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest, ObjectTypeAzureWorkloadSQLRestoreRequest, ObjectTypeIaasVMRestoreRequest, ObjectTypeRestoreRequest} -} - -// ObjectTypeBasicValidateOperationRequest enumerates the values for object type basic validate operation -// request. -type ObjectTypeBasicValidateOperationRequest string - -const ( - // ObjectTypeValidateIaasVMRestoreOperationRequest ... - ObjectTypeValidateIaasVMRestoreOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateIaasVMRestoreOperationRequest" - // ObjectTypeValidateOperationRequest ... - ObjectTypeValidateOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateOperationRequest" - // ObjectTypeValidateRestoreOperationRequest ... - ObjectTypeValidateRestoreOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateRestoreOperationRequest" -) - -// PossibleObjectTypeBasicValidateOperationRequestValues returns an array of possible values for the ObjectTypeBasicValidateOperationRequest const type. -func PossibleObjectTypeBasicValidateOperationRequestValues() []ObjectTypeBasicValidateOperationRequest { - return []ObjectTypeBasicValidateOperationRequest{ObjectTypeValidateIaasVMRestoreOperationRequest, ObjectTypeValidateOperationRequest, ObjectTypeValidateRestoreOperationRequest} + return []ObjectTypeBasicRecoveryPoint{ObjectTypeRecoveryPoint} } // OperationStatusValues enumerates the values for operation status values. @@ -949,44 +507,6 @@ func PossibleOperationTypeValues() []OperationType { return []OperationType{OperationTypeInvalid, OperationTypeRegister, OperationTypeReregister} } -// OverwriteOptions enumerates the values for overwrite options. -type OverwriteOptions string - -const ( - // OverwriteOptionsFailOnConflict ... - OverwriteOptionsFailOnConflict OverwriteOptions = "FailOnConflict" - // OverwriteOptionsInvalid ... - OverwriteOptionsInvalid OverwriteOptions = "Invalid" - // OverwriteOptionsOverwrite ... - OverwriteOptionsOverwrite OverwriteOptions = "Overwrite" -) - -// PossibleOverwriteOptionsValues returns an array of possible values for the OverwriteOptions const type. -func PossibleOverwriteOptionsValues() []OverwriteOptions { - return []OverwriteOptions{OverwriteOptionsFailOnConflict, OverwriteOptionsInvalid, OverwriteOptionsOverwrite} -} - -// PolicyType enumerates the values for policy type. -type PolicyType string - -const ( - // PolicyTypeCopyOnlyFull ... - PolicyTypeCopyOnlyFull PolicyType = "CopyOnlyFull" - // PolicyTypeDifferential ... - PolicyTypeDifferential PolicyType = "Differential" - // PolicyTypeFull ... - PolicyTypeFull PolicyType = "Full" - // PolicyTypeInvalid ... - PolicyTypeInvalid PolicyType = "Invalid" - // PolicyTypeLog ... - PolicyTypeLog PolicyType = "Log" -) - -// PossiblePolicyTypeValues returns an array of possible values for the PolicyType const type. -func PossiblePolicyTypeValues() []PolicyType { - return []PolicyType{PolicyTypeCopyOnlyFull, PolicyTypeDifferential, PolicyTypeFull, PolicyTypeInvalid, PolicyTypeLog} -} - // ProtectableContainerType enumerates the values for protectable container type. type ProtectableContainerType string @@ -1039,87 +559,6 @@ func PossibleProtectableItemTypeValues() []ProtectableItemType { return []ProtectableItemType{ProtectableItemTypeAzureFileShare, ProtectableItemTypeAzureVMWorkloadProtectableItem, ProtectableItemTypeIaaSVMProtectableItem, ProtectableItemTypeMicrosoftClassicComputevirtualMachines, ProtectableItemTypeMicrosoftComputevirtualMachines, ProtectableItemTypeSAPAseSystem, ProtectableItemTypeSAPHanaDatabase, ProtectableItemTypeSAPHanaSystem, ProtectableItemTypeSQLAvailabilityGroupContainer, ProtectableItemTypeSQLDataBase, ProtectableItemTypeSQLInstance, ProtectableItemTypeWorkloadProtectableItem} } -// ProtectedItemHealthStatus enumerates the values for protected item health status. -type ProtectedItemHealthStatus string - -const ( - // ProtectedItemHealthStatusHealthy ... - ProtectedItemHealthStatusHealthy ProtectedItemHealthStatus = "Healthy" - // ProtectedItemHealthStatusInvalid ... - ProtectedItemHealthStatusInvalid ProtectedItemHealthStatus = "Invalid" - // ProtectedItemHealthStatusIRPending ... - ProtectedItemHealthStatusIRPending ProtectedItemHealthStatus = "IRPending" - // ProtectedItemHealthStatusNotReachable ... - ProtectedItemHealthStatusNotReachable ProtectedItemHealthStatus = "NotReachable" - // ProtectedItemHealthStatusUnhealthy ... - ProtectedItemHealthStatusUnhealthy ProtectedItemHealthStatus = "Unhealthy" -) - -// PossibleProtectedItemHealthStatusValues returns an array of possible values for the ProtectedItemHealthStatus const type. -func PossibleProtectedItemHealthStatusValues() []ProtectedItemHealthStatus { - return []ProtectedItemHealthStatus{ProtectedItemHealthStatusHealthy, ProtectedItemHealthStatusInvalid, ProtectedItemHealthStatusIRPending, ProtectedItemHealthStatusNotReachable, ProtectedItemHealthStatusUnhealthy} -} - -// ProtectedItemState enumerates the values for protected item state. -type ProtectedItemState string - -const ( - // ProtectedItemStateInvalid ... - ProtectedItemStateInvalid ProtectedItemState = "Invalid" - // ProtectedItemStateIRPending ... - ProtectedItemStateIRPending ProtectedItemState = "IRPending" - // ProtectedItemStateProtected ... - ProtectedItemStateProtected ProtectedItemState = "Protected" - // ProtectedItemStateProtectionError ... - ProtectedItemStateProtectionError ProtectedItemState = "ProtectionError" - // ProtectedItemStateProtectionPaused ... - ProtectedItemStateProtectionPaused ProtectedItemState = "ProtectionPaused" - // ProtectedItemStateProtectionStopped ... - ProtectedItemStateProtectionStopped ProtectedItemState = "ProtectionStopped" -) - -// PossibleProtectedItemStateValues returns an array of possible values for the ProtectedItemState const type. -func PossibleProtectedItemStateValues() []ProtectedItemState { - return []ProtectedItemState{ProtectedItemStateInvalid, ProtectedItemStateIRPending, ProtectedItemStateProtected, ProtectedItemStateProtectionError, ProtectedItemStateProtectionPaused, ProtectedItemStateProtectionStopped} -} - -// ProtectedItemType enumerates the values for protected item type. -type ProtectedItemType string - -const ( - // ProtectedItemTypeAzureFileShareProtectedItem ... - ProtectedItemTypeAzureFileShareProtectedItem ProtectedItemType = "AzureFileShareProtectedItem" - // ProtectedItemTypeAzureIaaSVMProtectedItem ... - ProtectedItemTypeAzureIaaSVMProtectedItem ProtectedItemType = "AzureIaaSVMProtectedItem" - // ProtectedItemTypeAzureVMWorkloadProtectedItem ... - ProtectedItemTypeAzureVMWorkloadProtectedItem ProtectedItemType = "AzureVmWorkloadProtectedItem" - // ProtectedItemTypeAzureVMWorkloadSAPAseDatabase ... - ProtectedItemTypeAzureVMWorkloadSAPAseDatabase ProtectedItemType = "AzureVmWorkloadSAPAseDatabase" - // ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase ... - ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase ProtectedItemType = "AzureVmWorkloadSAPHanaDatabase" - // ProtectedItemTypeAzureVMWorkloadSQLDatabase ... - ProtectedItemTypeAzureVMWorkloadSQLDatabase ProtectedItemType = "AzureVmWorkloadSQLDatabase" - // ProtectedItemTypeDPMProtectedItem ... - ProtectedItemTypeDPMProtectedItem ProtectedItemType = "DPMProtectedItem" - // ProtectedItemTypeGenericProtectedItem ... - ProtectedItemTypeGenericProtectedItem ProtectedItemType = "GenericProtectedItem" - // ProtectedItemTypeMabFileFolderProtectedItem ... - ProtectedItemTypeMabFileFolderProtectedItem ProtectedItemType = "MabFileFolderProtectedItem" - // ProtectedItemTypeMicrosoftClassicComputevirtualMachines ... - ProtectedItemTypeMicrosoftClassicComputevirtualMachines ProtectedItemType = "Microsoft.ClassicCompute/virtualMachines" - // ProtectedItemTypeMicrosoftComputevirtualMachines ... - ProtectedItemTypeMicrosoftComputevirtualMachines ProtectedItemType = "Microsoft.Compute/virtualMachines" - // ProtectedItemTypeMicrosoftSqlserversdatabases ... - ProtectedItemTypeMicrosoftSqlserversdatabases ProtectedItemType = "Microsoft.Sql/servers/databases" - // ProtectedItemTypeProtectedItem ... - ProtectedItemTypeProtectedItem ProtectedItemType = "ProtectedItem" -) - -// PossibleProtectedItemTypeValues returns an array of possible values for the ProtectedItemType const type. -func PossibleProtectedItemTypeValues() []ProtectedItemType { - return []ProtectedItemType{ProtectedItemTypeAzureFileShareProtectedItem, ProtectedItemTypeAzureIaaSVMProtectedItem, ProtectedItemTypeAzureVMWorkloadProtectedItem, ProtectedItemTypeAzureVMWorkloadSAPAseDatabase, ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase, ProtectedItemTypeAzureVMWorkloadSQLDatabase, ProtectedItemTypeDPMProtectedItem, ProtectedItemTypeGenericProtectedItem, ProtectedItemTypeMabFileFolderProtectedItem, ProtectedItemTypeMicrosoftClassicComputevirtualMachines, ProtectedItemTypeMicrosoftComputevirtualMachines, ProtectedItemTypeMicrosoftSqlserversdatabases, ProtectedItemTypeProtectedItem} -} - // ProtectionIntentItemType enumerates the values for protection intent item type. type ProtectionIntentItemType string @@ -1141,29 +580,6 @@ func PossibleProtectionIntentItemTypeValues() []ProtectionIntentItemType { return []ProtectionIntentItemType{ProtectionIntentItemTypeAzureResourceItem, ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent, ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent, ProtectionIntentItemTypeProtectionIntent, ProtectionIntentItemTypeRecoveryServiceVaultItem} } -// ProtectionState enumerates the values for protection state. -type ProtectionState string - -const ( - // ProtectionStateInvalid ... - ProtectionStateInvalid ProtectionState = "Invalid" - // ProtectionStateIRPending ... - ProtectionStateIRPending ProtectionState = "IRPending" - // ProtectionStateProtected ... - ProtectionStateProtected ProtectionState = "Protected" - // ProtectionStateProtectionError ... - ProtectionStateProtectionError ProtectionState = "ProtectionError" - // ProtectionStateProtectionPaused ... - ProtectionStateProtectionPaused ProtectionState = "ProtectionPaused" - // ProtectionStateProtectionStopped ... - ProtectionStateProtectionStopped ProtectionState = "ProtectionStopped" -) - -// PossibleProtectionStateValues returns an array of possible values for the ProtectionState const type. -func PossibleProtectionStateValues() []ProtectionState { - return []ProtectionState{ProtectionStateInvalid, ProtectionStateIRPending, ProtectionStateProtected, ProtectionStateProtectionError, ProtectionStateProtectionPaused, ProtectionStateProtectionStopped} -} - // ProtectionStatus enumerates the values for protection status. type ProtectionStatus string @@ -1185,247 +601,6 @@ func PossibleProtectionStatusValues() []ProtectionStatus { return []ProtectionStatus{ProtectionStatusInvalid, ProtectionStatusNotProtected, ProtectionStatusProtected, ProtectionStatusProtecting, ProtectionStatusProtectionFailed} } -// RecoveryMode enumerates the values for recovery mode. -type RecoveryMode string - -const ( - // RecoveryModeFileRecovery ... - RecoveryModeFileRecovery RecoveryMode = "FileRecovery" - // RecoveryModeInvalid ... - RecoveryModeInvalid RecoveryMode = "Invalid" - // RecoveryModeWorkloadRecovery ... - RecoveryModeWorkloadRecovery RecoveryMode = "WorkloadRecovery" -) - -// PossibleRecoveryModeValues returns an array of possible values for the RecoveryMode const type. -func PossibleRecoveryModeValues() []RecoveryMode { - return []RecoveryMode{RecoveryModeFileRecovery, RecoveryModeInvalid, RecoveryModeWorkloadRecovery} -} - -// RecoveryPointTierStatus enumerates the values for recovery point tier status. -type RecoveryPointTierStatus string - -const ( - // RecoveryPointTierStatusDeleted ... - RecoveryPointTierStatusDeleted RecoveryPointTierStatus = "Deleted" - // RecoveryPointTierStatusDisabled ... - RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" - // RecoveryPointTierStatusInvalid ... - RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" - // RecoveryPointTierStatusValid ... - RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" -) - -// PossibleRecoveryPointTierStatusValues returns an array of possible values for the RecoveryPointTierStatus const type. -func PossibleRecoveryPointTierStatusValues() []RecoveryPointTierStatus { - return []RecoveryPointTierStatus{RecoveryPointTierStatusDeleted, RecoveryPointTierStatusDisabled, RecoveryPointTierStatusInvalid, RecoveryPointTierStatusValid} -} - -// RecoveryPointTierType enumerates the values for recovery point tier type. -type RecoveryPointTierType string - -const ( - // RecoveryPointTierTypeHardenedRP ... - RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" - // RecoveryPointTierTypeInstantRP ... - RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" - // RecoveryPointTierTypeInvalid ... - RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" -) - -// PossibleRecoveryPointTierTypeValues returns an array of possible values for the RecoveryPointTierType const type. -func PossibleRecoveryPointTierTypeValues() []RecoveryPointTierType { - return []RecoveryPointTierType{RecoveryPointTierTypeHardenedRP, RecoveryPointTierTypeInstantRP, RecoveryPointTierTypeInvalid} -} - -// RecoveryType enumerates the values for recovery type. -type RecoveryType string - -const ( - // RecoveryTypeAlternateLocation ... - RecoveryTypeAlternateLocation RecoveryType = "AlternateLocation" - // RecoveryTypeInvalid ... - RecoveryTypeInvalid RecoveryType = "Invalid" - // RecoveryTypeOffline ... - RecoveryTypeOffline RecoveryType = "Offline" - // RecoveryTypeOriginalLocation ... - RecoveryTypeOriginalLocation RecoveryType = "OriginalLocation" - // RecoveryTypeRestoreDisks ... - RecoveryTypeRestoreDisks RecoveryType = "RestoreDisks" -) - -// PossibleRecoveryTypeValues returns an array of possible values for the RecoveryType const type. -func PossibleRecoveryTypeValues() []RecoveryType { - return []RecoveryType{RecoveryTypeAlternateLocation, RecoveryTypeInvalid, RecoveryTypeOffline, RecoveryTypeOriginalLocation, RecoveryTypeRestoreDisks} -} - -// RestorePointQueryType enumerates the values for restore point query type. -type RestorePointQueryType string - -const ( - // RestorePointQueryTypeAll ... - RestorePointQueryTypeAll RestorePointQueryType = "All" - // RestorePointQueryTypeDifferential ... - RestorePointQueryTypeDifferential RestorePointQueryType = "Differential" - // RestorePointQueryTypeFull ... - RestorePointQueryTypeFull RestorePointQueryType = "Full" - // RestorePointQueryTypeFullAndDifferential ... - RestorePointQueryTypeFullAndDifferential RestorePointQueryType = "FullAndDifferential" - // RestorePointQueryTypeInvalid ... - RestorePointQueryTypeInvalid RestorePointQueryType = "Invalid" - // RestorePointQueryTypeLog ... - RestorePointQueryTypeLog RestorePointQueryType = "Log" -) - -// PossibleRestorePointQueryTypeValues returns an array of possible values for the RestorePointQueryType const type. -func PossibleRestorePointQueryTypeValues() []RestorePointQueryType { - return []RestorePointQueryType{RestorePointQueryTypeAll, RestorePointQueryTypeDifferential, RestorePointQueryTypeFull, RestorePointQueryTypeFullAndDifferential, RestorePointQueryTypeInvalid, RestorePointQueryTypeLog} -} - -// RestorePointType enumerates the values for restore point type. -type RestorePointType string - -const ( - // RestorePointTypeDifferential ... - RestorePointTypeDifferential RestorePointType = "Differential" - // RestorePointTypeFull ... - RestorePointTypeFull RestorePointType = "Full" - // RestorePointTypeInvalid ... - RestorePointTypeInvalid RestorePointType = "Invalid" - // RestorePointTypeLog ... - RestorePointTypeLog RestorePointType = "Log" -) - -// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type. -func PossibleRestorePointTypeValues() []RestorePointType { - return []RestorePointType{RestorePointTypeDifferential, RestorePointTypeFull, RestorePointTypeInvalid, RestorePointTypeLog} -} - -// RestoreRequestType enumerates the values for restore request type. -type RestoreRequestType string - -const ( - // RestoreRequestTypeFullShareRestore ... - RestoreRequestTypeFullShareRestore RestoreRequestType = "FullShareRestore" - // RestoreRequestTypeInvalid ... - RestoreRequestTypeInvalid RestoreRequestType = "Invalid" - // RestoreRequestTypeItemLevelRestore ... - RestoreRequestTypeItemLevelRestore RestoreRequestType = "ItemLevelRestore" -) - -// PossibleRestoreRequestTypeValues returns an array of possible values for the RestoreRequestType const type. -func PossibleRestoreRequestTypeValues() []RestoreRequestType { - return []RestoreRequestType{RestoreRequestTypeFullShareRestore, RestoreRequestTypeInvalid, RestoreRequestTypeItemLevelRestore} -} - -// RetentionDurationType enumerates the values for retention duration type. -type RetentionDurationType string - -const ( - // RetentionDurationTypeDays ... - RetentionDurationTypeDays RetentionDurationType = "Days" - // RetentionDurationTypeInvalid ... - RetentionDurationTypeInvalid RetentionDurationType = "Invalid" - // RetentionDurationTypeMonths ... - RetentionDurationTypeMonths RetentionDurationType = "Months" - // RetentionDurationTypeWeeks ... - RetentionDurationTypeWeeks RetentionDurationType = "Weeks" - // RetentionDurationTypeYears ... - RetentionDurationTypeYears RetentionDurationType = "Years" -) - -// PossibleRetentionDurationTypeValues returns an array of possible values for the RetentionDurationType const type. -func PossibleRetentionDurationTypeValues() []RetentionDurationType { - return []RetentionDurationType{RetentionDurationTypeDays, RetentionDurationTypeInvalid, RetentionDurationTypeMonths, RetentionDurationTypeWeeks, RetentionDurationTypeYears} -} - -// RetentionPolicyType enumerates the values for retention policy type. -type RetentionPolicyType string - -const ( - // RetentionPolicyTypeLongTermRetentionPolicy ... - RetentionPolicyTypeLongTermRetentionPolicy RetentionPolicyType = "LongTermRetentionPolicy" - // RetentionPolicyTypeRetentionPolicy ... - RetentionPolicyTypeRetentionPolicy RetentionPolicyType = "RetentionPolicy" - // RetentionPolicyTypeSimpleRetentionPolicy ... - RetentionPolicyTypeSimpleRetentionPolicy RetentionPolicyType = "SimpleRetentionPolicy" -) - -// PossibleRetentionPolicyTypeValues returns an array of possible values for the RetentionPolicyType const type. -func PossibleRetentionPolicyTypeValues() []RetentionPolicyType { - return []RetentionPolicyType{RetentionPolicyTypeLongTermRetentionPolicy, RetentionPolicyTypeRetentionPolicy, RetentionPolicyTypeSimpleRetentionPolicy} -} - -// RetentionScheduleFormat enumerates the values for retention schedule format. -type RetentionScheduleFormat string - -const ( - // RetentionScheduleFormatDaily ... - RetentionScheduleFormatDaily RetentionScheduleFormat = "Daily" - // RetentionScheduleFormatInvalid ... - RetentionScheduleFormatInvalid RetentionScheduleFormat = "Invalid" - // RetentionScheduleFormatWeekly ... - RetentionScheduleFormatWeekly RetentionScheduleFormat = "Weekly" -) - -// PossibleRetentionScheduleFormatValues returns an array of possible values for the RetentionScheduleFormat const type. -func PossibleRetentionScheduleFormatValues() []RetentionScheduleFormat { - return []RetentionScheduleFormat{RetentionScheduleFormatDaily, RetentionScheduleFormatInvalid, RetentionScheduleFormatWeekly} -} - -// SchedulePolicyType enumerates the values for schedule policy type. -type SchedulePolicyType string - -const ( - // SchedulePolicyTypeLogSchedulePolicy ... - SchedulePolicyTypeLogSchedulePolicy SchedulePolicyType = "LogSchedulePolicy" - // SchedulePolicyTypeLongTermSchedulePolicy ... - SchedulePolicyTypeLongTermSchedulePolicy SchedulePolicyType = "LongTermSchedulePolicy" - // SchedulePolicyTypeSchedulePolicy ... - SchedulePolicyTypeSchedulePolicy SchedulePolicyType = "SchedulePolicy" - // SchedulePolicyTypeSimpleSchedulePolicy ... - SchedulePolicyTypeSimpleSchedulePolicy SchedulePolicyType = "SimpleSchedulePolicy" -) - -// PossibleSchedulePolicyTypeValues returns an array of possible values for the SchedulePolicyType const type. -func PossibleSchedulePolicyTypeValues() []SchedulePolicyType { - return []SchedulePolicyType{SchedulePolicyTypeLogSchedulePolicy, SchedulePolicyTypeLongTermSchedulePolicy, SchedulePolicyTypeSchedulePolicy, SchedulePolicyTypeSimpleSchedulePolicy} -} - -// ScheduleRunType enumerates the values for schedule run type. -type ScheduleRunType string - -const ( - // ScheduleRunTypeDaily ... - ScheduleRunTypeDaily ScheduleRunType = "Daily" - // ScheduleRunTypeInvalid ... - ScheduleRunTypeInvalid ScheduleRunType = "Invalid" - // ScheduleRunTypeWeekly ... - ScheduleRunTypeWeekly ScheduleRunType = "Weekly" -) - -// PossibleScheduleRunTypeValues returns an array of possible values for the ScheduleRunType const type. -func PossibleScheduleRunTypeValues() []ScheduleRunType { - return []ScheduleRunType{ScheduleRunTypeDaily, ScheduleRunTypeInvalid, ScheduleRunTypeWeekly} -} - -// SoftDeleteFeatureState enumerates the values for soft delete feature state. -type SoftDeleteFeatureState string - -const ( - // SoftDeleteFeatureStateDisabled ... - SoftDeleteFeatureStateDisabled SoftDeleteFeatureState = "Disabled" - // SoftDeleteFeatureStateEnabled ... - SoftDeleteFeatureStateEnabled SoftDeleteFeatureState = "Enabled" - // SoftDeleteFeatureStateInvalid ... - SoftDeleteFeatureStateInvalid SoftDeleteFeatureState = "Invalid" -) - -// PossibleSoftDeleteFeatureStateValues returns an array of possible values for the SoftDeleteFeatureState const type. -func PossibleSoftDeleteFeatureStateValues() []SoftDeleteFeatureState { - return []SoftDeleteFeatureState{SoftDeleteFeatureStateDisabled, SoftDeleteFeatureStateEnabled, SoftDeleteFeatureStateInvalid} -} - // SQLDataDirectoryType enumerates the values for sql data directory type. type SQLDataDirectoryType string @@ -1576,29 +751,6 @@ func PossibleValidationStatusValues() []ValidationStatus { return []ValidationStatus{ValidationStatusFailed, ValidationStatusInvalid, ValidationStatusSucceeded} } -// WeekOfMonth enumerates the values for week of month. -type WeekOfMonth string - -const ( - // WeekOfMonthFirst ... - WeekOfMonthFirst WeekOfMonth = "First" - // WeekOfMonthFourth ... - WeekOfMonthFourth WeekOfMonth = "Fourth" - // WeekOfMonthInvalid ... - WeekOfMonthInvalid WeekOfMonth = "Invalid" - // WeekOfMonthLast ... - WeekOfMonthLast WeekOfMonth = "Last" - // WeekOfMonthSecond ... - WeekOfMonthSecond WeekOfMonth = "Second" - // WeekOfMonthThird ... - WeekOfMonthThird WeekOfMonth = "Third" -) - -// PossibleWeekOfMonthValues returns an array of possible values for the WeekOfMonth const type. -func PossibleWeekOfMonthValues() []WeekOfMonth { - return []WeekOfMonth{WeekOfMonthFirst, WeekOfMonthFourth, WeekOfMonthInvalid, WeekOfMonthLast, WeekOfMonthSecond, WeekOfMonthThird} -} - // WorkloadItemType enumerates the values for workload item type. type WorkloadItemType string @@ -1990,7 +1142,7 @@ type AzureFileShareBackupRequest struct { // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' - ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` + ObjectType ObjectType `json:"objectType,omitempty"` } // MarshalJSON is the custom marshaler for AzureFileShareBackupRequest. @@ -2157,615 +1309,310 @@ func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (Bas return &afspi, true } -// AzureFileshareProtectedItem azure File Share workload-specific backup item. -type AzureFileshareProtectedItem struct { - // FriendlyName - Friendly name of the fileshare represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // HealthStatus - backups running status for this backup item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' - HealthStatus HealthStatus `json:"healthStatus,omitempty"` - // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // ExtendedInfo - Additional information with this backup item. - ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. +// AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure +// file share. +type AzureFileShareProvisionILRRequest struct { + // RecoveryPointID - Recovery point ID. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // SourceResourceID - Source Storage account ARM Id SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { - afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { + afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest objectMap := make(map[string]interface{}) - if afpi.FriendlyName != nil { - objectMap["friendlyName"] = afpi.FriendlyName - } - if afpi.ProtectionStatus != nil { - objectMap["protectionStatus"] = afpi.ProtectionStatus - } - if afpi.ProtectionState != "" { - objectMap["protectionState"] = afpi.ProtectionState - } - if afpi.HealthStatus != "" { - objectMap["healthStatus"] = afpi.HealthStatus - } - if afpi.LastBackupStatus != nil { - objectMap["lastBackupStatus"] = afpi.LastBackupStatus - } - if afpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = afpi.LastBackupTime - } - if afpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = afpi.ExtendedInfo - } - if afpi.BackupManagementType != "" { - objectMap["backupManagementType"] = afpi.BackupManagementType - } - if afpi.WorkloadType != "" { - objectMap["workloadType"] = afpi.WorkloadType - } - if afpi.ContainerName != nil { - objectMap["containerName"] = afpi.ContainerName + if afspir.RecoveryPointID != nil { + objectMap["recoveryPointId"] = afspir.RecoveryPointID } - if afpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = afpi.SourceResourceID + if afspir.SourceResourceID != nil { + objectMap["sourceResourceId"] = afspir.SourceResourceID } - if afpi.PolicyID != nil { - objectMap["policyId"] = afpi.PolicyID + if afspir.ObjectType != "" { + objectMap["objectType"] = afspir.ObjectType } - if afpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint - } - if afpi.BackupSetName != nil { - objectMap["backupSetName"] = afpi.BackupSetName + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return &afspir, true +} + +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return nil, false +} + +// AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) { + return nil, false +} + +// AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &afspir, true +} + +// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual +// machine. +type AzureIaaSClassicComputeVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { + aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines + objectMap := make(map[string]interface{}) + if aisccvc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvc.VirtualMachineID } - if afpi.CreateMode != "" { - objectMap["createMode"] = afpi.CreateMode + if aisccvc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion } - if afpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC + if aisccvc.ResourceGroup != nil { + objectMap["resourceGroup"] = aisccvc.ResourceGroup } - if afpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete + if aisccvc.FriendlyName != nil { + objectMap["friendlyName"] = aisccvc.FriendlyName } - if afpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining + if aisccvc.BackupManagementType != "" { + objectMap["backupManagementType"] = aisccvc.BackupManagementType } - if afpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming + if aisccvc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aisccvc.RegistrationStatus } - if afpi.IsRehydrate != nil { - objectMap["isRehydrate"] = afpi.IsRehydrate + if aisccvc.HealthStatus != nil { + objectMap["healthStatus"] = aisccvc.HealthStatus } - if afpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = afpi.ProtectedItemType + if aisccvc.ContainerType != "" { + objectMap["containerType"] = aisccvc.ContainerType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return &afpi, true +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false } -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return &aisccvc, true } -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { return nil, false } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { return nil, false } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { return nil, false } -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { +// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { return nil, false } -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { +// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { return nil, false } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { - return nil, false +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &aisccvc, true } -// AsProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. -func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &afpi, true +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false } -// AzureFileshareProtectedItemExtendedInfo additional information about Azure File Share backup item. -type AzureFileshareProtectedItemExtendedInfo struct { - // OldestRecoveryPoint - The oldest backup copy available for this item in the service. - OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` - // RecoveryPointCount - Number of available backup copies associated with this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` - // PolicyState - Indicates consistency of policy object and policy applied to this backup item. - PolicyState *string `json:"policyState,omitempty"` - // ResourceState - READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} - ResourceState *string `json:"resourceState,omitempty"` - // ResourceStateSyncTime - READ-ONLY; The resource state sync time for this backup item. - ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"` +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aisccvc, true } -// AzureFileShareProtectionPolicy azureStorage backup policy. -type AzureFileShareProtectionPolicy struct { - // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkLoadType WorkloadType `json:"workLoadType,omitempty"` - // SchedulePolicy - Backup schedule specified as part of backup policy. - SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` - // RetentionPolicy - Retention policy with the details on backup copy retention ranges. - RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` - // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` - // ProtectedItemsCount - Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' - BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic +// Compute VM. +type AzureIaaSClassicComputeVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { - afspp.BackupManagementType = BackupManagementTypeAzureStorage +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines objectMap := make(map[string]interface{}) - if afspp.WorkLoadType != "" { - objectMap["workLoadType"] = afspp.WorkLoadType + if aisccvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID + } + if aisccvpi.BackupManagementType != nil { + objectMap["backupManagementType"] = aisccvpi.BackupManagementType + } + if aisccvpi.WorkloadType != nil { + objectMap["workloadType"] = aisccvpi.WorkloadType } - objectMap["schedulePolicy"] = afspp.SchedulePolicy - objectMap["retentionPolicy"] = afspp.RetentionPolicy - if afspp.TimeZone != nil { - objectMap["timeZone"] = afspp.TimeZone + if aisccvpi.FriendlyName != nil { + objectMap["friendlyName"] = aisccvpi.FriendlyName } - if afspp.ProtectedItemsCount != nil { - objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount + if aisccvpi.ProtectionState != "" { + objectMap["protectionState"] = aisccvpi.ProtectionState } - if afspp.BackupManagementType != "" { - objectMap["backupManagementType"] = afspp.BackupManagementType + if aisccvpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = aisccvpi.ProtectableItemType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { - return &afspp, true +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return &aisccvpi, true } -// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { return nil, false } -// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. -func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { - return &afspp, true -} - -// UnmarshalJSON is the custom unmarshaler for AzureFileShareProtectionPolicy struct. -func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "workLoadType": - if v != nil { - var workLoadType WorkloadType - err = json.Unmarshal(*v, &workLoadType) - if err != nil { - return err - } - afspp.WorkLoadType = workLoadType - } - case "schedulePolicy": - if v != nil { - schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) - if err != nil { - return err - } - afspp.SchedulePolicy = schedulePolicy - } - case "retentionPolicy": - if v != nil { - retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) - if err != nil { - return err - } - afspp.RetentionPolicy = retentionPolicy - } - case "timeZone": - if v != nil { - var timeZone string - err = json.Unmarshal(*v, &timeZone) - if err != nil { - return err - } - afspp.TimeZone = &timeZone - } - case "protectedItemsCount": - if v != nil { - var protectedItemsCount int32 - err = json.Unmarshal(*v, &protectedItemsCount) - if err != nil { - return err - } - afspp.ProtectedItemsCount = &protectedItemsCount - } - case "backupManagementType": - if v != nil { - var backupManagementType ManagementTypeBasicProtectionPolicy - err = json.Unmarshal(*v, &backupManagementType) - if err != nil { - return err - } - afspp.BackupManagementType = backupManagementType - } - } - } - - return nil +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false } -// AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure -// file share. -type AzureFileShareProvisionILRRequest struct { - // RecoveryPointID - Recovery point ID. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - // SourceResourceID - Source Storage account ARM Id - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' - ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest. -func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { - afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest - objectMap := make(map[string]interface{}) - if afspir.RecoveryPointID != nil { - objectMap["recoveryPointId"] = afspir.RecoveryPointID - } - if afspir.SourceResourceID != nil { - objectMap["sourceResourceId"] = afspir.SourceResourceID - } - if afspir.ObjectType != "" { - objectMap["objectType"] = afspir.ObjectType - } - return json.Marshal(objectMap) +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false } -// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. -func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { - return &afspir, true +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false } -// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. -func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { return nil, false } -// AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. -func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) { - return nil, false +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &aisccvpi, true } -// AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. -func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { - return &afspir, true +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false } -// AzureFileShareRecoveryPoint azure File Share workload specific backup copy. -type AzureFileShareRecoveryPoint struct { - // RecoveryPointType - READ-ONLY; Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. - RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` - // FileShareSnapshotURI - READ-ONLY; Contains Url to the snapshot of fileshare, if applicable - FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"` - // RecoveryPointSizeInGB - READ-ONLY; Contains recovery point size - RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &aisccvpi, true } -// MarshalJSON is the custom marshaler for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { - afsrp.ObjectType = ObjectTypeAzureFileShareRecoveryPoint - objectMap := make(map[string]interface{}) - if afsrp.ObjectType != "" { - objectMap["objectType"] = afsrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return &afsrp, true -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. -func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &afsrp, true -} - -// AzureFileShareRestoreRequest azureFileShare Restore Request -type AzureFileShareRestoreRequest struct { - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Source storage account ARM Id - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // CopyOptions - Options to resolve copy conflicts. Possible values include: 'CopyOptionsInvalid', 'CopyOptionsCreateCopy', 'CopyOptionsSkip', 'CopyOptionsOverwrite', 'CopyOptionsFailOnConflict' - CopyOptions CopyOptions `json:"copyOptions,omitempty"` - // RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore). Possible values include: 'RestoreRequestTypeInvalid', 'RestoreRequestTypeFullShareRestore', 'RestoreRequestTypeItemLevelRestore' - RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"` - // RestoreFileSpecs - List of Source Files/Folders(which need to recover) and TargetFolderPath details - RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"` - // TargetDetails - Target File Share Details - TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { - afsrr.ObjectType = ObjectTypeAzureFileShareRestoreRequest - objectMap := make(map[string]interface{}) - if afsrr.RecoveryType != "" { - objectMap["recoveryType"] = afsrr.RecoveryType - } - if afsrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = afsrr.SourceResourceID - } - if afsrr.CopyOptions != "" { - objectMap["copyOptions"] = afsrr.CopyOptions - } - if afsrr.RestoreRequestType != "" { - objectMap["restoreRequestType"] = afsrr.RestoreRequestType - } - if afsrr.RestoreFileSpecs != nil { - objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs - } - if afsrr.TargetDetails != nil { - objectMap["targetDetails"] = afsrr.TargetDetails - } - if afsrr.ObjectType != "" { - objectMap["objectType"] = afsrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return &afsrr, true -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return nil, false -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. -func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &afsrr, true -} - -// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual -// machine. -type AzureIaaSClassicComputeVMContainer struct { +// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager +// virtual machine. +type AzureIaaSComputeVMContainer struct { // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. VirtualMachineID *string `json:"virtualMachineId,omitempty"` // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. @@ -2784,125 +1631,125 @@ type AzureIaaSClassicComputeVMContainer struct { ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { - aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { + aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines objectMap := make(map[string]interface{}) - if aisccvc.VirtualMachineID != nil { - objectMap["virtualMachineId"] = aisccvc.VirtualMachineID + if aiscvc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvc.VirtualMachineID } - if aisccvc.VirtualMachineVersion != nil { - objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion + if aiscvc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion } - if aisccvc.ResourceGroup != nil { - objectMap["resourceGroup"] = aisccvc.ResourceGroup + if aiscvc.ResourceGroup != nil { + objectMap["resourceGroup"] = aiscvc.ResourceGroup } - if aisccvc.FriendlyName != nil { - objectMap["friendlyName"] = aisccvc.FriendlyName + if aiscvc.FriendlyName != nil { + objectMap["friendlyName"] = aiscvc.FriendlyName } - if aisccvc.BackupManagementType != "" { - objectMap["backupManagementType"] = aisccvc.BackupManagementType + if aiscvc.BackupManagementType != "" { + objectMap["backupManagementType"] = aiscvc.BackupManagementType } - if aisccvc.RegistrationStatus != nil { - objectMap["registrationStatus"] = aisccvc.RegistrationStatus + if aiscvc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aiscvc.RegistrationStatus } - if aisccvc.HealthStatus != nil { - objectMap["healthStatus"] = aisccvc.HealthStatus + if aiscvc.HealthStatus != nil { + objectMap["healthStatus"] = aiscvc.HealthStatus } - if aisccvc.ContainerType != "" { - objectMap["containerType"] = aisccvc.ContainerType + if aiscvc.ContainerType != "" { + objectMap["containerType"] = aiscvc.ContainerType } return json.Marshal(objectMap) } -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return &aisccvc, true +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false } -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return nil, false +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return &aiscvc, true } -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { return nil, false } -// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { return nil, false } -// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { return nil, false } -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { return nil, false } -// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { +// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { return nil, false } -// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { return nil, false } -// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { +// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { return nil, false } -// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { - return &aisccvc, true +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &aiscvc, true } -// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { return nil, false } -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. -func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &aisccvc, true +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aiscvc, true } -// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic -// Compute VM. -type AzureIaaSClassicComputeVMProtectableItem struct { +// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource +// Manager VM. +type AzureIaaSComputeVMProtectableItem struct { // VirtualMachineID - Fully qualified ARM ID of the virtual machine. VirtualMachineID *string `json:"virtualMachineId,omitempty"` // BackupManagementType - Type of backup management to backup an item. @@ -2917,828 +1764,938 @@ type AzureIaaSClassicComputeVMProtectableItem struct { ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { - aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines objectMap := make(map[string]interface{}) - if aisccvpi.VirtualMachineID != nil { - objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID + if aiscvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID } - if aisccvpi.BackupManagementType != nil { - objectMap["backupManagementType"] = aisccvpi.BackupManagementType + if aiscvpi.BackupManagementType != nil { + objectMap["backupManagementType"] = aiscvpi.BackupManagementType } - if aisccvpi.WorkloadType != nil { - objectMap["workloadType"] = aisccvpi.WorkloadType + if aiscvpi.WorkloadType != nil { + objectMap["workloadType"] = aiscvpi.WorkloadType } - if aisccvpi.FriendlyName != nil { - objectMap["friendlyName"] = aisccvpi.FriendlyName + if aiscvpi.FriendlyName != nil { + objectMap["friendlyName"] = aiscvpi.FriendlyName } - if aisccvpi.ProtectionState != "" { - objectMap["protectionState"] = aisccvpi.ProtectionState + if aiscvpi.ProtectionState != "" { + objectMap["protectionState"] = aiscvpi.ProtectionState } - if aisccvpi.ProtectableItemType != "" { - objectMap["protectableItemType"] = aisccvpi.ProtectableItemType + if aiscvpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = aiscvpi.ProtectableItemType } return json.Marshal(objectMap) } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { - return &aisccvpi, true +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false } -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return nil, false +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return &aiscvpi, true } -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { return nil, false } -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { return nil, false } -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return &aisccvpi, true +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &aiscvpi, true } -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { return nil, false } -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &aisccvpi, true +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &aiscvpi, true } -// AzureIaaSClassicComputeVMProtectedItem iaaS VM workload-specific backup item representing the Classic -// Compute VM. -type AzureIaaSClassicComputeVMProtectedItem struct { - // FriendlyName - Friendly name of the VM represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' - HealthStatus HealthStatus `json:"healthStatus,omitempty"` - // HealthDetails - Health details on this backup item. - HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` - // LastBackupStatus - Last backup operation status. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // ProtectedItemDataID - Data ID of the protected item. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' +// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information. +type AzureIaaSVMErrorInfo struct { + // ErrorCode - READ-ONLY; Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to. + ErrorTitle *string `json:"errorTitle,omitempty"` + // ErrorString - READ-ONLY; Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - READ-ONLY; List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureIaaSVMJob azure IaaS VM workload-specific job object. +type AzureIaaSVMJob struct { + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` + // VirtualMachineVersion - Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ExtendedInfo - Additional information for this job. + ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { - aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) { + aisj.JobType = JobTypeAzureIaaSVMJob objectMap := make(map[string]interface{}) - if aisccvpi.FriendlyName != nil { - objectMap["friendlyName"] = aisccvpi.FriendlyName - } - if aisccvpi.VirtualMachineID != nil { - objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID - } - if aisccvpi.ProtectionStatus != nil { - objectMap["protectionStatus"] = aisccvpi.ProtectionStatus - } - if aisccvpi.ProtectionState != "" { - objectMap["protectionState"] = aisccvpi.ProtectionState - } - if aisccvpi.HealthStatus != "" { - objectMap["healthStatus"] = aisccvpi.HealthStatus - } - if aisccvpi.HealthDetails != nil { - objectMap["healthDetails"] = aisccvpi.HealthDetails - } - if aisccvpi.LastBackupStatus != nil { - objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus - } - if aisccvpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = aisccvpi.LastBackupTime - } - if aisccvpi.ProtectedItemDataID != nil { - objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID - } - if aisccvpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = aisccvpi.ExtendedInfo - } - if aisccvpi.ExtendedProperties != nil { - objectMap["extendedProperties"] = aisccvpi.ExtendedProperties - } - if aisccvpi.BackupManagementType != "" { - objectMap["backupManagementType"] = aisccvpi.BackupManagementType - } - if aisccvpi.WorkloadType != "" { - objectMap["workloadType"] = aisccvpi.WorkloadType + if aisj.Duration != nil { + objectMap["duration"] = aisj.Duration } - if aisccvpi.ContainerName != nil { - objectMap["containerName"] = aisccvpi.ContainerName + if aisj.ActionsInfo != nil { + objectMap["actionsInfo"] = aisj.ActionsInfo } - if aisccvpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = aisccvpi.SourceResourceID + if aisj.ErrorDetails != nil { + objectMap["errorDetails"] = aisj.ErrorDetails } - if aisccvpi.PolicyID != nil { - objectMap["policyId"] = aisccvpi.PolicyID + if aisj.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion } - if aisccvpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint + if aisj.ExtendedInfo != nil { + objectMap["extendedInfo"] = aisj.ExtendedInfo } - if aisccvpi.BackupSetName != nil { - objectMap["backupSetName"] = aisccvpi.BackupSetName + if aisj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = aisj.EntityFriendlyName } - if aisccvpi.CreateMode != "" { - objectMap["createMode"] = aisccvpi.CreateMode + if aisj.BackupManagementType != "" { + objectMap["backupManagementType"] = aisj.BackupManagementType } - if aisccvpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC + if aisj.Operation != nil { + objectMap["operation"] = aisj.Operation } - if aisccvpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete + if aisj.Status != nil { + objectMap["status"] = aisj.Status } - if aisccvpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining + if aisj.StartTime != nil { + objectMap["startTime"] = aisj.StartTime } - if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming + if aisj.EndTime != nil { + objectMap["endTime"] = aisj.EndTime } - if aisccvpi.IsRehydrate != nil { - objectMap["isRehydrate"] = aisccvpi.IsRehydrate + if aisj.ActivityID != nil { + objectMap["activityId"] = aisj.ActivityID } - if aisccvpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = aisccvpi.ProtectedItemType + if aisj.JobType != "" { + objectMap["jobType"] = aisj.JobType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return &aisccvpi, true -} - -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false +// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return &aisj, true } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { +// AsAzureStorageJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) { return nil, false } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return &aisccvpi, true -} - -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { +// AsAzureWorkloadJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { return nil, false } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { +// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { +// AsMabJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { +// AsJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return nil, false +// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) { + return &aisj, true } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return nil, false +// AzureIaaSVMJobExtendedInfo azure IaaS VM workload-specific additional information for job. +type AzureIaaSVMJobExtendedInfo struct { + // TasksList - List of tasks associated with this job. + TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // InternalPropertyBag - Job internal properties. + InternalPropertyBag map[string]*string `json:"internalPropertyBag"` + // ProgressPercentage - Indicates progress of the job. Null if it has not started or completed. + ProgressPercentage *float64 `json:"progressPercentage,omitempty"` + // EstimatedRemainingDuration - Time remaining for execution of this job. + EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false +// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo. +func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aisjei.TasksList != nil { + objectMap["tasksList"] = aisjei.TasksList + } + if aisjei.PropertyBag != nil { + objectMap["propertyBag"] = aisjei.PropertyBag + } + if aisjei.InternalPropertyBag != nil { + objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag + } + if aisjei.ProgressPercentage != nil { + objectMap["progressPercentage"] = aisjei.ProgressPercentage + } + if aisjei.EstimatedRemainingDuration != nil { + objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration + } + if aisjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage + } + return json.Marshal(objectMap) } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { - return nil, false +// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details. +type AzureIaaSVMJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // InstanceID - The instanceId. + InstanceID *string `json:"instanceId,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` + // ProgressPercentage - Progress of the task. + ProgressPercentage *float64 `json:"progressPercentage,omitempty"` + // TaskExecutionDetails - Details about execution of the task. + // eg: number of bytes transferred etc + TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"` } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { - return nil, false +// BasicAzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. +type BasicAzureRecoveryServiceVaultProtectionIntent interface { + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) + AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) } -// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return nil, false +// AzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. +type AzureRecoveryServiceVaultProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. -func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &aisccvpi, true +func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var arsvpi AzureRecoveryServiceVaultProtectionIntent + err := json.Unmarshal(body, &arsvpi) + return arsvpi, err + } } +func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } -// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager -// virtual machine. -type AzureIaaSComputeVMContainer struct { - // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - // ResourceGroup - Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` + arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + arsvpiArray[index] = arsvpi + } + return arsvpiArray, nil } -// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { - aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines +// MarshalJSON is the custom marshaler for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { + arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem objectMap := make(map[string]interface{}) - if aiscvc.VirtualMachineID != nil { - objectMap["virtualMachineId"] = aiscvc.VirtualMachineID - } - if aiscvc.VirtualMachineVersion != nil { - objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion - } - if aiscvc.ResourceGroup != nil { - objectMap["resourceGroup"] = aiscvc.ResourceGroup + if arsvpi.BackupManagementType != "" { + objectMap["backupManagementType"] = arsvpi.BackupManagementType } - if aiscvc.FriendlyName != nil { - objectMap["friendlyName"] = aiscvc.FriendlyName + if arsvpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = arsvpi.SourceResourceID } - if aiscvc.BackupManagementType != "" { - objectMap["backupManagementType"] = aiscvc.BackupManagementType + if arsvpi.ItemID != nil { + objectMap["itemId"] = arsvpi.ItemID } - if aiscvc.RegistrationStatus != nil { - objectMap["registrationStatus"] = aiscvc.RegistrationStatus + if arsvpi.PolicyID != nil { + objectMap["policyId"] = arsvpi.PolicyID } - if aiscvc.HealthStatus != nil { - objectMap["healthStatus"] = aiscvc.HealthStatus + if arsvpi.ProtectionState != "" { + objectMap["protectionState"] = arsvpi.ProtectionState } - if aiscvc.ContainerType != "" { - objectMap["containerType"] = aiscvc.ContainerType + if arsvpi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType } return json.Marshal(objectMap) } -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { - return nil, false +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return &arsvpi, true } -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &arsvpi, true } -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return &aiscvc, true +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false } -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { return nil, false } -// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { return nil, false } -// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { return nil, false } -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { return nil, false } -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return nil, false +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &arsvpi, true } -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return nil, false +// AzureResourceProtectionIntent iaaS VM specific backup protection intent item. +type AzureResourceProtectionIntent struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` } -// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false +// MarshalJSON is the custom marshaler for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { + arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem + objectMap := make(map[string]interface{}) + if arpi.FriendlyName != nil { + objectMap["friendlyName"] = arpi.FriendlyName + } + if arpi.BackupManagementType != "" { + objectMap["backupManagementType"] = arpi.BackupManagementType + } + if arpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = arpi.SourceResourceID + } + if arpi.ItemID != nil { + objectMap["itemId"] = arpi.ItemID + } + if arpi.PolicyID != nil { + objectMap["policyId"] = arpi.PolicyID + } + if arpi.ProtectionState != "" { + objectMap["protectionState"] = arpi.ProtectionState + } + if arpi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType + } + return json.Marshal(objectMap) } -// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { return nil, false } -// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { return nil, false } -// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { - return nil, false +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return &arpi, true } -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { - return &aiscvc, true +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false } -// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { return nil, false } -// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { return nil, false } -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. -func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &aiscvc, true +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false } -// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource -// Manager VM. -type AzureIaaSComputeVMProtectableItem struct { - // VirtualMachineID - Fully qualified ARM ID of the virtual machine. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &arpi, true } -// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { - aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines - objectMap := make(map[string]interface{}) - if aiscvpi.VirtualMachineID != nil { - objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID - } - if aiscvpi.BackupManagementType != nil { - objectMap["backupManagementType"] = aiscvpi.BackupManagementType +// AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group. +type AzureSQLAGWorkloadContainerProtectionContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { + aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1 + objectMap := make(map[string]interface{}) + if aswcpc.SourceResourceID != nil { + objectMap["sourceResourceId"] = aswcpc.SourceResourceID } - if aiscvpi.WorkloadType != nil { - objectMap["workloadType"] = aiscvpi.WorkloadType + if aswcpc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime } - if aiscvpi.FriendlyName != nil { - objectMap["friendlyName"] = aiscvpi.FriendlyName + if aswcpc.ExtendedInfo != nil { + objectMap["extendedInfo"] = aswcpc.ExtendedInfo } - if aiscvpi.ProtectionState != "" { - objectMap["protectionState"] = aiscvpi.ProtectionState + if aswcpc.WorkloadType != "" { + objectMap["workloadType"] = aswcpc.WorkloadType } - if aiscvpi.ProtectableItemType != "" { - objectMap["protectableItemType"] = aiscvpi.ProtectableItemType + if aswcpc.OperationType != "" { + objectMap["operationType"] = aswcpc.OperationType + } + if aswcpc.FriendlyName != nil { + objectMap["friendlyName"] = aswcpc.FriendlyName + } + if aswcpc.BackupManagementType != "" { + objectMap["backupManagementType"] = aswcpc.BackupManagementType + } + if aswcpc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aswcpc.RegistrationStatus + } + if aswcpc.HealthStatus != nil { + objectMap["healthStatus"] = aswcpc.HealthStatus + } + if aswcpc.ContainerType != "" { + objectMap["containerType"] = aswcpc.ContainerType } return json.Marshal(objectMap) } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return &aiscvpi, true +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false } -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return &aswcpc, true +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &aswcpc, true +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { +// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { return nil, false } -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return &aiscvpi, true +// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false } -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { return nil, false } -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. -func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &aiscvpi, true +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aswcpc, true } -// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Azure Resource -// Manager VM. -type AzureIaaSComputeVMProtectedItem struct { - // FriendlyName - Friendly name of the VM represented by this backup item. +// AzureSQLContainer azure Sql workload-specific container. +type AzureSQLContainer struct { + // FriendlyName - Friendly name of the container. FriendlyName *string `json:"friendlyName,omitempty"` - // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' - HealthStatus HealthStatus `json:"healthStatus,omitempty"` - // HealthDetails - Health details on this backup item. - HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` - // LastBackupStatus - Last backup operation status. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // ProtectedItemDataID - Data ID of the protected item. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { - aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLContainer. +func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) { + asc.ContainerType = ContainerTypeAzureSQLContainer1 objectMap := make(map[string]interface{}) - if aiscvpi.FriendlyName != nil { - objectMap["friendlyName"] = aiscvpi.FriendlyName - } - if aiscvpi.VirtualMachineID != nil { - objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID - } - if aiscvpi.ProtectionStatus != nil { - objectMap["protectionStatus"] = aiscvpi.ProtectionStatus - } - if aiscvpi.ProtectionState != "" { - objectMap["protectionState"] = aiscvpi.ProtectionState - } - if aiscvpi.HealthStatus != "" { - objectMap["healthStatus"] = aiscvpi.HealthStatus - } - if aiscvpi.HealthDetails != nil { - objectMap["healthDetails"] = aiscvpi.HealthDetails - } - if aiscvpi.LastBackupStatus != nil { - objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus - } - if aiscvpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = aiscvpi.LastBackupTime - } - if aiscvpi.ProtectedItemDataID != nil { - objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID - } - if aiscvpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = aiscvpi.ExtendedInfo - } - if aiscvpi.ExtendedProperties != nil { - objectMap["extendedProperties"] = aiscvpi.ExtendedProperties - } - if aiscvpi.BackupManagementType != "" { - objectMap["backupManagementType"] = aiscvpi.BackupManagementType - } - if aiscvpi.WorkloadType != "" { - objectMap["workloadType"] = aiscvpi.WorkloadType - } - if aiscvpi.ContainerName != nil { - objectMap["containerName"] = aiscvpi.ContainerName - } - if aiscvpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = aiscvpi.SourceResourceID - } - if aiscvpi.PolicyID != nil { - objectMap["policyId"] = aiscvpi.PolicyID - } - if aiscvpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint - } - if aiscvpi.BackupSetName != nil { - objectMap["backupSetName"] = aiscvpi.BackupSetName - } - if aiscvpi.CreateMode != "" { - objectMap["createMode"] = aiscvpi.CreateMode - } - if aiscvpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC - } - if aiscvpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete + if asc.FriendlyName != nil { + objectMap["friendlyName"] = asc.FriendlyName } - if aiscvpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining + if asc.BackupManagementType != "" { + objectMap["backupManagementType"] = asc.BackupManagementType } - if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming + if asc.RegistrationStatus != nil { + objectMap["registrationStatus"] = asc.RegistrationStatus } - if aiscvpi.IsRehydrate != nil { - objectMap["isRehydrate"] = aiscvpi.IsRehydrate + if asc.HealthStatus != nil { + objectMap["healthStatus"] = asc.HealthStatus } - if aiscvpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = aiscvpi.ProtectedItemType + if asc.ContainerType != "" { + objectMap["containerType"] = asc.ContainerType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return &aiscvpi, true +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { return nil, false } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return &aiscvpi, true +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return &asc, true } -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { +// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { return nil, false } -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { +// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) { return nil, false } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { return nil, false } -// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. -func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &aiscvpi, true +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false } -// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information. -type AzureIaaSVMErrorInfo struct { - // ErrorCode - READ-ONLY; Error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - // ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to. - ErrorTitle *string `json:"errorTitle,omitempty"` - // ErrorString - READ-ONLY; Localized error string. - ErrorString *string `json:"errorString,omitempty"` - // Recommendations - READ-ONLY; List of localized recommendations for above error code. - Recommendations *[]string `json:"recommendations,omitempty"` +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &asc, true } -// AzureIaaSVMHealthDetails azure IaaS VM workload-specific Health Details. -type AzureIaaSVMHealthDetails struct { - // Code - READ-ONLY; Health Code - Code *int32 `json:"code,omitempty"` - // Title - READ-ONLY; Health Title - Title *string `json:"title,omitempty"` - // Message - READ-ONLY; Health Message - Message *string `json:"message,omitempty"` - // Recommendations - READ-ONLY; Health Recommended Actions - Recommendations *[]string `json:"recommendations,omitempty"` +// AzureStorageContainer azure Storage Account workload-specific container. +type AzureStorageContainer struct { + // SourceResourceID - Fully qualified ARM url. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // StorageAccountVersion - Storage account version. + StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // ProtectedItemCount - Number of items backed up in this container. + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -// AzureIaaSVMJob azure IaaS VM workload-specific job object. -type AzureIaaSVMJob struct { +// MarshalJSON is the custom marshaler for AzureStorageContainer. +func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) { + asc.ContainerType = ContainerTypeStorageContainer1 + objectMap := make(map[string]interface{}) + if asc.SourceResourceID != nil { + objectMap["sourceResourceId"] = asc.SourceResourceID + } + if asc.StorageAccountVersion != nil { + objectMap["storageAccountVersion"] = asc.StorageAccountVersion + } + if asc.ResourceGroup != nil { + objectMap["resourceGroup"] = asc.ResourceGroup + } + if asc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = asc.ProtectedItemCount + } + if asc.FriendlyName != nil { + objectMap["friendlyName"] = asc.FriendlyName + } + if asc.BackupManagementType != "" { + objectMap["backupManagementType"] = asc.BackupManagementType + } + if asc.RegistrationStatus != nil { + objectMap["registrationStatus"] = asc.RegistrationStatus + } + if asc.HealthStatus != nil { + objectMap["healthStatus"] = asc.HealthStatus + } + if asc.ContainerType != "" { + objectMap["containerType"] = asc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return &asc, true +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &asc, true +} + +// AzureStorageErrorInfo azure storage specific error information +type AzureStorageErrorInfo struct { + // ErrorCode - Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureStorageJob azure storage specific job. +type AzureStorageJob struct { // Duration - Time elapsed during the execution of this job. Duration *string `json:"duration,omitempty"` // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` // ErrorDetails - Error details on execution of this job. - ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` - // VirtualMachineVersion - Specifies whether the backup item is a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - // ExtendedInfo - Additional information for this job. - ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` + ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"` + // StorageAccountName - Specifies friendly name of the storage account. + StorageAccountName *string `json:"storageAccountName,omitempty"` + // StorageAccountVersion - Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. + StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` + // ExtendedInfo - Additional information about the job. + ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"` // EntityFriendlyName - Friendly name of the entity on which the current job is executing. EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' @@ -3757,1973 +2714,1913 @@ type AzureIaaSVMJob struct { JobType JobType `json:"jobType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) { - aisj.JobType = JobTypeAzureIaaSVMJob +// MarshalJSON is the custom marshaler for AzureStorageJob. +func (asj AzureStorageJob) MarshalJSON() ([]byte, error) { + asj.JobType = JobTypeAzureStorageJob objectMap := make(map[string]interface{}) - if aisj.Duration != nil { - objectMap["duration"] = aisj.Duration + if asj.Duration != nil { + objectMap["duration"] = asj.Duration } - if aisj.ActionsInfo != nil { - objectMap["actionsInfo"] = aisj.ActionsInfo + if asj.ActionsInfo != nil { + objectMap["actionsInfo"] = asj.ActionsInfo } - if aisj.ErrorDetails != nil { - objectMap["errorDetails"] = aisj.ErrorDetails + if asj.ErrorDetails != nil { + objectMap["errorDetails"] = asj.ErrorDetails } - if aisj.VirtualMachineVersion != nil { - objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion + if asj.StorageAccountName != nil { + objectMap["storageAccountName"] = asj.StorageAccountName } - if aisj.ExtendedInfo != nil { - objectMap["extendedInfo"] = aisj.ExtendedInfo + if asj.StorageAccountVersion != nil { + objectMap["storageAccountVersion"] = asj.StorageAccountVersion } - if aisj.EntityFriendlyName != nil { - objectMap["entityFriendlyName"] = aisj.EntityFriendlyName + if asj.ExtendedInfo != nil { + objectMap["extendedInfo"] = asj.ExtendedInfo } - if aisj.BackupManagementType != "" { - objectMap["backupManagementType"] = aisj.BackupManagementType + if asj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = asj.EntityFriendlyName } - if aisj.Operation != nil { - objectMap["operation"] = aisj.Operation + if asj.BackupManagementType != "" { + objectMap["backupManagementType"] = asj.BackupManagementType } - if aisj.Status != nil { - objectMap["status"] = aisj.Status + if asj.Operation != nil { + objectMap["operation"] = asj.Operation } - if aisj.StartTime != nil { - objectMap["startTime"] = aisj.StartTime + if asj.Status != nil { + objectMap["status"] = asj.Status } - if aisj.EndTime != nil { - objectMap["endTime"] = aisj.EndTime + if asj.StartTime != nil { + objectMap["startTime"] = asj.StartTime } - if aisj.ActivityID != nil { - objectMap["activityId"] = aisj.ActivityID + if asj.EndTime != nil { + objectMap["endTime"] = asj.EndTime } - if aisj.JobType != "" { - objectMap["jobType"] = aisj.JobType + if asj.ActivityID != nil { + objectMap["activityId"] = asj.ActivityID + } + if asj.JobType != "" { + objectMap["jobType"] = asj.JobType } return json.Marshal(objectMap) } -// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { - return &aisj, true +// AsAzureIaaSVMJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false } -// AsAzureStorageJob is the BasicJob implementation for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) { - return nil, false +// AsAzureStorageJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return &asj, true } -// AsAzureWorkloadJob is the BasicJob implementation for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { +// AsAzureWorkloadJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { return nil, false } -// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) { +// AsDpmJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) { return nil, false } -// AsMabJob is the BasicJob implementation for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) { +// AsMabJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) { return nil, false } -// AsJob is the BasicJob implementation for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) { +// AsJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsJob() (*Job, bool) { return nil, false } -// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob. -func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) { - return &aisj, true +// AsBasicJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) { + return &asj, true } -// AzureIaaSVMJobExtendedInfo azure IaaS VM workload-specific additional information for job. -type AzureIaaSVMJobExtendedInfo struct { - // TasksList - List of tasks associated with this job. - TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` +// AzureStorageJobExtendedInfo azure Storage workload-specific additional information for job. +type AzureStorageJobExtendedInfo struct { + // TasksList - List of tasks for this job + TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"` // PropertyBag - Job properties. PropertyBag map[string]*string `json:"propertyBag"` - // InternalPropertyBag - Job internal properties. - InternalPropertyBag map[string]*string `json:"internalPropertyBag"` - // ProgressPercentage - Indicates progress of the job. Null if it has not started or completed. - ProgressPercentage *float64 `json:"progressPercentage,omitempty"` - // EstimatedRemainingDuration - Time remaining for execution of this job. - EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"` // DynamicErrorMessage - Non localized error message on job execution. DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo. -func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for AzureStorageJobExtendedInfo. +func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if aisjei.TasksList != nil { - objectMap["tasksList"] = aisjei.TasksList - } - if aisjei.PropertyBag != nil { - objectMap["propertyBag"] = aisjei.PropertyBag - } - if aisjei.InternalPropertyBag != nil { - objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag - } - if aisjei.ProgressPercentage != nil { - objectMap["progressPercentage"] = aisjei.ProgressPercentage + if asjei.TasksList != nil { + objectMap["tasksList"] = asjei.TasksList } - if aisjei.EstimatedRemainingDuration != nil { - objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration + if asjei.PropertyBag != nil { + objectMap["propertyBag"] = asjei.PropertyBag } - if aisjei.DynamicErrorMessage != nil { - objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage + if asjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage } return json.Marshal(objectMap) } -// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details. -type AzureIaaSVMJobTaskDetails struct { +// AzureStorageJobTaskDetails azure storage workload specific job task details. +type AzureStorageJobTaskDetails struct { // TaskID - The task display name. TaskID *string `json:"taskId,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // InstanceID - The instanceId. - InstanceID *string `json:"instanceId,omitempty"` - // Duration - Time elapsed for task. - Duration *string `json:"duration,omitempty"` // Status - The status. Status *string `json:"status,omitempty"` - // ProgressPercentage - Progress of the task. - ProgressPercentage *float64 `json:"progressPercentage,omitempty"` - // TaskExecutionDetails - Details about execution of the task. - // eg: number of bytes transferred etc - TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"` } -// BasicAzureIaaSVMProtectedItem iaaS VM workload-specific backup item. -type BasicAzureIaaSVMProtectedItem interface { - AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) - AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) - AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) -} - -// AzureIaaSVMProtectedItem iaaS VM workload-specific backup item. -type AzureIaaSVMProtectedItem struct { - // FriendlyName - Friendly name of the VM represented by this backup item. +// AzureStorageProtectableContainer azure Storage-specific protectable containers +type AzureStorageProtectableContainer struct { + // FriendlyName - Friendly name of the container. FriendlyName *string `json:"friendlyName,omitempty"` - // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' - HealthStatus HealthStatus `json:"healthStatus,omitempty"` - // HealthDetails - Health details on this backup item. - HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` - // LastBackupStatus - Last backup operation status. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // ProtectedItemDataID - Data ID of the protected item. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["protectedItemType"] { - case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): - var aisccvpi AzureIaaSClassicComputeVMProtectedItem - err := json.Unmarshal(body, &aisccvpi) - return aisccvpi, err - case string(ProtectedItemTypeMicrosoftComputevirtualMachines): - var aiscvpi AzureIaaSComputeVMProtectedItem - err := json.Unmarshal(body, &aiscvpi) - return aiscvpi, err - default: - var aispi AzureIaaSVMProtectedItem - err := json.Unmarshal(body, &aispi) - return aispi, err - } -} -func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages)) - - for index, rawMessage := range rawMessages { - aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage) - if err != nil { - return nil, err - } - aispiArray[index] = aispi - } - return aispiArray, nil + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { - aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem +// MarshalJSON is the custom marshaler for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { + aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer objectMap := make(map[string]interface{}) - if aispi.FriendlyName != nil { - objectMap["friendlyName"] = aispi.FriendlyName - } - if aispi.VirtualMachineID != nil { - objectMap["virtualMachineId"] = aispi.VirtualMachineID - } - if aispi.ProtectionStatus != nil { - objectMap["protectionStatus"] = aispi.ProtectionStatus - } - if aispi.ProtectionState != "" { - objectMap["protectionState"] = aispi.ProtectionState - } - if aispi.HealthStatus != "" { - objectMap["healthStatus"] = aispi.HealthStatus - } - if aispi.HealthDetails != nil { - objectMap["healthDetails"] = aispi.HealthDetails - } - if aispi.LastBackupStatus != nil { - objectMap["lastBackupStatus"] = aispi.LastBackupStatus - } - if aispi.LastBackupTime != nil { - objectMap["lastBackupTime"] = aispi.LastBackupTime - } - if aispi.ProtectedItemDataID != nil { - objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID - } - if aispi.ExtendedInfo != nil { - objectMap["extendedInfo"] = aispi.ExtendedInfo - } - if aispi.ExtendedProperties != nil { - objectMap["extendedProperties"] = aispi.ExtendedProperties - } - if aispi.BackupManagementType != "" { - objectMap["backupManagementType"] = aispi.BackupManagementType - } - if aispi.WorkloadType != "" { - objectMap["workloadType"] = aispi.WorkloadType - } - if aispi.ContainerName != nil { - objectMap["containerName"] = aispi.ContainerName - } - if aispi.SourceResourceID != nil { - objectMap["sourceResourceId"] = aispi.SourceResourceID - } - if aispi.PolicyID != nil { - objectMap["policyId"] = aispi.PolicyID - } - if aispi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint - } - if aispi.BackupSetName != nil { - objectMap["backupSetName"] = aispi.BackupSetName - } - if aispi.CreateMode != "" { - objectMap["createMode"] = aispi.CreateMode - } - if aispi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC - } - if aispi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete + if aspc.FriendlyName != nil { + objectMap["friendlyName"] = aspc.FriendlyName } - if aispi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining + if aspc.BackupManagementType != "" { + objectMap["backupManagementType"] = aspc.BackupManagementType } - if aispi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming + if aspc.HealthStatus != nil { + objectMap["healthStatus"] = aspc.HealthStatus } - if aispi.IsRehydrate != nil { - objectMap["isRehydrate"] = aispi.IsRehydrate + if aspc.ContainerID != nil { + objectMap["containerId"] = aspc.ContainerID } - if aispi.ProtectedItemType != "" { - objectMap["protectedItemType"] = aispi.ProtectedItemType + if aspc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = aspc.ProtectableContainerType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { - return &aispi, true -} - -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return &aispi, true -} - -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return nil, false -} - -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false -} - -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { - return nil, false +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { + return &aspc, true } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { return nil, false } -// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { +// AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { return nil, false } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. -func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &aispi, true -} - -// AzureIaaSVMProtectedItemExtendedInfo additional information on Azure IaaS VM specific backup item. -type AzureIaaSVMProtectedItemExtendedInfo struct { - // OldestRecoveryPoint - The oldest backup copy available for this backup item. - OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` - // RecoveryPointCount - Number of backup copies available for this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` - // PolicyInconsistent - Specifies if backup policy associated with the backup item is inconsistent. - PolicyInconsistent *bool `json:"policyInconsistent,omitempty"` +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &aspc, true } -// AzureIaaSVMProtectionPolicy iaaS VM workload-specific backup policy. -type AzureIaaSVMProtectionPolicy struct { - // SchedulePolicy - Backup schedule specified as part of backup policy. - SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` - // RetentionPolicy - Retention policy with the details on backup copy retention ranges. - RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` - // InstantRpRetentionRangeInDays - Instant RP retention policy range in days - InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"` - // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` - // ProtectedItemsCount - Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' - BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +// AzureVMAppContainerProtectableContainer azure workload-specific container +type AzureVMAppContainerProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { - aispp.BackupManagementType = BackupManagementTypeAzureIaasVM +// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { + avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer objectMap := make(map[string]interface{}) - objectMap["schedulePolicy"] = aispp.SchedulePolicy - objectMap["retentionPolicy"] = aispp.RetentionPolicy - if aispp.InstantRpRetentionRangeInDays != nil { - objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays + if avacpc.FriendlyName != nil { + objectMap["friendlyName"] = avacpc.FriendlyName + } + if avacpc.BackupManagementType != "" { + objectMap["backupManagementType"] = avacpc.BackupManagementType } - if aispp.TimeZone != nil { - objectMap["timeZone"] = aispp.TimeZone + if avacpc.HealthStatus != nil { + objectMap["healthStatus"] = avacpc.HealthStatus } - if aispp.ProtectedItemsCount != nil { - objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount + if avacpc.ContainerID != nil { + objectMap["containerId"] = avacpc.ContainerID } - if aispp.BackupManagementType != "" { - objectMap["backupManagementType"] = aispp.BackupManagementType + if avacpc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = avacpc.ProtectableContainerType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { - return nil, false -} - -// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { - return &aispp, true -} - -// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { return nil, false } -// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { - return nil, false +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { + return &avacpc, true } -// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { +// AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { return nil, false } -// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { - return nil, false +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &avacpc, true } -// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. -func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { - return &aispp, true +// AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines. +type AzureVMAppContainerProtectionContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for AzureIaaSVMProtectionPolicy struct. -func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "schedulePolicy": - if v != nil { - schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) - if err != nil { - return err - } - aispp.SchedulePolicy = schedulePolicy - } - case "retentionPolicy": - if v != nil { - retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) - if err != nil { - return err - } - aispp.RetentionPolicy = retentionPolicy - } - case "instantRpRetentionRangeInDays": - if v != nil { - var instantRpRetentionRangeInDays int32 - err = json.Unmarshal(*v, &instantRpRetentionRangeInDays) - if err != nil { - return err - } - aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays - } - case "timeZone": - if v != nil { - var timeZone string - err = json.Unmarshal(*v, &timeZone) - if err != nil { - return err - } - aispp.TimeZone = &timeZone - } - case "protectedItemsCount": - if v != nil { - var protectedItemsCount int32 - err = json.Unmarshal(*v, &protectedItemsCount) - if err != nil { - return err - } - aispp.ProtectedItemsCount = &protectedItemsCount - } - case "backupManagementType": - if v != nil { - var backupManagementType ManagementTypeBasicProtectionPolicy - err = json.Unmarshal(*v, &backupManagementType) - if err != nil { - return err - } - aispp.BackupManagementType = backupManagementType - } - } - } - - return nil -} - -// BasicAzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. -type BasicAzureRecoveryServiceVaultProtectionIntent interface { - AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) - AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) - AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) - AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) -} - -// AzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. -type AzureRecoveryServiceVaultProtectionIntent struct { - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' - ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` -} - -func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err +// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { + avacpc.ContainerType = ContainerTypeVMAppContainer1 + objectMap := make(map[string]interface{}) + if avacpc.SourceResourceID != nil { + objectMap["sourceResourceId"] = avacpc.SourceResourceID } - - switch m["protectionIntentItemType"] { - case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): - var awapi AzureWorkloadAutoProtectionIntent - err := json.Unmarshal(body, &awapi) - return awapi, err - case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): - var awsapi AzureWorkloadSQLAutoProtectionIntent - err := json.Unmarshal(body, &awsapi) - return awsapi, err - default: - var arsvpi AzureRecoveryServiceVaultProtectionIntent - err := json.Unmarshal(body, &arsvpi) - return arsvpi, err + if avacpc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime } -} -func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err + if avacpc.ExtendedInfo != nil { + objectMap["extendedInfo"] = avacpc.ExtendedInfo } - - arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages)) - - for index, rawMessage := range rawMessages { - arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage) - if err != nil { - return nil, err - } - arsvpiArray[index] = arsvpi + if avacpc.WorkloadType != "" { + objectMap["workloadType"] = avacpc.WorkloadType } - return arsvpiArray, nil -} - -// MarshalJSON is the custom marshaler for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { - arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem - objectMap := make(map[string]interface{}) - if arsvpi.BackupManagementType != "" { - objectMap["backupManagementType"] = arsvpi.BackupManagementType + if avacpc.OperationType != "" { + objectMap["operationType"] = avacpc.OperationType } - if arsvpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = arsvpi.SourceResourceID + if avacpc.FriendlyName != nil { + objectMap["friendlyName"] = avacpc.FriendlyName } - if arsvpi.ItemID != nil { - objectMap["itemId"] = arsvpi.ItemID + if avacpc.BackupManagementType != "" { + objectMap["backupManagementType"] = avacpc.BackupManagementType } - if arsvpi.PolicyID != nil { - objectMap["policyId"] = arsvpi.PolicyID + if avacpc.RegistrationStatus != nil { + objectMap["registrationStatus"] = avacpc.RegistrationStatus } - if arsvpi.ProtectionState != "" { - objectMap["protectionState"] = arsvpi.ProtectionState + if avacpc.HealthStatus != nil { + objectMap["healthStatus"] = avacpc.HealthStatus } - if arsvpi.ProtectionIntentItemType != "" { - objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType + if avacpc.ContainerType != "" { + objectMap["containerType"] = avacpc.ContainerType } return json.Marshal(objectMap) } -// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { - return &arsvpi, true -} - -// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { - return &arsvpi, true +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false } -// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { return nil, false } -// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { return nil, false } -// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { return nil, false } -// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { return nil, false } -// AsProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. -func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { - return &arsvpi, true +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return &avacpc, true } -// AzureResourceProtectionIntent iaaS VM specific backup protection intent item. -type AzureResourceProtectionIntent struct { - // FriendlyName - Friendly name of the VM represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' - ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { - arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem - objectMap := make(map[string]interface{}) - if arpi.FriendlyName != nil { - objectMap["friendlyName"] = arpi.FriendlyName - } - if arpi.BackupManagementType != "" { - objectMap["backupManagementType"] = arpi.BackupManagementType - } - if arpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = arpi.SourceResourceID - } - if arpi.ItemID != nil { - objectMap["itemId"] = arpi.ItemID - } - if arpi.PolicyID != nil { - objectMap["policyId"] = arpi.PolicyID - } - if arpi.ProtectionState != "" { - objectMap["protectionState"] = arpi.ProtectionState - } - if arpi.ProtectionIntentItemType != "" { - objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType - } - return json.Marshal(objectMap) +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &avacpc, true } -// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { +// AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { return nil, false } -// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { return nil, false } -// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { - return &arpi, true +// AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false } -// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { return nil, false } -// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { return nil, false } -// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. -func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { - return &arpi, true +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &avacpc, true } -// AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group. -type AzureSQLAGWorkloadContainerProtectionContainer struct { - // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // LastUpdatedTime - Time stamp when this container was updated. - LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` - // ExtendedInfo - Additional details of a workload container. - ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` - // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` - // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' - OperationType OperationType `json:"operationType,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +// AzureVMResourceFeatureSupportRequest azureResource(IaaS VM) Specific feature support request +type AzureVMResourceFeatureSupportRequest struct { + // VMSize - Size of the resource: VM size(A/D series etc) in case of IaasVM + VMSize *string `json:"vmSize,omitempty"` + // VMSku - SKUs (Premium/Managed etc) in case of IaasVM + VMSku *string `json:"vmSku,omitempty"` + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { - aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1 +// MarshalJSON is the custom marshaler for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { + avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup objectMap := make(map[string]interface{}) - if aswcpc.SourceResourceID != nil { - objectMap["sourceResourceId"] = aswcpc.SourceResourceID - } - if aswcpc.LastUpdatedTime != nil { - objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime - } - if aswcpc.ExtendedInfo != nil { - objectMap["extendedInfo"] = aswcpc.ExtendedInfo - } - if aswcpc.WorkloadType != "" { - objectMap["workloadType"] = aswcpc.WorkloadType - } - if aswcpc.OperationType != "" { - objectMap["operationType"] = aswcpc.OperationType - } - if aswcpc.FriendlyName != nil { - objectMap["friendlyName"] = aswcpc.FriendlyName - } - if aswcpc.BackupManagementType != "" { - objectMap["backupManagementType"] = aswcpc.BackupManagementType - } - if aswcpc.RegistrationStatus != nil { - objectMap["registrationStatus"] = aswcpc.RegistrationStatus + if avrfsr.VMSize != nil { + objectMap["vmSize"] = avrfsr.VMSize } - if aswcpc.HealthStatus != nil { - objectMap["healthStatus"] = aswcpc.HealthStatus + if avrfsr.VMSku != nil { + objectMap["vmSku"] = avrfsr.VMSku } - if aswcpc.ContainerType != "" { - objectMap["containerType"] = aswcpc.ContainerType + if avrfsr.FeatureType != "" { + objectMap["featureType"] = avrfsr.FeatureType } return json.Marshal(objectMap) } -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { + return &avrfsr, true } -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { return nil, false } -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return &aswcpc, true +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &avrfsr, true } -// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return nil, false +// AzureVMResourceFeatureSupportResponse response for feature support requests for Azure IaasVm +type AzureVMResourceFeatureSupportResponse struct { + autorest.Response `json:"-"` + // SupportStatus - Support status of feature. Possible values include: 'SupportStatusInvalid', 'SupportStatusSupported', 'SupportStatusDefaultOFF', 'SupportStatusDefaultON', 'SupportStatusNotSupported' + SupportStatus SupportStatus `json:"supportStatus,omitempty"` } -// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false +// BasicAzureVMWorkloadItem azure VM workload-specific workload item. +type BasicAzureVMWorkloadItem interface { + AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) + AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) + AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) } -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return nil, false +// AzureVMWorkloadItem azure VM workload-specific workload item. +type AzureVMWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` } -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return nil, false +func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["workloadItemType"] { + case string(WorkloadItemTypeSAPAseDatabase1): + var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsadwi) + return avwsadwi, err + case string(WorkloadItemTypeSAPAseSystem1): + var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem + err := json.Unmarshal(body, &avwsaswi) + return avwsaswi, err + case string(WorkloadItemTypeSAPHanaDatabase1): + var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem + err := json.Unmarshal(body, &avwshdwi) + return avwshdwi, err + case string(WorkloadItemTypeSAPHanaSystem1): + var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem + err := json.Unmarshal(body, &avwshswi) + return avwshswi, err + case string(WorkloadItemTypeSQLDataBase1): + var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsdwi) + return avwsdwi, err + case string(WorkloadItemTypeSQLInstance1): + var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem + err := json.Unmarshal(body, &avwsiwi) + return avwsiwi, err + default: + var avwi AzureVMWorkloadItem + err := json.Unmarshal(body, &avwi) + return avwi, err + } } +func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return &aswcpc, true + avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage) + if err != nil { + return nil, err + } + avwiArray[index] = avwi + } + return avwiArray, nil } -// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false +// MarshalJSON is the custom marshaler for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { + avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem + objectMap := make(map[string]interface{}) + if avwi.ParentName != nil { + objectMap["parentName"] = avwi.ParentName + } + if avwi.ServerName != nil { + objectMap["serverName"] = avwi.ServerName + } + if avwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwi.IsAutoProtectable + } + if avwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwi.Subinquireditemcount + } + if avwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount + } + if avwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwi.BackupManagementType + } + if avwi.WorkloadType != nil { + objectMap["workloadType"] = avwi.WorkloadType + } + if avwi.FriendlyName != nil { + objectMap["friendlyName"] = avwi.FriendlyName + } + if avwi.ProtectionState != "" { + objectMap["protectionState"] = avwi.ProtectionState + } + if avwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwi.WorkloadItemType + } + return json.Marshal(objectMap) } -// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { - return nil, false +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return &avwi, true } -// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { - return nil, false +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwi, true } -// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { return nil, false } -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { return nil, false } -// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { return nil, false } -// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { return nil, false } -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. -func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &aswcpc, true +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false } -// AzureSQLContainer azure Sql workload-specific container. -type AzureSQLContainer struct { - // FriendlyName - Friendly name of the container. +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwi, true +} + +// BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item. +type BasicAzureVMWorkloadProtectableItem interface { + AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) + AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) + AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) + AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) + AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) +} + +// AzureVMWorkloadProtectableItem azure VM workload-specific protectable item. +type AzureVMWorkloadProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureSQLContainer. -func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) { - asc.ContainerType = ContainerTypeAzureSQLContainer1 +func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeSAPAseSystem): + var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem + err := json.Unmarshal(body, &avwsaspi) + return avwsaspi, err + case string(ProtectableItemTypeSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectableItemTypeSAPHanaSystem): + var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem + err := json.Unmarshal(body, &avwshspi) + return avwshspi, err + case string(ProtectableItemTypeSQLAvailabilityGroupContainer): + var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem + err := json.Unmarshal(body, &avwsagpi) + return avwsagpi, err + case string(ProtectableItemTypeSQLDataBase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + case string(ProtectableItemTypeSQLInstance): + var avwsipi AzureVMWorkloadSQLInstanceProtectableItem + err := json.Unmarshal(body, &avwsipi) + return avwsipi, err + default: + var avwpi AzureVMWorkloadProtectableItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + } +} +func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + avwpiArray[index] = avwpi + } + return avwpiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { + avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem objectMap := make(map[string]interface{}) - if asc.FriendlyName != nil { - objectMap["friendlyName"] = asc.FriendlyName + if avwpi.ParentName != nil { + objectMap["parentName"] = avwpi.ParentName } - if asc.BackupManagementType != "" { - objectMap["backupManagementType"] = asc.BackupManagementType + if avwpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwpi.ParentUniqueName } - if asc.RegistrationStatus != nil { - objectMap["registrationStatus"] = asc.RegistrationStatus + if avwpi.ServerName != nil { + objectMap["serverName"] = avwpi.ServerName } - if asc.HealthStatus != nil { - objectMap["healthStatus"] = asc.HealthStatus + if avwpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable } - if asc.ContainerType != "" { - objectMap["containerType"] = asc.ContainerType + if avwpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwpi.IsAutoProtected + } + if avwpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount + } + if avwpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount + } + if avwpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation + } + if avwpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwpi.BackupManagementType + } + if avwpi.WorkloadType != nil { + objectMap["workloadType"] = avwpi.WorkloadType + } + if avwpi.FriendlyName != nil { + objectMap["friendlyName"] = avwpi.FriendlyName + } + if avwpi.ProtectionState != "" { + objectMap["protectionState"] = avwpi.ProtectionState + } + if avwpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwpi.ProtectableItemType } return json.Marshal(objectMap) } -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { return nil, false } -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return &avwpi, true } -// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return &asc, true +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwpi, true } -// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { return nil, false } -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { return nil, false } -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) { +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { return nil, false } -// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { return nil, false } -// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) { +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { return nil, false } -// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { return nil, false } -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { return nil, false } -// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) { - return nil, false +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwpi, true } -// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) { - return nil, false -} - -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. -func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &asc, true +// AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE +// Database. +type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` } -// AzureSQLProtectedItem azure SQL workload-specific backup item. -type AzureSQLProtectedItem struct { - // ProtectedItemDataID - Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. - ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` - // ProtectionState - Backup state of the backed up item. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' - ProtectionState ProtectedItemState `json:"protectionState,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { - aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1 objectMap := make(map[string]interface{}) - if aspi.ProtectedItemDataID != nil { - objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID - } - if aspi.ProtectionState != "" { - objectMap["protectionState"] = aspi.ProtectionState - } - if aspi.ExtendedInfo != nil { - objectMap["extendedInfo"] = aspi.ExtendedInfo - } - if aspi.BackupManagementType != "" { - objectMap["backupManagementType"] = aspi.BackupManagementType - } - if aspi.WorkloadType != "" { - objectMap["workloadType"] = aspi.WorkloadType - } - if aspi.ContainerName != nil { - objectMap["containerName"] = aspi.ContainerName - } - if aspi.SourceResourceID != nil { - objectMap["sourceResourceId"] = aspi.SourceResourceID - } - if aspi.PolicyID != nil { - objectMap["policyId"] = aspi.PolicyID + if avwsadwi.ParentName != nil { + objectMap["parentName"] = avwsadwi.ParentName } - if aspi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint + if avwsadwi.ServerName != nil { + objectMap["serverName"] = avwsadwi.ServerName } - if aspi.BackupSetName != nil { - objectMap["backupSetName"] = aspi.BackupSetName + if avwsadwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable } - if aspi.CreateMode != "" { - objectMap["createMode"] = aspi.CreateMode + if avwsadwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount } - if aspi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC + if avwsadwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount } - if aspi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete + if avwsadwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsadwi.BackupManagementType } - if aspi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining + if avwsadwi.WorkloadType != nil { + objectMap["workloadType"] = avwsadwi.WorkloadType } - if aspi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming + if avwsadwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsadwi.FriendlyName } - if aspi.IsRehydrate != nil { - objectMap["isRehydrate"] = aspi.IsRehydrate + if avwsadwi.ProtectionState != "" { + objectMap["protectionState"] = avwsadwi.ProtectionState } - if aspi.ProtectedItemType != "" { - objectMap["protectedItemType"] = aspi.ProtectedItemType + if avwsadwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsadwi.WorkloadItemType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsadwi, true } -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return &avwsadwi, true } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { return nil, false } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { - return &aspi, true +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return nil, false +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsadwi, true } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return nil, false +// AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP +// ASE System. +type AzureVMWorkloadSAPAseSystemProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { + avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem + objectMap := make(map[string]interface{}) + if avwsaspi.ParentName != nil { + objectMap["parentName"] = avwsaspi.ParentName + } + if avwsaspi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName + } + if avwsaspi.ServerName != nil { + objectMap["serverName"] = avwsaspi.ServerName + } + if avwsaspi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable + } + if avwsaspi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected + } + if avwsaspi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount + } + if avwsaspi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount + } + if avwsaspi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation + } + if avwsaspi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsaspi.BackupManagementType + } + if avwsaspi.WorkloadType != nil { + objectMap["workloadType"] = avwsaspi.WorkloadType + } + if avwsaspi.FriendlyName != nil { + objectMap["friendlyName"] = avwsaspi.FriendlyName + } + if avwsaspi.ProtectionState != "" { + objectMap["protectionState"] = avwsaspi.ProtectionState + } + if avwsaspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsaspi.ProtectableItemType + } + return json.Marshal(objectMap) } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { return nil, false } -// AsProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. -func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &aspi, true +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false } -// AzureSQLProtectedItemExtendedInfo additional information on Azure Sql specific protected item. -type AzureSQLProtectedItemExtendedInfo struct { - // OldestRecoveryPoint - The oldest backup copy available for this item in the service. - OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` - // RecoveryPointCount - Number of available backup copies associated with this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` - // PolicyState - State of the backup policy associated with this backup item. - PolicyState *string `json:"policyState,omitempty"` +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsaspi, true } -// AzureSQLProtectionPolicy azure SQL workload-specific backup policy. -type AzureSQLProtectionPolicy struct { - // RetentionPolicy - Retention policy details. - RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` - // ProtectedItemsCount - Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' - BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return &avwsaspi, true } -// MarshalJSON is the custom marshaler for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { - aspp.BackupManagementType = BackupManagementTypeAzureSQL - objectMap := make(map[string]interface{}) - objectMap["retentionPolicy"] = aspp.RetentionPolicy - if aspp.ProtectedItemsCount != nil { - objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount - } - if aspp.BackupManagementType != "" { - objectMap["backupManagementType"] = aspp.BackupManagementType - } - return json.Marshal(objectMap) +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false } -// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { return nil, false } -// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { return nil, false } -// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { - return &aspp, true +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false } -// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { return nil, false } -// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { return nil, false } -// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { return nil, false } -// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. -func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { - return &aspp, true +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsaspi, true } -// UnmarshalJSON is the custom unmarshaler for AzureSQLProtectionPolicy struct. -func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err +// AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE +// System. +type AzureVMWorkloadSAPAseSystemWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { + avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1 + objectMap := make(map[string]interface{}) + if avwsaswi.ParentName != nil { + objectMap["parentName"] = avwsaswi.ParentName } - for k, v := range m { - switch k { - case "retentionPolicy": - if v != nil { - retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) - if err != nil { - return err - } - aspp.RetentionPolicy = retentionPolicy - } - case "protectedItemsCount": - if v != nil { - var protectedItemsCount int32 - err = json.Unmarshal(*v, &protectedItemsCount) - if err != nil { - return err - } - aspp.ProtectedItemsCount = &protectedItemsCount - } - case "backupManagementType": - if v != nil { - var backupManagementType ManagementTypeBasicProtectionPolicy - err = json.Unmarshal(*v, &backupManagementType) - if err != nil { - return err - } - aspp.BackupManagementType = backupManagementType - } - } - } - - return nil -} - -// AzureStorageContainer azure Storage Account workload-specific container. -type AzureStorageContainer struct { - // SourceResourceID - Fully qualified ARM url. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // StorageAccountVersion - Storage account version. - StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` - // ResourceGroup - Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // ProtectedItemCount - Number of items backed up in this container. - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureStorageContainer. -func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) { - asc.ContainerType = ContainerTypeStorageContainer1 - objectMap := make(map[string]interface{}) - if asc.SourceResourceID != nil { - objectMap["sourceResourceId"] = asc.SourceResourceID + if avwsaswi.ServerName != nil { + objectMap["serverName"] = avwsaswi.ServerName } - if asc.StorageAccountVersion != nil { - objectMap["storageAccountVersion"] = asc.StorageAccountVersion + if avwsaswi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable } - if asc.ResourceGroup != nil { - objectMap["resourceGroup"] = asc.ResourceGroup + if avwsaswi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount } - if asc.ProtectedItemCount != nil { - objectMap["protectedItemCount"] = asc.ProtectedItemCount + if avwsaswi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount } - if asc.FriendlyName != nil { - objectMap["friendlyName"] = asc.FriendlyName + if avwsaswi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsaswi.BackupManagementType } - if asc.BackupManagementType != "" { - objectMap["backupManagementType"] = asc.BackupManagementType + if avwsaswi.WorkloadType != nil { + objectMap["workloadType"] = avwsaswi.WorkloadType } - if asc.RegistrationStatus != nil { - objectMap["registrationStatus"] = asc.RegistrationStatus + if avwsaswi.FriendlyName != nil { + objectMap["friendlyName"] = avwsaswi.FriendlyName } - if asc.HealthStatus != nil { - objectMap["healthStatus"] = asc.HealthStatus + if avwsaswi.ProtectionState != "" { + objectMap["protectionState"] = avwsaswi.ProtectionState } - if asc.ContainerType != "" { - objectMap["containerType"] = asc.ContainerType + if avwsaswi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsaswi.WorkloadItemType } return json.Marshal(objectMap) } -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsaswi, true } -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return &avwsaswi, true } -// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return &asc, true +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false } -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { return nil, false } -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { return nil, false } -// AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) { +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsaswi, true +} + +// AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing +// SAP HANA Database. +type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase + objectMap := make(map[string]interface{}) + if avwshdpi.ParentName != nil { + objectMap["parentName"] = avwshdpi.ParentName + } + if avwshdpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName + } + if avwshdpi.ServerName != nil { + objectMap["serverName"] = avwshdpi.ServerName + } + if avwshdpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable + } + if avwshdpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected + } + if avwshdpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount + } + if avwshdpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount + } + if avwshdpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation + } + if avwshdpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshdpi.BackupManagementType + } + if avwshdpi.WorkloadType != nil { + objectMap["workloadType"] = avwshdpi.WorkloadType + } + if avwshdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdpi.FriendlyName + } + if avwshdpi.ProtectionState != "" { + objectMap["protectionState"] = avwshdpi.ProtectionState + } + if avwshdpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwshdpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { return nil, false } -// AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { return nil, false } -// AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. -func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &asc, true +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false } -// AzureStorageErrorInfo azure storage specific error information -type AzureStorageErrorInfo struct { - // ErrorCode - Error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - // ErrorString - Localized error string. - ErrorString *string `json:"errorString,omitempty"` - // Recommendations - List of localized recommendations for above error code. - Recommendations *[]string `json:"recommendations,omitempty"` +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false } -// AzureStorageJob azure storage specific job. -type AzureStorageJob struct { - // Duration - Time elapsed during the execution of this job. - Duration *string `json:"duration,omitempty"` - // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. - ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` - // ErrorDetails - Error details on execution of this job. - ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"` - // StorageAccountName - Specifies friendly name of the storage account. - StorageAccountName *string `json:"storageAccountName,omitempty"` - // StorageAccountVersion - Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. - StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` - // ExtendedInfo - Additional information about the job. - ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"` - // EntityFriendlyName - Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // Operation - The operation name. - Operation *string `json:"operation,omitempty"` - // Status - Job status. - Status *string `json:"status,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // ActivityID - ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' - JobType JobType `json:"jobType,omitempty"` +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for AzureStorageJob. -func (asj AzureStorageJob) MarshalJSON() ([]byte, error) { - asj.JobType = JobTypeAzureStorageJob +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwshdpi, true +} + +// AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP +// HANA Database. +type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1 objectMap := make(map[string]interface{}) - if asj.Duration != nil { - objectMap["duration"] = asj.Duration - } - if asj.ActionsInfo != nil { - objectMap["actionsInfo"] = asj.ActionsInfo - } - if asj.ErrorDetails != nil { - objectMap["errorDetails"] = asj.ErrorDetails - } - if asj.StorageAccountName != nil { - objectMap["storageAccountName"] = asj.StorageAccountName - } - if asj.StorageAccountVersion != nil { - objectMap["storageAccountVersion"] = asj.StorageAccountVersion + if avwshdwi.ParentName != nil { + objectMap["parentName"] = avwshdwi.ParentName } - if asj.ExtendedInfo != nil { - objectMap["extendedInfo"] = asj.ExtendedInfo + if avwshdwi.ServerName != nil { + objectMap["serverName"] = avwshdwi.ServerName } - if asj.EntityFriendlyName != nil { - objectMap["entityFriendlyName"] = asj.EntityFriendlyName + if avwshdwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable } - if asj.BackupManagementType != "" { - objectMap["backupManagementType"] = asj.BackupManagementType + if avwshdwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount } - if asj.Operation != nil { - objectMap["operation"] = asj.Operation + if avwshdwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount } - if asj.Status != nil { - objectMap["status"] = asj.Status + if avwshdwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshdwi.BackupManagementType } - if asj.StartTime != nil { - objectMap["startTime"] = asj.StartTime + if avwshdwi.WorkloadType != nil { + objectMap["workloadType"] = avwshdwi.WorkloadType } - if asj.EndTime != nil { - objectMap["endTime"] = asj.EndTime + if avwshdwi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdwi.FriendlyName } - if asj.ActivityID != nil { - objectMap["activityId"] = asj.ActivityID + if avwshdwi.ProtectionState != "" { + objectMap["protectionState"] = avwshdwi.ProtectionState } - if asj.JobType != "" { - objectMap["jobType"] = asj.JobType + if avwshdwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwshdwi.WorkloadItemType } return json.Marshal(objectMap) } -// AsAzureIaaSVMJob is the BasicJob implementation for AzureStorageJob. -func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { return nil, false } -// AsAzureStorageJob is the BasicJob implementation for AzureStorageJob. -func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) { - return &asj, true +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwshdwi, true } -// AsAzureWorkloadJob is the BasicJob implementation for AzureStorageJob. -func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { return nil, false } -// AsDpmJob is the BasicJob implementation for AzureStorageJob. -func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) { +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { return nil, false } -// AsMabJob is the BasicJob implementation for AzureStorageJob. -func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) { - return nil, false +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return &avwshdwi, true } -// AsJob is the BasicJob implementation for AzureStorageJob. -func (asj AzureStorageJob) AsJob() (*Job, bool) { +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { return nil, false } -// AsBasicJob is the BasicJob implementation for AzureStorageJob. -func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) { - return &asj, true +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false } -// AzureStorageJobExtendedInfo azure Storage workload-specific additional information for job. -type AzureStorageJobExtendedInfo struct { - // TasksList - List of tasks for this job - TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"` - // PropertyBag - Job properties. - PropertyBag map[string]*string `json:"propertyBag"` - // DynamicErrorMessage - Non localized error message on job execution. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for AzureStorageJobExtendedInfo. -func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if asjei.TasksList != nil { - objectMap["tasksList"] = asjei.TasksList - } - if asjei.PropertyBag != nil { - objectMap["propertyBag"] = asjei.PropertyBag - } - if asjei.DynamicErrorMessage != nil { - objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage - } - return json.Marshal(objectMap) +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false } -// AzureStorageJobTaskDetails azure storage workload specific job task details. -type AzureStorageJobTaskDetails struct { - // TaskID - The task display name. - TaskID *string `json:"taskId,omitempty"` - // Status - The status. - Status *string `json:"status,omitempty"` +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwshdwi, true } -// AzureStorageProtectableContainer azure Storage-specific protectable containers -type AzureStorageProtectableContainer struct { - // FriendlyName - Friendly name of the container. +// AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP +// HANA System. +type AzureVMWorkloadSAPHanaSystemProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerID - Fabric Id of the container such as ARM Id. - ContainerID *string `json:"containerId,omitempty"` - // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' - ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureStorageProtectableContainer. -func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { - aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { + avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem objectMap := make(map[string]interface{}) - if aspc.FriendlyName != nil { - objectMap["friendlyName"] = aspc.FriendlyName + if avwshspi.ParentName != nil { + objectMap["parentName"] = avwshspi.ParentName } - if aspc.BackupManagementType != "" { - objectMap["backupManagementType"] = aspc.BackupManagementType + if avwshspi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwshspi.ParentUniqueName } - if aspc.HealthStatus != nil { - objectMap["healthStatus"] = aspc.HealthStatus + if avwshspi.ServerName != nil { + objectMap["serverName"] = avwshspi.ServerName } - if aspc.ContainerID != nil { - objectMap["containerId"] = aspc.ContainerID + if avwshspi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable } - if aspc.ProtectableContainerType != "" { - objectMap["protectableContainerType"] = aspc.ProtectableContainerType + if avwshspi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwshspi.IsAutoProtected + } + if avwshspi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount + } + if avwshspi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount + } + if avwshspi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation + } + if avwshspi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshspi.BackupManagementType + } + if avwshspi.WorkloadType != nil { + objectMap["workloadType"] = avwshspi.WorkloadType + } + if avwshspi.FriendlyName != nil { + objectMap["friendlyName"] = avwshspi.FriendlyName + } + if avwshspi.ProtectionState != "" { + objectMap["protectionState"] = avwshspi.ProtectionState + } + if avwshspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwshspi.ProtectableItemType } return json.Marshal(objectMap) } -// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. -func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { - return &aspc, true +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false } -// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. -func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { return nil, false } -// AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. -func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. -func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { - return &aspc, true +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false } -// AzureVMAppContainerProtectableContainer azure workload-specific container -type AzureVMAppContainerProtectableContainer struct { - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerID - Fabric Id of the container such as ARM Id. - ContainerID *string `json:"containerId,omitempty"` - // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' - ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwshspi, true } -// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer. -func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { - avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer - objectMap := make(map[string]interface{}) - if avacpc.FriendlyName != nil { - objectMap["friendlyName"] = avacpc.FriendlyName - } - if avacpc.BackupManagementType != "" { - objectMap["backupManagementType"] = avacpc.BackupManagementType - } - if avacpc.HealthStatus != nil { - objectMap["healthStatus"] = avacpc.HealthStatus - } - if avacpc.ContainerID != nil { - objectMap["containerId"] = avacpc.ContainerID - } - if avacpc.ProtectableContainerType != "" { - objectMap["protectableContainerType"] = avacpc.ProtectableContainerType - } - return json.Marshal(objectMap) +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false } -// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. -func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { return nil, false } -// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. -func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { - return &avacpc, true +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return &avwshspi, true } -// AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. -func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. -func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { - return &avacpc, true +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false } -// AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines. -type AzureVMAppContainerProtectionContainer struct { - // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // LastUpdatedTime - Time stamp when this container was updated. - LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` - // ExtendedInfo - Additional details of a workload container. - ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` - // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` - // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' - OperationType OperationType `json:"operationType,omitempty"` - // FriendlyName - Friendly name of the container. +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwshspi, true +} + +// AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA +// System. +type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { - avacpc.ContainerType = ContainerTypeVMAppContainer1 +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { + avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1 objectMap := make(map[string]interface{}) - if avacpc.SourceResourceID != nil { - objectMap["sourceResourceId"] = avacpc.SourceResourceID + if avwshswi.ParentName != nil { + objectMap["parentName"] = avwshswi.ParentName } - if avacpc.LastUpdatedTime != nil { - objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime + if avwshswi.ServerName != nil { + objectMap["serverName"] = avwshswi.ServerName } - if avacpc.ExtendedInfo != nil { - objectMap["extendedInfo"] = avacpc.ExtendedInfo + if avwshswi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable } - if avacpc.WorkloadType != "" { - objectMap["workloadType"] = avacpc.WorkloadType + if avwshswi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount } - if avacpc.OperationType != "" { - objectMap["operationType"] = avacpc.OperationType + if avwshswi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount } - if avacpc.FriendlyName != nil { - objectMap["friendlyName"] = avacpc.FriendlyName + if avwshswi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshswi.BackupManagementType } - if avacpc.BackupManagementType != "" { - objectMap["backupManagementType"] = avacpc.BackupManagementType + if avwshswi.WorkloadType != nil { + objectMap["workloadType"] = avwshswi.WorkloadType } - if avacpc.RegistrationStatus != nil { - objectMap["registrationStatus"] = avacpc.RegistrationStatus + if avwshswi.FriendlyName != nil { + objectMap["friendlyName"] = avwshswi.FriendlyName } - if avacpc.HealthStatus != nil { - objectMap["healthStatus"] = avacpc.HealthStatus + if avwshswi.ProtectionState != "" { + objectMap["protectionState"] = avwshswi.ProtectionState } - if avacpc.ContainerType != "" { - objectMap["containerType"] = avacpc.ContainerType + if avwshswi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwshswi.WorkloadItemType } return json.Marshal(objectMap) } -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwshswi, true } -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { return nil, false } -// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return &avwshswi, true } -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return &avacpc, true +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false } -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { return nil, false } -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return &avacpc, true +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false } -// AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwshswi, true } -// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { - return nil, false +// AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item +// representing SQL Availability Group. +type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -// AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { + avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer + objectMap := make(map[string]interface{}) + if avwsagpi.ParentName != nil { + objectMap["parentName"] = avwsagpi.ParentName + } + if avwsagpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName + } + if avwsagpi.ServerName != nil { + objectMap["serverName"] = avwsagpi.ServerName + } + if avwsagpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable + } + if avwsagpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected + } + if avwsagpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount + } + if avwsagpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount + } + if avwsagpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation + } + if avwsagpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsagpi.BackupManagementType + } + if avwsagpi.WorkloadType != nil { + objectMap["workloadType"] = avwsagpi.WorkloadType + } + if avwsagpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsagpi.FriendlyName + } + if avwsagpi.ProtectionState != "" { + objectMap["protectionState"] = avwsagpi.ProtectionState + } + if avwsagpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsagpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { return nil, false } -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsagpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. -func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &avacpc, true +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false } -// AzureVMResourceFeatureSupportRequest azureResource(IaaS VM) Specific feature support request -type AzureVMResourceFeatureSupportRequest struct { - // VMSize - Size of the resource: VM size(A/D series etc) in case of IaasVM - VMSize *string `json:"vmSize,omitempty"` - // VMSku - SKUs (Premium/Managed etc) in case of IaasVM - VMSku *string `json:"vmSku,omitempty"` - // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' - FeatureType FeatureType `json:"featureType,omitempty"` +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for AzureVMResourceFeatureSupportRequest. -func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { - avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup - objectMap := make(map[string]interface{}) - if avrfsr.VMSize != nil { - objectMap["vmSize"] = avrfsr.VMSize - } - if avrfsr.VMSku != nil { - objectMap["vmSku"] = avrfsr.VMSku - } - if avrfsr.FeatureType != "" { - objectMap["featureType"] = avrfsr.FeatureType - } - return json.Marshal(objectMap) +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return &avwsagpi, true } -// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. -func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { return nil, false } -// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. -func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { - return &avrfsr, true +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false } -// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. -func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { return nil, false } -// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. -func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { - return &avrfsr, true +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false } -// AzureVMResourceFeatureSupportResponse response for feature support requests for Azure IaasVm -type AzureVMResourceFeatureSupportResponse struct { - autorest.Response `json:"-"` - // SupportStatus - Support status of feature. Possible values include: 'SupportStatusInvalid', 'SupportStatusSupported', 'SupportStatusDefaultOFF', 'SupportStatusDefaultON', 'SupportStatusNotSupported' - SupportStatus SupportStatus `json:"supportStatus,omitempty"` +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false } -// BasicAzureVMWorkloadItem azure VM workload-specific workload item. -type BasicAzureVMWorkloadItem interface { - AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) - AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) - AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) - AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) - AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) - AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) - AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsagpi, true } -// AzureVMWorkloadItem azure VM workload-specific workload item. -type AzureVMWorkloadItem struct { +// AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseProtectableItem struct { // ParentName - Name for instance or AG ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` // ServerName - Host/Cluster Name for instance or AG ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if workload item is auto-protectable + // IsAutoProtectable - Indicates if protectable item is auto-protectable IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` // Subinquireditemcount - For instance or AG, indicates number of DB's present Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` // BackupManagementType - Type of backup management to backup an item. BackupManagementType *string `json:"backupManagementType,omitempty"` // WorkloadType - Type of workload for the backup management @@ -5732,184 +4629,144 @@ type AzureVMWorkloadItem struct { FriendlyName *string `json:"friendlyName,omitempty"` // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' - WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase + objectMap := make(map[string]interface{}) + if avwsdpi.ParentName != nil { + objectMap["parentName"] = avwsdpi.ParentName } - - switch m["workloadItemType"] { - case string(WorkloadItemTypeSAPAseDatabase1): - var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem - err := json.Unmarshal(body, &avwsadwi) - return avwsadwi, err - case string(WorkloadItemTypeSAPAseSystem1): - var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem - err := json.Unmarshal(body, &avwsaswi) - return avwsaswi, err - case string(WorkloadItemTypeSAPHanaDatabase1): - var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem - err := json.Unmarshal(body, &avwshdwi) - return avwshdwi, err - case string(WorkloadItemTypeSAPHanaSystem1): - var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem - err := json.Unmarshal(body, &avwshswi) - return avwshswi, err - case string(WorkloadItemTypeSQLDataBase1): - var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem - err := json.Unmarshal(body, &avwsdwi) - return avwsdwi, err - case string(WorkloadItemTypeSQLInstance1): - var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem - err := json.Unmarshal(body, &avwsiwi) - return avwsiwi, err - default: - var avwi AzureVMWorkloadItem - err := json.Unmarshal(body, &avwi) - return avwi, err - } -} -func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err + if avwsdpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName } - - avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages)) - - for index, rawMessage := range rawMessages { - avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage) - if err != nil { - return nil, err - } - avwiArray[index] = avwi + if avwsdpi.ServerName != nil { + objectMap["serverName"] = avwsdpi.ServerName } - return avwiArray, nil -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { - avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem - objectMap := make(map[string]interface{}) - if avwi.ParentName != nil { - objectMap["parentName"] = avwi.ParentName + if avwsdpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable } - if avwi.ServerName != nil { - objectMap["serverName"] = avwi.ServerName + if avwsdpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected } - if avwi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwi.IsAutoProtectable + if avwsdpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount } - if avwi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwi.Subinquireditemcount + if avwsdpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount } - if avwi.SubWorkloadItemCount != nil { - objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount + if avwsdpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation } - if avwi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwi.BackupManagementType + if avwsdpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsdpi.BackupManagementType } - if avwi.WorkloadType != nil { - objectMap["workloadType"] = avwi.WorkloadType + if avwsdpi.WorkloadType != nil { + objectMap["workloadType"] = avwsdpi.WorkloadType } - if avwi.FriendlyName != nil { - objectMap["friendlyName"] = avwi.FriendlyName + if avwsdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdpi.FriendlyName } - if avwi.ProtectionState != "" { - objectMap["protectionState"] = avwi.ProtectionState + if avwsdpi.ProtectionState != "" { + objectMap["protectionState"] = avwsdpi.ProtectionState } - if avwi.WorkloadItemType != "" { - objectMap["workloadItemType"] = avwi.WorkloadItemType + if avwsdpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsdpi.ProtectableItemType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { - return &avwi, true +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false } -// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { - return &avwi, true +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false } -// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { return nil, false } -// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. -func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { - return &avwi, true +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false } -// BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item. -type BasicAzureVMWorkloadProtectableItem interface { - AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) - AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) - AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) - AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) - AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) - AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) - AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false } -// AzureVMWorkloadProtectableItem azure VM workload-specific protectable item. -type AzureVMWorkloadProtectableItem struct { +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsdpi, true +} + +// AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseWorkloadItem struct { // ParentName - Name for instance or AG ParentName *string `json:"parentName,omitempty"` - // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent - // Only Applicable for data bases where the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` // ServerName - Host/Cluster Name for instance or AG ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if protectable item is auto-protectable + // IsAutoProtectable - Indicates if workload item is auto-protectable IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // IsAutoProtected - Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` // Subinquireditemcount - For instance or AG, indicates number of DB's present Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - // Prebackupvalidation - Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` // BackupManagementType - Type of backup management to backup an item. BackupManagementType *string `json:"backupManagementType,omitempty"` // WorkloadType - Type of workload for the backup management @@ -5918,9685 +4775,1967 @@ type AzureVMWorkloadProtectableItem struct { FriendlyName *string `json:"friendlyName,omitempty"` // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` } -func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1 + objectMap := make(map[string]interface{}) + if avwsdwi.ParentName != nil { + objectMap["parentName"] = avwsdwi.ParentName } - - switch m["protectableItemType"] { - case string(ProtectableItemTypeSAPAseSystem): - var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem - err := json.Unmarshal(body, &avwsaspi) - return avwsaspi, err - case string(ProtectableItemTypeSAPHanaDatabase): - var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem - err := json.Unmarshal(body, &avwshdpi) - return avwshdpi, err - case string(ProtectableItemTypeSAPHanaSystem): - var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem - err := json.Unmarshal(body, &avwshspi) - return avwshspi, err - case string(ProtectableItemTypeSQLAvailabilityGroupContainer): - var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem - err := json.Unmarshal(body, &avwsagpi) - return avwsagpi, err - case string(ProtectableItemTypeSQLDataBase): - var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem - err := json.Unmarshal(body, &avwsdpi) - return avwsdpi, err - case string(ProtectableItemTypeSQLInstance): - var avwsipi AzureVMWorkloadSQLInstanceProtectableItem - err := json.Unmarshal(body, &avwsipi) - return avwsipi, err - default: - var avwpi AzureVMWorkloadProtectableItem - err := json.Unmarshal(body, &avwpi) - return avwpi, err + if avwsdwi.ServerName != nil { + objectMap["serverName"] = avwsdwi.ServerName } -} -func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err + if avwsdwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable } - - avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages)) - - for index, rawMessage := range rawMessages { - avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage) - if err != nil { - return nil, err - } - avwpiArray[index] = avwpi + if avwsdwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount } - return avwpiArray, nil -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { - avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem - objectMap := make(map[string]interface{}) - if avwpi.ParentName != nil { - objectMap["parentName"] = avwpi.ParentName + if avwsdwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount } - if avwpi.ParentUniqueName != nil { - objectMap["parentUniqueName"] = avwpi.ParentUniqueName + if avwsdwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsdwi.BackupManagementType } - if avwpi.ServerName != nil { - objectMap["serverName"] = avwpi.ServerName + if avwsdwi.WorkloadType != nil { + objectMap["workloadType"] = avwsdwi.WorkloadType } - if avwpi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable - } - if avwpi.IsAutoProtected != nil { - objectMap["isAutoProtected"] = avwpi.IsAutoProtected - } - if avwpi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount - } - if avwpi.Subprotectableitemcount != nil { - objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount - } - if avwpi.Prebackupvalidation != nil { - objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation - } - if avwpi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwpi.BackupManagementType - } - if avwpi.WorkloadType != nil { - objectMap["workloadType"] = avwpi.WorkloadType - } - if avwpi.FriendlyName != nil { - objectMap["friendlyName"] = avwpi.FriendlyName + if avwsdwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdwi.FriendlyName } - if avwpi.ProtectionState != "" { - objectMap["protectionState"] = avwpi.ProtectionState + if avwsdwi.ProtectionState != "" { + objectMap["protectionState"] = avwsdwi.ProtectionState } - if avwpi.ProtectableItemType != "" { - objectMap["protectableItemType"] = avwpi.ProtectableItemType + if avwsdwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsdwi.WorkloadItemType } return json.Marshal(objectMap) } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { - return &avwpi, true -} - -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return &avwpi, true -} - -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { - return nil, false +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsdwi, true } -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { return nil, false } -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { - return nil, false +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return &avwsdwi, true } -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { return nil, false } -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { return nil, false } -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. -func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &avwpi, true -} - -// BasicAzureVMWorkloadProtectedItem azure VM workload-specific protected item. -type BasicAzureVMWorkloadProtectedItem interface { - AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) - AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) - AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) - AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsdwi, true } -// AzureVMWorkloadProtectedItem azure VM workload-specific protected item. -type AzureVMWorkloadProtectedItem struct { - // FriendlyName - Friendly name of the DB represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` +// AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL +// Instance. +type AzureVMWorkloadSQLInstanceProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` // ServerName - Host/Cluster Name for instance or AG ServerName *string `json:"serverName,omitempty"` - // ParentName - Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' - LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // LastBackupErrorDetail - Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - // ProtectedItemDataSourceID - Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' - ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["protectedItemType"] { - case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): - var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem - err := json.Unmarshal(body, &avwsadpi) - return avwsadpi, err - case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): - var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem - err := json.Unmarshal(body, &avwshdpi) - return avwshdpi, err - case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): - var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem - err := json.Unmarshal(body, &avwsdpi) - return avwsdpi, err - default: - var avwpi AzureVMWorkloadProtectedItem - err := json.Unmarshal(body, &avwpi) - return avwpi, err - } -} -func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages)) - - for index, rawMessage := range rawMessages { - avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage) - if err != nil { - return nil, err - } - avwpiArray[index] = avwpi - } - return avwpiArray, nil + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { - avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { + avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance objectMap := make(map[string]interface{}) - if avwpi.FriendlyName != nil { - objectMap["friendlyName"] = avwpi.FriendlyName - } - if avwpi.ServerName != nil { - objectMap["serverName"] = avwpi.ServerName - } - if avwpi.ParentName != nil { - objectMap["parentName"] = avwpi.ParentName - } - if avwpi.ParentType != nil { - objectMap["parentType"] = avwpi.ParentType - } - if avwpi.ProtectionStatus != nil { - objectMap["protectionStatus"] = avwpi.ProtectionStatus - } - if avwpi.ProtectionState != "" { - objectMap["protectionState"] = avwpi.ProtectionState - } - if avwpi.LastBackupStatus != "" { - objectMap["lastBackupStatus"] = avwpi.LastBackupStatus - } - if avwpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = avwpi.LastBackupTime - } - if avwpi.LastBackupErrorDetail != nil { - objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail - } - if avwpi.ProtectedItemDataSourceID != nil { - objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID - } - if avwpi.ProtectedItemHealthStatus != "" { - objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus - } - if avwpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = avwpi.ExtendedInfo - } - if avwpi.BackupManagementType != "" { - objectMap["backupManagementType"] = avwpi.BackupManagementType - } - if avwpi.WorkloadType != "" { - objectMap["workloadType"] = avwpi.WorkloadType + if avwsipi.ParentName != nil { + objectMap["parentName"] = avwsipi.ParentName } - if avwpi.ContainerName != nil { - objectMap["containerName"] = avwpi.ContainerName + if avwsipi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsipi.ParentUniqueName } - if avwpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = avwpi.SourceResourceID + if avwsipi.ServerName != nil { + objectMap["serverName"] = avwsipi.ServerName } - if avwpi.PolicyID != nil { - objectMap["policyId"] = avwpi.PolicyID + if avwsipi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable } - if avwpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint + if avwsipi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsipi.IsAutoProtected } - if avwpi.BackupSetName != nil { - objectMap["backupSetName"] = avwpi.BackupSetName + if avwsipi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount } - if avwpi.CreateMode != "" { - objectMap["createMode"] = avwpi.CreateMode + if avwsipi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount } - if avwpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC + if avwsipi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation } - if avwpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete + if avwsipi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsipi.BackupManagementType } - if avwpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining + if avwsipi.WorkloadType != nil { + objectMap["workloadType"] = avwsipi.WorkloadType } - if avwpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming + if avwsipi.FriendlyName != nil { + objectMap["friendlyName"] = avwsipi.FriendlyName } - if avwpi.IsRehydrate != nil { - objectMap["isRehydrate"] = avwpi.IsRehydrate + if avwsipi.ProtectionState != "" { + objectMap["protectionState"] = avwsipi.ProtectionState } - if avwpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = avwpi.ProtectedItemType + if avwsipi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsipi.ProtectableItemType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return nil, false +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsipi, true } -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { - return &avwpi, true -} - -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return &avwpi, true +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { return nil, false } -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return &avwsipi, true } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { return nil, false } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { return nil, false } -// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { return nil, false } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. -func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &avwpi, true +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsipi, true } -// AzureVMWorkloadProtectedItemExtendedInfo additional information on Azure Workload for SQL specific -// backup item. -type AzureVMWorkloadProtectedItemExtendedInfo struct { - // OldestRecoveryPoint - The oldest backup copy available for this backup item. - OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` - // RecoveryPointCount - Number of backup copies available for this backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` - // PolicyState - Indicates consistency of policy object and policy applied to this backup item. - PolicyState *string `json:"policyState,omitempty"` -} - -// AzureVMWorkloadProtectionPolicy azure VM (Mercury) workload-specific backup policy. -type AzureVMWorkloadProtectionPolicy struct { - // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkLoadType WorkloadType `json:"workLoadType,omitempty"` - // Settings - Common settings for the backup management - Settings *Settings `json:"settings,omitempty"` - // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention - SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` - // MakePolicyConsistent - Fix the policy inconsistency - MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"` - // ProtectedItemsCount - Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' - BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +// AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL +// Instance. +type AzureVMWorkloadSQLInstanceWorkloadItem struct { + // DataDirectoryPaths - Data Directory Paths for default directories + DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { - avwpp.BackupManagementType = BackupManagementTypeAzureWorkload +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { + avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1 objectMap := make(map[string]interface{}) - if avwpp.WorkLoadType != "" { - objectMap["workLoadType"] = avwpp.WorkLoadType + if avwsiwi.DataDirectoryPaths != nil { + objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths + } + if avwsiwi.ParentName != nil { + objectMap["parentName"] = avwsiwi.ParentName + } + if avwsiwi.ServerName != nil { + objectMap["serverName"] = avwsiwi.ServerName + } + if avwsiwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable } - if avwpp.Settings != nil { - objectMap["settings"] = avwpp.Settings + if avwsiwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount + } + if avwsiwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount + } + if avwsiwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsiwi.BackupManagementType } - if avwpp.SubProtectionPolicy != nil { - objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy + if avwsiwi.WorkloadType != nil { + objectMap["workloadType"] = avwsiwi.WorkloadType } - if avwpp.MakePolicyConsistent != nil { - objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent + if avwsiwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsiwi.FriendlyName } - if avwpp.ProtectedItemsCount != nil { - objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount + if avwsiwi.ProtectionState != "" { + objectMap["protectionState"] = avwsiwi.ProtectionState } - if avwpp.BackupManagementType != "" { - objectMap["backupManagementType"] = avwpp.BackupManagementType + if avwsiwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsiwi.WorkloadItemType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { - return &avwpp, true +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsiwi, true } -// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { return nil, false } -// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { return nil, false } -// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { return nil, false } -// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { return nil, false } -// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { return nil, false } -// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return &avwsiwi, true +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { return nil, false } -// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. -func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { - return &avwpp, true +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsiwi, true } -// AzureVMWorkloadSAPAseDatabaseProtectedItem azure VM workload-specific protected item representing SAP -// ASE Database. -type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { - // FriendlyName - Friendly name of the DB represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // ParentName - Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' - LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // LastBackupErrorDetail - Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - // ProtectedItemDataSourceID - Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' - ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` +// BasicAzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. +type BasicAzureWorkloadAutoProtectionIntent interface { + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) +} + +// AzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. +type AzureWorkloadAutoProtectionIntent struct { // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` // SourceResourceID - ARM ID of the resource to be backed up. SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` // PolicyID - ID of the backup policy with which this item is backed up. PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) { - avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase - objectMap := make(map[string]interface{}) - if avwsadpi.FriendlyName != nil { - objectMap["friendlyName"] = avwsadpi.FriendlyName - } - if avwsadpi.ServerName != nil { - objectMap["serverName"] = avwsadpi.ServerName - } - if avwsadpi.ParentName != nil { - objectMap["parentName"] = avwsadpi.ParentName - } - if avwsadpi.ParentType != nil { - objectMap["parentType"] = avwsadpi.ParentType - } - if avwsadpi.ProtectionStatus != nil { - objectMap["protectionStatus"] = avwsadpi.ProtectionStatus - } - if avwsadpi.ProtectionState != "" { - objectMap["protectionState"] = avwsadpi.ProtectionState - } - if avwsadpi.LastBackupStatus != "" { - objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus - } - if avwsadpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = avwsadpi.LastBackupTime - } - if avwsadpi.LastBackupErrorDetail != nil { - objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail - } - if avwsadpi.ProtectedItemDataSourceID != nil { - objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID - } - if avwsadpi.ProtectedItemHealthStatus != "" { - objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus - } - if avwsadpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = avwsadpi.ExtendedInfo - } - if avwsadpi.BackupManagementType != "" { - objectMap["backupManagementType"] = avwsadpi.BackupManagementType - } - if avwsadpi.WorkloadType != "" { - objectMap["workloadType"] = avwsadpi.WorkloadType - } - if avwsadpi.ContainerName != nil { - objectMap["containerName"] = avwsadpi.ContainerName - } - if avwsadpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = avwsadpi.SourceResourceID - } - if avwsadpi.PolicyID != nil { - objectMap["policyId"] = avwsadpi.PolicyID + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err } - if avwsadpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err } - if avwsadpi.BackupSetName != nil { - objectMap["backupSetName"] = avwsadpi.BackupSetName +} +func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err } - if avwsadpi.CreateMode != "" { - objectMap["createMode"] = avwsadpi.CreateMode + + awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + awapiArray[index] = awapi } - if avwsadpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC + return awapiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { + awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent + objectMap := make(map[string]interface{}) + if awapi.BackupManagementType != "" { + objectMap["backupManagementType"] = awapi.BackupManagementType } - if avwsadpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete + if awapi.SourceResourceID != nil { + objectMap["sourceResourceId"] = awapi.SourceResourceID } - if avwsadpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining + if awapi.ItemID != nil { + objectMap["itemId"] = awapi.ItemID } - if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming + if awapi.PolicyID != nil { + objectMap["policyId"] = awapi.PolicyID } - if avwsadpi.IsRehydrate != nil { - objectMap["isRehydrate"] = avwsadpi.IsRehydrate + if awapi.ProtectionState != "" { + objectMap["protectionState"] = awapi.ProtectionState } - if avwsadpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = avwsadpi.ProtectedItemType + if awapi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &awapi, true } -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { return nil, false } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { - return nil, false +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return &awapi, true } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return nil, false +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return &awapi, true } -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { return nil, false } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return &avwsadpi, true +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &awapi, true } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { - return &avwsadpi, true +// AzureWorkloadBackupRequest azureWorkload workload-specific backup request. +type AzureWorkloadBackupRequest struct { + // BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeEnumInvalid', 'TypeEnumFull', 'TypeEnumDifferential', 'TypeEnumLog', 'TypeEnumCopyOnlyFull' + BackupType TypeEnum `json:"backupType,omitempty"` + // EnableCompression - Bool for Compression setting + EnableCompression *bool `json:"enableCompression,omitempty"` + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectType `json:"objectType,omitempty"` } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return nil, false +// MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { + awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest + objectMap := make(map[string]interface{}) + if awbr.BackupType != "" { + objectMap["backupType"] = awbr.BackupType + } + if awbr.EnableCompression != nil { + objectMap["enableCompression"] = awbr.EnableCompression + } + if awbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC + } + if awbr.ObjectType != "" { + objectMap["objectType"] = awbr.ObjectType + } + return json.Marshal(objectMap) } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { +// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { return nil, false } -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return &awbr, true } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { +// AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { return nil, false } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { +// AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) { return nil, false } -// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return nil, false +// AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &awbr, true } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. -func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &avwsadpi, true +// BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. +type BasicAzureWorkloadContainer interface { + AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) + AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) + AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) } -// AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE -// Database. -type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. +// AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. +type AzureWorkloadContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' - WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { - avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1 +func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeSQLAGWorkLoadContainer1): + var aswcpc AzureSQLAGWorkloadContainerProtectionContainer + err := json.Unmarshal(body, &aswcpc) + return aswcpc, err + case string(ContainerTypeVMAppContainer1): + var avacpc AzureVMAppContainerProtectionContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + default: + var awc AzureWorkloadContainer + err := json.Unmarshal(body, &awc) + return awc, err + } +} +func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage) + if err != nil { + return nil, err + } + awcArray[index] = awc + } + return awcArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) { + awc.ContainerType = ContainerTypeAzureWorkloadContainer objectMap := make(map[string]interface{}) - if avwsadwi.ParentName != nil { - objectMap["parentName"] = avwsadwi.ParentName + if awc.SourceResourceID != nil { + objectMap["sourceResourceId"] = awc.SourceResourceID } - if avwsadwi.ServerName != nil { - objectMap["serverName"] = avwsadwi.ServerName + if awc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = awc.LastUpdatedTime } - if avwsadwi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable + if awc.ExtendedInfo != nil { + objectMap["extendedInfo"] = awc.ExtendedInfo } - if avwsadwi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount + if awc.WorkloadType != "" { + objectMap["workloadType"] = awc.WorkloadType } - if avwsadwi.SubWorkloadItemCount != nil { - objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount + if awc.OperationType != "" { + objectMap["operationType"] = awc.OperationType } - if avwsadwi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsadwi.BackupManagementType + if awc.FriendlyName != nil { + objectMap["friendlyName"] = awc.FriendlyName } - if avwsadwi.WorkloadType != nil { - objectMap["workloadType"] = avwsadwi.WorkloadType + if awc.BackupManagementType != "" { + objectMap["backupManagementType"] = awc.BackupManagementType } - if avwsadwi.FriendlyName != nil { - objectMap["friendlyName"] = avwsadwi.FriendlyName + if awc.RegistrationStatus != nil { + objectMap["registrationStatus"] = awc.RegistrationStatus } - if avwsadwi.ProtectionState != "" { - objectMap["protectionState"] = avwsadwi.ProtectionState + if awc.HealthStatus != nil { + objectMap["healthStatus"] = awc.HealthStatus } - if avwsadwi.WorkloadItemType != "" { - objectMap["workloadItemType"] = avwsadwi.WorkloadItemType + if awc.ContainerType != "" { + objectMap["containerType"] = awc.ContainerType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { return nil, false } -// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { - return &avwsadwi, true -} - -// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { - return &avwsadwi, true -} - -// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. -func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { - return &avwsadwi, true +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return &awc, true } -// AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP -// ASE System. -type AzureVMWorkloadSAPAseSystemProtectableItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent - // Only Applicable for data bases where the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // IsAutoProtected - Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - // Prebackupvalidation - Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &awc, true } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { - avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem - objectMap := make(map[string]interface{}) - if avwsaspi.ParentName != nil { - objectMap["parentName"] = avwsaspi.ParentName - } - if avwsaspi.ParentUniqueName != nil { - objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName - } - if avwsaspi.ServerName != nil { - objectMap["serverName"] = avwsaspi.ServerName - } - if avwsaspi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable - } - if avwsaspi.IsAutoProtected != nil { - objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected - } - if avwsaspi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount - } - if avwsaspi.Subprotectableitemcount != nil { - objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount - } - if avwsaspi.Prebackupvalidation != nil { - objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation - } - if avwsaspi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsaspi.BackupManagementType - } - if avwsaspi.WorkloadType != nil { - objectMap["workloadType"] = avwsaspi.WorkloadType - } - if avwsaspi.FriendlyName != nil { - objectMap["friendlyName"] = avwsaspi.FriendlyName - } - if avwsaspi.ProtectionState != "" { - objectMap["protectionState"] = avwsaspi.ProtectionState - } - if avwsaspi.ProtectableItemType != "" { - objectMap["protectableItemType"] = avwsaspi.ProtectableItemType - } - return json.Marshal(objectMap) +// AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { +// AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return &avwsaspi, true -} - -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { - return &avwsaspi, true -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) { return nil, false } -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return nil, false +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &awc, true } -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { - return nil, false +// AzureWorkloadContainerExtendedInfo extended information of the container. +type AzureWorkloadContainerExtendedInfo struct { + // HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + HostServerName *string `json:"hostServerName,omitempty"` + // InquiryInfo - Inquiry Status for the container. + InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"` + // NodesList - List of the nodes in case of distributed container. + NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"` } -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. -func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &avwsaspi, true +// AzureWorkloadErrorInfo azure storage specific error information +type AzureWorkloadErrorInfo struct { + // ErrorCode - Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // ErrorTitle - Title: Typically, the entity that the error pertains to. + ErrorTitle *string `json:"errorTitle,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` + // AdditionalDetails - Additional details for above error code. + AdditionalDetails *string `json:"additionalDetails,omitempty"` } -// AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE -// System. -type AzureVMWorkloadSAPAseSystemWorkloadItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management +// AzureWorkloadJob azure storage specific job. +type AzureWorkloadJob struct { + // WorkloadType - Workload type of the job WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' - WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information about the job. + ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { - avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1 +// MarshalJSON is the custom marshaler for AzureWorkloadJob. +func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) { + awj.JobType = JobTypeAzureWorkloadJob objectMap := make(map[string]interface{}) - if avwsaswi.ParentName != nil { - objectMap["parentName"] = avwsaswi.ParentName + if awj.WorkloadType != nil { + objectMap["workloadType"] = awj.WorkloadType } - if avwsaswi.ServerName != nil { - objectMap["serverName"] = avwsaswi.ServerName + if awj.Duration != nil { + objectMap["duration"] = awj.Duration } - if avwsaswi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable + if awj.ActionsInfo != nil { + objectMap["actionsInfo"] = awj.ActionsInfo } - if avwsaswi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount + if awj.ErrorDetails != nil { + objectMap["errorDetails"] = awj.ErrorDetails } - if avwsaswi.SubWorkloadItemCount != nil { - objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount + if awj.ExtendedInfo != nil { + objectMap["extendedInfo"] = awj.ExtendedInfo } - if avwsaswi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsaswi.BackupManagementType + if awj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = awj.EntityFriendlyName } - if avwsaswi.WorkloadType != nil { - objectMap["workloadType"] = avwsaswi.WorkloadType + if awj.BackupManagementType != "" { + objectMap["backupManagementType"] = awj.BackupManagementType } - if avwsaswi.FriendlyName != nil { - objectMap["friendlyName"] = avwsaswi.FriendlyName + if awj.Operation != nil { + objectMap["operation"] = awj.Operation } - if avwsaswi.ProtectionState != "" { - objectMap["protectionState"] = avwsaswi.ProtectionState + if awj.Status != nil { + objectMap["status"] = awj.Status } - if avwsaswi.WorkloadItemType != "" { - objectMap["workloadItemType"] = avwsaswi.WorkloadItemType + if awj.StartTime != nil { + objectMap["startTime"] = awj.StartTime + } + if awj.EndTime != nil { + objectMap["endTime"] = awj.EndTime + } + if awj.ActivityID != nil { + objectMap["activityId"] = awj.ActivityID + } + if awj.JobType != "" { + objectMap["jobType"] = awj.JobType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { +// AsAzureIaaSVMJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { return nil, false } -// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { - return &avwsaswi, true -} - -// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { +// AsAzureStorageJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { - return &avwsaswi, true +// AsAzureWorkloadJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return &awj, true } -// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { +// AsDpmJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { +// AsMabJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { +// AsJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsJob() (*Job, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { - return nil, false +// AsBasicJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) { + return &awj, true } -// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { - return nil, false +// AzureWorkloadJobExtendedInfo azure VM workload-specific additional information for job. +type AzureWorkloadJobExtendedInfo struct { + // TasksList - List of tasks for this job + TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. -func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { - return &avwsaswi, true +// MarshalJSON is the custom marshaler for AzureWorkloadJobExtendedInfo. +func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if awjei.TasksList != nil { + objectMap["tasksList"] = awjei.TasksList + } + if awjei.PropertyBag != nil { + objectMap["propertyBag"] = awjei.PropertyBag + } + if awjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage + } + return json.Marshal(objectMap) } -// AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing -// SAP HANA Database. -type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent - // Only Applicable for data bases where the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // IsAutoProtected - Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - // Prebackupvalidation - Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' +// AzureWorkloadJobTaskDetails azure VM workload specific job task details. +type AzureWorkloadJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// AzureWorkloadSQLAutoProtectionIntent azure Workload SQL Auto Protection intent item. +type AzureWorkloadSQLAutoProtectionIntent struct { + // WorkloadItemType - Workload item type of the item for which intent is to be set. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' + WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { - avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase +// MarshalJSON is the custom marshaler for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { + awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent objectMap := make(map[string]interface{}) - if avwshdpi.ParentName != nil { - objectMap["parentName"] = avwshdpi.ParentName - } - if avwshdpi.ParentUniqueName != nil { - objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName - } - if avwshdpi.ServerName != nil { - objectMap["serverName"] = avwshdpi.ServerName - } - if avwshdpi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable - } - if avwshdpi.IsAutoProtected != nil { - objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected - } - if avwshdpi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount - } - if avwshdpi.Subprotectableitemcount != nil { - objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount + if awsapi.WorkloadItemType != "" { + objectMap["workloadItemType"] = awsapi.WorkloadItemType } - if avwshdpi.Prebackupvalidation != nil { - objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation + if awsapi.BackupManagementType != "" { + objectMap["backupManagementType"] = awsapi.BackupManagementType } - if avwshdpi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwshdpi.BackupManagementType + if awsapi.SourceResourceID != nil { + objectMap["sourceResourceId"] = awsapi.SourceResourceID } - if avwshdpi.WorkloadType != nil { - objectMap["workloadType"] = avwshdpi.WorkloadType + if awsapi.ItemID != nil { + objectMap["itemId"] = awsapi.ItemID } - if avwshdpi.FriendlyName != nil { - objectMap["friendlyName"] = avwshdpi.FriendlyName + if awsapi.PolicyID != nil { + objectMap["policyId"] = awsapi.PolicyID } - if avwshdpi.ProtectionState != "" { - objectMap["protectionState"] = avwshdpi.ProtectionState + if awsapi.ProtectionState != "" { + objectMap["protectionState"] = awsapi.ProtectionState } - if avwshdpi.ProtectableItemType != "" { - objectMap["protectableItemType"] = avwshdpi.ProtectableItemType + if awsapi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType } return json.Marshal(objectMap) } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return nil, false +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &awsapi, true } -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return &avwshdpi, true -} - -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { - return &avwshdpi, true +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return &awsapi, true } -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { - return nil, false +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return &awsapi, true } -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { - return nil, false +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &awsapi, true } -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { - return nil, false +// BMSBackupEngineQueryObject query parameters to fetch list of backup engines. +type BMSBackupEngineQueryObject struct { + // Expand - attribute to add extended info + Expand *string `json:"expand,omitempty"` } -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { - return nil, false +// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines. +type BMSBackupEnginesQueryObject struct { + // BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // Expand - Attribute to add extended info. + Expand *string `json:"expand,omitempty"` } -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return nil, false +// BMSBackupSummariesQueryObject query parameters to fetch backup summaries. +type BMSBackupSummariesQueryObject struct { + // Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary' + Type Type `json:"type,omitempty"` } -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { - return nil, false +// BMSContainerQueryObject the query filters that can be used with the list containers API. +type BMSContainerQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer' + ContainerType ContainerType `json:"containerType,omitempty"` + // BackupEngineName - Backup engine name + BackupEngineName *string `json:"backupEngineName,omitempty"` + // FabricName - Fabric name for filter + FabricName *string `json:"fabricName,omitempty"` + // Status - Status of registration of this container with the Recovery Services Vault. + Status *string `json:"status,omitempty"` + // FriendlyName - Friendly name of this container. + FriendlyName *string `json:"friendlyName,omitempty"` } -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &avwshdpi, true +// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API. +type BMSContainersInquiryQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` } -// AzureVMWorkloadSAPHanaDatabaseProtectedItem azure VM workload-specific protected item representing SAP -// HANA Database. -type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { - // FriendlyName - Friendly name of the DB represented by this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // ParentName - Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' - LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // LastBackupErrorDetail - Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - // ProtectedItemDataSourceID - Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' - ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' +// BMSPOQueryObject filters to list items that can be backed up. +type BMSPOQueryObject struct { + // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container + // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ContainerName - Full name of the container whose Protectable Objects should be returned. ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) { - avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase - objectMap := make(map[string]interface{}) - if avwshdpi.FriendlyName != nil { - objectMap["friendlyName"] = avwshdpi.FriendlyName - } - if avwshdpi.ServerName != nil { - objectMap["serverName"] = avwshdpi.ServerName - } - if avwshdpi.ParentName != nil { - objectMap["parentName"] = avwshdpi.ParentName - } - if avwshdpi.ParentType != nil { - objectMap["parentType"] = avwshdpi.ParentType - } - if avwshdpi.ProtectionStatus != nil { - objectMap["protectionStatus"] = avwshdpi.ProtectionStatus - } - if avwshdpi.ProtectionState != "" { - objectMap["protectionState"] = avwshdpi.ProtectionState - } - if avwshdpi.LastBackupStatus != "" { - objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus - } - if avwshdpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = avwshdpi.LastBackupTime - } - if avwshdpi.LastBackupErrorDetail != nil { - objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail - } - if avwshdpi.ProtectedItemDataSourceID != nil { - objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID - } - if avwshdpi.ProtectedItemHealthStatus != "" { - objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus - } - if avwshdpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = avwshdpi.ExtendedInfo - } - if avwshdpi.BackupManagementType != "" { - objectMap["backupManagementType"] = avwshdpi.BackupManagementType - } - if avwshdpi.WorkloadType != "" { - objectMap["workloadType"] = avwshdpi.WorkloadType - } - if avwshdpi.ContainerName != nil { - objectMap["containerName"] = avwshdpi.ContainerName - } - if avwshdpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = avwshdpi.SourceResourceID - } - if avwshdpi.PolicyID != nil { - objectMap["policyId"] = avwshdpi.PolicyID - } - if avwshdpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint - } - if avwshdpi.BackupSetName != nil { - objectMap["backupSetName"] = avwshdpi.BackupSetName - } - if avwshdpi.CreateMode != "" { - objectMap["createMode"] = avwshdpi.CreateMode - } - if avwshdpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC - } - if avwshdpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete - } - if avwshdpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining - } - if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming - } - if avwshdpi.IsRehydrate != nil { - objectMap["isRehydrate"] = avwshdpi.IsRehydrate - } - if avwshdpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = avwshdpi.ProtectedItemType - } - return json.Marshal(objectMap) + // Status - Backup status query parameter. + Status *string `json:"status,omitempty"` + // FriendlyName - Friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return nil, false -} +// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API. +type BMSRefreshContainersQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` +} -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false +// BMSWorkloadItemQueryObject filters to list items that can be backed up. +type BMSWorkloadItemQueryObject struct { + // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' + WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` + // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` } -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false +// ClientDiscoveryDisplay localized display information of an operation. +type ClientDiscoveryDisplay struct { + // Provider - Name of the provider for display purposes + Provider *string `json:"provider,omitempty"` + // Resource - ResourceType for which this Operation can be performed. + Resource *string `json:"resource,omitempty"` + // Operation - Operations Name itself. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation having details of what operation is about. + Description *string `json:"description,omitempty"` } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { - return nil, false +// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client +// discovery. +type ClientDiscoveryForLogSpecification struct { + // Name - Name for shoebox log specification. + Name *string `json:"name,omitempty"` + // DisplayName - Localized display name + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - blob duration of shoebox log specification + BlobDuration *string `json:"blobDuration,omitempty"` } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return nil, false +// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. +type ClientDiscoveryForProperties struct { + // ServiceSpecification - Operation properties. + ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` } -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { - return nil, false +// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client +// discovery. +type ClientDiscoveryForServiceSpecification struct { + // LogSpecifications - List of log specifications of this operation. + LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { - return nil, false +// ClientDiscoveryResponse operations List response which contains list of available APIs. +type ClientDiscoveryResponse struct { + autorest.Response `json:"-"` + // Value - List of available operations. + Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` + // NextLink - Link to the next chunk of Response. + NextLink *string `json:"nextLink,omitempty"` } -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return &avwshdpi, true +// ClientDiscoveryResponseIterator provides access to a complete listing of +// ClientDiscoveryValueForSingleAPI values. +type ClientDiscoveryResponseIterator struct { + i int + page ClientDiscoveryResponsePage } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { - return nil, false +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return &avwshdpi, true +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ClientDiscoveryResponseIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return nil, false +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ClientDiscoveryResponseIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false +// Response returns the raw server response from the last page request. +func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { + return iter.page.Response() } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { - return nil, false +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { + if !iter.page.NotDone() { + return ClientDiscoveryValueForSingleAPI{} + } + return iter.page.Values()[iter.i] } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { - return nil, false +// Creates a new instance of the ClientDiscoveryResponseIterator type. +func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { + return ClientDiscoveryResponseIterator{page: page} } -// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return nil, false +// IsEmpty returns true if the ListResult contains no values. +func (cdr ClientDiscoveryResponse) IsEmpty() bool { + return cdr.Value == nil || len(*cdr.Value) == 0 } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. -func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &avwshdpi, true +// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) { + if cdr.NextLink == nil || len(to.String(cdr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cdr.NextLink))) } -// AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP -// HANA Database. -type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' - WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. +type ClientDiscoveryResponsePage struct { + fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error) + cdr ClientDiscoveryResponse } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { - avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1 - objectMap := make(map[string]interface{}) - if avwshdwi.ParentName != nil { - objectMap["parentName"] = avwshdwi.ParentName - } - if avwshdwi.ServerName != nil { - objectMap["serverName"] = avwshdwi.ServerName - } - if avwshdwi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable - } - if avwshdwi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount - } - if avwshdwi.SubWorkloadItemCount != nil { - objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount - } - if avwshdwi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwshdwi.BackupManagementType - } - if avwshdwi.WorkloadType != nil { - objectMap["workloadType"] = avwshdwi.WorkloadType - } - if avwshdwi.FriendlyName != nil { - objectMap["friendlyName"] = avwshdwi.FriendlyName - } - if avwshdwi.ProtectionState != "" { - objectMap["protectionState"] = avwshdwi.ProtectionState +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if avwshdwi.WorkloadItemType != "" { - objectMap["workloadItemType"] = avwshdwi.WorkloadItemType + next, err := page.fn(ctx, page.cdr) + if err != nil { + return err } - return json.Marshal(objectMap) + page.cdr = next + return nil } -// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { - return nil, false +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ClientDiscoveryResponsePage) Next() error { + return page.NextWithContext(context.Background()) } -// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { - return &avwshdwi, true +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ClientDiscoveryResponsePage) NotDone() bool { + return !page.cdr.IsEmpty() } -// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { - return nil, false +// Response returns the raw server response from the last page request. +func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { + return page.cdr } -// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { - return nil, false +// Values returns the slice of values for the current page or nil if there are no values. +func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { + if page.cdr.IsEmpty() { + return nil + } + return *page.cdr.Value } -// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { - return &avwshdwi, true +// Creates a new instance of the ClientDiscoveryResponsePage type. +func NewClientDiscoveryResponsePage(getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { + return ClientDiscoveryResponsePage{fn: getNextPage} } -// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { - return nil, false +// ClientDiscoveryValueForSingleAPI available operation details. +type ClientDiscoveryValueForSingleAPI struct { + // Name - Name of the Operation. + Name *string `json:"name,omitempty"` + // Display - Contains the localized display information for this particular operation + Display *ClientDiscoveryDisplay `json:"display,omitempty"` + // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + Origin *string `json:"origin,omitempty"` + // Properties - ShoeBox properties for the given operation. + Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` } -// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { - return nil, false +// ClientScriptForConnect client script details for file / folder restore. +type ClientScriptForConnect struct { + // ScriptContent - File content of the client script for file / folder restore. + ScriptContent *string `json:"scriptContent,omitempty"` + // ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc. + ScriptExtension *string `json:"scriptExtension,omitempty"` + // OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works. + OsType *string `json:"osType,omitempty"` + // URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used + URL *string `json:"url,omitempty"` + // ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user. + // If its null or empty then , ignore it. + ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` } -// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { - return nil, false +// ContainerIdentityInfo container identity information +type ContainerIdentityInfo struct { + // UniqueName - Unique name of the container + UniqueName *string `json:"uniqueName,omitempty"` + // AadTenantID - Protection container identity - AAD Tenant + AadTenantID *string `json:"aadTenantId,omitempty"` + // ServicePrincipalClientID - Protection container identity - AAD Service Principal + ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` + // Audience - Protection container identity - Audience + Audience *string `json:"audience,omitempty"` } -// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. -func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { - return &avwshdwi, true +// DistributedNodesInfo this is used to represent the various nodes of the distributed container. +type DistributedNodesInfo struct { + // NodeName - Name of the node under a distributed container. + NodeName *string `json:"nodeName,omitempty"` + // Status - Status of this Node. + // Failed | Succeeded + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Details if the Status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` } -// AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP -// HANA System. -type AzureVMWorkloadSAPHanaSystemProtectableItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent - // Only Applicable for data bases where the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // IsAutoProtected - Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - // Prebackupvalidation - Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. +// DpmBackupEngine data Protection Manager (DPM) specific backup engine. +type DpmBackupEngine struct { + // FriendlyName - Friendly name of the backup engine. FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { - avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem +// MarshalJSON is the custom marshaler for DpmBackupEngine. +func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { + dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine objectMap := make(map[string]interface{}) - if avwshspi.ParentName != nil { - objectMap["parentName"] = avwshspi.ParentName + if dbe.FriendlyName != nil { + objectMap["friendlyName"] = dbe.FriendlyName } - if avwshspi.ParentUniqueName != nil { - objectMap["parentUniqueName"] = avwshspi.ParentUniqueName + if dbe.BackupManagementType != "" { + objectMap["backupManagementType"] = dbe.BackupManagementType } - if avwshspi.ServerName != nil { - objectMap["serverName"] = avwshspi.ServerName + if dbe.RegistrationStatus != nil { + objectMap["registrationStatus"] = dbe.RegistrationStatus } - if avwshspi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable + if dbe.BackupEngineState != nil { + objectMap["backupEngineState"] = dbe.BackupEngineState } - if avwshspi.IsAutoProtected != nil { - objectMap["isAutoProtected"] = avwshspi.IsAutoProtected + if dbe.HealthStatus != nil { + objectMap["healthStatus"] = dbe.HealthStatus } - if avwshspi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount + if dbe.CanReRegister != nil { + objectMap["canReRegister"] = dbe.CanReRegister } - if avwshspi.Subprotectableitemcount != nil { - objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount + if dbe.BackupEngineID != nil { + objectMap["backupEngineId"] = dbe.BackupEngineID } - if avwshspi.Prebackupvalidation != nil { - objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation + if dbe.DpmVersion != nil { + objectMap["dpmVersion"] = dbe.DpmVersion } - if avwshspi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwshspi.BackupManagementType + if dbe.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion } - if avwshspi.WorkloadType != nil { - objectMap["workloadType"] = avwshspi.WorkloadType + if dbe.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable } - if avwshspi.FriendlyName != nil { - objectMap["friendlyName"] = avwshspi.FriendlyName + if dbe.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable } - if avwshspi.ProtectionState != "" { - objectMap["protectionState"] = avwshspi.ProtectionState + if dbe.ExtendedInfo != nil { + objectMap["extendedInfo"] = dbe.ExtendedInfo } - if avwshspi.ProtectableItemType != "" { - objectMap["protectableItemType"] = avwshspi.ProtectableItemType + if dbe.BackupEngineType != "" { + objectMap["backupEngineType"] = dbe.BackupEngineType } return json.Marshal(objectMap) } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { +// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return nil, false +// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return &dbe, true } -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { +// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return &avwshspi, true +// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) { + return &dbe, true } -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { - return nil, false +// BasicDpmContainer DPM workload-specific protection container. +type BasicDpmContainer interface { + AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) + AsDpmContainer() (*DpmContainer, bool) } -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { - return nil, false +// DpmContainer DPM workload-specific protection container. +type DpmContainer struct { + // CanReRegister - Specifies whether the container is re-registrable. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ID of container. + ContainerID *string `json:"containerId,omitempty"` + // ProtectedItemCount - Number of protected items in the BackupEngine + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // DpmAgentVersion - Backup engine Agent version + DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` + // DpmServers - List of BackupEngines protecting the container + DpmServers *[]string `json:"dpmServers,omitempty"` + // UpgradeAvailable - To check if upgrade available + UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` + // ProtectionStatus - Protection status of the container. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ExtendedInfo - Extended Info of the container. + ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { - return &avwshspi, true -} +func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { - return nil, false + switch m["containerType"] { + case string(ContainerTypeAzureBackupServerContainer1): + var absc AzureBackupServerContainer + err := json.Unmarshal(body, &absc) + return absc, err + default: + var dc DpmContainer + err := json.Unmarshal(body, &dc) + return dc, err + } } +func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { - return nil, false -} + dcArray := make([]BasicDpmContainer, len(rawMessages)) -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { - return nil, false -} - -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { - return nil, false -} - -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return nil, false -} - -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { - return nil, false -} - -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. -func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &avwshspi, true -} - -// AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA -// System. -type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' - WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` + for index, rawMessage := range rawMessages { + dc, err := unmarshalBasicDpmContainer(*rawMessage) + if err != nil { + return nil, err + } + dcArray[index] = dc + } + return dcArray, nil } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { - avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1 +// MarshalJSON is the custom marshaler for DpmContainer. +func (dc DpmContainer) MarshalJSON() ([]byte, error) { + dc.ContainerType = ContainerTypeDPMContainer1 objectMap := make(map[string]interface{}) - if avwshswi.ParentName != nil { - objectMap["parentName"] = avwshswi.ParentName + if dc.CanReRegister != nil { + objectMap["canReRegister"] = dc.CanReRegister } - if avwshswi.ServerName != nil { - objectMap["serverName"] = avwshswi.ServerName + if dc.ContainerID != nil { + objectMap["containerId"] = dc.ContainerID } - if avwshswi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable + if dc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = dc.ProtectedItemCount } - if avwshswi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount + if dc.DpmAgentVersion != nil { + objectMap["dpmAgentVersion"] = dc.DpmAgentVersion } - if avwshswi.SubWorkloadItemCount != nil { - objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount + if dc.DpmServers != nil { + objectMap["dpmServers"] = dc.DpmServers } - if avwshswi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwshswi.BackupManagementType + if dc.UpgradeAvailable != nil { + objectMap["upgradeAvailable"] = dc.UpgradeAvailable } - if avwshswi.WorkloadType != nil { - objectMap["workloadType"] = avwshswi.WorkloadType + if dc.ProtectionStatus != nil { + objectMap["protectionStatus"] = dc.ProtectionStatus } - if avwshswi.FriendlyName != nil { - objectMap["friendlyName"] = avwshswi.FriendlyName + if dc.ExtendedInfo != nil { + objectMap["extendedInfo"] = dc.ExtendedInfo } - if avwshswi.ProtectionState != "" { - objectMap["protectionState"] = avwshswi.ProtectionState + if dc.FriendlyName != nil { + objectMap["friendlyName"] = dc.FriendlyName } - if avwshswi.WorkloadItemType != "" { - objectMap["workloadItemType"] = avwshswi.WorkloadItemType + if dc.BackupManagementType != "" { + objectMap["backupManagementType"] = dc.BackupManagementType + } + if dc.RegistrationStatus != nil { + objectMap["registrationStatus"] = dc.RegistrationStatus + } + if dc.HealthStatus != nil { + objectMap["healthStatus"] = dc.HealthStatus + } + if dc.ContainerType != "" { + objectMap["containerType"] = dc.ContainerType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { return nil, false } -// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { - return &avwshswi, true -} - -// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { - return &avwshswi, true +// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false } -// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { return nil, false } -// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. -func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { - return &avwshswi, true +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false } -// AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item -// representing SQL Availability Group. -type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent - // Only Applicable for data bases where the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // IsAutoProtected - Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - // Prebackupvalidation - Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { + return &dc, true } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { - avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer - objectMap := make(map[string]interface{}) - if avwsagpi.ParentName != nil { - objectMap["parentName"] = avwsagpi.ParentName - } - if avwsagpi.ParentUniqueName != nil { - objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName - } - if avwsagpi.ServerName != nil { - objectMap["serverName"] = avwsagpi.ServerName - } - if avwsagpi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable - } - if avwsagpi.IsAutoProtected != nil { - objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected - } - if avwsagpi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount - } - if avwsagpi.Subprotectableitemcount != nil { - objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount - } - if avwsagpi.Prebackupvalidation != nil { - objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation - } - if avwsagpi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsagpi.BackupManagementType - } - if avwsagpi.WorkloadType != nil { - objectMap["workloadType"] = avwsagpi.WorkloadType - } - if avwsagpi.FriendlyName != nil { - objectMap["friendlyName"] = avwsagpi.FriendlyName - } - if avwsagpi.ProtectionState != "" { - objectMap["protectionState"] = avwsagpi.ProtectionState - } - if avwsagpi.ProtectableItemType != "" { - objectMap["protectableItemType"] = avwsagpi.ProtectableItemType - } - return json.Marshal(objectMap) +// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return &dc, true } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { +// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { return nil, false } -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return &avwsagpi, true +// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false } -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { - return &avwsagpi, true -} - -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { - return nil, false -} - -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { - return nil, false -} - -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return nil, false +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &dc, true } -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { - return nil, false +// DPMContainerExtendedInfo additional information of the DPMContainer. +type DPMContainerExtendedInfo struct { + // LastRefreshedAt - Last refresh time of the DPMContainer. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` } -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. -func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &avwsagpi, true +// DpmErrorInfo DPM workload-specific error information. +type DpmErrorInfo struct { + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` } -// AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL -// Database. -type AzureVMWorkloadSQLDatabaseProtectableItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent - // Only Applicable for data bases where the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // IsAutoProtected - Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - // Prebackupvalidation - Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management +// DpmJob DPM workload-specific job object. +type DpmJob struct { + // Duration - Time elapsed for job. + Duration *string `json:"duration,omitempty"` + // DpmServerName - DPM server name managing the backup item or backup job. + DpmServerName *string `json:"dpmServerName,omitempty"` + // ContainerName - Name of cluster/server protecting current backup item, if any. + ContainerName *string `json:"containerName,omitempty"` + // ContainerType - Type of container. + ContainerType *string `json:"containerType,omitempty"` + // WorkloadType - Type of backup item. WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` + // ActionsInfo - The state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - The errors. + ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information for this job. + ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` } -// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { - avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase +// MarshalJSON is the custom marshaler for DpmJob. +func (dj DpmJob) MarshalJSON() ([]byte, error) { + dj.JobType = JobTypeDpmJob objectMap := make(map[string]interface{}) - if avwsdpi.ParentName != nil { - objectMap["parentName"] = avwsdpi.ParentName + if dj.Duration != nil { + objectMap["duration"] = dj.Duration } - if avwsdpi.ParentUniqueName != nil { - objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName + if dj.DpmServerName != nil { + objectMap["dpmServerName"] = dj.DpmServerName } - if avwsdpi.ServerName != nil { - objectMap["serverName"] = avwsdpi.ServerName + if dj.ContainerName != nil { + objectMap["containerName"] = dj.ContainerName } - if avwsdpi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable + if dj.ContainerType != nil { + objectMap["containerType"] = dj.ContainerType } - if avwsdpi.IsAutoProtected != nil { - objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected + if dj.WorkloadType != nil { + objectMap["workloadType"] = dj.WorkloadType } - if avwsdpi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount + if dj.ActionsInfo != nil { + objectMap["actionsInfo"] = dj.ActionsInfo } - if avwsdpi.Subprotectableitemcount != nil { - objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount + if dj.ErrorDetails != nil { + objectMap["errorDetails"] = dj.ErrorDetails } - if avwsdpi.Prebackupvalidation != nil { - objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation + if dj.ExtendedInfo != nil { + objectMap["extendedInfo"] = dj.ExtendedInfo } - if avwsdpi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsdpi.BackupManagementType + if dj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = dj.EntityFriendlyName } - if avwsdpi.WorkloadType != nil { - objectMap["workloadType"] = avwsdpi.WorkloadType + if dj.BackupManagementType != "" { + objectMap["backupManagementType"] = dj.BackupManagementType } - if avwsdpi.FriendlyName != nil { - objectMap["friendlyName"] = avwsdpi.FriendlyName + if dj.Operation != nil { + objectMap["operation"] = dj.Operation } - if avwsdpi.ProtectionState != "" { - objectMap["protectionState"] = avwsdpi.ProtectionState + if dj.Status != nil { + objectMap["status"] = dj.Status } - if avwsdpi.ProtectableItemType != "" { - objectMap["protectableItemType"] = avwsdpi.ProtectableItemType + if dj.StartTime != nil { + objectMap["startTime"] = dj.StartTime + } + if dj.EndTime != nil { + objectMap["endTime"] = dj.EndTime + } + if dj.ActivityID != nil { + objectMap["activityId"] = dj.ActivityID + } + if dj.JobType != "" { + objectMap["jobType"] = dj.JobType } return json.Marshal(objectMap) } -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { +// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { +// AsAzureStorageJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) { return nil, false } -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { +// AsAzureWorkloadJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return &avwsdpi, true -} - -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { - return nil, false +// AsDpmJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { + return &dj, true } -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { +// AsMabJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsMabJob() (*MabJob, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { +// AsJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsJob() (*Job, bool) { return nil, false } -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { - return nil, false +// AsBasicJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsBasicJob() (BasicJob, bool) { + return &dj, true } -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { - return &avwsdpi, true +// DpmJobExtendedInfo additional information on the DPM workload-specific job. +type DpmJobExtendedInfo struct { + // TasksList - List of tasks associated with this job. + TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - The job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { - return nil, false +// MarshalJSON is the custom marshaler for DpmJobExtendedInfo. +func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if djei.TasksList != nil { + objectMap["tasksList"] = djei.TasksList + } + if djei.PropertyBag != nil { + objectMap["propertyBag"] = djei.PropertyBag + } + if djei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage + } + return json.Marshal(objectMap) } -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { - return nil, false -} - -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return nil, false -} - -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { - return nil, false +// DpmJobTaskDetails DPM workload-specific job task details. +type DpmJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` } -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &avwsdpi, true +// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class. +type BasicEngineBase interface { + AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) + AsDpmBackupEngine() (*DpmBackupEngine, bool) + AsEngineBase() (*EngineBase, bool) } -// AzureVMWorkloadSQLDatabaseProtectedItem azure VM workload-specific protected item representing SQL -// Database. -type AzureVMWorkloadSQLDatabaseProtectedItem struct { - // FriendlyName - Friendly name of the DB represented by this backup item. +// EngineBase the base backup engine class. All workload specific backup engines derive from this class. +type EngineBase struct { + // FriendlyName - Friendly name of the backup engine. FriendlyName *string `json:"friendlyName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // ParentName - Parent name of the DB such as Instance or Availability Group. - ParentName *string `json:"parentName,omitempty"` - // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed - ParentType *string `json:"parentType,omitempty"` - // ProtectionStatus - Backup status of this backup item. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' - LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // LastBackupErrorDetail - Error details in last backup - LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` - // ProtectedItemDataSourceID - Data ID of the protected item. - ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` - // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' - ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` - // ExtendedInfo - Additional information for this backup item. - ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { - avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase - objectMap := make(map[string]interface{}) - if avwsdpi.FriendlyName != nil { - objectMap["friendlyName"] = avwsdpi.FriendlyName - } - if avwsdpi.ServerName != nil { - objectMap["serverName"] = avwsdpi.ServerName - } - if avwsdpi.ParentName != nil { - objectMap["parentName"] = avwsdpi.ParentName - } - if avwsdpi.ParentType != nil { - objectMap["parentType"] = avwsdpi.ParentType - } - if avwsdpi.ProtectionStatus != nil { - objectMap["protectionStatus"] = avwsdpi.ProtectionStatus - } - if avwsdpi.ProtectionState != "" { - objectMap["protectionState"] = avwsdpi.ProtectionState - } - if avwsdpi.LastBackupStatus != "" { - objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus - } - if avwsdpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = avwsdpi.LastBackupTime - } - if avwsdpi.LastBackupErrorDetail != nil { - objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail - } - if avwsdpi.ProtectedItemDataSourceID != nil { - objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` +} + +func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err } - if avwsdpi.ProtectedItemHealthStatus != "" { - objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus + + switch m["backupEngineType"] { + case string(BackupEngineTypeAzureBackupServerEngine): + var abse AzureBackupServerEngine + err := json.Unmarshal(body, &abse) + return abse, err + case string(BackupEngineTypeDpmBackupEngine): + var dbe DpmBackupEngine + err := json.Unmarshal(body, &dbe) + return dbe, err + default: + var eb EngineBase + err := json.Unmarshal(body, &eb) + return eb, err } - if avwsdpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = avwsdpi.ExtendedInfo +} +func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err } - if avwsdpi.BackupManagementType != "" { - objectMap["backupManagementType"] = avwsdpi.BackupManagementType + + ebArray := make([]BasicEngineBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + eb, err := unmarshalBasicEngineBase(*rawMessage) + if err != nil { + return nil, err + } + ebArray[index] = eb } - if avwsdpi.WorkloadType != "" { - objectMap["workloadType"] = avwsdpi.WorkloadType + return ebArray, nil +} + +// MarshalJSON is the custom marshaler for EngineBase. +func (eb EngineBase) MarshalJSON() ([]byte, error) { + eb.BackupEngineType = BackupEngineTypeBackupEngineBase + objectMap := make(map[string]interface{}) + if eb.FriendlyName != nil { + objectMap["friendlyName"] = eb.FriendlyName } - if avwsdpi.ContainerName != nil { - objectMap["containerName"] = avwsdpi.ContainerName + if eb.BackupManagementType != "" { + objectMap["backupManagementType"] = eb.BackupManagementType } - if avwsdpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = avwsdpi.SourceResourceID + if eb.RegistrationStatus != nil { + objectMap["registrationStatus"] = eb.RegistrationStatus } - if avwsdpi.PolicyID != nil { - objectMap["policyId"] = avwsdpi.PolicyID + if eb.BackupEngineState != nil { + objectMap["backupEngineState"] = eb.BackupEngineState } - if avwsdpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint + if eb.HealthStatus != nil { + objectMap["healthStatus"] = eb.HealthStatus } - if avwsdpi.BackupSetName != nil { - objectMap["backupSetName"] = avwsdpi.BackupSetName + if eb.CanReRegister != nil { + objectMap["canReRegister"] = eb.CanReRegister } - if avwsdpi.CreateMode != "" { - objectMap["createMode"] = avwsdpi.CreateMode + if eb.BackupEngineID != nil { + objectMap["backupEngineId"] = eb.BackupEngineID } - if avwsdpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC + if eb.DpmVersion != nil { + objectMap["dpmVersion"] = eb.DpmVersion } - if avwsdpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete + if eb.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion } - if avwsdpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining + if eb.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable } - if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming + if eb.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable } - if avwsdpi.IsRehydrate != nil { - objectMap["isRehydrate"] = avwsdpi.IsRehydrate + if eb.ExtendedInfo != nil { + objectMap["extendedInfo"] = eb.ExtendedInfo } - if avwsdpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = avwsdpi.ProtectedItemType + if eb.BackupEngineType != "" { + objectMap["backupEngineType"] = eb.BackupEngineType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return &avwsdpi, true -} - -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { +// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return &avwsdpi, true -} - -// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { +// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) { return nil, false } -// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { - return nil, false +// AsEngineBase is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsEngineBase() (*EngineBase, bool) { + return &eb, true } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { - return nil, false +// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) { + return &eb, true } -// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return nil, false +// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this +// class. +type EngineBaseResource struct { + autorest.Response `json:"-"` + // Properties - BackupEngineBaseResource properties + Properties BasicEngineBase `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` } -// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. -func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &avwsdpi, true +// MarshalJSON is the custom marshaler for EngineBaseResource. +func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = ebr.Properties + if ebr.Location != nil { + objectMap["location"] = ebr.Location + } + if ebr.Tags != nil { + objectMap["tags"] = ebr.Tags + } + if ebr.ETag != nil { + objectMap["eTag"] = ebr.ETag + } + return json.Marshal(objectMap) } -// AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL -// Database. -type AzureVMWorkloadSQLDatabaseWorkloadItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' - WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { - avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1 - objectMap := make(map[string]interface{}) - if avwsdwi.ParentName != nil { - objectMap["parentName"] = avwsdwi.ParentName - } - if avwsdwi.ServerName != nil { - objectMap["serverName"] = avwsdwi.ServerName - } - if avwsdwi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable - } - if avwsdwi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount - } - if avwsdwi.SubWorkloadItemCount != nil { - objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount - } - if avwsdwi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsdwi.BackupManagementType - } - if avwsdwi.WorkloadType != nil { - objectMap["workloadType"] = avwsdwi.WorkloadType - } - if avwsdwi.FriendlyName != nil { - objectMap["friendlyName"] = avwsdwi.FriendlyName - } - if avwsdwi.ProtectionState != "" { - objectMap["protectionState"] = avwsdwi.ProtectionState - } - if avwsdwi.WorkloadItemType != "" { - objectMap["workloadItemType"] = avwsdwi.WorkloadItemType - } - return json.Marshal(objectMap) -} - -// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { - return &avwsdwi, true -} - -// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { - return &avwsdwi, true -} - -// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { - return nil, false -} - -// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { - return nil, false -} - -// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. -func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { - return &avwsdwi, true -} - -// AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL -// Instance. -type AzureVMWorkloadSQLInstanceProtectableItem struct { - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent - // Only Applicable for data bases where the parent would be either Instance or a SQL AG. - ParentUniqueName *string `json:"parentUniqueName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if protectable item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // IsAutoProtected - Indicates if protectable item is auto-protected - IsAutoProtected *bool `json:"isAutoProtected,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected - Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` - // Prebackupvalidation - Pre-backup validation for protectable objects - Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { - avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance - objectMap := make(map[string]interface{}) - if avwsipi.ParentName != nil { - objectMap["parentName"] = avwsipi.ParentName - } - if avwsipi.ParentUniqueName != nil { - objectMap["parentUniqueName"] = avwsipi.ParentUniqueName - } - if avwsipi.ServerName != nil { - objectMap["serverName"] = avwsipi.ServerName - } - if avwsipi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable - } - if avwsipi.IsAutoProtected != nil { - objectMap["isAutoProtected"] = avwsipi.IsAutoProtected - } - if avwsipi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount - } - if avwsipi.Subprotectableitemcount != nil { - objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount - } - if avwsipi.Prebackupvalidation != nil { - objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation - } - if avwsipi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsipi.BackupManagementType - } - if avwsipi.WorkloadType != nil { - objectMap["workloadType"] = avwsipi.WorkloadType - } - if avwsipi.FriendlyName != nil { - objectMap["friendlyName"] = avwsipi.FriendlyName - } - if avwsipi.ProtectionState != "" { - objectMap["protectionState"] = avwsipi.ProtectionState - } - if avwsipi.ProtectableItemType != "" { - objectMap["protectableItemType"] = avwsipi.ProtectableItemType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return &avwsipi, true -} - -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { - return &avwsipi, true -} - -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { - return nil, false -} - -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return nil, false -} - -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { - return nil, false -} - -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. -func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &avwsipi, true -} - -// AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL -// Instance. -type AzureVMWorkloadSQLInstanceWorkloadItem struct { - // DataDirectoryPaths - Data Directory Paths for default directories - DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` - // ParentName - Name for instance or AG - ParentName *string `json:"parentName,omitempty"` - // ServerName - Host/Cluster Name for instance or AG - ServerName *string `json:"serverName,omitempty"` - // IsAutoProtectable - Indicates if workload item is auto-protectable - IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` - // Subinquireditemcount - For instance or AG, indicates number of DB's present - Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` - // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected - SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' - WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { - avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1 - objectMap := make(map[string]interface{}) - if avwsiwi.DataDirectoryPaths != nil { - objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths - } - if avwsiwi.ParentName != nil { - objectMap["parentName"] = avwsiwi.ParentName - } - if avwsiwi.ServerName != nil { - objectMap["serverName"] = avwsiwi.ServerName - } - if avwsiwi.IsAutoProtectable != nil { - objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable - } - if avwsiwi.Subinquireditemcount != nil { - objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount - } - if avwsiwi.SubWorkloadItemCount != nil { - objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount - } - if avwsiwi.BackupManagementType != nil { - objectMap["backupManagementType"] = avwsiwi.BackupManagementType - } - if avwsiwi.WorkloadType != nil { - objectMap["workloadType"] = avwsiwi.WorkloadType - } - if avwsiwi.FriendlyName != nil { - objectMap["friendlyName"] = avwsiwi.FriendlyName - } - if avwsiwi.ProtectionState != "" { - objectMap["protectionState"] = avwsiwi.ProtectionState - } - if avwsiwi.WorkloadItemType != "" { - objectMap["workloadItemType"] = avwsiwi.WorkloadItemType - } - return json.Marshal(objectMap) -} - -// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { - return &avwsiwi, true -} - -// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { - return &avwsiwi, true -} - -// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { - return nil, false -} - -// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. -func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { - return &avwsiwi, true -} - -// BasicAzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. -type BasicAzureWorkloadAutoProtectionIntent interface { - AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) - AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) -} - -// AzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. -type AzureWorkloadAutoProtectionIntent struct { - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' - ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` -} - -func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["protectionIntentItemType"] { - case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): - var awsapi AzureWorkloadSQLAutoProtectionIntent - err := json.Unmarshal(body, &awsapi) - return awsapi, err - default: - var awapi AzureWorkloadAutoProtectionIntent - err := json.Unmarshal(body, &awapi) - return awapi, err - } -} -func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage) - if err != nil { - return nil, err - } - awapiArray[index] = awapi - } - return awapiArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { - awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent - objectMap := make(map[string]interface{}) - if awapi.BackupManagementType != "" { - objectMap["backupManagementType"] = awapi.BackupManagementType - } - if awapi.SourceResourceID != nil { - objectMap["sourceResourceId"] = awapi.SourceResourceID - } - if awapi.ItemID != nil { - objectMap["itemId"] = awapi.ItemID - } - if awapi.PolicyID != nil { - objectMap["policyId"] = awapi.PolicyID - } - if awapi.ProtectionState != "" { - objectMap["protectionState"] = awapi.ProtectionState - } - if awapi.ProtectionIntentItemType != "" { - objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType - } - return json.Marshal(objectMap) -} - -// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { - return nil, false -} - -// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { - return &awapi, true -} - -// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { - return nil, false -} - -// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { - return &awapi, true -} - -// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { - return &awapi, true -} - -// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { - return nil, false -} - -// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { - return nil, false -} - -// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. -func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { - return &awapi, true -} - -// AzureWorkloadBackupRequest azureWorkload workload-specific backup request. -type AzureWorkloadBackupRequest struct { - // BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeEnumInvalid', 'TypeEnumFull', 'TypeEnumDifferential', 'TypeEnumLog', 'TypeEnumCopyOnlyFull' - BackupType TypeEnum `json:"backupType,omitempty"` - // EnableCompression - Bool for Compression setting - EnableCompression *bool `json:"enableCompression,omitempty"` - // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). - RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' - ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest. -func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { - awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest - objectMap := make(map[string]interface{}) - if awbr.BackupType != "" { - objectMap["backupType"] = awbr.BackupType - } - if awbr.EnableCompression != nil { - objectMap["enableCompression"] = awbr.EnableCompression - } - if awbr.RecoveryPointExpiryTimeInUTC != nil { - objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC - } - if awbr.ObjectType != "" { - objectMap["objectType"] = awbr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. -func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { - return nil, false -} - -// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. -func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { - return &awbr, true -} - -// AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. -func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { - return nil, false -} - -// AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. -func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) { - return nil, false -} - -// AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. -func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) { - return &awbr, true -} - -// BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. -type BasicAzureWorkloadContainer interface { - AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) - AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) - AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) -} - -// AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. -type AzureWorkloadContainer struct { - // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // LastUpdatedTime - Time stamp when this container was updated. - LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` - // ExtendedInfo - Additional details of a workload container. - ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` - // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` - // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' - OperationType OperationType `json:"operationType,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` -} - -func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["containerType"] { - case string(ContainerTypeSQLAGWorkLoadContainer1): - var aswcpc AzureSQLAGWorkloadContainerProtectionContainer - err := json.Unmarshal(body, &aswcpc) - return aswcpc, err - case string(ContainerTypeVMAppContainer1): - var avacpc AzureVMAppContainerProtectionContainer - err := json.Unmarshal(body, &avacpc) - return avacpc, err - default: - var awc AzureWorkloadContainer - err := json.Unmarshal(body, &awc) - return awc, err - } -} -func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage) - if err != nil { - return nil, err - } - awcArray[index] = awc - } - return awcArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) { - awc.ContainerType = ContainerTypeAzureWorkloadContainer - objectMap := make(map[string]interface{}) - if awc.SourceResourceID != nil { - objectMap["sourceResourceId"] = awc.SourceResourceID - } - if awc.LastUpdatedTime != nil { - objectMap["lastUpdatedTime"] = awc.LastUpdatedTime - } - if awc.ExtendedInfo != nil { - objectMap["extendedInfo"] = awc.ExtendedInfo - } - if awc.WorkloadType != "" { - objectMap["workloadType"] = awc.WorkloadType - } - if awc.OperationType != "" { - objectMap["operationType"] = awc.OperationType - } - if awc.FriendlyName != nil { - objectMap["friendlyName"] = awc.FriendlyName - } - if awc.BackupManagementType != "" { - objectMap["backupManagementType"] = awc.BackupManagementType - } - if awc.RegistrationStatus != nil { - objectMap["registrationStatus"] = awc.RegistrationStatus - } - if awc.HealthStatus != nil { - objectMap["healthStatus"] = awc.HealthStatus - } - if awc.ContainerType != "" { - objectMap["containerType"] = awc.ContainerType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return nil, false -} - -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return nil, false -} - -// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false -} - -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return &awc, true -} - -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return &awc, true -} - -// AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false -} - -// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { - return nil, false -} - -// AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) { - return nil, false -} - -// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { - return nil, false -} - -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { - return nil, false -} - -// AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) { - return nil, false -} - -// AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) { - return nil, false -} - -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. -func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &awc, true -} - -// AzureWorkloadContainerExtendedInfo extended information of the container. -type AzureWorkloadContainerExtendedInfo struct { - // HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. - HostServerName *string `json:"hostServerName,omitempty"` - // InquiryInfo - Inquiry Status for the container. - InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"` - // NodesList - List of the nodes in case of distributed container. - NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"` -} - -// AzureWorkloadErrorInfo azure storage specific error information -type AzureWorkloadErrorInfo struct { - // ErrorCode - Error code. - ErrorCode *int32 `json:"errorCode,omitempty"` - // ErrorString - Localized error string. - ErrorString *string `json:"errorString,omitempty"` - // ErrorTitle - Title: Typically, the entity that the error pertains to. - ErrorTitle *string `json:"errorTitle,omitempty"` - // Recommendations - List of localized recommendations for above error code. - Recommendations *[]string `json:"recommendations,omitempty"` - // AdditionalDetails - Additional details for above error code. - AdditionalDetails *string `json:"additionalDetails,omitempty"` -} - -// AzureWorkloadJob azure storage specific job. -type AzureWorkloadJob struct { - // WorkloadType - Workload type of the job - WorkloadType *string `json:"workloadType,omitempty"` - // Duration - Time elapsed during the execution of this job. - Duration *string `json:"duration,omitempty"` - // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. - ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` - // ErrorDetails - Error details on execution of this job. - ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"` - // ExtendedInfo - Additional information about the job. - ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"` - // EntityFriendlyName - Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // Operation - The operation name. - Operation *string `json:"operation,omitempty"` - // Status - Job status. - Status *string `json:"status,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // ActivityID - ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' - JobType JobType `json:"jobType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadJob. -func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) { - awj.JobType = JobTypeAzureWorkloadJob - objectMap := make(map[string]interface{}) - if awj.WorkloadType != nil { - objectMap["workloadType"] = awj.WorkloadType - } - if awj.Duration != nil { - objectMap["duration"] = awj.Duration - } - if awj.ActionsInfo != nil { - objectMap["actionsInfo"] = awj.ActionsInfo - } - if awj.ErrorDetails != nil { - objectMap["errorDetails"] = awj.ErrorDetails - } - if awj.ExtendedInfo != nil { - objectMap["extendedInfo"] = awj.ExtendedInfo - } - if awj.EntityFriendlyName != nil { - objectMap["entityFriendlyName"] = awj.EntityFriendlyName - } - if awj.BackupManagementType != "" { - objectMap["backupManagementType"] = awj.BackupManagementType - } - if awj.Operation != nil { - objectMap["operation"] = awj.Operation - } - if awj.Status != nil { - objectMap["status"] = awj.Status - } - if awj.StartTime != nil { - objectMap["startTime"] = awj.StartTime - } - if awj.EndTime != nil { - objectMap["endTime"] = awj.EndTime - } - if awj.ActivityID != nil { - objectMap["activityId"] = awj.ActivityID - } - if awj.JobType != "" { - objectMap["jobType"] = awj.JobType - } - return json.Marshal(objectMap) -} - -// AsAzureIaaSVMJob is the BasicJob implementation for AzureWorkloadJob. -func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { - return nil, false -} - -// AsAzureStorageJob is the BasicJob implementation for AzureWorkloadJob. -func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) { - return nil, false -} - -// AsAzureWorkloadJob is the BasicJob implementation for AzureWorkloadJob. -func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { - return &awj, true -} - -// AsDpmJob is the BasicJob implementation for AzureWorkloadJob. -func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) { - return nil, false -} - -// AsMabJob is the BasicJob implementation for AzureWorkloadJob. -func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) { - return nil, false -} - -// AsJob is the BasicJob implementation for AzureWorkloadJob. -func (awj AzureWorkloadJob) AsJob() (*Job, bool) { - return nil, false -} - -// AsBasicJob is the BasicJob implementation for AzureWorkloadJob. -func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) { - return &awj, true -} - -// AzureWorkloadJobExtendedInfo azure VM workload-specific additional information for job. -type AzureWorkloadJobExtendedInfo struct { - // TasksList - List of tasks for this job - TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"` - // PropertyBag - Job properties. - PropertyBag map[string]*string `json:"propertyBag"` - // DynamicErrorMessage - Non localized error message on job execution. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadJobExtendedInfo. -func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if awjei.TasksList != nil { - objectMap["tasksList"] = awjei.TasksList - } - if awjei.PropertyBag != nil { - objectMap["propertyBag"] = awjei.PropertyBag - } - if awjei.DynamicErrorMessage != nil { - objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage - } - return json.Marshal(objectMap) -} - -// AzureWorkloadJobTaskDetails azure VM workload specific job task details. -type AzureWorkloadJobTaskDetails struct { - // TaskID - The task display name. - TaskID *string `json:"taskId,omitempty"` - // Status - The status. - Status *string `json:"status,omitempty"` -} - -// BasicAzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime -type BasicAzureWorkloadPointInTimeRecoveryPoint interface { - AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) - AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) -} - -// AzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime -type AzureWorkloadPointInTimeRecoveryPoint struct { - // TimeRanges - List of log ranges - TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` - // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created - RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` - // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' - Type RestorePointType `json:"type,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): - var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awshpitrp) - return awshpitrp, err - default: - var awpitrp AzureWorkloadPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awpitrp) - return awpitrp, err - } -} -func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage) - if err != nil { - return nil, err - } - awpitrpArray[index] = awpitrp - } - return awpitrpArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { - awpitrp.ObjectType = ObjectTypeAzureWorkloadPointInTimeRecoveryPoint - objectMap := make(map[string]interface{}) - if awpitrp.TimeRanges != nil { - objectMap["timeRanges"] = awpitrp.TimeRanges - } - if awpitrp.ObjectType != "" { - objectMap["objectType"] = awpitrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return &awpitrp, true -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return &awpitrp, true -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return &awpitrp, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. -func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &awpitrp, true -} - -// AzureWorkloadPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for -// PointInTime/Log restore -type AzureWorkloadPointInTimeRestoreRequest struct { - // PointInTime - PointInTime value - PointInTime *date.Time `json:"pointInTime,omitempty"` - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PropertyBag - Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag"` - // TargetInfo - Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' - RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { - awpitrr.ObjectType = ObjectTypeAzureWorkloadPointInTimeRestoreRequest - objectMap := make(map[string]interface{}) - if awpitrr.PointInTime != nil { - objectMap["pointInTime"] = awpitrr.PointInTime - } - if awpitrr.RecoveryType != "" { - objectMap["recoveryType"] = awpitrr.RecoveryType - } - if awpitrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = awpitrr.SourceResourceID - } - if awpitrr.PropertyBag != nil { - objectMap["propertyBag"] = awpitrr.PropertyBag - } - if awpitrr.TargetInfo != nil { - objectMap["targetInfo"] = awpitrr.TargetInfo - } - if awpitrr.RecoveryMode != "" { - objectMap["recoveryMode"] = awpitrr.RecoveryMode - } - if awpitrr.ObjectType != "" { - objectMap["objectType"] = awpitrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return &awpitrr, true -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return &awpitrr, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return nil, false -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. -func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &awpitrr, true -} - -// BasicAzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery point -type BasicAzureWorkloadRecoveryPoint interface { - AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) - AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) - AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) - AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) - AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) - AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) - AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) - AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) -} - -// AzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery -// point -type AzureWorkloadRecoveryPoint struct { - // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created - RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` - // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' - Type RestorePointType `json:"type,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): - var awpitrp AzureWorkloadPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awpitrp) - return awpitrp, err - case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): - var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awshpitrp) - return awshpitrp, err - case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): - var awshrp AzureWorkloadSAPHanaRecoveryPoint - err := json.Unmarshal(body, &awshrp) - return awshrp, err - case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): - var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awspitrp) - return awspitrp, err - case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): - var awsrp AzureWorkloadSQLRecoveryPoint - err := json.Unmarshal(body, &awsrp) - return awsrp, err - default: - var awrp AzureWorkloadRecoveryPoint - err := json.Unmarshal(body, &awrp) - return awrp, err - } -} -func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage) - if err != nil { - return nil, err - } - awrpArray[index] = awrp - } - return awrpArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { - awrp.ObjectType = ObjectTypeAzureWorkloadRecoveryPoint - objectMap := make(map[string]interface{}) - if awrp.ObjectType != "" { - objectMap["objectType"] = awrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return &awrp, true -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return &awrp, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. -func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &awrp, true -} - -// BasicAzureWorkloadRestoreRequest azureWorkload-specific restore. -type BasicAzureWorkloadRestoreRequest interface { - AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) - AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) - AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) - AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) - AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) - AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) - AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) - AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) -} - -// AzureWorkloadRestoreRequest azureWorkload-specific restore. -type AzureWorkloadRestoreRequest struct { - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PropertyBag - Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag"` - // TargetInfo - Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' - RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): - var awpitrr AzureWorkloadPointInTimeRestoreRequest - err := json.Unmarshal(body, &awpitrr) - return awpitrr, err - case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): - var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest - err := json.Unmarshal(body, &awshpitrr) - return awshpitrr, err - case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): - var awshrr AzureWorkloadSAPHanaRestoreRequest - err := json.Unmarshal(body, &awshrr) - return awshrr, err - case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): - var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest - err := json.Unmarshal(body, &awspitrr) - return awspitrr, err - case string(ObjectTypeAzureWorkloadSQLRestoreRequest): - var awsrr AzureWorkloadSQLRestoreRequest - err := json.Unmarshal(body, &awsrr) - return awsrr, err - default: - var awrr AzureWorkloadRestoreRequest - err := json.Unmarshal(body, &awrr) - return awrr, err - } -} -func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage) - if err != nil { - return nil, err - } - awrrArray[index] = awrr - } - return awrrArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { - awrr.ObjectType = ObjectTypeAzureWorkloadRestoreRequest - objectMap := make(map[string]interface{}) - if awrr.RecoveryType != "" { - objectMap["recoveryType"] = awrr.RecoveryType - } - if awrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = awrr.SourceResourceID - } - if awrr.PropertyBag != nil { - objectMap["propertyBag"] = awrr.PropertyBag - } - if awrr.TargetInfo != nil { - objectMap["targetInfo"] = awrr.TargetInfo - } - if awrr.RecoveryMode != "" { - objectMap["recoveryMode"] = awrr.RecoveryMode - } - if awrr.ObjectType != "" { - objectMap["objectType"] = awrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return &awrr, true -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return &awrr, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return nil, false -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. -func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &awrr, true -} - -// AzureWorkloadSAPHanaPointInTimeRecoveryPoint recovery point specific to PointInTime in SAPHana -type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { - // TimeRanges - List of log ranges - TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` - // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created - RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` - // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' - Type RestorePointType `json:"type,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { - awshpitrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint - objectMap := make(map[string]interface{}) - if awshpitrp.TimeRanges != nil { - objectMap["timeRanges"] = awshpitrp.TimeRanges - } - if awshpitrp.ObjectType != "" { - objectMap["objectType"] = awshpitrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return &awshpitrp, true -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return &awshpitrp, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return &awshpitrp, true -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. -func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &awshpitrp, true -} - -// AzureWorkloadSAPHanaPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for -// PointInTime/Log restore -type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { - // PointInTime - PointInTime value - PointInTime *date.Time `json:"pointInTime,omitempty"` - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PropertyBag - Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag"` - // TargetInfo - Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' - RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { - awshpitrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest - objectMap := make(map[string]interface{}) - if awshpitrr.PointInTime != nil { - objectMap["pointInTime"] = awshpitrr.PointInTime - } - if awshpitrr.RecoveryType != "" { - objectMap["recoveryType"] = awshpitrr.RecoveryType - } - if awshpitrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = awshpitrr.SourceResourceID - } - if awshpitrr.PropertyBag != nil { - objectMap["propertyBag"] = awshpitrr.PropertyBag - } - if awshpitrr.TargetInfo != nil { - objectMap["targetInfo"] = awshpitrr.TargetInfo - } - if awshpitrr.RecoveryMode != "" { - objectMap["recoveryMode"] = awshpitrr.RecoveryMode - } - if awshpitrr.ObjectType != "" { - objectMap["objectType"] = awshpitrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return &awshpitrr, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return &awshpitrr, true -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return &awshpitrr, true -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return nil, false -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. -func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &awshpitrr, true -} - -// AzureWorkloadSAPHanaRecoveryPoint sAPHana specific recoverypoint, specifically encapsulates full/diff -// recoverypoints -type AzureWorkloadSAPHanaRecoveryPoint struct { - // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created - RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` - // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' - Type RestorePointType `json:"type,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { - awshrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaRecoveryPoint - objectMap := make(map[string]interface{}) - if awshrp.ObjectType != "" { - objectMap["objectType"] = awshrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return &awshrp, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return &awshrp, true -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. -func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &awshrp, true -} - -// BasicAzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. -type BasicAzureWorkloadSAPHanaRestoreRequest interface { - AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) - AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) -} - -// AzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. -type AzureWorkloadSAPHanaRestoreRequest struct { - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PropertyBag - Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag"` - // TargetInfo - Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' - RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): - var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest - err := json.Unmarshal(body, &awshpitrr) - return awshpitrr, err - default: - var awshrr AzureWorkloadSAPHanaRestoreRequest - err := json.Unmarshal(body, &awshrr) - return awshrr, err - } -} -func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage) - if err != nil { - return nil, err - } - awshrrArray[index] = awshrr - } - return awshrrArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { - awshrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaRestoreRequest - objectMap := make(map[string]interface{}) - if awshrr.RecoveryType != "" { - objectMap["recoveryType"] = awshrr.RecoveryType - } - if awshrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = awshrr.SourceResourceID - } - if awshrr.PropertyBag != nil { - objectMap["propertyBag"] = awshrr.PropertyBag - } - if awshrr.TargetInfo != nil { - objectMap["targetInfo"] = awshrr.TargetInfo - } - if awshrr.RecoveryMode != "" { - objectMap["recoveryMode"] = awshrr.RecoveryMode - } - if awshrr.ObjectType != "" { - objectMap["objectType"] = awshrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return &awshrr, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return &awshrr, true -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return &awshrr, true -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return nil, false -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. -func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &awshrr, true -} - -// AzureWorkloadSQLAutoProtectionIntent azure Workload SQL Auto Protection intent item. -type AzureWorkloadSQLAutoProtectionIntent struct { - // WorkloadItemType - Workload item type of the item for which intent is to be set. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' - WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' - ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { - awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent - objectMap := make(map[string]interface{}) - if awsapi.WorkloadItemType != "" { - objectMap["workloadItemType"] = awsapi.WorkloadItemType - } - if awsapi.BackupManagementType != "" { - objectMap["backupManagementType"] = awsapi.BackupManagementType - } - if awsapi.SourceResourceID != nil { - objectMap["sourceResourceId"] = awsapi.SourceResourceID - } - if awsapi.ItemID != nil { - objectMap["itemId"] = awsapi.ItemID - } - if awsapi.PolicyID != nil { - objectMap["policyId"] = awsapi.PolicyID - } - if awsapi.ProtectionState != "" { - objectMap["protectionState"] = awsapi.ProtectionState - } - if awsapi.ProtectionIntentItemType != "" { - objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType - } - return json.Marshal(objectMap) -} - -// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { - return nil, false -} - -// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { - return &awsapi, true -} - -// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { - return nil, false -} - -// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { - return nil, false -} - -// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { - return &awsapi, true -} - -// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { - return &awsapi, true -} - -// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { - return nil, false -} - -// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. -func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { - return &awsapi, true -} - -// AzureWorkloadSQLPointInTimeRecoveryPoint recovery point specific to PointInTime -type AzureWorkloadSQLPointInTimeRecoveryPoint struct { - // TimeRanges - List of log ranges - TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` - // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: - // When a specific recovery point is accessed using GetRecoveryPoint - // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter - ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` - // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created - RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` - // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' - Type RestorePointType `json:"type,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { - awspitrp.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint - objectMap := make(map[string]interface{}) - if awspitrp.TimeRanges != nil { - objectMap["timeRanges"] = awspitrp.TimeRanges - } - if awspitrp.ExtendedInfo != nil { - objectMap["extendedInfo"] = awspitrp.ExtendedInfo - } - if awspitrp.ObjectType != "" { - objectMap["objectType"] = awspitrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return &awspitrp, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return &awspitrp, true -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return &awspitrp, true -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. -func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &awspitrp, true -} - -// AzureWorkloadSQLPointInTimeRestoreRequest azureWorkload SQL -specific restore. Specifically for -// PointInTime/Log restore -type AzureWorkloadSQLPointInTimeRestoreRequest struct { - // PointInTime - PointInTime value - PointInTime *date.Time `json:"pointInTime,omitempty"` - // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided - ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` - // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried - IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` - // AlternateDirectoryPaths - Data directory details - AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PropertyBag - Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag"` - // TargetInfo - Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' - RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { - awspitrr.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest - objectMap := make(map[string]interface{}) - if awspitrr.PointInTime != nil { - objectMap["pointInTime"] = awspitrr.PointInTime - } - if awspitrr.ShouldUseAlternateTargetLocation != nil { - objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation - } - if awspitrr.IsNonRecoverable != nil { - objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable - } - if awspitrr.AlternateDirectoryPaths != nil { - objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths - } - if awspitrr.RecoveryType != "" { - objectMap["recoveryType"] = awspitrr.RecoveryType - } - if awspitrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = awspitrr.SourceResourceID - } - if awspitrr.PropertyBag != nil { - objectMap["propertyBag"] = awspitrr.PropertyBag - } - if awspitrr.TargetInfo != nil { - objectMap["targetInfo"] = awspitrr.TargetInfo - } - if awspitrr.RecoveryMode != "" { - objectMap["recoveryMode"] = awspitrr.RecoveryMode - } - if awspitrr.ObjectType != "" { - objectMap["objectType"] = awspitrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return &awspitrr, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return &awspitrr, true -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return &awspitrr, true -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return nil, false -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. -func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &awspitrr, true -} - -// BasicAzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint -// along with extended info -type BasicAzureWorkloadSQLRecoveryPoint interface { - AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) - AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) -} - -// AzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint -// along with extended info -type AzureWorkloadSQLRecoveryPoint struct { - // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: - // When a specific recovery point is accessed using GetRecoveryPoint - // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter - ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` - // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created - RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` - // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' - Type RestorePointType `json:"type,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): - var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awspitrp) - return awspitrp, err - default: - var awsrp AzureWorkloadSQLRecoveryPoint - err := json.Unmarshal(body, &awsrp) - return awsrp, err - } -} -func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage) - if err != nil { - return nil, err - } - awsrpArray[index] = awsrp - } - return awsrpArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { - awsrp.ObjectType = ObjectTypeAzureWorkloadSQLRecoveryPoint - objectMap := make(map[string]interface{}) - if awsrp.ExtendedInfo != nil { - objectMap["extendedInfo"] = awsrp.ExtendedInfo - } - if awsrp.ObjectType != "" { - objectMap["objectType"] = awsrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return &awsrp, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return &awsrp, true -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return &awsrp, true -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. -func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &awsrp, true -} - -// AzureWorkloadSQLRecoveryPointExtendedInfo extended info class details -type AzureWorkloadSQLRecoveryPointExtendedInfo struct { - // DataDirectoryTimeInUTC - READ-ONLY; UTC time at which data directory info was captured - DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"` - // DataDirectoryPaths - READ-ONLY; List of data directory paths during restore operation. - DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` -} - -// BasicAzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore -type BasicAzureWorkloadSQLRestoreRequest interface { - AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) - AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) -} - -// AzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore -type AzureWorkloadSQLRestoreRequest struct { - // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided - ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` - // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried - IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` - // AlternateDirectoryPaths - Data directory details - AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PropertyBag - Workload specific property bag. - PropertyBag map[string]*string `json:"propertyBag"` - // TargetInfo - Details of target database - TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` - // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' - RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): - var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest - err := json.Unmarshal(body, &awspitrr) - return awspitrr, err - default: - var awsrr AzureWorkloadSQLRestoreRequest - err := json.Unmarshal(body, &awsrr) - return awsrr, err - } -} -func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage) - if err != nil { - return nil, err - } - awsrrArray[index] = awsrr - } - return awsrrArray, nil -} - -// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { - awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest - objectMap := make(map[string]interface{}) - if awsrr.ShouldUseAlternateTargetLocation != nil { - objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation - } - if awsrr.IsNonRecoverable != nil { - objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable - } - if awsrr.AlternateDirectoryPaths != nil { - objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths - } - if awsrr.RecoveryType != "" { - objectMap["recoveryType"] = awsrr.RecoveryType - } - if awsrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = awsrr.SourceResourceID - } - if awsrr.PropertyBag != nil { - objectMap["propertyBag"] = awsrr.PropertyBag - } - if awsrr.TargetInfo != nil { - objectMap["targetInfo"] = awsrr.TargetInfo - } - if awsrr.RecoveryMode != "" { - objectMap["recoveryMode"] = awsrr.RecoveryMode - } - if awsrr.ObjectType != "" { - objectMap["objectType"] = awsrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return &awsrr, true -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return &awsrr, true -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return &awsrr, true -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return nil, false -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. -func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &awsrr, true -} - -// BEKDetails BEK is bitlocker encryption key. -type BEKDetails struct { - // SecretURL - Secret is BEK. - SecretURL *string `json:"secretUrl,omitempty"` - // SecretVaultID - ID of the Key Vault where this Secret is stored. - SecretVaultID *string `json:"secretVaultId,omitempty"` - // SecretData - BEK data. - SecretData *string `json:"secretData,omitempty"` -} - -// BMSBackupEngineQueryObject query parameters to fetch list of backup engines. -type BMSBackupEngineQueryObject struct { - // Expand - attribute to add extended info - Expand *string `json:"expand,omitempty"` -} - -// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines. -type BMSBackupEnginesQueryObject struct { - // BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // FriendlyName - Friendly name of the backup engine. - FriendlyName *string `json:"friendlyName,omitempty"` - // Expand - Attribute to add extended info. - Expand *string `json:"expand,omitempty"` -} - -// BMSBackupSummariesQueryObject query parameters to fetch backup summaries. -type BMSBackupSummariesQueryObject struct { - // Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary' - Type Type `json:"type,omitempty"` -} - -// BMSContainerQueryObject the query filters that can be used with the list containers API. -type BMSContainerQueryObject struct { - // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer' - ContainerType ContainerType `json:"containerType,omitempty"` - // BackupEngineName - Backup engine name - BackupEngineName *string `json:"backupEngineName,omitempty"` - // FabricName - Fabric name for filter - FabricName *string `json:"fabricName,omitempty"` - // Status - Status of registration of this container with the Recovery Services Vault. - Status *string `json:"status,omitempty"` - // FriendlyName - Friendly name of this container. - FriendlyName *string `json:"friendlyName,omitempty"` -} - -// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API. -type BMSContainersInquiryQueryObject struct { - // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` -} - -// BMSPOQueryObject filters to list items that can be backed up. -type BMSPOQueryObject struct { - // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` - // ContainerName - Full name of the container whose Protectable Objects should be returned. - ContainerName *string `json:"containerName,omitempty"` - // Status - Backup status query parameter. - Status *string `json:"status,omitempty"` - // FriendlyName - Friendly name. - FriendlyName *string `json:"friendlyName,omitempty"` -} - -// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API. -type BMSRefreshContainersQueryObject struct { - // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` -} - -// BMSRPQueryObject filters to list backup copies. -type BMSRPQueryObject struct { - // StartDate - Backup copies created after this time. - StartDate *date.Time `json:"startDate,omitempty"` - // EndDate - Backup copies created before this time. - EndDate *date.Time `json:"endDate,omitempty"` - // RestorePointQueryType - RestorePoint type. Possible values include: 'RestorePointQueryTypeInvalid', 'RestorePointQueryTypeFull', 'RestorePointQueryTypeLog', 'RestorePointQueryTypeDifferential', 'RestorePointQueryTypeFullAndDifferential', 'RestorePointQueryTypeAll' - RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"` - // ExtendedInfo - In Get Recovery Point, it tells whether extended information about recovery point is asked. - ExtendedInfo *bool `json:"extendedInfo,omitempty"` -} - -// BMSWorkloadItemQueryObject filters to list items that can be backed up. -type BMSWorkloadItemQueryObject struct { - // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' - WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` - // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` - // ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` -} - -// ClientDiscoveryDisplay localized display information of an operation. -type ClientDiscoveryDisplay struct { - // Provider - Name of the provider for display purposes - Provider *string `json:"provider,omitempty"` - // Resource - ResourceType for which this Operation can be performed. - Resource *string `json:"resource,omitempty"` - // Operation - Operations Name itself. - Operation *string `json:"operation,omitempty"` - // Description - Description of the operation having details of what operation is about. - Description *string `json:"description,omitempty"` -} - -// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client -// discovery. -type ClientDiscoveryForLogSpecification struct { - // Name - Name for shoebox log specification. - Name *string `json:"name,omitempty"` - // DisplayName - Localized display name - DisplayName *string `json:"displayName,omitempty"` - // BlobDuration - blob duration of shoebox log specification - BlobDuration *string `json:"blobDuration,omitempty"` -} - -// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. -type ClientDiscoveryForProperties struct { - // ServiceSpecification - Operation properties. - ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client -// discovery. -type ClientDiscoveryForServiceSpecification struct { - // LogSpecifications - List of log specifications of this operation. - LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` -} - -// ClientDiscoveryResponse operations List response which contains list of available APIs. -type ClientDiscoveryResponse struct { - autorest.Response `json:"-"` - // Value - List of available operations. - Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` - // NextLink - Link to the next chunk of Response. - NextLink *string `json:"nextLink,omitempty"` -} - -// ClientDiscoveryResponseIterator provides access to a complete listing of -// ClientDiscoveryValueForSingleAPI values. -type ClientDiscoveryResponseIterator struct { - i int - page ClientDiscoveryResponsePage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ClientDiscoveryResponseIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ClientDiscoveryResponseIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { - if !iter.page.NotDone() { - return ClientDiscoveryValueForSingleAPI{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ClientDiscoveryResponseIterator type. -func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { - return ClientDiscoveryResponseIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (cdr ClientDiscoveryResponse) IsEmpty() bool { - return cdr.Value == nil || len(*cdr.Value) == 0 -} - -// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) { - if cdr.NextLink == nil || len(to.String(cdr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(cdr.NextLink))) -} - -// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. -type ClientDiscoveryResponsePage struct { - fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error) - cdr ClientDiscoveryResponse -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.cdr) - if err != nil { - return err - } - page.cdr = next - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ClientDiscoveryResponsePage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ClientDiscoveryResponsePage) NotDone() bool { - return !page.cdr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { - return page.cdr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { - if page.cdr.IsEmpty() { - return nil - } - return *page.cdr.Value -} - -// Creates a new instance of the ClientDiscoveryResponsePage type. -func NewClientDiscoveryResponsePage(getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { - return ClientDiscoveryResponsePage{fn: getNextPage} -} - -// ClientDiscoveryValueForSingleAPI available operation details. -type ClientDiscoveryValueForSingleAPI struct { - // Name - Name of the Operation. - Name *string `json:"name,omitempty"` - // Display - Contains the localized display information for this particular operation - Display *ClientDiscoveryDisplay `json:"display,omitempty"` - // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX - Origin *string `json:"origin,omitempty"` - // Properties - ShoeBox properties for the given operation. - Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` -} - -// ClientScriptForConnect client script details for file / folder restore. -type ClientScriptForConnect struct { - // ScriptContent - File content of the client script for file / folder restore. - ScriptContent *string `json:"scriptContent,omitempty"` - // ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc. - ScriptExtension *string `json:"scriptExtension,omitempty"` - // OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works. - OsType *string `json:"osType,omitempty"` - // URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used - URL *string `json:"url,omitempty"` - // ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user. - // If its null or empty then , ignore it. - ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` -} - -// ContainerIdentityInfo container identity information -type ContainerIdentityInfo struct { - // UniqueName - Unique name of the container - UniqueName *string `json:"uniqueName,omitempty"` - // AadTenantID - Protection container identity - AAD Tenant - AadTenantID *string `json:"aadTenantId,omitempty"` - // ServicePrincipalClientID - Protection container identity - AAD Service Principal - ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` - // Audience - Protection container identity - Audience - Audience *string `json:"audience,omitempty"` -} - -// DailyRetentionFormat daily retention format. -type DailyRetentionFormat struct { - // DaysOfTheMonth - List of days of the month. - DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"` -} - -// DailyRetentionSchedule daily retention schedule. -type DailyRetentionSchedule struct { - // RetentionTimes - Retention times of retention policy. - RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` - // RetentionDuration - Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` -} - -// Day day of the week. -type Day struct { - // Date - Date of the month - Date *int32 `json:"date,omitempty"` - // IsLast - Whether Date is last date of month - IsLast *bool `json:"isLast,omitempty"` -} - -// DiskExclusionProperties ... -type DiskExclusionProperties struct { - // DiskLunList - List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. - DiskLunList *[]int32 `json:"diskLunList,omitempty"` - // IsInclusionList - Flag to indicate whether DiskLunList is to be included/ excluded from backup. - IsInclusionList *bool `json:"isInclusionList,omitempty"` -} - -// DiskInformation disk information -type DiskInformation struct { - Lun *int32 `json:"lun,omitempty"` - Name *string `json:"name,omitempty"` -} - -// DistributedNodesInfo this is used to represent the various nodes of the distributed container. -type DistributedNodesInfo struct { - // NodeName - Name of the node under a distributed container. - NodeName *string `json:"nodeName,omitempty"` - // Status - Status of this Node. - // Failed | Succeeded - Status *string `json:"status,omitempty"` - // ErrorDetail - Error Details if the Status is non-success. - ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` -} - -// DpmBackupEngine data Protection Manager (DPM) specific backup engine. -type DpmBackupEngine struct { - // FriendlyName - Friendly name of the backup engine. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} - BackupEngineState *string `json:"backupEngineState,omitempty"` - // HealthStatus - Backup status of the backup engine. - HealthStatus *string `json:"healthStatus,omitempty"` - // CanReRegister - Flag indicating if the backup engine be registered, once already registered. - CanReRegister *bool `json:"canReRegister,omitempty"` - // BackupEngineID - ID of the backup engine. - BackupEngineID *string `json:"backupEngineId,omitempty"` - // DpmVersion - Backup engine version - DpmVersion *string `json:"dpmVersion,omitempty"` - // AzureBackupAgentVersion - Backup agent version - AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` - // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available - IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` - // IsDpmUpgradeAvailable - To check if backup engine upgrade available - IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` - // ExtendedInfo - Extended info of the backupengine - ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` - // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' - BackupEngineType EngineType `json:"backupEngineType,omitempty"` -} - -// MarshalJSON is the custom marshaler for DpmBackupEngine. -func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { - dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine - objectMap := make(map[string]interface{}) - if dbe.FriendlyName != nil { - objectMap["friendlyName"] = dbe.FriendlyName - } - if dbe.BackupManagementType != "" { - objectMap["backupManagementType"] = dbe.BackupManagementType - } - if dbe.RegistrationStatus != nil { - objectMap["registrationStatus"] = dbe.RegistrationStatus - } - if dbe.BackupEngineState != nil { - objectMap["backupEngineState"] = dbe.BackupEngineState - } - if dbe.HealthStatus != nil { - objectMap["healthStatus"] = dbe.HealthStatus - } - if dbe.CanReRegister != nil { - objectMap["canReRegister"] = dbe.CanReRegister - } - if dbe.BackupEngineID != nil { - objectMap["backupEngineId"] = dbe.BackupEngineID - } - if dbe.DpmVersion != nil { - objectMap["dpmVersion"] = dbe.DpmVersion - } - if dbe.AzureBackupAgentVersion != nil { - objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion - } - if dbe.IsAzureBackupAgentUpgradeAvailable != nil { - objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable - } - if dbe.IsDpmUpgradeAvailable != nil { - objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable - } - if dbe.ExtendedInfo != nil { - objectMap["extendedInfo"] = dbe.ExtendedInfo - } - if dbe.BackupEngineType != "" { - objectMap["backupEngineType"] = dbe.BackupEngineType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine. -func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { - return nil, false -} - -// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine. -func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { - return &dbe, true -} - -// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine. -func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) { - return nil, false -} - -// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine. -func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) { - return &dbe, true -} - -// BasicDpmContainer DPM workload-specific protection container. -type BasicDpmContainer interface { - AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) - AsDpmContainer() (*DpmContainer, bool) -} - -// DpmContainer DPM workload-specific protection container. -type DpmContainer struct { - // CanReRegister - Specifies whether the container is re-registrable. - CanReRegister *bool `json:"canReRegister,omitempty"` - // ContainerID - ID of container. - ContainerID *string `json:"containerId,omitempty"` - // ProtectedItemCount - Number of protected items in the BackupEngine - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - // DpmAgentVersion - Backup engine Agent version - DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` - // DpmServers - List of BackupEngines protecting the container - DpmServers *[]string `json:"dpmServers,omitempty"` - // UpgradeAvailable - To check if upgrade available - UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` - // ProtectionStatus - Protection status of the container. - ProtectionStatus *string `json:"protectionStatus,omitempty"` - // ExtendedInfo - Extended Info of the container. - ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` -} - -func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["containerType"] { - case string(ContainerTypeAzureBackupServerContainer1): - var absc AzureBackupServerContainer - err := json.Unmarshal(body, &absc) - return absc, err - default: - var dc DpmContainer - err := json.Unmarshal(body, &dc) - return dc, err - } -} -func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - dcArray := make([]BasicDpmContainer, len(rawMessages)) - - for index, rawMessage := range rawMessages { - dc, err := unmarshalBasicDpmContainer(*rawMessage) - if err != nil { - return nil, err - } - dcArray[index] = dc - } - return dcArray, nil -} - -// MarshalJSON is the custom marshaler for DpmContainer. -func (dc DpmContainer) MarshalJSON() ([]byte, error) { - dc.ContainerType = ContainerTypeDPMContainer1 - objectMap := make(map[string]interface{}) - if dc.CanReRegister != nil { - objectMap["canReRegister"] = dc.CanReRegister - } - if dc.ContainerID != nil { - objectMap["containerId"] = dc.ContainerID - } - if dc.ProtectedItemCount != nil { - objectMap["protectedItemCount"] = dc.ProtectedItemCount - } - if dc.DpmAgentVersion != nil { - objectMap["dpmAgentVersion"] = dc.DpmAgentVersion - } - if dc.DpmServers != nil { - objectMap["dpmServers"] = dc.DpmServers - } - if dc.UpgradeAvailable != nil { - objectMap["upgradeAvailable"] = dc.UpgradeAvailable - } - if dc.ProtectionStatus != nil { - objectMap["protectionStatus"] = dc.ProtectionStatus - } - if dc.ExtendedInfo != nil { - objectMap["extendedInfo"] = dc.ExtendedInfo - } - if dc.FriendlyName != nil { - objectMap["friendlyName"] = dc.FriendlyName - } - if dc.BackupManagementType != "" { - objectMap["backupManagementType"] = dc.BackupManagementType - } - if dc.RegistrationStatus != nil { - objectMap["registrationStatus"] = dc.RegistrationStatus - } - if dc.HealthStatus != nil { - objectMap["healthStatus"] = dc.HealthStatus - } - if dc.ContainerType != "" { - objectMap["containerType"] = dc.ContainerType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return nil, false -} - -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return nil, false -} - -// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false -} - -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return nil, false -} - -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return nil, false -} - -// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { - return &dc, true -} - -// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { - return &dc, true -} - -// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) { - return nil, false -} - -// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { - return nil, false -} - -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { - return nil, false -} - -// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { - return nil, false -} - -// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) { - return nil, false -} - -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. -func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &dc, true -} - -// DPMContainerExtendedInfo additional information of the DPMContainer. -type DPMContainerExtendedInfo struct { - // LastRefreshedAt - Last refresh time of the DPMContainer. - LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` -} - -// DpmErrorInfo DPM workload-specific error information. -type DpmErrorInfo struct { - // ErrorString - Localized error string. - ErrorString *string `json:"errorString,omitempty"` - // Recommendations - List of localized recommendations for above error code. - Recommendations *[]string `json:"recommendations,omitempty"` -} - -// DpmJob DPM workload-specific job object. -type DpmJob struct { - // Duration - Time elapsed for job. - Duration *string `json:"duration,omitempty"` - // DpmServerName - DPM server name managing the backup item or backup job. - DpmServerName *string `json:"dpmServerName,omitempty"` - // ContainerName - Name of cluster/server protecting current backup item, if any. - ContainerName *string `json:"containerName,omitempty"` - // ContainerType - Type of container. - ContainerType *string `json:"containerType,omitempty"` - // WorkloadType - Type of backup item. - WorkloadType *string `json:"workloadType,omitempty"` - // ActionsInfo - The state/actions applicable on this job like cancel/retry. - ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` - // ErrorDetails - The errors. - ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"` - // ExtendedInfo - Additional information for this job. - ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` - // EntityFriendlyName - Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // Operation - The operation name. - Operation *string `json:"operation,omitempty"` - // Status - Job status. - Status *string `json:"status,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // ActivityID - ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' - JobType JobType `json:"jobType,omitempty"` -} - -// MarshalJSON is the custom marshaler for DpmJob. -func (dj DpmJob) MarshalJSON() ([]byte, error) { - dj.JobType = JobTypeDpmJob - objectMap := make(map[string]interface{}) - if dj.Duration != nil { - objectMap["duration"] = dj.Duration - } - if dj.DpmServerName != nil { - objectMap["dpmServerName"] = dj.DpmServerName - } - if dj.ContainerName != nil { - objectMap["containerName"] = dj.ContainerName - } - if dj.ContainerType != nil { - objectMap["containerType"] = dj.ContainerType - } - if dj.WorkloadType != nil { - objectMap["workloadType"] = dj.WorkloadType - } - if dj.ActionsInfo != nil { - objectMap["actionsInfo"] = dj.ActionsInfo - } - if dj.ErrorDetails != nil { - objectMap["errorDetails"] = dj.ErrorDetails - } - if dj.ExtendedInfo != nil { - objectMap["extendedInfo"] = dj.ExtendedInfo - } - if dj.EntityFriendlyName != nil { - objectMap["entityFriendlyName"] = dj.EntityFriendlyName - } - if dj.BackupManagementType != "" { - objectMap["backupManagementType"] = dj.BackupManagementType - } - if dj.Operation != nil { - objectMap["operation"] = dj.Operation - } - if dj.Status != nil { - objectMap["status"] = dj.Status - } - if dj.StartTime != nil { - objectMap["startTime"] = dj.StartTime - } - if dj.EndTime != nil { - objectMap["endTime"] = dj.EndTime - } - if dj.ActivityID != nil { - objectMap["activityId"] = dj.ActivityID - } - if dj.JobType != "" { - objectMap["jobType"] = dj.JobType - } - return json.Marshal(objectMap) -} - -// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob. -func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { - return nil, false -} - -// AsAzureStorageJob is the BasicJob implementation for DpmJob. -func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) { - return nil, false -} - -// AsAzureWorkloadJob is the BasicJob implementation for DpmJob. -func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { - return nil, false -} - -// AsDpmJob is the BasicJob implementation for DpmJob. -func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { - return &dj, true -} - -// AsMabJob is the BasicJob implementation for DpmJob. -func (dj DpmJob) AsMabJob() (*MabJob, bool) { - return nil, false -} - -// AsJob is the BasicJob implementation for DpmJob. -func (dj DpmJob) AsJob() (*Job, bool) { - return nil, false -} - -// AsBasicJob is the BasicJob implementation for DpmJob. -func (dj DpmJob) AsBasicJob() (BasicJob, bool) { - return &dj, true -} - -// DpmJobExtendedInfo additional information on the DPM workload-specific job. -type DpmJobExtendedInfo struct { - // TasksList - List of tasks associated with this job. - TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` - // PropertyBag - The job properties. - PropertyBag map[string]*string `json:"propertyBag"` - // DynamicErrorMessage - Non localized error message on job execution. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` -} - -// MarshalJSON is the custom marshaler for DpmJobExtendedInfo. -func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if djei.TasksList != nil { - objectMap["tasksList"] = djei.TasksList - } - if djei.PropertyBag != nil { - objectMap["propertyBag"] = djei.PropertyBag - } - if djei.DynamicErrorMessage != nil { - objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage - } - return json.Marshal(objectMap) -} - -// DpmJobTaskDetails DPM workload-specific job task details. -type DpmJobTaskDetails struct { - // TaskID - The task display name. - TaskID *string `json:"taskId,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // Duration - Time elapsed for task. - Duration *string `json:"duration,omitempty"` - // Status - The status. - Status *string `json:"status,omitempty"` -} - -// DPMProtectedItem additional information on Backup engine specific backup item. -type DPMProtectedItem struct { - // FriendlyName - Friendly name of the managed item - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupEngineName - Backup Management server protecting this backup item - BackupEngineName *string `json:"backupEngineName,omitempty"` - // ProtectionState - Protection state of the backup engine. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' - ProtectionState ProtectedItemState `json:"protectionState,omitempty"` - // ExtendedInfo - Extended info of the backup item. - ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for DPMProtectedItem. -func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) { - dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem - objectMap := make(map[string]interface{}) - if dpi.FriendlyName != nil { - objectMap["friendlyName"] = dpi.FriendlyName - } - if dpi.BackupEngineName != nil { - objectMap["backupEngineName"] = dpi.BackupEngineName - } - if dpi.ProtectionState != "" { - objectMap["protectionState"] = dpi.ProtectionState - } - if dpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = dpi.ExtendedInfo - } - if dpi.BackupManagementType != "" { - objectMap["backupManagementType"] = dpi.BackupManagementType - } - if dpi.WorkloadType != "" { - objectMap["workloadType"] = dpi.WorkloadType - } - if dpi.ContainerName != nil { - objectMap["containerName"] = dpi.ContainerName - } - if dpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = dpi.SourceResourceID - } - if dpi.PolicyID != nil { - objectMap["policyId"] = dpi.PolicyID - } - if dpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint - } - if dpi.BackupSetName != nil { - objectMap["backupSetName"] = dpi.BackupSetName - } - if dpi.CreateMode != "" { - objectMap["createMode"] = dpi.CreateMode - } - if dpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC - } - if dpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete - } - if dpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining - } - if dpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming - } - if dpi.IsRehydrate != nil { - objectMap["isRehydrate"] = dpi.IsRehydrate - } - if dpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = dpi.ProtectedItemType - } - return json.Marshal(objectMap) -} - -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return nil, false -} - -// AsDPMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return &dpi, true -} - -// AsGenericProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { - return nil, false -} - -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { - return nil, false -} - -// AsProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return nil, false -} - -// AsBasicProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. -func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &dpi, true -} - -// DPMProtectedItemExtendedInfo additional information of DPM Protected item. -type DPMProtectedItemExtendedInfo struct { - // ProtectableObjectLoadPath - Attribute to provide information on various DBs. - ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"` - // Protected - To check if backup item is disk protected. - Protected *bool `json:"protected,omitempty"` - // IsPresentOnCloud - To check if backup item is cloud protected. - IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"` - // LastBackupStatus - Last backup status information on backup item. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - // LastRefreshedAt - Last refresh time on backup item. - LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` - // OldestRecoveryPoint - Oldest cloud recovery point time. - OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` - // RecoveryPointCount - cloud recovery point count. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` - // OnPremiseOldestRecoveryPoint - Oldest disk recovery point time. - OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"` - // OnPremiseLatestRecoveryPoint - latest disk recovery point time. - OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"` - // OnPremiseRecoveryPointCount - disk recovery point count. - OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"` - // IsCollocated - To check if backup item is collocated. - IsCollocated *bool `json:"isCollocated,omitempty"` - // ProtectionGroupName - Protection group name of the backup item. - ProtectionGroupName *string `json:"protectionGroupName,omitempty"` - // DiskStorageUsedInBytes - Used Disk storage in bytes. - DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"` - // TotalDiskStorageSizeInBytes - total Disk storage in bytes. - TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` -} - -// MarshalJSON is the custom marshaler for DPMProtectedItemExtendedInfo. -func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dpiei.ProtectableObjectLoadPath != nil { - objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath - } - if dpiei.Protected != nil { - objectMap["protected"] = dpiei.Protected - } - if dpiei.IsPresentOnCloud != nil { - objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud - } - if dpiei.LastBackupStatus != nil { - objectMap["lastBackupStatus"] = dpiei.LastBackupStatus - } - if dpiei.LastRefreshedAt != nil { - objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt - } - if dpiei.OldestRecoveryPoint != nil { - objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint - } - if dpiei.RecoveryPointCount != nil { - objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount - } - if dpiei.OnPremiseOldestRecoveryPoint != nil { - objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint - } - if dpiei.OnPremiseLatestRecoveryPoint != nil { - objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint - } - if dpiei.OnPremiseRecoveryPointCount != nil { - objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount - } - if dpiei.IsCollocated != nil { - objectMap["isCollocated"] = dpiei.IsCollocated - } - if dpiei.ProtectionGroupName != nil { - objectMap["protectionGroupName"] = dpiei.ProtectionGroupName - } - if dpiei.DiskStorageUsedInBytes != nil { - objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes - } - if dpiei.TotalDiskStorageSizeInBytes != nil { - objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes - } - return json.Marshal(objectMap) -} - -// EncryptionDetails details needed if the VM was encrypted at the time of backup. -type EncryptionDetails struct { - // EncryptionEnabled - Identifies whether this backup copy represents an encrypted VM at the time of backup. - EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` - // KekURL - Key Url. - KekURL *string `json:"kekUrl,omitempty"` - // SecretKeyURL - Secret Url. - SecretKeyURL *string `json:"secretKeyUrl,omitempty"` - // KekVaultID - ID of Key Vault where KEK is stored. - KekVaultID *string `json:"kekVaultId,omitempty"` - // SecretKeyVaultID - ID of Key Vault where Secret is stored. - SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` -} - -// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class. -type BasicEngineBase interface { - AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) - AsDpmBackupEngine() (*DpmBackupEngine, bool) - AsEngineBase() (*EngineBase, bool) -} - -// EngineBase the base backup engine class. All workload specific backup engines derive from this class. -type EngineBase struct { - // FriendlyName - Friendly name of the backup engine. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} - BackupEngineState *string `json:"backupEngineState,omitempty"` - // HealthStatus - Backup status of the backup engine. - HealthStatus *string `json:"healthStatus,omitempty"` - // CanReRegister - Flag indicating if the backup engine be registered, once already registered. - CanReRegister *bool `json:"canReRegister,omitempty"` - // BackupEngineID - ID of the backup engine. - BackupEngineID *string `json:"backupEngineId,omitempty"` - // DpmVersion - Backup engine version - DpmVersion *string `json:"dpmVersion,omitempty"` - // AzureBackupAgentVersion - Backup agent version - AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` - // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available - IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` - // IsDpmUpgradeAvailable - To check if backup engine upgrade available - IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` - // ExtendedInfo - Extended info of the backupengine - ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` - // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' - BackupEngineType EngineType `json:"backupEngineType,omitempty"` -} - -func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["backupEngineType"] { - case string(BackupEngineTypeAzureBackupServerEngine): - var abse AzureBackupServerEngine - err := json.Unmarshal(body, &abse) - return abse, err - case string(BackupEngineTypeDpmBackupEngine): - var dbe DpmBackupEngine - err := json.Unmarshal(body, &dbe) - return dbe, err - default: - var eb EngineBase - err := json.Unmarshal(body, &eb) - return eb, err - } -} -func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - ebArray := make([]BasicEngineBase, len(rawMessages)) - - for index, rawMessage := range rawMessages { - eb, err := unmarshalBasicEngineBase(*rawMessage) - if err != nil { - return nil, err - } - ebArray[index] = eb - } - return ebArray, nil -} - -// MarshalJSON is the custom marshaler for EngineBase. -func (eb EngineBase) MarshalJSON() ([]byte, error) { - eb.BackupEngineType = BackupEngineTypeBackupEngineBase - objectMap := make(map[string]interface{}) - if eb.FriendlyName != nil { - objectMap["friendlyName"] = eb.FriendlyName - } - if eb.BackupManagementType != "" { - objectMap["backupManagementType"] = eb.BackupManagementType - } - if eb.RegistrationStatus != nil { - objectMap["registrationStatus"] = eb.RegistrationStatus - } - if eb.BackupEngineState != nil { - objectMap["backupEngineState"] = eb.BackupEngineState - } - if eb.HealthStatus != nil { - objectMap["healthStatus"] = eb.HealthStatus - } - if eb.CanReRegister != nil { - objectMap["canReRegister"] = eb.CanReRegister - } - if eb.BackupEngineID != nil { - objectMap["backupEngineId"] = eb.BackupEngineID - } - if eb.DpmVersion != nil { - objectMap["dpmVersion"] = eb.DpmVersion - } - if eb.AzureBackupAgentVersion != nil { - objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion - } - if eb.IsAzureBackupAgentUpgradeAvailable != nil { - objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable - } - if eb.IsDpmUpgradeAvailable != nil { - objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable - } - if eb.ExtendedInfo != nil { - objectMap["extendedInfo"] = eb.ExtendedInfo - } - if eb.BackupEngineType != "" { - objectMap["backupEngineType"] = eb.BackupEngineType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase. -func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { - return nil, false -} - -// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase. -func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) { - return nil, false -} - -// AsEngineBase is the BasicEngineBase implementation for EngineBase. -func (eb EngineBase) AsEngineBase() (*EngineBase, bool) { - return &eb, true -} - -// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase. -func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) { - return &eb, true -} - -// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this -// class. -type EngineBaseResource struct { - autorest.Response `json:"-"` - // Properties - BackupEngineBaseResource properties - Properties BasicEngineBase `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for EngineBaseResource. -func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["properties"] = ebr.Properties - if ebr.Location != nil { - objectMap["location"] = ebr.Location - } - if ebr.Tags != nil { - objectMap["tags"] = ebr.Tags - } - if ebr.ETag != nil { - objectMap["eTag"] = ebr.ETag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct. -func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - properties, err := unmarshalBasicEngineBase(*v) - if err != nil { - return err - } - ebr.Properties = properties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ebr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ebr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ebr.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ebr.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ebr.Tags = tags - } - case "eTag": - if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) - if err != nil { - return err - } - ebr.ETag = &eTag - } - } - } - - return nil -} - -// EngineBaseResourceList list of BackupEngineBase resources -type EngineBaseResourceList struct { - autorest.Response `json:"-"` - // Value - List of resources. - Value *[]EngineBaseResource `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values. -type EngineBaseResourceListIterator struct { - i int - page EngineBaseResourceListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *EngineBaseResourceListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EngineBaseResourceListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter EngineBaseResourceListIterator) Value() EngineBaseResource { - if !iter.page.NotDone() { - return EngineBaseResource{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the EngineBaseResourceListIterator type. -func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator { - return EngineBaseResourceListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (ebrl EngineBaseResourceList) IsEmpty() bool { - return ebrl.Value == nil || len(*ebrl.Value) == 0 -} - -// engineBaseResourceListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { - if ebrl.NextLink == nil || len(to.String(ebrl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(ebrl.NextLink))) -} - -// EngineBaseResourceListPage contains a page of EngineBaseResource values. -type EngineBaseResourceListPage struct { - fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error) - ebrl EngineBaseResourceList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.ebrl) - if err != nil { - return err - } - page.ebrl = next - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *EngineBaseResourceListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EngineBaseResourceListPage) NotDone() bool { - return !page.ebrl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EngineBaseResourceListPage) Response() EngineBaseResourceList { - return page.ebrl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page EngineBaseResourceListPage) Values() []EngineBaseResource { - if page.ebrl.IsEmpty() { - return nil - } - return *page.ebrl.Value -} - -// Creates a new instance of the EngineBaseResourceListPage type. -func NewEngineBaseResourceListPage(getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage { - return EngineBaseResourceListPage{fn: getNextPage} -} - -// EngineExtendedInfo additional information on backup engine. -type EngineExtendedInfo struct { - // DatabaseName - Database name of backup engine. - DatabaseName *string `json:"databaseName,omitempty"` - // ProtectedItemsCount - Number of protected items in the backup engine. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // ProtectedServersCount - Number of protected servers in the backup engine. - ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` - // DiskCount - Number of disks in the backup engine. - DiskCount *int32 `json:"diskCount,omitempty"` - // UsedDiskSpace - Disk space used in the backup engine. - UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` - // AvailableDiskSpace - Disk space currently available in the backup engine. - AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` - // RefreshedAt - Last refresh time in the backup engine. - RefreshedAt *date.Time `json:"refreshedAt,omitempty"` - // AzureProtectedInstances - Protected instances in the backup engine. - AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` -} - -// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations. -type ErrorDetail struct { - // Code - READ-ONLY; Error code. - Code *string `json:"code,omitempty"` - // Message - READ-ONLY; Error Message related to the Code. - Message *string `json:"message,omitempty"` - // Recommendations - READ-ONLY; List of recommendation strings. - Recommendations *[]string `json:"recommendations,omitempty"` -} - -// ExportJobsOperationResultInfo this class is used to send blob details after exporting jobs. -type ExportJobsOperationResultInfo struct { - // BlobURL - URL of the blob into which the serialized string of list of jobs is exported. - BlobURL *string `json:"blobUrl,omitempty"` - // BlobSasKey - SAS key to access the blob. It expires in 15 mins. - BlobSasKey *string `json:"blobSasKey,omitempty"` - // ExcelFileBlobURL - URL of the blob into which the ExcelFile is uploaded. - ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` - // ExcelFileBlobSasKey - SAS key to access the blob. It expires in 15 mins. - ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' - ObjectType ObjectType `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo. -func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { - ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo - objectMap := make(map[string]interface{}) - if ejori.BlobURL != nil { - objectMap["blobUrl"] = ejori.BlobURL - } - if ejori.BlobSasKey != nil { - objectMap["blobSasKey"] = ejori.BlobSasKey - } - if ejori.ExcelFileBlobURL != nil { - objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL - } - if ejori.ExcelFileBlobSasKey != nil { - objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey - } - if ejori.ObjectType != "" { - objectMap["objectType"] = ejori.ObjectType - } - return json.Marshal(objectMap) -} - -// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. -func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { - return &ejori, true -} - -// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. -func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { - return nil, false -} - -// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. -func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { - return nil, false -} - -// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. -func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { - return &ejori, true -} - -// ExtendedProperties extended Properties for Azure IaasVM Backup. -type ExtendedProperties struct { - // DiskExclusionProperties - Extended Properties for Disk Exclusion. - DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"` -} - -// BasicFeatureSupportRequest base class for feature request -type BasicFeatureSupportRequest interface { - AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) - AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) - AsFeatureSupportRequest() (*FeatureSupportRequest, bool) -} - -// FeatureSupportRequest base class for feature request -type FeatureSupportRequest struct { - // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' - FeatureType FeatureType `json:"featureType,omitempty"` -} - -func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["featureType"] { - case string(FeatureTypeAzureBackupGoals): - var abgfsr AzureBackupGoalFeatureSupportRequest - err := json.Unmarshal(body, &abgfsr) - return abgfsr, err - case string(FeatureTypeAzureVMResourceBackup): - var avrfsr AzureVMResourceFeatureSupportRequest - err := json.Unmarshal(body, &avrfsr) - return avrfsr, err - default: - var fsr FeatureSupportRequest - err := json.Unmarshal(body, &fsr) - return fsr, err - } -} -func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage) - if err != nil { - return nil, err - } - fsrArray[index] = fsr - } - return fsrArray, nil -} - -// MarshalJSON is the custom marshaler for FeatureSupportRequest. -func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) { - fsr.FeatureType = FeatureTypeFeatureSupportRequest - objectMap := make(map[string]interface{}) - if fsr.FeatureType != "" { - objectMap["featureType"] = fsr.FeatureType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. -func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { - return nil, false -} - -// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. -func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { - return nil, false -} - -// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. -func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { - return &fsr, true -} - -// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. -func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { - return &fsr, true -} - -// GenericContainer base class for generic container of backup items -type GenericContainer struct { - // FabricName - Name of the container's fabric - FabricName *string `json:"fabricName,omitempty"` - // ExtendedInformation - Extended information (not returned in List container API calls) - ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` -} - -// MarshalJSON is the custom marshaler for GenericContainer. -func (gc GenericContainer) MarshalJSON() ([]byte, error) { - gc.ContainerType = ContainerTypeGenericContainer1 - objectMap := make(map[string]interface{}) - if gc.FabricName != nil { - objectMap["fabricName"] = gc.FabricName - } - if gc.ExtendedInformation != nil { - objectMap["extendedInformation"] = gc.ExtendedInformation - } - if gc.FriendlyName != nil { - objectMap["friendlyName"] = gc.FriendlyName - } - if gc.BackupManagementType != "" { - objectMap["backupManagementType"] = gc.BackupManagementType - } - if gc.RegistrationStatus != nil { - objectMap["registrationStatus"] = gc.RegistrationStatus - } - if gc.HealthStatus != nil { - objectMap["healthStatus"] = gc.HealthStatus - } - if gc.ContainerType != "" { - objectMap["containerType"] = gc.ContainerType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return nil, false -} - -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return nil, false -} - -// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false -} - -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return nil, false -} - -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return nil, false -} - -// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false -} - -// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { - return nil, false -} - -// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) { - return &gc, true -} - -// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { - return nil, false -} - -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { - return nil, false -} - -// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) { - return nil, false -} - -// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) { - return nil, false -} - -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. -func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &gc, true -} - -// GenericContainerExtendedInfo container extended information -type GenericContainerExtendedInfo struct { - // RawCertData - Public key of container cert - RawCertData *string `json:"rawCertData,omitempty"` - // ContainerIdentityInfo - Container identity information - ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` - // ServiceEndpoints - Azure Backup Service Endpoints for the container - ServiceEndpoints map[string]*string `json:"serviceEndpoints"` -} - -// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo. -func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gcei.RawCertData != nil { - objectMap["rawCertData"] = gcei.RawCertData - } - if gcei.ContainerIdentityInfo != nil { - objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo - } - if gcei.ServiceEndpoints != nil { - objectMap["serviceEndpoints"] = gcei.ServiceEndpoints - } - return json.Marshal(objectMap) -} - -// GenericProtectedItem base class for backup items. -type GenericProtectedItem struct { - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // PolicyState - Indicates consistency of policy object and policy applied to this backup item. - PolicyState *string `json:"policyState,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' - ProtectionState ProtectionState `json:"protectionState,omitempty"` - // ProtectedItemID - Data Plane Service ID of the protected item. - ProtectedItemID *int64 `json:"protectedItemId,omitempty"` - // SourceAssociations - Loosely coupled (type, value) associations (example - parent of a protected item) - SourceAssociations map[string]*string `json:"sourceAssociations"` - // FabricName - Name of this backup item's fabric. - FabricName *string `json:"fabricName,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for GenericProtectedItem. -func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) { - gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem - objectMap := make(map[string]interface{}) - if gpi.FriendlyName != nil { - objectMap["friendlyName"] = gpi.FriendlyName - } - if gpi.PolicyState != nil { - objectMap["policyState"] = gpi.PolicyState - } - if gpi.ProtectionState != "" { - objectMap["protectionState"] = gpi.ProtectionState - } - if gpi.ProtectedItemID != nil { - objectMap["protectedItemId"] = gpi.ProtectedItemID - } - if gpi.SourceAssociations != nil { - objectMap["sourceAssociations"] = gpi.SourceAssociations - } - if gpi.FabricName != nil { - objectMap["fabricName"] = gpi.FabricName - } - if gpi.BackupManagementType != "" { - objectMap["backupManagementType"] = gpi.BackupManagementType - } - if gpi.WorkloadType != "" { - objectMap["workloadType"] = gpi.WorkloadType - } - if gpi.ContainerName != nil { - objectMap["containerName"] = gpi.ContainerName - } - if gpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = gpi.SourceResourceID - } - if gpi.PolicyID != nil { - objectMap["policyId"] = gpi.PolicyID - } - if gpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint - } - if gpi.BackupSetName != nil { - objectMap["backupSetName"] = gpi.BackupSetName - } - if gpi.CreateMode != "" { - objectMap["createMode"] = gpi.CreateMode - } - if gpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC - } - if gpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete - } - if gpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining - } - if gpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming - } - if gpi.IsRehydrate != nil { - objectMap["isRehydrate"] = gpi.IsRehydrate - } - if gpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = gpi.ProtectedItemType - } - return json.Marshal(objectMap) -} - -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return nil, false -} - -// AsDPMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false -} - -// AsGenericProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { - return &gpi, true -} - -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { - return nil, false -} - -// AsProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return nil, false -} - -// AsBasicProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. -func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &gpi, true -} - -// GenericProtectionPolicy azure VM (Mercury) workload-specific backup policy. -type GenericProtectionPolicy struct { - // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention - SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` - // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` - // FabricName - Name of this policy's fabric. - FabricName *string `json:"fabricName,omitempty"` - // ProtectedItemsCount - Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' - BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` -} - -// MarshalJSON is the custom marshaler for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) { - gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy - objectMap := make(map[string]interface{}) - if gpp.SubProtectionPolicy != nil { - objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy - } - if gpp.TimeZone != nil { - objectMap["timeZone"] = gpp.TimeZone - } - if gpp.FabricName != nil { - objectMap["fabricName"] = gpp.FabricName - } - if gpp.ProtectedItemsCount != nil { - objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount - } - if gpp.BackupManagementType != "" { - objectMap["backupManagementType"] = gpp.BackupManagementType - } - return json.Marshal(objectMap) -} - -// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { - return nil, false -} - -// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { - return nil, false -} - -// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { - return nil, false -} - -// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { - return &gpp, true -} - -// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { - return nil, false -} - -// AsProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { - return nil, false -} - -// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. -func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { - return &gpp, true -} - -// GenericRecoveryPoint generic backup copy. -type GenericRecoveryPoint struct { - // FriendlyName - Friendly name of the backup copy. - FriendlyName *string `json:"friendlyName,omitempty"` - // RecoveryPointType - Type of the backup copy. - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - // RecoveryPointTime - Time at which this backup copy was created. - RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` - // RecoveryPointAdditionalInfo - Additional information associated with this backup copy. - RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) { - grp.ObjectType = ObjectTypeGenericRecoveryPoint - objectMap := make(map[string]interface{}) - if grp.FriendlyName != nil { - objectMap["friendlyName"] = grp.FriendlyName - } - if grp.RecoveryPointType != nil { - objectMap["recoveryPointType"] = grp.RecoveryPointType - } - if grp.RecoveryPointTime != nil { - objectMap["recoveryPointTime"] = grp.RecoveryPointTime - } - if grp.RecoveryPointAdditionalInfo != nil { - objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo - } - if grp.ObjectType != "" { - objectMap["objectType"] = grp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return &grp, true -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return nil, false -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. -func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &grp, true -} - -// GetProtectedItemQueryObject filters to list backup items. -type GetProtectedItemQueryObject struct { - // Expand - Specifies if the additional information should be provided for this item. - Expand *string `json:"expand,omitempty"` -} - -// IaasVMBackupRequest iaaS VM workload-specific backup request. -type IaasVMBackupRequest struct { - // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). - RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' - ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for IaasVMBackupRequest. -func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { - ivbr.ObjectType = ObjectTypeIaasVMBackupRequest - objectMap := make(map[string]interface{}) - if ivbr.RecoveryPointExpiryTimeInUTC != nil { - objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC - } - if ivbr.ObjectType != "" { - objectMap["objectType"] = ivbr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. -func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { - return nil, false -} - -// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. -func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { - return nil, false -} - -// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. -func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { - return &ivbr, true -} - -// AsRequest is the BasicRequest implementation for IaasVMBackupRequest. -func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) { - return nil, false -} - -// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest. -func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) { - return &ivbr, true -} - -// BasicIaaSVMContainer iaaS VM workload-specific container. -type BasicIaaSVMContainer interface { - AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) - AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) - AsIaaSVMContainer() (*IaaSVMContainer, bool) -} - -// IaaSVMContainer iaaS VM workload-specific container. -type IaaSVMContainer struct { - // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - // ResourceGroup - Resource group name of Recovery Services Vault. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` -} - -func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["containerType"] { - case string(ContainerTypeMicrosoftClassicComputevirtualMachines): - var aisccvc AzureIaaSClassicComputeVMContainer - err := json.Unmarshal(body, &aisccvc) - return aisccvc, err - case string(ContainerTypeMicrosoftComputevirtualMachines): - var aiscvc AzureIaaSComputeVMContainer - err := json.Unmarshal(body, &aiscvc) - return aiscvc, err - default: - var isc IaaSVMContainer - err := json.Unmarshal(body, &isc) - return isc, err - } -} -func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - iscArray := make([]BasicIaaSVMContainer, len(rawMessages)) - - for index, rawMessage := range rawMessages { - isc, err := unmarshalBasicIaaSVMContainer(*rawMessage) - if err != nil { - return nil, err - } - iscArray[index] = isc - } - return iscArray, nil -} - -// MarshalJSON is the custom marshaler for IaaSVMContainer. -func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { - isc.ContainerType = ContainerTypeIaaSVMContainer - objectMap := make(map[string]interface{}) - if isc.VirtualMachineID != nil { - objectMap["virtualMachineId"] = isc.VirtualMachineID - } - if isc.VirtualMachineVersion != nil { - objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion - } - if isc.ResourceGroup != nil { - objectMap["resourceGroup"] = isc.ResourceGroup - } - if isc.FriendlyName != nil { - objectMap["friendlyName"] = isc.FriendlyName - } - if isc.BackupManagementType != "" { - objectMap["backupManagementType"] = isc.BackupManagementType - } - if isc.RegistrationStatus != nil { - objectMap["registrationStatus"] = isc.RegistrationStatus - } - if isc.HealthStatus != nil { - objectMap["healthStatus"] = isc.HealthStatus - } - if isc.ContainerType != "" { - objectMap["containerType"] = isc.ContainerType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return nil, false -} - -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return nil, false -} - -// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false -} - -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return nil, false -} - -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return nil, false -} - -// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false -} - -// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { - return nil, false -} - -// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) { - return nil, false -} - -// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { - return &isc, true -} - -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { - return &isc, true -} - -// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { - return nil, false -} - -// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { - return nil, false -} - -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. -func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &isc, true -} - -// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM. -type IaasVMILRRegistrationRequest struct { - // RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - // VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // InitiatorName - iSCSI initiator name. - InitiatorName *string `json:"initiatorName,omitempty"` - // RenewExistingRegistration - Whether to renew existing registration with the iSCSI server. - RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' - ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. -func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { - ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest - objectMap := make(map[string]interface{}) - if ivrr.RecoveryPointID != nil { - objectMap["recoveryPointId"] = ivrr.RecoveryPointID - } - if ivrr.VirtualMachineID != nil { - objectMap["virtualMachineId"] = ivrr.VirtualMachineID - } - if ivrr.InitiatorName != nil { - objectMap["initiatorName"] = ivrr.InitiatorName - } - if ivrr.RenewExistingRegistration != nil { - objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration - } - if ivrr.ObjectType != "" { - objectMap["objectType"] = ivrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. -func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { - return nil, false -} - -// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. -func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { - return &ivrr, true -} - -// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. -func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) { - return nil, false -} - -// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. -func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) { - return &ivrr, true -} - -// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item. -type BasicIaaSVMProtectableItem interface { - AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) - AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) - AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) -} - -// IaaSVMProtectableItem iaaS VM workload-specific backup item. -type IaaSVMProtectableItem struct { - // VirtualMachineID - Fully qualified ARM ID of the virtual machine. - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - // BackupManagementType - Type of backup management to backup an item. - BackupManagementType *string `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload for the backup management - WorkloadType *string `json:"workloadType,omitempty"` - // FriendlyName - Friendly name of the backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' - ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` -} - -func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["protectableItemType"] { - case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): - var aisccvpi AzureIaaSClassicComputeVMProtectableItem - err := json.Unmarshal(body, &aisccvpi) - return aisccvpi, err - case string(ProtectableItemTypeMicrosoftComputevirtualMachines): - var aiscvpi AzureIaaSComputeVMProtectableItem - err := json.Unmarshal(body, &aiscvpi) - return aiscvpi, err - default: - var ispi IaaSVMProtectableItem - err := json.Unmarshal(body, &ispi) - return ispi, err - } -} -func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages)) - - for index, rawMessage := range rawMessages { - ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage) - if err != nil { - return nil, err - } - ispiArray[index] = ispi - } - return ispiArray, nil -} - -// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { - ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem - objectMap := make(map[string]interface{}) - if ispi.VirtualMachineID != nil { - objectMap["virtualMachineId"] = ispi.VirtualMachineID - } - if ispi.BackupManagementType != nil { - objectMap["backupManagementType"] = ispi.BackupManagementType - } - if ispi.WorkloadType != nil { - objectMap["workloadType"] = ispi.WorkloadType - } - if ispi.FriendlyName != nil { - objectMap["friendlyName"] = ispi.FriendlyName - } - if ispi.ProtectionState != "" { - objectMap["protectionState"] = ispi.ProtectionState - } - if ispi.ProtectableItemType != "" { - objectMap["protectableItemType"] = ispi.ProtectableItemType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { - return nil, false -} - -// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { - return &ispi, true -} - -// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { - return &ispi, true -} - -// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { - return nil, false -} - -// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. -func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { - return &ispi, true -} - -// IaasVMRecoveryPoint iaaS VM workload specific backup copy. -type IaasVMRecoveryPoint struct { - // RecoveryPointType - READ-ONLY; Type of the backup copy. - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. - RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` - // RecoveryPointAdditionalInfo - READ-ONLY; Additional information associated with this backup copy. - RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` - // SourceVMStorageType - READ-ONLY; Storage type of the VM whose backup copy is created. - SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` - // IsSourceVMEncrypted - READ-ONLY; Identifies whether the VM was encrypted when the backup copy is created. - IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` - // KeyAndSecret - Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. - KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` - // IsInstantIlrSessionActive - Is the session to recover items from this backup copy still active. - IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"` - // RecoveryPointTierDetails - Recovery point tier information. - RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` - // IsManagedVirtualMachine - Whether VM is with Managed Disks - IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` - // VirtualMachineSize - Virtual Machine Size - VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` - // OriginalStorageAccountOption - Original Storage Account Option - OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` - // OsType - OS type - OsType *string `json:"osType,omitempty"` - // RecoveryPointDiskConfiguration - Disk configuration - RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { - ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint - objectMap := make(map[string]interface{}) - if ivrp.KeyAndSecret != nil { - objectMap["keyAndSecret"] = ivrp.KeyAndSecret - } - if ivrp.IsInstantIlrSessionActive != nil { - objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive - } - if ivrp.RecoveryPointTierDetails != nil { - objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails - } - if ivrp.IsManagedVirtualMachine != nil { - objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine - } - if ivrp.VirtualMachineSize != nil { - objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize - } - if ivrp.OriginalStorageAccountOption != nil { - objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption - } - if ivrp.OsType != nil { - objectMap["osType"] = ivrp.OsType - } - if ivrp.RecoveryPointDiskConfiguration != nil { - objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration - } - if ivrp.ObjectType != "" { - objectMap["objectType"] = ivrp.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { - return nil, false -} - -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { - return nil, false -} - -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { - return &ivrp, true -} - -// AsRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return nil, false -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. -func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &ivrp, true -} - -// IaasVMRestoreRequest iaaS VM workload-specific restore. -type IaasVMRestoreRequest struct { - // RecoveryPointID - ID of the backup copy to be recovered. - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - // SourceResourceID - Fully qualified ARM ID of the VM which is being recovered. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created. - // For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` - // TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. - // For e.g. /subscriptions/{subId}/resourcegroups/{rg} - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - // StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored. - StorageAccountID *string `json:"storageAccountId,omitempty"` - // VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine. - // User will be validated for join action permissions in the linked access. - VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` - // SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be - // {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent - // the subnet. - SubnetID *string `json:"subnetId,omitempty"` - // TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic - // Virtual Machines. - TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` - // Region - Region in which the virtual machine is restored. - Region *string `json:"region,omitempty"` - // AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. - AffinityGroup *string `json:"affinityGroup,omitempty"` - // CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same - // cloud service as it was at the time of backup. - CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` - // OriginalStorageAccountOption - Original Storage Account Option - OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` - // EncryptionDetails - Details needed if the VM was encrypted at the time of backup. - EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` - // RestoreDiskLunList - List of Disk LUNs for partial restore - RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { - ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest - objectMap := make(map[string]interface{}) - if ivrr.RecoveryPointID != nil { - objectMap["recoveryPointId"] = ivrr.RecoveryPointID - } - if ivrr.RecoveryType != "" { - objectMap["recoveryType"] = ivrr.RecoveryType - } - if ivrr.SourceResourceID != nil { - objectMap["sourceResourceId"] = ivrr.SourceResourceID - } - if ivrr.TargetVirtualMachineID != nil { - objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID - } - if ivrr.TargetResourceGroupID != nil { - objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID - } - if ivrr.StorageAccountID != nil { - objectMap["storageAccountId"] = ivrr.StorageAccountID - } - if ivrr.VirtualNetworkID != nil { - objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID - } - if ivrr.SubnetID != nil { - objectMap["subnetId"] = ivrr.SubnetID - } - if ivrr.TargetDomainNameID != nil { - objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID - } - if ivrr.Region != nil { - objectMap["region"] = ivrr.Region - } - if ivrr.AffinityGroup != nil { - objectMap["affinityGroup"] = ivrr.AffinityGroup - } - if ivrr.CreateNewCloudService != nil { - objectMap["createNewCloudService"] = ivrr.CreateNewCloudService - } - if ivrr.OriginalStorageAccountOption != nil { - objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption - } - if ivrr.EncryptionDetails != nil { - objectMap["encryptionDetails"] = ivrr.EncryptionDetails - } - if ivrr.RestoreDiskLunList != nil { - objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList - } - if ivrr.ObjectType != "" { - objectMap["objectType"] = ivrr.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false -} - -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { - return nil, false -} - -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { - return &ivrr, true -} - -// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return nil, false -} - -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. -func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &ivrr, true -} - -// BasicILRRequest parameters to Provision ILR API. -type BasicILRRequest interface { - AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) - AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) - AsILRRequest() (*ILRRequest, bool) -} - -// ILRRequest parameters to Provision ILR API. -type ILRRequest struct { - // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' - ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` -} - -func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeAzureFileShareProvisionILRRequest): - var afspir AzureFileShareProvisionILRRequest - err := json.Unmarshal(body, &afspir) - return afspir, err - case string(ObjectTypeIaasVMILRRegistrationRequest): - var ivrr IaasVMILRRegistrationRequest - err := json.Unmarshal(body, &ivrr) - return ivrr, err - default: - var ir ILRRequest - err := json.Unmarshal(body, &ir) - return ir, err - } -} -func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - irArray := make([]BasicILRRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - ir, err := unmarshalBasicILRRequest(*rawMessage) - if err != nil { - return nil, err - } - irArray[index] = ir - } - return irArray, nil -} - -// MarshalJSON is the custom marshaler for ILRRequest. -func (ir ILRRequest) MarshalJSON() ([]byte, error) { - ir.ObjectType = ObjectTypeILRRequest - objectMap := make(map[string]interface{}) - if ir.ObjectType != "" { - objectMap["objectType"] = ir.ObjectType - } - return json.Marshal(objectMap) -} - -// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest. -func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { - return nil, false -} - -// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest. -func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { - return nil, false -} - -// AsILRRequest is the BasicILRRequest implementation for ILRRequest. -func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) { - return &ir, true -} - -// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest. -func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { - return &ir, true -} - -// ILRRequestResource parameters to Provision ILR API. -type ILRRequestResource struct { - // Properties - ILRRequestResource properties - Properties BasicILRRequest `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ILRRequestResource. -func (irr ILRRequestResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["properties"] = irr.Properties - if irr.Location != nil { - objectMap["location"] = irr.Location - } - if irr.Tags != nil { - objectMap["tags"] = irr.Tags - } - if irr.ETag != nil { - objectMap["eTag"] = irr.ETag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. -func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - properties, err := unmarshalBasicILRRequest(*v) - if err != nil { - return err - } - irr.Properties = properties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - irr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - irr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - irr.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - irr.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - irr.Tags = tags - } - case "eTag": - if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) - if err != nil { - return err - } - irr.ETag = &eTag - } - } - } - - return nil -} - -// InquiryInfo details about inquired protectable items under a given container. -type InquiryInfo struct { - // Status - Inquiry Status for this container such as - // InProgress | Failed | Succeeded - Status *string `json:"status,omitempty"` - // ErrorDetail - Error Details if the Status is non-success. - ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` - // InquiryDetails - Inquiry Details which will have workload specific details. - // For e.g. - For SQL and oracle this will contain different details. - InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` -} - -// InquiryValidation validation for inquired protectable items under a given container. -type InquiryValidation struct { - // Status - Status for the Inquiry Validation. - Status *string `json:"status,omitempty"` - // ErrorDetail - Error Detail in case the status is non-success. - ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` - // AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success. - AdditionalDetail *string `json:"additionalDetail,omitempty"` -} - -// InstantItemRecoveryTarget target details for file / folder restore. -type InstantItemRecoveryTarget struct { - // ClientScripts - List of client scripts. - ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"` -} - -// InstantRPAdditionalDetails ... -type InstantRPAdditionalDetails struct { - AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` - AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` -} - -// BasicJob defines workload agnostic properties for a job. -type BasicJob interface { - AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) - AsAzureStorageJob() (*AzureStorageJob, bool) - AsAzureWorkloadJob() (*AzureWorkloadJob, bool) - AsDpmJob() (*DpmJob, bool) - AsMabJob() (*MabJob, bool) - AsJob() (*Job, bool) -} - -// Job defines workload agnostic properties for a job. -type Job struct { - // EntityFriendlyName - Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // Operation - The operation name. - Operation *string `json:"operation,omitempty"` - // Status - Job status. - Status *string `json:"status,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // ActivityID - ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' - JobType JobType `json:"jobType,omitempty"` -} - -func unmarshalBasicJob(body []byte) (BasicJob, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["jobType"] { - case string(JobTypeAzureIaaSVMJob): - var aisj AzureIaaSVMJob - err := json.Unmarshal(body, &aisj) - return aisj, err - case string(JobTypeAzureStorageJob): - var asj AzureStorageJob - err := json.Unmarshal(body, &asj) - return asj, err - case string(JobTypeAzureWorkloadJob): - var awj AzureWorkloadJob - err := json.Unmarshal(body, &awj) - return awj, err - case string(JobTypeDpmJob): - var dj DpmJob - err := json.Unmarshal(body, &dj) - return dj, err - case string(JobTypeMabJob): - var mj MabJob - err := json.Unmarshal(body, &mj) - return mj, err - default: - var j Job - err := json.Unmarshal(body, &j) - return j, err - } -} -func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - jArray := make([]BasicJob, len(rawMessages)) - - for index, rawMessage := range rawMessages { - j, err := unmarshalBasicJob(*rawMessage) - if err != nil { - return nil, err - } - jArray[index] = j - } - return jArray, nil -} - -// MarshalJSON is the custom marshaler for Job. -func (j Job) MarshalJSON() ([]byte, error) { - j.JobType = JobTypeJob - objectMap := make(map[string]interface{}) - if j.EntityFriendlyName != nil { - objectMap["entityFriendlyName"] = j.EntityFriendlyName - } - if j.BackupManagementType != "" { - objectMap["backupManagementType"] = j.BackupManagementType - } - if j.Operation != nil { - objectMap["operation"] = j.Operation - } - if j.Status != nil { - objectMap["status"] = j.Status - } - if j.StartTime != nil { - objectMap["startTime"] = j.StartTime - } - if j.EndTime != nil { - objectMap["endTime"] = j.EndTime - } - if j.ActivityID != nil { - objectMap["activityId"] = j.ActivityID - } - if j.JobType != "" { - objectMap["jobType"] = j.JobType - } - return json.Marshal(objectMap) -} - -// AsAzureIaaSVMJob is the BasicJob implementation for Job. -func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { - return nil, false -} - -// AsAzureStorageJob is the BasicJob implementation for Job. -func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) { - return nil, false -} - -// AsAzureWorkloadJob is the BasicJob implementation for Job. -func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { - return nil, false -} - -// AsDpmJob is the BasicJob implementation for Job. -func (j Job) AsDpmJob() (*DpmJob, bool) { - return nil, false -} - -// AsMabJob is the BasicJob implementation for Job. -func (j Job) AsMabJob() (*MabJob, bool) { - return nil, false -} - -// AsJob is the BasicJob implementation for Job. -func (j Job) AsJob() (*Job, bool) { - return &j, true -} - -// AsBasicJob is the BasicJob implementation for Job. -func (j Job) AsBasicJob() (BasicJob, bool) { - return &j, true -} - -// JobQueryObject filters to list the jobs. -type JobQueryObject struct { - // Status - Status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusInProgress', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCompletedWithWarnings', 'JobStatusCancelled', 'JobStatusCancelling' - Status JobStatus `json:"status,omitempty"` - // BackupManagementType - Type of backup management for the job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // Operation - Type of operation. Possible values include: 'JobOperationTypeInvalid', 'JobOperationTypeRegister', 'JobOperationTypeUnRegister', 'JobOperationTypeConfigureBackup', 'JobOperationTypeBackup', 'JobOperationTypeRestore', 'JobOperationTypeDisableBackup', 'JobOperationTypeDeleteBackupData', 'JobOperationTypeCrossRegionRestore', 'JobOperationTypeUndelete' - Operation JobOperationType `json:"operation,omitempty"` - // JobID - JobID represents the job uniquely. - JobID *string `json:"jobId,omitempty"` - // StartTime - Job has started at this time. Value is in UTC. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - Job has ended at this time. Value is in UTC. - EndTime *date.Time `json:"endTime,omitempty"` -} - -// JobResource defines workload agnostic properties for a job. -type JobResource struct { - autorest.Response `json:"-"` - // Properties - JobResource properties - Properties BasicJob `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for JobResource. -func (jr JobResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["properties"] = jr.Properties - if jr.Location != nil { - objectMap["location"] = jr.Location - } - if jr.Tags != nil { - objectMap["tags"] = jr.Tags - } - if jr.ETag != nil { - objectMap["eTag"] = jr.ETag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for JobResource struct. -func (jr *JobResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - properties, err := unmarshalBasicJob(*v) - if err != nil { - return err - } - jr.Properties = properties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - jr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - jr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - jr.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - jr.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - jr.Tags = tags - } - case "eTag": - if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) - if err != nil { - return err - } - jr.ETag = &eTag - } - } - } - - return nil -} - -// JobResourceList list of Job resources -type JobResourceList struct { - autorest.Response `json:"-"` - // Value - List of resources. - Value *[]JobResource `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// JobResourceListIterator provides access to a complete listing of JobResource values. -type JobResourceListIterator struct { - i int - page JobResourceListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *JobResourceListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter JobResourceListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter JobResourceListIterator) Response() JobResourceList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter JobResourceListIterator) Value() JobResource { - if !iter.page.NotDone() { - return JobResource{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the JobResourceListIterator type. -func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator { - return JobResourceListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (jrl JobResourceList) IsEmpty() bool { - return jrl.Value == nil || len(*jrl.Value) == 0 -} - -// jobResourceListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) { - if jrl.NextLink == nil || len(to.String(jrl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(jrl.NextLink))) -} - -// JobResourceListPage contains a page of JobResource values. -type JobResourceListPage struct { - fn func(context.Context, JobResourceList) (JobResourceList, error) - jrl JobResourceList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.jrl) - if err != nil { - return err - } - page.jrl = next - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *JobResourceListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page JobResourceListPage) NotDone() bool { - return !page.jrl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page JobResourceListPage) Response() JobResourceList { - return page.jrl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page JobResourceListPage) Values() []JobResource { - if page.jrl.IsEmpty() { - return nil - } - return *page.jrl.Value -} - -// Creates a new instance of the JobResourceListPage type. -func NewJobResourceListPage(getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage { - return JobResourceListPage{fn: getNextPage} -} - -// KEKDetails KEK is encryption key for BEK. -type KEKDetails struct { - // KeyURL - Key is KEK. - KeyURL *string `json:"keyUrl,omitempty"` - // KeyVaultID - Key Vault ID where this Key is stored. - KeyVaultID *string `json:"keyVaultId,omitempty"` - // KeyBackupData - KEK data. - KeyBackupData *string `json:"keyBackupData,omitempty"` -} - -// KeyAndSecretDetails BEK is bitlocker key. -// KEK is encryption key for BEK -// If the VM was encrypted then we will store following details : -// 1. Secret(BEK) - Url + Backup Data + vaultId. -// 2. Key(KEK) - Url + Backup Data + vaultId. -// 3. EncryptionMechanism -// BEK and KEK can potentially have different vault ids. -type KeyAndSecretDetails struct { - // KekDetails - KEK is encryption key for BEK. - KekDetails *KEKDetails `json:"kekDetails,omitempty"` - // BekDetails - BEK is bitlocker encryption key. - BekDetails *BEKDetails `json:"bekDetails,omitempty"` - // EncryptionMechanism - Encryption mechanism: None/ SinglePass/ DoublePass - EncryptionMechanism *string `json:"encryptionMechanism,omitempty"` -} - -// LogSchedulePolicy log policy schedule. -type LogSchedulePolicy struct { - // ScheduleFrequencyInMins - Frequency of the log schedule operation of this policy in minutes. - ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"` - // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' - SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` -} - -// MarshalJSON is the custom marshaler for LogSchedulePolicy. -func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) { - lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy - objectMap := make(map[string]interface{}) - if lsp.ScheduleFrequencyInMins != nil { - objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins - } - if lsp.SchedulePolicyType != "" { - objectMap["schedulePolicyType"] = lsp.SchedulePolicyType - } - return json.Marshal(objectMap) -} - -// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. -func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { - return &lsp, true -} - -// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. -func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { - return nil, false -} - -// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. -func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { - return nil, false -} - -// AsSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. -func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { - return nil, false -} - -// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. -func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { - return &lsp, true -} - -// LongTermRetentionPolicy long term retention policy. -type LongTermRetentionPolicy struct { - // DailySchedule - Daily retention schedule of the protection policy. - DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` - // WeeklySchedule - Weekly retention schedule of the protection policy. - WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` - // MonthlySchedule - Monthly retention schedule of the protection policy. - MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` - // YearlySchedule - Yearly retention schedule of the protection policy. - YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` - // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' - RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` -} - -// MarshalJSON is the custom marshaler for LongTermRetentionPolicy. -func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { - ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy - objectMap := make(map[string]interface{}) - if ltrp.DailySchedule != nil { - objectMap["dailySchedule"] = ltrp.DailySchedule - } - if ltrp.WeeklySchedule != nil { - objectMap["weeklySchedule"] = ltrp.WeeklySchedule - } - if ltrp.MonthlySchedule != nil { - objectMap["monthlySchedule"] = ltrp.MonthlySchedule - } - if ltrp.YearlySchedule != nil { - objectMap["yearlySchedule"] = ltrp.YearlySchedule - } - if ltrp.RetentionPolicyType != "" { - objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType - } - return json.Marshal(objectMap) -} - -// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. -func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { - return <rp, true -} - -// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. -func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { - return nil, false -} - -// AsRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. -func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { - return nil, false -} - -// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. -func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { - return <rp, true -} - -// LongTermSchedulePolicy long term policy schedule. -type LongTermSchedulePolicy struct { - // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' - SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` -} - -// MarshalJSON is the custom marshaler for LongTermSchedulePolicy. -func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { - ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy - objectMap := make(map[string]interface{}) - if ltsp.SchedulePolicyType != "" { - objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType - } - return json.Marshal(objectMap) -} - -// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. -func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { - return nil, false -} - -// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. -func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { - return <sp, true -} - -// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. -func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { - return nil, false -} - -// AsSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. -func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { - return nil, false -} - -// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. -func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { - return <sp, true -} - -// MabContainer container with items backed up using MAB backup engine. -type MabContainer struct { - // CanReRegister - Can the container be registered one more time. - CanReRegister *bool `json:"canReRegister,omitempty"` - // ContainerID - ContainerID represents the container. - ContainerID *int64 `json:"containerId,omitempty"` - // ProtectedItemCount - Number of items backed up in this container. - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - // AgentVersion - Agent version of this container. - AgentVersion *string `json:"agentVersion,omitempty"` - // ExtendedInfo - Additional information for this container - ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` - // MabContainerHealthDetails - Health details on this mab container. - MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` - // ContainerHealthState - Health state of mab container. - ContainerHealthState *string `json:"containerHealthState,omitempty"` - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MabContainer. -func (mc MabContainer) MarshalJSON() ([]byte, error) { - mc.ContainerType = ContainerTypeWindows1 - objectMap := make(map[string]interface{}) - if mc.CanReRegister != nil { - objectMap["canReRegister"] = mc.CanReRegister - } - if mc.ContainerID != nil { - objectMap["containerId"] = mc.ContainerID - } - if mc.ProtectedItemCount != nil { - objectMap["protectedItemCount"] = mc.ProtectedItemCount - } - if mc.AgentVersion != nil { - objectMap["agentVersion"] = mc.AgentVersion - } - if mc.ExtendedInfo != nil { - objectMap["extendedInfo"] = mc.ExtendedInfo - } - if mc.MabContainerHealthDetails != nil { - objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails - } - if mc.ContainerHealthState != nil { - objectMap["containerHealthState"] = mc.ContainerHealthState - } - if mc.FriendlyName != nil { - objectMap["friendlyName"] = mc.FriendlyName - } - if mc.BackupManagementType != "" { - objectMap["backupManagementType"] = mc.BackupManagementType - } - if mc.RegistrationStatus != nil { - objectMap["registrationStatus"] = mc.RegistrationStatus - } - if mc.HealthStatus != nil { - objectMap["healthStatus"] = mc.HealthStatus - } - if mc.ContainerType != "" { - objectMap["containerType"] = mc.ContainerType - } - return json.Marshal(objectMap) -} - -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return nil, false -} - -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return nil, false -} - -// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false -} - -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return nil, false -} - -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return nil, false -} - -// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false -} - -// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { - return nil, false -} - -// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) { - return nil, false -} - -// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { - return nil, false -} - -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { - return nil, false -} - -// AsMabContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { - return &mc, true -} - -// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) { - return nil, false -} - -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer. -func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &mc, true -} - -// MabContainerExtendedInfo additional information of the container. -type MabContainerExtendedInfo struct { - // LastRefreshedAt - Time stamp when this container was refreshed. - LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` - // BackupItemType - Type of backup items associated with this container. Possible values include: 'ItemTypeInvalid', 'ItemTypeVM', 'ItemTypeFileFolder', 'ItemTypeAzureSQLDb', 'ItemTypeSQLDB', 'ItemTypeExchange', 'ItemTypeSharepoint', 'ItemTypeVMwareVM', 'ItemTypeSystemState', 'ItemTypeClient', 'ItemTypeGenericDataSource', 'ItemTypeSQLDataBase', 'ItemTypeAzureFileShare', 'ItemTypeSAPHanaDatabase', 'ItemTypeSAPAseDatabase' - BackupItemType ItemType `json:"backupItemType,omitempty"` - // BackupItems - List of backup items associated with this container. - BackupItems *[]string `json:"backupItems,omitempty"` - // PolicyName - Backup policy associated with this container. - PolicyName *string `json:"policyName,omitempty"` - // LastBackupStatus - Latest backup status of this container. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` -} - -// MABContainerHealthDetails MAB workload-specific Health Details. -type MABContainerHealthDetails struct { - // Code - Health Code - Code *int32 `json:"code,omitempty"` - // Title - Health Title - Title *string `json:"title,omitempty"` - // Message - Health Message - Message *string `json:"message,omitempty"` - // Recommendations - Health Recommended Actions - Recommendations *[]string `json:"recommendations,omitempty"` -} - -// MabErrorInfo MAB workload-specific error information. -type MabErrorInfo struct { - // ErrorString - READ-ONLY; Localized error string. - ErrorString *string `json:"errorString,omitempty"` - // Recommendations - READ-ONLY; List of localized recommendations. - Recommendations *[]string `json:"recommendations,omitempty"` -} - -// MabFileFolderProtectedItem MAB workload-specific backup item. -type MabFileFolderProtectedItem struct { - // FriendlyName - Friendly name of this backup item. - FriendlyName *string `json:"friendlyName,omitempty"` - // ComputerName - Name of the computer associated with this backup item. - ComputerName *string `json:"computerName,omitempty"` - // LastBackupStatus - Status of last backup operation. - LastBackupStatus *string `json:"lastBackupStatus,omitempty"` - // LastBackupTime - Timestamp of the last backup operation on this backup item. - LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` - // ProtectionState - Protected, ProtectionStopped, IRPending or ProtectionError - ProtectionState *string `json:"protectionState,omitempty"` - // DeferredDeleteSyncTimeInUTC - Sync time for deferred deletion in UTC - DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"` - // ExtendedInfo - Additional information with this backup item. - ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { - mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem - objectMap := make(map[string]interface{}) - if mffpi.FriendlyName != nil { - objectMap["friendlyName"] = mffpi.FriendlyName - } - if mffpi.ComputerName != nil { - objectMap["computerName"] = mffpi.ComputerName - } - if mffpi.LastBackupStatus != nil { - objectMap["lastBackupStatus"] = mffpi.LastBackupStatus - } - if mffpi.LastBackupTime != nil { - objectMap["lastBackupTime"] = mffpi.LastBackupTime - } - if mffpi.ProtectionState != nil { - objectMap["protectionState"] = mffpi.ProtectionState - } - if mffpi.DeferredDeleteSyncTimeInUTC != nil { - objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC - } - if mffpi.ExtendedInfo != nil { - objectMap["extendedInfo"] = mffpi.ExtendedInfo - } - if mffpi.BackupManagementType != "" { - objectMap["backupManagementType"] = mffpi.BackupManagementType - } - if mffpi.WorkloadType != "" { - objectMap["workloadType"] = mffpi.WorkloadType - } - if mffpi.ContainerName != nil { - objectMap["containerName"] = mffpi.ContainerName - } - if mffpi.SourceResourceID != nil { - objectMap["sourceResourceId"] = mffpi.SourceResourceID - } - if mffpi.PolicyID != nil { - objectMap["policyId"] = mffpi.PolicyID - } - if mffpi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint - } - if mffpi.BackupSetName != nil { - objectMap["backupSetName"] = mffpi.BackupSetName - } - if mffpi.CreateMode != "" { - objectMap["createMode"] = mffpi.CreateMode - } - if mffpi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC - } - if mffpi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete - } - if mffpi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining - } - if mffpi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming - } - if mffpi.IsRehydrate != nil { - objectMap["isRehydrate"] = mffpi.IsRehydrate - } - if mffpi.ProtectedItemType != "" { - objectMap["protectedItemType"] = mffpi.ProtectedItemType - } - return json.Marshal(objectMap) -} - -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { - return nil, false -} - -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { - return nil, false -} - -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { - return nil, false -} - -// AsDPMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false -} - -// AsGenericProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { - return nil, false -} - -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { - return &mffpi, true -} - -// AsProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return nil, false -} - -// AsBasicProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. -func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &mffpi, true -} - -// MabFileFolderProtectedItemExtendedInfo additional information on the backed up item. -type MabFileFolderProtectedItemExtendedInfo struct { - // LastRefreshedAt - Last time when the agent data synced to service. - LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` - // OldestRecoveryPoint - The oldest backup copy available. - OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` - // RecoveryPointCount - Number of backup copies associated with the backup item. - RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` -} - -// MabJob MAB workload-specific job. -type MabJob struct { - // Duration - Time taken by job to run. - Duration *string `json:"duration,omitempty"` - // ActionsInfo - The state/actions applicable on jobs like cancel/retry. - ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` - // MabServerName - Name of server protecting the DS. - MabServerName *string `json:"mabServerName,omitempty"` - // MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer' - MabServerType MabServerType `json:"mabServerType,omitempty"` - // WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` - // ErrorDetails - The errors. - ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"` - // ExtendedInfo - Additional information on the job. - ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` - // EntityFriendlyName - Friendly name of the entity on which the current job is executing. - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // Operation - The operation name. - Operation *string `json:"operation,omitempty"` - // Status - Job status. - Status *string `json:"status,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // ActivityID - ActivityId of job. - ActivityID *string `json:"activityId,omitempty"` - // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' - JobType JobType `json:"jobType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MabJob. -func (mj MabJob) MarshalJSON() ([]byte, error) { - mj.JobType = JobTypeMabJob - objectMap := make(map[string]interface{}) - if mj.Duration != nil { - objectMap["duration"] = mj.Duration - } - if mj.ActionsInfo != nil { - objectMap["actionsInfo"] = mj.ActionsInfo - } - if mj.MabServerName != nil { - objectMap["mabServerName"] = mj.MabServerName - } - if mj.MabServerType != "" { - objectMap["mabServerType"] = mj.MabServerType - } - if mj.WorkloadType != "" { - objectMap["workloadType"] = mj.WorkloadType - } - if mj.ErrorDetails != nil { - objectMap["errorDetails"] = mj.ErrorDetails - } - if mj.ExtendedInfo != nil { - objectMap["extendedInfo"] = mj.ExtendedInfo - } - if mj.EntityFriendlyName != nil { - objectMap["entityFriendlyName"] = mj.EntityFriendlyName - } - if mj.BackupManagementType != "" { - objectMap["backupManagementType"] = mj.BackupManagementType - } - if mj.Operation != nil { - objectMap["operation"] = mj.Operation - } - if mj.Status != nil { - objectMap["status"] = mj.Status - } - if mj.StartTime != nil { - objectMap["startTime"] = mj.StartTime - } - if mj.EndTime != nil { - objectMap["endTime"] = mj.EndTime - } - if mj.ActivityID != nil { - objectMap["activityId"] = mj.ActivityID - } - if mj.JobType != "" { - objectMap["jobType"] = mj.JobType - } - return json.Marshal(objectMap) -} - -// AsAzureIaaSVMJob is the BasicJob implementation for MabJob. -func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { - return nil, false -} - -// AsAzureStorageJob is the BasicJob implementation for MabJob. -func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) { - return nil, false -} - -// AsAzureWorkloadJob is the BasicJob implementation for MabJob. -func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { - return nil, false -} - -// AsDpmJob is the BasicJob implementation for MabJob. -func (mj MabJob) AsDpmJob() (*DpmJob, bool) { - return nil, false -} - -// AsMabJob is the BasicJob implementation for MabJob. -func (mj MabJob) AsMabJob() (*MabJob, bool) { - return &mj, true -} - -// AsJob is the BasicJob implementation for MabJob. -func (mj MabJob) AsJob() (*Job, bool) { - return nil, false -} - -// AsBasicJob is the BasicJob implementation for MabJob. -func (mj MabJob) AsBasicJob() (BasicJob, bool) { - return &mj, true -} - -// MabJobExtendedInfo additional information for the MAB workload-specific job. -type MabJobExtendedInfo struct { - // TasksList - List of tasks for this job. - TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` - // PropertyBag - The job properties. - PropertyBag map[string]*string `json:"propertyBag"` - // DynamicErrorMessage - Non localized error message specific to this job. - DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` -} - -// MarshalJSON is the custom marshaler for MabJobExtendedInfo. -func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if mjei.TasksList != nil { - objectMap["tasksList"] = mjei.TasksList - } - if mjei.PropertyBag != nil { - objectMap["propertyBag"] = mjei.PropertyBag - } - if mjei.DynamicErrorMessage != nil { - objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage - } - return json.Marshal(objectMap) -} - -// MabJobTaskDetails MAB workload-specific job task details. -type MabJobTaskDetails struct { - // TaskID - The task display name. - TaskID *string `json:"taskId,omitempty"` - // StartTime - The start time. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time. - EndTime *date.Time `json:"endTime,omitempty"` - // Duration - Time elapsed for task. - Duration *string `json:"duration,omitempty"` - // Status - The status. - Status *string `json:"status,omitempty"` -} - -// MabProtectionPolicy mab container-specific backup policy. -type MabProtectionPolicy struct { - // SchedulePolicy - Backup schedule of backup policy. - SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` - // RetentionPolicy - Retention policy details. - RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` - // ProtectedItemsCount - Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' - BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MabProtectionPolicy. -func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) { - mpp.BackupManagementType = BackupManagementTypeMAB - objectMap := make(map[string]interface{}) - objectMap["schedulePolicy"] = mpp.SchedulePolicy - objectMap["retentionPolicy"] = mpp.RetentionPolicy - if mpp.ProtectedItemsCount != nil { - objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount - } - if mpp.BackupManagementType != "" { - objectMap["backupManagementType"] = mpp.BackupManagementType - } - return json.Marshal(objectMap) -} - -// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { - return nil, false -} - -// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { - return nil, false -} - -// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { - return nil, false -} - -// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { - return nil, false -} - -// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { - return &mpp, true -} - -// AsProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { - return nil, false -} - -// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. -func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { - return &mpp, true -} - -// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct. -func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "schedulePolicy": - if v != nil { - schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) - if err != nil { - return err - } - mpp.SchedulePolicy = schedulePolicy - } - case "retentionPolicy": - if v != nil { - retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) - if err != nil { - return err - } - mpp.RetentionPolicy = retentionPolicy - } - case "protectedItemsCount": - if v != nil { - var protectedItemsCount int32 - err = json.Unmarshal(*v, &protectedItemsCount) - if err != nil { - return err - } - mpp.ProtectedItemsCount = &protectedItemsCount - } - case "backupManagementType": - if v != nil { - var backupManagementType ManagementTypeBasicProtectionPolicy - err = json.Unmarshal(*v, &backupManagementType) - if err != nil { - return err - } - mpp.BackupManagementType = backupManagementType - } - } - } - - return nil -} - -// ManagementUsage backup management usages of a vault. -type ManagementUsage struct { - // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - Unit UsagesUnit `json:"unit,omitempty"` - // QuotaPeriod - Quota period of usage. - QuotaPeriod *string `json:"quotaPeriod,omitempty"` - // NextResetTime - Next reset time of usage. - NextResetTime *date.Time `json:"nextResetTime,omitempty"` - // CurrentValue - Current value of usage. - CurrentValue *int64 `json:"currentValue,omitempty"` - // Limit - Limit of usage. - Limit *int64 `json:"limit,omitempty"` - // Name - Name of usage. - Name *NameInfo `json:"name,omitempty"` -} - -// ManagementUsageList backup management usage for vault. -type ManagementUsageList struct { - autorest.Response `json:"-"` - // Value - The list of backup management usages for the given vault. - Value *[]ManagementUsage `json:"value,omitempty"` -} - -// MonthlyRetentionSchedule monthly retention schedule. -type MonthlyRetentionSchedule struct { - // RetentionScheduleFormatType - Retention schedule format type for monthly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' - RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` - // RetentionScheduleDaily - Daily retention format for monthly retention policy. - RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` - // RetentionScheduleWeekly - Weekly retention format for monthly retention policy. - RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` - // RetentionTimes - Retention times of retention policy. - RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` - // RetentionDuration - Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` -} - -// NameInfo the name of usage. -type NameInfo struct { - // Value - Value of usage. - Value *string `json:"value,omitempty"` - // LocalizedValue - Localized value of usage. - LocalizedValue *string `json:"localizedValue,omitempty"` -} - -// OperationResultInfo operation result info. -type OperationResultInfo struct { - // JobList - List of jobs created by this operation. - JobList *[]string `json:"jobList,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' - ObjectType ObjectType `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for OperationResultInfo. -func (ori OperationResultInfo) MarshalJSON() ([]byte, error) { - ori.ObjectType = ObjectTypeOperationResultInfo - objectMap := make(map[string]interface{}) - if ori.JobList != nil { - objectMap["jobList"] = ori.JobList - } - if ori.ObjectType != "" { - objectMap["objectType"] = ori.ObjectType - } - return json.Marshal(objectMap) -} - -// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. -func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { - return nil, false -} - -// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. -func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { - return &ori, true -} - -// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. -func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { - return nil, false -} - -// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. -func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { - return &ori, true -} - -// BasicOperationResultInfoBase base class for operation result info. -type BasicOperationResultInfoBase interface { - AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) - AsOperationResultInfo() (*OperationResultInfo, bool) - AsOperationResultInfoBase() (*OperationResultInfoBase, bool) -} - -// OperationResultInfoBase base class for operation result info. -type OperationResultInfoBase struct { - // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' - ObjectType ObjectType `json:"objectType,omitempty"` -} - -func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeExportJobsOperationResultInfo): - var ejori ExportJobsOperationResultInfo - err := json.Unmarshal(body, &ejori) - return ejori, err - case string(ObjectTypeOperationResultInfo): - var ori OperationResultInfo - err := json.Unmarshal(body, &ori) - return ori, err - default: - var orib OperationResultInfoBase - err := json.Unmarshal(body, &orib) - return orib, err - } -} -func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - oribArray := make([]BasicOperationResultInfoBase, len(rawMessages)) - - for index, rawMessage := range rawMessages { - orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage) - if err != nil { - return nil, err - } - oribArray[index] = orib - } - return oribArray, nil -} - -// MarshalJSON is the custom marshaler for OperationResultInfoBase. -func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) { - orib.ObjectType = ObjectTypeOperationResultInfoBase - objectMap := make(map[string]interface{}) - if orib.ObjectType != "" { - objectMap["objectType"] = orib.ObjectType - } - return json.Marshal(objectMap) -} - -// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. -func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { - return nil, false -} - -// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. -func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) { - return nil, false -} - -// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. -func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { - return &orib, true -} - -// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. -func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { - return &orib, true -} - -// OperationResultInfoBaseResource base class for operation result info. -type OperationResultInfoBaseResource struct { - autorest.Response `json:"-"` - // Operation - OperationResultInfoBaseResource operation - Operation BasicOperationResultInfoBase `json:"operation,omitempty"` - // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' - StatusCode HTTPStatusCode `json:"statusCode,omitempty"` - // Headers - HTTP headers associated with this operation. - Headers map[string][]string `json:"headers"` -} - -// MarshalJSON is the custom marshaler for OperationResultInfoBaseResource. -func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["operation"] = oribr.Operation - if oribr.StatusCode != "" { - objectMap["statusCode"] = oribr.StatusCode - } - if oribr.Headers != nil { - objectMap["headers"] = oribr.Headers - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct. -func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct. +func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -15604,66 +6743,14 @@ func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "operation": - if v != nil { - operation, err := unmarshalBasicOperationResultInfoBase(*v) - if err != nil { - return err - } - oribr.Operation = operation - } - case "statusCode": - if v != nil { - var statusCode HTTPStatusCode - err = json.Unmarshal(*v, &statusCode) - if err != nil { - return err - } - oribr.StatusCode = statusCode - } - case "headers": + case "properties": if v != nil { - var headers map[string][]string - err = json.Unmarshal(*v, &headers) + properties, err := unmarshalBasicEngineBase(*v) if err != nil { return err } - oribr.Headers = headers + ebr.Properties = properties } - } - } - - return nil -} - -// OperationStatus operation status. -type OperationStatus struct { - autorest.Response `json:"-"` - // ID - ID of the operation. - ID *string `json:"id,omitempty"` - // Name - Name of the operation. - Name *string `json:"name,omitempty"` - // Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled' - Status OperationStatusValues `json:"status,omitempty"` - // StartTime - Operation start time. Format: ISO-8601. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - Operation end time. Format: ISO-8601. - EndTime *date.Time `json:"endTime,omitempty"` - // Error - Error information related to this operation. - Error *OperationStatusError `json:"error,omitempty"` - // Properties - Additional information associated with this operation. - Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. -func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { case "id": if v != nil { var ID string @@ -15671,7 +6758,7 @@ func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { if err != nil { return err } - osVar.ID = &ID + ebr.ID = &ID } case "name": if v != nil { @@ -15680,51 +6767,43 @@ func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { if err != nil { return err } - osVar.Name = &name - } - case "status": - if v != nil { - var status OperationStatusValues - err = json.Unmarshal(*v, &status) - if err != nil { - return err - } - osVar.Status = status + ebr.Name = &name } - case "startTime": + case "type": if v != nil { - var startTime date.Time - err = json.Unmarshal(*v, &startTime) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - osVar.StartTime = &startTime + ebr.Type = &typeVar } - case "endTime": + case "location": if v != nil { - var endTime date.Time - err = json.Unmarshal(*v, &endTime) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - osVar.EndTime = &endTime + ebr.Location = &location } - case "error": + case "tags": if v != nil { - var errorVar OperationStatusError - err = json.Unmarshal(*v, &errorVar) + var tags map[string]*string + err = json.Unmarshal(*v, &tags) if err != nil { return err } - osVar.Error = &errorVar + ebr.Tags = tags } - case "properties": + case "eTag": if v != nil { - properties, err := unmarshalBasicOperationStatusExtendedInfo(*v) + var eTag string + err = json.Unmarshal(*v, &eTag) if err != nil { return err } - osVar.Properties = properties + ebr.ETag = &eTag } } } @@ -15732,974 +6811,960 @@ func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { return nil } -// OperationStatusError error information associated with operation status call. -type OperationStatusError struct { - // Code - Error code of the operation failure. +// EngineBaseResourceList list of BackupEngineBase resources +type EngineBaseResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]EngineBaseResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values. +type EngineBaseResourceListIterator struct { + i int + page EngineBaseResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *EngineBaseResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EngineBaseResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter EngineBaseResourceListIterator) Value() EngineBaseResource { + if !iter.page.NotDone() { + return EngineBaseResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EngineBaseResourceListIterator type. +func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator { + return EngineBaseResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ebrl EngineBaseResourceList) IsEmpty() bool { + return ebrl.Value == nil || len(*ebrl.Value) == 0 +} + +// engineBaseResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { + if ebrl.NextLink == nil || len(to.String(ebrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ebrl.NextLink))) +} + +// EngineBaseResourceListPage contains a page of EngineBaseResource values. +type EngineBaseResourceListPage struct { + fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error) + ebrl EngineBaseResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ebrl) + if err != nil { + return err + } + page.ebrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *EngineBaseResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EngineBaseResourceListPage) NotDone() bool { + return !page.ebrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EngineBaseResourceListPage) Response() EngineBaseResourceList { + return page.ebrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EngineBaseResourceListPage) Values() []EngineBaseResource { + if page.ebrl.IsEmpty() { + return nil + } + return *page.ebrl.Value +} + +// Creates a new instance of the EngineBaseResourceListPage type. +func NewEngineBaseResourceListPage(getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage { + return EngineBaseResourceListPage{fn: getNextPage} +} + +// EngineExtendedInfo additional information on backup engine. +type EngineExtendedInfo struct { + // DatabaseName - Database name of backup engine. + DatabaseName *string `json:"databaseName,omitempty"` + // ProtectedItemsCount - Number of protected items in the backup engine. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // ProtectedServersCount - Number of protected servers in the backup engine. + ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` + // DiskCount - Number of disks in the backup engine. + DiskCount *int32 `json:"diskCount,omitempty"` + // UsedDiskSpace - Disk space used in the backup engine. + UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` + // AvailableDiskSpace - Disk space currently available in the backup engine. + AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` + // RefreshedAt - Last refresh time in the backup engine. + RefreshedAt *date.Time `json:"refreshedAt,omitempty"` + // AzureProtectedInstances - Protected instances in the backup engine. + AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` +} + +// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations. +type ErrorDetail struct { + // Code - READ-ONLY; Error code. Code *string `json:"code,omitempty"` - // Message - Error message displayed if the operation failure. + // Message - READ-ONLY; Error Message related to the Code. Message *string `json:"message,omitempty"` + // Recommendations - READ-ONLY; List of recommendation strings. + Recommendations *[]string `json:"recommendations,omitempty"` } -// BasicOperationStatusExtendedInfo base class for additional information of operation status. -type BasicOperationStatusExtendedInfo interface { - AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) - AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) - AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) - AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) +// BasicFeatureSupportRequest base class for feature request +type BasicFeatureSupportRequest interface { + AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) + AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) + AsFeatureSupportRequest() (*FeatureSupportRequest, bool) } -// OperationStatusExtendedInfo base class for additional information of operation status. -type OperationStatusExtendedInfo struct { - // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' - ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +// FeatureSupportRequest base class for feature request +type FeatureSupportRequest struct { + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` } -func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) { +func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { return nil, err } - switch m["objectType"] { - case string(ObjectTypeOperationStatusJobExtendedInfo): - var osjei OperationStatusJobExtendedInfo - err := json.Unmarshal(body, &osjei) - return osjei, err - case string(ObjectTypeOperationStatusJobsExtendedInfo): - var osjei OperationStatusJobsExtendedInfo - err := json.Unmarshal(body, &osjei) - return osjei, err - case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): - var ospiei OperationStatusProvisionILRExtendedInfo - err := json.Unmarshal(body, &ospiei) - return ospiei, err + switch m["featureType"] { + case string(FeatureTypeAzureBackupGoals): + var abgfsr AzureBackupGoalFeatureSupportRequest + err := json.Unmarshal(body, &abgfsr) + return abgfsr, err + case string(FeatureTypeAzureVMResourceBackup): + var avrfsr AzureVMResourceFeatureSupportRequest + err := json.Unmarshal(body, &avrfsr) + return avrfsr, err default: - var osei OperationStatusExtendedInfo - err := json.Unmarshal(body, &osei) - return osei, err + var fsr FeatureSupportRequest + err := json.Unmarshal(body, &fsr) + return fsr, err } } -func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) { +func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages)) + fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages)) for index, rawMessage := range rawMessages { - osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage) + fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage) if err != nil { return nil, err } - oseiArray[index] = osei + fsrArray[index] = fsr } - return oseiArray, nil + return fsrArray, nil } -// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo. -func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { - osei.ObjectType = ObjectTypeOperationStatusExtendedInfo +// MarshalJSON is the custom marshaler for FeatureSupportRequest. +func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) { + fsr.FeatureType = FeatureTypeFeatureSupportRequest objectMap := make(map[string]interface{}) - if osei.ObjectType != "" { - objectMap["objectType"] = osei.ObjectType + if fsr.FeatureType != "" { + objectMap["featureType"] = fsr.FeatureType } return json.Marshal(objectMap) } -// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. -func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { - return nil, false -} - -// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. -func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { return nil, false } -// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. -func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { return nil, false } -// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. -func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { - return &osei, true +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { + return &fsr, true } -// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. -func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { - return &osei, true +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &fsr, true } -// OperationStatusJobExtendedInfo operation status job extended info. -type OperationStatusJobExtendedInfo struct { - // JobID - ID of the job created for this protected item. - JobID *string `json:"jobId,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' - ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +// GenericContainer base class for generic container of backup items +type GenericContainer struct { + // FabricName - Name of the container's fabric + FabricName *string `json:"fabricName,omitempty"` + // ExtendedInformation - Extended information (not returned in List container API calls) + ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. -func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { - osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo +// MarshalJSON is the custom marshaler for GenericContainer. +func (gc GenericContainer) MarshalJSON() ([]byte, error) { + gc.ContainerType = ContainerTypeGenericContainer1 objectMap := make(map[string]interface{}) - if osjei.JobID != nil { - objectMap["jobId"] = osjei.JobID + if gc.FabricName != nil { + objectMap["fabricName"] = gc.FabricName } - if osjei.ObjectType != "" { - objectMap["objectType"] = osjei.ObjectType + if gc.ExtendedInformation != nil { + objectMap["extendedInformation"] = gc.ExtendedInformation + } + if gc.FriendlyName != nil { + objectMap["friendlyName"] = gc.FriendlyName + } + if gc.BackupManagementType != "" { + objectMap["backupManagementType"] = gc.BackupManagementType + } + if gc.RegistrationStatus != nil { + objectMap["registrationStatus"] = gc.RegistrationStatus + } + if gc.HealthStatus != nil { + objectMap["healthStatus"] = gc.HealthStatus + } + if gc.ContainerType != "" { + objectMap["containerType"] = gc.ContainerType } return json.Marshal(objectMap) } -// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. -func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { - return &osjei, true -} - -// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. -func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { return nil, false } -// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. -func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { return nil, false } -// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. -func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { return nil, false } -// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. -func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { - return &osjei, true +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false } -// OperationStatusJobsExtendedInfo operation status extended info for list of jobs. -type OperationStatusJobsExtendedInfo struct { - // JobIds - IDs of the jobs created for the protected item. - JobIds *[]string `json:"jobIds,omitempty"` - // FailedJobsError - Stores all the failed jobs along with the corresponding error codes. - FailedJobsError map[string]*string `json:"failedJobsError"` - // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' - ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false } -// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. -func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { - osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo - objectMap := make(map[string]interface{}) - if osjei.JobIds != nil { - objectMap["jobIds"] = osjei.JobIds - } - if osjei.FailedJobsError != nil { - objectMap["failedJobsError"] = osjei.FailedJobsError - } - if osjei.ObjectType != "" { - objectMap["objectType"] = osjei.ObjectType - } - return json.Marshal(objectMap) +// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false } -// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. -func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. -func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { - return &osjei, true +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false } -// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. -func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { return nil, false } -// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. -func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { +// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) { return nil, false } -// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. -func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { - return &osjei, true +// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false } -// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action. -type OperationStatusProvisionILRExtendedInfo struct { - // RecoveryTarget - Target details for file / folder restore. - RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' - ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) { + return &gc, true } -// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. -func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { - ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo - objectMap := make(map[string]interface{}) - if ospiei.RecoveryTarget != nil { - objectMap["recoveryTarget"] = ospiei.RecoveryTarget - } - if ospiei.ObjectType != "" { - objectMap["objectType"] = ospiei.ObjectType - } - return json.Marshal(objectMap) +// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false } -// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. -func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { return nil, false } -// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. -func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. -func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { - return &ospiei, true +// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false } -// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. -func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { - return nil, false +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &gc, true } -// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. -func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { - return &ospiei, true +// GenericContainerExtendedInfo container extended information +type GenericContainerExtendedInfo struct { + // RawCertData - Public key of container cert + RawCertData *string `json:"rawCertData,omitempty"` + // ContainerIdentityInfo - Container identity information + ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` + // ServiceEndpoints - Azure Backup Service Endpoints for the container + ServiceEndpoints map[string]*string `json:"serviceEndpoints"` } -// OperationWorkerResponse this is the base class for operation result responses. -type OperationWorkerResponse struct { - // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' - StatusCode HTTPStatusCode `json:"statusCode,omitempty"` - // Headers - HTTP headers associated with this operation. - Headers map[string][]string `json:"headers"` +// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo. +func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gcei.RawCertData != nil { + objectMap["rawCertData"] = gcei.RawCertData + } + if gcei.ContainerIdentityInfo != nil { + objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo + } + if gcei.ServiceEndpoints != nil { + objectMap["serviceEndpoints"] = gcei.ServiceEndpoints + } + return json.Marshal(objectMap) +} + +// IaasVMBackupRequest iaaS VM workload-specific backup request. +type IaasVMBackupRequest struct { + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectType `json:"objectType,omitempty"` } -// MarshalJSON is the custom marshaler for OperationWorkerResponse. -func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { + ivbr.ObjectType = ObjectTypeIaasVMBackupRequest objectMap := make(map[string]interface{}) - if owr.StatusCode != "" { - objectMap["statusCode"] = owr.StatusCode + if ivbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC } - if owr.Headers != nil { - objectMap["headers"] = owr.Headers + if ivbr.ObjectType != "" { + objectMap["objectType"] = ivbr.ObjectType } return json.Marshal(objectMap) } -// PointInTimeRange provides details for log ranges -type PointInTimeRange struct { - // StartTime - Start time of the time range for log recovery. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - End time of the time range for log recovery. - EndTime *date.Time `json:"endTime,omitempty"` +// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return nil, false } -// PreBackupValidation pre-backup validation for Azure VM Workload provider. -type PreBackupValidation struct { - // Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed' - Status InquiryStatus `json:"status,omitempty"` - // Code - Error code of protectable item - Code *string `json:"code,omitempty"` - // Message - Message corresponding to the error code for the protectable item - Message *string `json:"message,omitempty"` +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return nil, false } -// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a -// given vault and given configuration. -// It will validate followings -// 1. Vault capacity -// 2. VM is already protected -// 3. Any VM related configuration passed in properties. -type PreValidateEnableBackupRequest struct { - // ResourceType - ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - ResourceType DataSourceType `json:"resourceType,omitempty"` - // ResourceID - ARM Virtual Machine Id - ResourceID *string `json:"resourceId,omitempty"` - // VaultID - ARM id of the Recovery Services Vault - VaultID *string `json:"vaultId,omitempty"` - // Properties - Configuration of VM if any needs to be validated like OS type etc - Properties *string `json:"properties,omitempty"` +// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return &ivbr, true } -// PreValidateEnableBackupResponse response contract for enable backup validation request -type PreValidateEnableBackupResponse struct { - autorest.Response `json:"-"` - // Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed' - Status ValidationStatus `json:"status,omitempty"` - // ErrorCode - Response error code - ErrorCode *string `json:"errorCode,omitempty"` - // ErrorMessage - Response error message - ErrorMessage *string `json:"errorMessage,omitempty"` - // Recommendation - Recommended action for user - Recommendation *string `json:"recommendation,omitempty"` - // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required - // for portal - ContainerName *string `json:"containerName,omitempty"` - // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal - ProtectedItemName *string `json:"protectedItemName,omitempty"` +// AsRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) { + return nil, false } -// BasicProtectableContainer protectable Container Class. -type BasicProtectableContainer interface { - AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) - AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) - AsProtectableContainer() (*ProtectableContainer, bool) +// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &ivbr, true } -// ProtectableContainer protectable Container Class. -type ProtectableContainer struct { +// BasicIaaSVMContainer iaaS VM workload-specific container. +type BasicIaaSVMContainer interface { + AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) + AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) + AsIaaSVMContainer() (*IaaSVMContainer, bool) +} + +// IaaSVMContainer iaaS VM workload-specific container. +type IaaSVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` // FriendlyName - Friendly name of the container. FriendlyName *string `json:"friendlyName,omitempty"` // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` // HealthStatus - Status of health of the container. HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerID - Fabric Id of the container such as ARM Id. - ContainerID *string `json:"containerId,omitempty"` - // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' - ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) { +func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { return nil, err } - switch m["protectableContainerType"] { - case string(ProtectableContainerTypeStorageContainer): - var aspc AzureStorageProtectableContainer - err := json.Unmarshal(body, &aspc) - return aspc, err - case string(ProtectableContainerTypeVMAppContainer): - var avacpc AzureVMAppContainerProtectableContainer - err := json.Unmarshal(body, &avacpc) - return avacpc, err + switch m["containerType"] { + case string(ContainerTypeMicrosoftClassicComputevirtualMachines): + var aisccvc AzureIaaSClassicComputeVMContainer + err := json.Unmarshal(body, &aisccvc) + return aisccvc, err + case string(ContainerTypeMicrosoftComputevirtualMachines): + var aiscvc AzureIaaSComputeVMContainer + err := json.Unmarshal(body, &aiscvc) + return aiscvc, err default: - var pc ProtectableContainer - err := json.Unmarshal(body, &pc) - return pc, err + var isc IaaSVMContainer + err := json.Unmarshal(body, &isc) + return isc, err } } -func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) { +func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - pcArray := make([]BasicProtectableContainer, len(rawMessages)) + iscArray := make([]BasicIaaSVMContainer, len(rawMessages)) for index, rawMessage := range rawMessages { - pc, err := unmarshalBasicProtectableContainer(*rawMessage) + isc, err := unmarshalBasicIaaSVMContainer(*rawMessage) if err != nil { return nil, err } - pcArray[index] = pc + iscArray[index] = isc } - return pcArray, nil + return iscArray, nil } -// MarshalJSON is the custom marshaler for ProtectableContainer. -func (pc ProtectableContainer) MarshalJSON() ([]byte, error) { - pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer +// MarshalJSON is the custom marshaler for IaaSVMContainer. +func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { + isc.ContainerType = ContainerTypeIaaSVMContainer objectMap := make(map[string]interface{}) - if pc.FriendlyName != nil { - objectMap["friendlyName"] = pc.FriendlyName + if isc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = isc.VirtualMachineID } - if pc.BackupManagementType != "" { - objectMap["backupManagementType"] = pc.BackupManagementType + if isc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion } - if pc.HealthStatus != nil { - objectMap["healthStatus"] = pc.HealthStatus + if isc.ResourceGroup != nil { + objectMap["resourceGroup"] = isc.ResourceGroup } - if pc.ContainerID != nil { - objectMap["containerId"] = pc.ContainerID + if isc.FriendlyName != nil { + objectMap["friendlyName"] = isc.FriendlyName } - if pc.ProtectableContainerType != "" { - objectMap["protectableContainerType"] = pc.ProtectableContainerType + if isc.BackupManagementType != "" { + objectMap["backupManagementType"] = isc.BackupManagementType } - return json.Marshal(objectMap) -} - -// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. -func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { - return nil, false -} - -// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. -func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { - return nil, false -} - -// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. -func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { - return &pc, true -} - -// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. -func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { - return &pc, true -} - -// ProtectableContainerResource protectable Container Class. -type ProtectableContainerResource struct { - // Properties - ProtectableContainerResource properties - Properties BasicProtectableContainer `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProtectableContainerResource. -func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["properties"] = pcr.Properties - if pcr.Location != nil { - objectMap["location"] = pcr.Location + if isc.RegistrationStatus != nil { + objectMap["registrationStatus"] = isc.RegistrationStatus } - if pcr.Tags != nil { - objectMap["tags"] = pcr.Tags + if isc.HealthStatus != nil { + objectMap["healthStatus"] = isc.HealthStatus } - if pcr.ETag != nil { - objectMap["eTag"] = pcr.ETag + if isc.ContainerType != "" { + objectMap["containerType"] = isc.ContainerType } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct. -func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - properties, err := unmarshalBasicProtectableContainer(*v) - if err != nil { - return err - } - pcr.Properties = properties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pcr.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pcr.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pcr.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - pcr.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - pcr.Tags = tags - } - case "eTag": - if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) - if err != nil { - return err - } - pcr.ETag = &eTag - } - } - } +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} - return nil +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false } -// ProtectableContainerResourceList list of ProtectableContainer resources -type ProtectableContainerResourceList struct { - autorest.Response `json:"-"` - // Value - List of resources. - Value *[]ProtectableContainerResource `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false } -// ProtectableContainerResourceListIterator provides access to a complete listing of -// ProtectableContainerResource values. -type ProtectableContainerResourceListIterator struct { - i int - page ProtectableContainerResourceListPage +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil +// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ProtectableContainerResourceListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProtectableContainerResourceListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList { - return iter.page.Response() +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource { - if !iter.page.NotDone() { - return ProtectableContainerResource{} - } - return iter.page.Values()[iter.i] +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false } -// Creates a new instance of the ProtectableContainerResourceListIterator type. -func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator { - return ProtectableContainerResourceListIterator{page: page} +// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false } -// IsEmpty returns true if the ListResult contains no values. -func (pcrl ProtectableContainerResourceList) IsEmpty() bool { - return pcrl.Value == nil || len(*pcrl.Value) == 0 +// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false } -// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { - if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pcrl.NextLink))) +// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false } -// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values. -type ProtectableContainerResourceListPage struct { - fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error) - pcrl ProtectableContainerResourceList +// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return &isc, true } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &isc, true +} + +// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &isc, true +} + +// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM. +type IaasVMILRRegistrationRequest struct { + // RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // InitiatorName - iSCSI initiator name. + InitiatorName *string `json:"initiatorName,omitempty"` + // RenewExistingRegistration - Whether to renew existing registration with the iSCSI server. + RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { + ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest + objectMap := make(map[string]interface{}) + if ivrr.RecoveryPointID != nil { + objectMap["recoveryPointId"] = ivrr.RecoveryPointID + } + if ivrr.VirtualMachineID != nil { + objectMap["virtualMachineId"] = ivrr.VirtualMachineID + } + if ivrr.InitiatorName != nil { + objectMap["initiatorName"] = ivrr.InitiatorName + } + if ivrr.RenewExistingRegistration != nil { + objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration } - next, err := page.fn(ctx, page.pcrl) - if err != nil { - return err + if ivrr.ObjectType != "" { + objectMap["objectType"] = ivrr.ObjectType } - page.pcrl = next - return nil + return json.Marshal(objectMap) } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ProtectableContainerResourceListPage) Next() error { - return page.NextWithContext(context.Background()) +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return nil, false } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProtectableContainerResourceListPage) NotDone() bool { - return !page.pcrl.IsEmpty() +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return &ivrr, true } -// Response returns the raw server response from the last page request. -func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList { - return page.pcrl +// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) { + return nil, false } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource { - if page.pcrl.IsEmpty() { - return nil - } - return *page.pcrl.Value +// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &ivrr, true } -// Creates a new instance of the ProtectableContainerResourceListPage type. -func NewProtectableContainerResourceListPage(getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage { - return ProtectableContainerResourceListPage{fn: getNextPage} +// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item. +type BasicIaaSVMProtectableItem interface { + AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) + AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) + AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) } -// BasicProtectedItem base class for backup items. -type BasicProtectedItem interface { - AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) - AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) - AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) - AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) - AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) - AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) - AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) - AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) - AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) - AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) - AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) - AsDPMProtectedItem() (*DPMProtectedItem, bool) - AsGenericProtectedItem() (*GenericProtectedItem, bool) - AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) - AsProtectedItem() (*ProtectedItem, bool) -} - -// ProtectedItem base class for backup items. -type ProtectedItem struct { - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - WorkloadType DataSourceType `json:"workloadType,omitempty"` - // ContainerName - Unique name of container - ContainerName *string `json:"containerName,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` - // BackupSetName - Name of the backup set the backup item belongs to - BackupSetName *string `json:"backupSetName,omitempty"` - // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' - CreateMode CreateMode `json:"createMode,omitempty"` - // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC - DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` - // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete - IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` - // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted - DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` - // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon - IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` - // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state - IsRehydrate *bool `json:"isRehydrate,omitempty"` - // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' - ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` -} - -func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) { +// IaaSVMProtectableItem iaaS VM workload-specific backup item. +type IaaSVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { return nil, err } - switch m["protectedItemType"] { - case string(ProtectedItemTypeAzureFileShareProtectedItem): - var afpi AzureFileshareProtectedItem - err := json.Unmarshal(body, &afpi) - return afpi, err - case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): - var aisccvpi AzureIaaSClassicComputeVMProtectedItem + switch m["protectableItemType"] { + case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectableItem err := json.Unmarshal(body, &aisccvpi) return aisccvpi, err - case string(ProtectedItemTypeMicrosoftComputevirtualMachines): - var aiscvpi AzureIaaSComputeVMProtectedItem + case string(ProtectableItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectableItem err := json.Unmarshal(body, &aiscvpi) return aiscvpi, err - case string(ProtectedItemTypeAzureIaaSVMProtectedItem): - var aispi AzureIaaSVMProtectedItem - err := json.Unmarshal(body, &aispi) - return aispi, err - case string(ProtectedItemTypeMicrosoftSqlserversdatabases): - var aspi AzureSQLProtectedItem - err := json.Unmarshal(body, &aspi) - return aspi, err - case string(ProtectedItemTypeAzureVMWorkloadProtectedItem): - var avwpi AzureVMWorkloadProtectedItem - err := json.Unmarshal(body, &avwpi) - return avwpi, err - case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): - var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem - err := json.Unmarshal(body, &avwsadpi) - return avwsadpi, err - case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): - var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem - err := json.Unmarshal(body, &avwshdpi) - return avwshdpi, err - case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): - var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem - err := json.Unmarshal(body, &avwsdpi) - return avwsdpi, err - case string(ProtectedItemTypeDPMProtectedItem): - var dpi DPMProtectedItem - err := json.Unmarshal(body, &dpi) - return dpi, err - case string(ProtectedItemTypeGenericProtectedItem): - var gpi GenericProtectedItem - err := json.Unmarshal(body, &gpi) - return gpi, err - case string(ProtectedItemTypeMabFileFolderProtectedItem): - var mffpi MabFileFolderProtectedItem - err := json.Unmarshal(body, &mffpi) - return mffpi, err default: - var pi ProtectedItem - err := json.Unmarshal(body, &pi) - return pi, err + var ispi IaaSVMProtectableItem + err := json.Unmarshal(body, &ispi) + return ispi, err } } -func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) { +func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - piArray := make([]BasicProtectedItem, len(rawMessages)) + ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages)) for index, rawMessage := range rawMessages { - pi, err := unmarshalBasicProtectedItem(*rawMessage) + ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage) if err != nil { return nil, err } - piArray[index] = pi + ispiArray[index] = ispi } - return piArray, nil + return ispiArray, nil } -// MarshalJSON is the custom marshaler for ProtectedItem. -func (pi ProtectedItem) MarshalJSON() ([]byte, error) { - pi.ProtectedItemType = ProtectedItemTypeProtectedItem +// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { + ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem objectMap := make(map[string]interface{}) - if pi.BackupManagementType != "" { - objectMap["backupManagementType"] = pi.BackupManagementType - } - if pi.WorkloadType != "" { - objectMap["workloadType"] = pi.WorkloadType - } - if pi.ContainerName != nil { - objectMap["containerName"] = pi.ContainerName - } - if pi.SourceResourceID != nil { - objectMap["sourceResourceId"] = pi.SourceResourceID - } - if pi.PolicyID != nil { - objectMap["policyId"] = pi.PolicyID - } - if pi.LastRecoveryPoint != nil { - objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint - } - if pi.BackupSetName != nil { - objectMap["backupSetName"] = pi.BackupSetName - } - if pi.CreateMode != "" { - objectMap["createMode"] = pi.CreateMode - } - if pi.DeferredDeleteTimeInUTC != nil { - objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC + if ispi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = ispi.VirtualMachineID } - if pi.IsScheduledForDeferredDelete != nil { - objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete + if ispi.BackupManagementType != nil { + objectMap["backupManagementType"] = ispi.BackupManagementType } - if pi.DeferredDeleteTimeRemaining != nil { - objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining + if ispi.WorkloadType != nil { + objectMap["workloadType"] = ispi.WorkloadType } - if pi.IsDeferredDeleteScheduleUpcoming != nil { - objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming + if ispi.FriendlyName != nil { + objectMap["friendlyName"] = ispi.FriendlyName } - if pi.IsRehydrate != nil { - objectMap["isRehydrate"] = pi.IsRehydrate + if ispi.ProtectionState != "" { + objectMap["protectionState"] = ispi.ProtectionState } - if pi.ProtectedItemType != "" { - objectMap["protectedItemType"] = pi.ProtectedItemType + if ispi.ProtectableItemType != "" { + objectMap["protectableItemType"] = ispi.ProtectableItemType } return json.Marshal(objectMap) } -// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { return nil, false } -// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { return nil, false } -// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { return nil, false } -// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { return nil, false } -// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { return nil, false } -// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { return nil, false } -// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { return nil, false } -// AsDPMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { - return nil, false +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return &ispi, true +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &ispi, true } -// AsGenericProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { return nil, false } -// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &ispi, true +} + +// BasicILRRequest parameters to Provision ILR API. +type BasicILRRequest interface { + AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) + AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) + AsILRRequest() (*ILRRequest, bool) +} + +// ILRRequest parameters to Provision ILR API. +type ILRRequest struct { + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareProvisionILRRequest): + var afspir AzureFileShareProvisionILRRequest + err := json.Unmarshal(body, &afspir) + return afspir, err + case string(ObjectTypeIaasVMILRRegistrationRequest): + var ivrr IaasVMILRRegistrationRequest + err := json.Unmarshal(body, &ivrr) + return ivrr, err + default: + var ir ILRRequest + err := json.Unmarshal(body, &ir) + return ir, err + } +} +func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + irArray := make([]BasicILRRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ir, err := unmarshalBasicILRRequest(*rawMessage) + if err != nil { + return nil, err + } + irArray[index] = ir + } + return irArray, nil +} + +// MarshalJSON is the custom marshaler for ILRRequest. +func (ir ILRRequest) MarshalJSON() ([]byte, error) { + ir.ObjectType = ObjectTypeILRRequest + objectMap := make(map[string]interface{}) + if ir.ObjectType != "" { + objectMap["objectType"] = ir.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { return nil, false } -// AsProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { - return &pi, true +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return nil, false } -// AsBasicProtectedItem is the BasicProtectedItem implementation for ProtectedItem. -func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { - return &pi, true +// AsILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) { + return &ir, true } -// ProtectedItemQueryObject filters to list backup items. -type ProtectedItemQueryObject struct { - // HealthState - Health State for the backed up item. Possible values include: 'HealthStatePassed', 'HealthStateActionRequired', 'HealthStateActionSuggested', 'HealthStateInvalid' - HealthState HealthState `json:"healthState,omitempty"` - // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // ItemType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' - ItemType DataSourceType `json:"itemType,omitempty"` - // PolicyName - Backup policy name associated with the backup item. - PolicyName *string `json:"policyName,omitempty"` - // ContainerName - Name of the container. - ContainerName *string `json:"containerName,omitempty"` - // BackupEngineName - Backup Engine name - BackupEngineName *string `json:"backupEngineName,omitempty"` - // FriendlyName - Friendly name of protected item - FriendlyName *string `json:"friendlyName,omitempty"` - // FabricName - Name of the fabric. - FabricName *string `json:"fabricName,omitempty"` - // BackupSetName - Name of the backup set. - BackupSetName *string `json:"backupSetName,omitempty"` +// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &ir, true } -// ProtectedItemResource base class for backup items. -type ProtectedItemResource struct { - autorest.Response `json:"-"` - // Properties - ProtectedItemResource properties - Properties BasicProtectedItem `json:"properties,omitempty"` +// ILRRequestResource parameters to Provision ILR API. +type ILRRequestResource struct { + // Properties - ILRRequestResource properties + Properties BasicILRRequest `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id represents the complete path to the resource. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name associated with the resource. @@ -16714,24 +7779,24 @@ type ProtectedItemResource struct { ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for ProtectedItemResource. -func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["properties"] = pir.Properties - if pir.Location != nil { - objectMap["location"] = pir.Location +// MarshalJSON is the custom marshaler for ILRRequestResource. +func (irr ILRRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = irr.Properties + if irr.Location != nil { + objectMap["location"] = irr.Location } - if pir.Tags != nil { - objectMap["tags"] = pir.Tags + if irr.Tags != nil { + objectMap["tags"] = irr.Tags } - if pir.ETag != nil { - objectMap["eTag"] = pir.ETag + if irr.ETag != nil { + objectMap["eTag"] = irr.ETag } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct. -func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. +func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -16741,11 +7806,11 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - properties, err := unmarshalBasicProtectedItem(*v) + properties, err := unmarshalBasicILRRequest(*v) if err != nil { return err } - pir.Properties = properties + irr.Properties = properties } case "id": if v != nil { @@ -16754,7 +7819,7 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.ID = &ID + irr.ID = &ID } case "name": if v != nil { @@ -16763,7 +7828,7 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.Name = &name + irr.Name = &name } case "type": if v != nil { @@ -16772,7 +7837,7 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.Type = &typeVar + irr.Type = &typeVar } case "location": if v != nil { @@ -16781,7 +7846,7 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.Location = &location + irr.Location = &location } case "tags": if v != nil { @@ -16790,7 +7855,7 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.Tags = tags + irr.Tags = tags } case "eTag": if v != nil { @@ -16799,7 +7864,7 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.ETag = &eTag + irr.ETag = &eTag } } } @@ -16807,382 +7872,193 @@ func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { return nil } -// ProtectedItemResourceList list of ProtectedItem resources -type ProtectedItemResourceList struct { - autorest.Response `json:"-"` - // Value - List of resources. - Value *[]ProtectedItemResource `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` -} - -// ProtectedItemResourceListIterator provides access to a complete listing of ProtectedItemResource values. -type ProtectedItemResourceListIterator struct { - i int - page ProtectedItemResourceListPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ProtectedItemResourceListIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProtectedItemResourceListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource { - if !iter.page.NotDone() { - return ProtectedItemResource{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ProtectedItemResourceListIterator type. -func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator { - return ProtectedItemResourceListIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (pirl ProtectedItemResourceList) IsEmpty() bool { - return pirl.Value == nil || len(*pirl.Value) == 0 -} - -// protectedItemResourceListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) { - if pirl.NextLink == nil || len(to.String(pirl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pirl.NextLink))) -} - -// ProtectedItemResourceListPage contains a page of ProtectedItemResource values. -type ProtectedItemResourceListPage struct { - fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error) - pirl ProtectedItemResourceList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.pirl) - if err != nil { - return err - } - page.pirl = next - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ProtectedItemResourceListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProtectedItemResourceListPage) NotDone() bool { - return !page.pirl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList { - return page.pirl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource { - if page.pirl.IsEmpty() { - return nil - } - return *page.pirl.Value +// InquiryInfo details about inquired protectable items under a given container. +type InquiryInfo struct { + // Status - Inquiry Status for this container such as + // InProgress | Failed | Succeeded + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Details if the Status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` + // InquiryDetails - Inquiry Details which will have workload specific details. + // For e.g. - For SQL and oracle this will contain different details. + InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` } -// Creates a new instance of the ProtectedItemResourceListPage type. -func NewProtectedItemResourceListPage(getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage { - return ProtectedItemResourceListPage{fn: getNextPage} +// InquiryValidation validation for inquired protectable items under a given container. +type InquiryValidation struct { + // Status - Status for the Inquiry Validation. + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Detail in case the status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` + // AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success. + AdditionalDetail *string `json:"additionalDetail,omitempty"` } -// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived -// from this class. -type BasicProtectionContainer interface { - AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) - AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) - AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) - AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) - AsAzureSQLContainer() (*AzureSQLContainer, bool) - AsAzureStorageContainer() (*AzureStorageContainer, bool) - AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) - AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) - AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) - AsDpmContainer() (*DpmContainer, bool) - AsBasicDpmContainer() (BasicDpmContainer, bool) - AsGenericContainer() (*GenericContainer, bool) - AsIaaSVMContainer() (*IaaSVMContainer, bool) - AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) - AsMabContainer() (*MabContainer, bool) - AsProtectionContainer() (*ProtectionContainer, bool) +// InstantItemRecoveryTarget target details for file / folder restore. +type InstantItemRecoveryTarget struct { + // ClientScripts - List of client scripts. + ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"` } -// ProtectionContainer base class for container with backup items. Containers with specific workloads are -// derived from this class. -type ProtectionContainer struct { - // FriendlyName - Friendly name of the container. - FriendlyName *string `json:"friendlyName,omitempty"` - // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. - RegistrationStatus *string `json:"registrationStatus,omitempty"` - // HealthStatus - Status of health of the container. - HealthStatus *string `json:"healthStatus,omitempty"` - // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' - ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +// InstantRPAdditionalDetails ... +type InstantRPAdditionalDetails struct { + AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` + AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` } -func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["containerType"] { - case string(ContainerTypeAzureBackupServerContainer1): - var absc AzureBackupServerContainer - err := json.Unmarshal(body, &absc) - return absc, err - case string(ContainerTypeMicrosoftClassicComputevirtualMachines): - var aisccvc AzureIaaSClassicComputeVMContainer - err := json.Unmarshal(body, &aisccvc) - return aisccvc, err - case string(ContainerTypeMicrosoftComputevirtualMachines): - var aiscvc AzureIaaSComputeVMContainer - err := json.Unmarshal(body, &aiscvc) - return aiscvc, err - case string(ContainerTypeSQLAGWorkLoadContainer1): - var aswcpc AzureSQLAGWorkloadContainerProtectionContainer - err := json.Unmarshal(body, &aswcpc) - return aswcpc, err - case string(ContainerTypeAzureSQLContainer1): - var asc AzureSQLContainer - err := json.Unmarshal(body, &asc) - return asc, err - case string(ContainerTypeStorageContainer1): - var asc AzureStorageContainer - err := json.Unmarshal(body, &asc) - return asc, err - case string(ContainerTypeVMAppContainer1): - var avacpc AzureVMAppContainerProtectionContainer - err := json.Unmarshal(body, &avacpc) - return avacpc, err - case string(ContainerTypeAzureWorkloadContainer): - var awc AzureWorkloadContainer - err := json.Unmarshal(body, &awc) - return awc, err - case string(ContainerTypeDPMContainer1): - var dc DpmContainer - err := json.Unmarshal(body, &dc) - return dc, err - case string(ContainerTypeGenericContainer1): - var gc GenericContainer - err := json.Unmarshal(body, &gc) - return gc, err - case string(ContainerTypeIaaSVMContainer): - var isc IaaSVMContainer - err := json.Unmarshal(body, &isc) - return isc, err - case string(ContainerTypeWindows1): - var mc MabContainer - err := json.Unmarshal(body, &mc) - return mc, err +// BasicJob defines workload agnostic properties for a job. +type BasicJob interface { + AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) + AsAzureStorageJob() (*AzureStorageJob, bool) + AsAzureWorkloadJob() (*AzureWorkloadJob, bool) + AsDpmJob() (*DpmJob, bool) + AsMabJob() (*MabJob, bool) + AsJob() (*Job, bool) +} + +// Job defines workload agnostic properties for a job. +type Job struct { + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +func unmarshalBasicJob(body []byte) (BasicJob, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["jobType"] { + case string(JobTypeAzureIaaSVMJob): + var aisj AzureIaaSVMJob + err := json.Unmarshal(body, &aisj) + return aisj, err + case string(JobTypeAzureStorageJob): + var asj AzureStorageJob + err := json.Unmarshal(body, &asj) + return asj, err + case string(JobTypeAzureWorkloadJob): + var awj AzureWorkloadJob + err := json.Unmarshal(body, &awj) + return awj, err + case string(JobTypeDpmJob): + var dj DpmJob + err := json.Unmarshal(body, &dj) + return dj, err + case string(JobTypeMabJob): + var mj MabJob + err := json.Unmarshal(body, &mj) + return mj, err default: - var pc ProtectionContainer - err := json.Unmarshal(body, &pc) - return pc, err + var j Job + err := json.Unmarshal(body, &j) + return j, err } } -func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) { +func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - pcArray := make([]BasicProtectionContainer, len(rawMessages)) + jArray := make([]BasicJob, len(rawMessages)) for index, rawMessage := range rawMessages { - pc, err := unmarshalBasicProtectionContainer(*rawMessage) + j, err := unmarshalBasicJob(*rawMessage) if err != nil { return nil, err } - pcArray[index] = pc + jArray[index] = j } - return pcArray, nil + return jArray, nil } -// MarshalJSON is the custom marshaler for ProtectionContainer. -func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { - pc.ContainerType = ContainerTypeProtectionContainer +// MarshalJSON is the custom marshaler for Job. +func (j Job) MarshalJSON() ([]byte, error) { + j.JobType = JobTypeJob objectMap := make(map[string]interface{}) - if pc.FriendlyName != nil { - objectMap["friendlyName"] = pc.FriendlyName + if j.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = j.EntityFriendlyName } - if pc.BackupManagementType != "" { - objectMap["backupManagementType"] = pc.BackupManagementType + if j.BackupManagementType != "" { + objectMap["backupManagementType"] = j.BackupManagementType } - if pc.RegistrationStatus != nil { - objectMap["registrationStatus"] = pc.RegistrationStatus + if j.Operation != nil { + objectMap["operation"] = j.Operation } - if pc.HealthStatus != nil { - objectMap["healthStatus"] = pc.HealthStatus + if j.Status != nil { + objectMap["status"] = j.Status } - if pc.ContainerType != "" { - objectMap["containerType"] = pc.ContainerType + if j.StartTime != nil { + objectMap["startTime"] = j.StartTime + } + if j.EndTime != nil { + objectMap["endTime"] = j.EndTime + } + if j.ActivityID != nil { + objectMap["activityId"] = j.ActivityID + } + if j.JobType != "" { + objectMap["jobType"] = j.JobType } return json.Marshal(objectMap) } -// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { - return nil, false -} - -// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { - return nil, false -} - -// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { - return nil, false -} - -// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { - return nil, false -} - -// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { - return nil, false -} - -// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { - return nil, false -} - -// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { - return nil, false -} - -// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { - return nil, false -} - -// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { - return nil, false -} - -// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { +// AsAzureIaaSVMJob is the BasicJob implementation for Job. +func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { return nil, false } -// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { +// AsAzureStorageJob is the BasicJob implementation for Job. +func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) { return nil, false } -// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { +// AsAzureWorkloadJob is the BasicJob implementation for Job. +func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { return nil, false } -// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { +// AsDpmJob is the BasicJob implementation for Job. +func (j Job) AsDpmJob() (*DpmJob, bool) { return nil, false } -// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) { +// AsMabJob is the BasicJob implementation for Job. +func (j Job) AsMabJob() (*MabJob, bool) { return nil, false } -// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { - return &pc, true +// AsJob is the BasicJob implementation for Job. +func (j Job) AsJob() (*Job, bool) { + return &j, true } -// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. -func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { - return &pc, true +// AsBasicJob is the BasicJob implementation for Job. +func (j Job) AsBasicJob() (BasicJob, bool) { + return &j, true } -// ProtectionContainerResource base class for container with backup items. Containers with specific -// workloads are derived from this class. -type ProtectionContainerResource struct { - autorest.Response `json:"-"` - // Properties - ProtectionContainerResource properties - Properties BasicProtectionContainer `json:"properties,omitempty"` +// JobResource defines workload agnostic properties for a job. +type JobResource struct { + // Properties - JobResource properties + Properties BasicJob `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id represents the complete path to the resource. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name associated with the resource. @@ -17197,24 +8073,24 @@ type ProtectionContainerResource struct { ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for ProtectionContainerResource. -func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for JobResource. +func (jr JobResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - objectMap["properties"] = pcr.Properties - if pcr.Location != nil { - objectMap["location"] = pcr.Location + objectMap["properties"] = jr.Properties + if jr.Location != nil { + objectMap["location"] = jr.Location } - if pcr.Tags != nil { - objectMap["tags"] = pcr.Tags + if jr.Tags != nil { + objectMap["tags"] = jr.Tags } - if pcr.ETag != nil { - objectMap["eTag"] = pcr.ETag + if jr.ETag != nil { + objectMap["eTag"] = jr.ETag } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. -func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for JobResource struct. +func (jr *JobResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -17224,11 +8100,11 @@ func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - properties, err := unmarshalBasicProtectionContainer(*v) + properties, err := unmarshalBasicJob(*v) if err != nil { return err } - pcr.Properties = properties + jr.Properties = properties } case "id": if v != nil { @@ -17237,7 +8113,7 @@ func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.ID = &ID + jr.ID = &ID } case "name": if v != nil { @@ -17246,7 +8122,7 @@ func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.Name = &name + jr.Name = &name } case "type": if v != nil { @@ -17255,7 +8131,7 @@ func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.Type = &typeVar + jr.Type = &typeVar } case "location": if v != nil { @@ -17264,7 +8140,7 @@ func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.Location = &location + jr.Location = &location } case "tags": if v != nil { @@ -17273,7 +8149,7 @@ func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.Tags = tags + jr.Tags = tags } case "eTag": if v != nil { @@ -17282,351 +8158,416 @@ func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.ETag = &eTag + jr.ETag = &eTag } } } - return nil + return nil +} + +// MabContainer container with items backed up using MAB backup engine. +type MabContainer struct { + // CanReRegister - Can the container be registered one more time. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ContainerID represents the container. + ContainerID *int64 `json:"containerId,omitempty"` + // ProtectedItemCount - Number of items backed up in this container. + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // AgentVersion - Agent version of this container. + AgentVersion *string `json:"agentVersion,omitempty"` + // ExtendedInfo - Additional information for this container + ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` + // MabContainerHealthDetails - Health details on this mab container. + MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` + // ContainerHealthState - Health state of mab container. + ContainerHealthState *string `json:"containerHealthState,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabContainer. +func (mc MabContainer) MarshalJSON() ([]byte, error) { + mc.ContainerType = ContainerTypeWindows1 + objectMap := make(map[string]interface{}) + if mc.CanReRegister != nil { + objectMap["canReRegister"] = mc.CanReRegister + } + if mc.ContainerID != nil { + objectMap["containerId"] = mc.ContainerID + } + if mc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = mc.ProtectedItemCount + } + if mc.AgentVersion != nil { + objectMap["agentVersion"] = mc.AgentVersion + } + if mc.ExtendedInfo != nil { + objectMap["extendedInfo"] = mc.ExtendedInfo + } + if mc.MabContainerHealthDetails != nil { + objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails + } + if mc.ContainerHealthState != nil { + objectMap["containerHealthState"] = mc.ContainerHealthState + } + if mc.FriendlyName != nil { + objectMap["friendlyName"] = mc.FriendlyName + } + if mc.BackupManagementType != "" { + objectMap["backupManagementType"] = mc.BackupManagementType + } + if mc.RegistrationStatus != nil { + objectMap["registrationStatus"] = mc.RegistrationStatus + } + if mc.HealthStatus != nil { + objectMap["healthStatus"] = mc.HealthStatus + } + if mc.ContainerType != "" { + objectMap["containerType"] = mc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false } -// ProtectionContainerResourceList list of ProtectionContainer resources -type ProtectionContainerResourceList struct { - autorest.Response `json:"-"` - // Value - List of resources. - Value *[]ProtectionContainerResource `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false } -// ProtectionContainerResourceListIterator provides access to a complete listing of -// ProtectionContainerResource values. -type ProtectionContainerResourceListIterator struct { - i int - page ProtectionContainerResourceListPage +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ProtectionContainerResourceListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProtectionContainerResourceListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList { - return iter.page.Response() +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource { - if !iter.page.NotDone() { - return ProtectionContainerResource{} - } - return iter.page.Values()[iter.i] +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false } -// Creates a new instance of the ProtectionContainerResourceListIterator type. -func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator { - return ProtectionContainerResourceListIterator{page: page} +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false } -// IsEmpty returns true if the ListResult contains no values. -func (pcrl ProtectionContainerResourceList) IsEmpty() bool { - return pcrl.Value == nil || len(*pcrl.Value) == 0 +// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false } -// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { - if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pcrl.NextLink))) +// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false } -// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values. -type ProtectionContainerResourceListPage struct { - fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error) - pcrl ProtectionContainerResourceList +// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.pcrl) - if err != nil { - return err - } - page.pcrl = next - return nil +// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ProtectionContainerResourceListPage) Next() error { - return page.NextWithContext(context.Background()) +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProtectionContainerResourceListPage) NotDone() bool { - return !page.pcrl.IsEmpty() +// AsMabContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { + return &mc, true } -// Response returns the raw server response from the last page request. -func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList { - return page.pcrl +// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource { - if page.pcrl.IsEmpty() { - return nil - } - return *page.pcrl.Value +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &mc, true } -// Creates a new instance of the ProtectionContainerResourceListPage type. -func NewProtectionContainerResourceListPage(getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage { - return ProtectionContainerResourceListPage{fn: getNextPage} +// MabContainerExtendedInfo additional information of the container. +type MabContainerExtendedInfo struct { + // LastRefreshedAt - Time stamp when this container was refreshed. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` + // BackupItemType - Type of backup items associated with this container. Possible values include: 'ItemTypeInvalid', 'ItemTypeVM', 'ItemTypeFileFolder', 'ItemTypeAzureSQLDb', 'ItemTypeSQLDB', 'ItemTypeExchange', 'ItemTypeSharepoint', 'ItemTypeVMwareVM', 'ItemTypeSystemState', 'ItemTypeClient', 'ItemTypeGenericDataSource', 'ItemTypeSQLDataBase', 'ItemTypeAzureFileShare', 'ItemTypeSAPHanaDatabase', 'ItemTypeSAPAseDatabase' + BackupItemType ItemType `json:"backupItemType,omitempty"` + // BackupItems - List of backup items associated with this container. + BackupItems *[]string `json:"backupItems,omitempty"` + // PolicyName - Backup policy associated with this container. + PolicyName *string `json:"policyName,omitempty"` + // LastBackupStatus - Latest backup status of this container. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` } -// BasicProtectionIntent base class for backup ProtectionIntent. -type BasicProtectionIntent interface { - AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) - AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) - AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) - AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) - AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) - AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) - AsProtectionIntent() (*ProtectionIntent, bool) +// MABContainerHealthDetails MAB workload-specific Health Details. +type MABContainerHealthDetails struct { + // Code - Health Code + Code *int32 `json:"code,omitempty"` + // Title - Health Title + Title *string `json:"title,omitempty"` + // Message - Health Message + Message *string `json:"message,omitempty"` + // Recommendations - Health Recommended Actions + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// MabErrorInfo MAB workload-specific error information. +type MabErrorInfo struct { + // ErrorString - READ-ONLY; Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - READ-ONLY; List of localized recommendations. + Recommendations *[]string `json:"recommendations,omitempty"` } -// ProtectionIntent base class for backup ProtectionIntent. -type ProtectionIntent struct { - // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' +// MabJob MAB workload-specific job. +type MabJob struct { + // Duration - Time taken by job to run. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - The state/actions applicable on jobs like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // MabServerName - Name of server protecting the DS. + MabServerName *string `json:"mabServerName,omitempty"` + // MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer' + MabServerType MabServerType `json:"mabServerType,omitempty"` + // WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ErrorDetails - The errors. + ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information on the job. + ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // SourceResourceID - ARM ID of the resource to be backed up. - SourceResourceID *string `json:"sourceResourceId,omitempty"` - // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId - ItemID *string `json:"itemId,omitempty"` - // PolicyID - ID of the backup policy with which this item is backed up. - PolicyID *string `json:"policyId,omitempty"` - // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' - ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` } -func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err +// MarshalJSON is the custom marshaler for MabJob. +func (mj MabJob) MarshalJSON() ([]byte, error) { + mj.JobType = JobTypeMabJob + objectMap := make(map[string]interface{}) + if mj.Duration != nil { + objectMap["duration"] = mj.Duration } - - switch m["protectionIntentItemType"] { - case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): - var arsvpi AzureRecoveryServiceVaultProtectionIntent - err := json.Unmarshal(body, &arsvpi) - return arsvpi, err - case string(ProtectionIntentItemTypeAzureResourceItem): - var arpi AzureResourceProtectionIntent - err := json.Unmarshal(body, &arpi) - return arpi, err - case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): - var awapi AzureWorkloadAutoProtectionIntent - err := json.Unmarshal(body, &awapi) - return awapi, err - case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): - var awsapi AzureWorkloadSQLAutoProtectionIntent - err := json.Unmarshal(body, &awsapi) - return awsapi, err - default: - var pi ProtectionIntent - err := json.Unmarshal(body, &pi) - return pi, err + if mj.ActionsInfo != nil { + objectMap["actionsInfo"] = mj.ActionsInfo } -} -func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err + if mj.MabServerName != nil { + objectMap["mabServerName"] = mj.MabServerName } - - piArray := make([]BasicProtectionIntent, len(rawMessages)) - - for index, rawMessage := range rawMessages { - pi, err := unmarshalBasicProtectionIntent(*rawMessage) - if err != nil { - return nil, err - } - piArray[index] = pi + if mj.MabServerType != "" { + objectMap["mabServerType"] = mj.MabServerType } - return piArray, nil -} - -// MarshalJSON is the custom marshaler for ProtectionIntent. -func (pi ProtectionIntent) MarshalJSON() ([]byte, error) { - pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent - objectMap := make(map[string]interface{}) - if pi.BackupManagementType != "" { - objectMap["backupManagementType"] = pi.BackupManagementType + if mj.WorkloadType != "" { + objectMap["workloadType"] = mj.WorkloadType } - if pi.SourceResourceID != nil { - objectMap["sourceResourceId"] = pi.SourceResourceID + if mj.ErrorDetails != nil { + objectMap["errorDetails"] = mj.ErrorDetails } - if pi.ItemID != nil { - objectMap["itemId"] = pi.ItemID + if mj.ExtendedInfo != nil { + objectMap["extendedInfo"] = mj.ExtendedInfo } - if pi.PolicyID != nil { - objectMap["policyId"] = pi.PolicyID + if mj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = mj.EntityFriendlyName } - if pi.ProtectionState != "" { - objectMap["protectionState"] = pi.ProtectionState + if mj.BackupManagementType != "" { + objectMap["backupManagementType"] = mj.BackupManagementType } - if pi.ProtectionIntentItemType != "" { - objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType + if mj.Operation != nil { + objectMap["operation"] = mj.Operation + } + if mj.Status != nil { + objectMap["status"] = mj.Status + } + if mj.StartTime != nil { + objectMap["startTime"] = mj.StartTime + } + if mj.EndTime != nil { + objectMap["endTime"] = mj.EndTime + } + if mj.ActivityID != nil { + objectMap["activityId"] = mj.ActivityID + } + if mj.JobType != "" { + objectMap["jobType"] = mj.JobType } return json.Marshal(objectMap) } -// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { +// AsAzureIaaSVMJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { return nil, false } -// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { +// AsAzureStorageJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) { return nil, false } -// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { +// AsAzureWorkloadJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { return nil, false } -// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { +// AsDpmJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsDpmJob() (*DpmJob, bool) { return nil, false } -// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { - return nil, false +// AsMabJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsMabJob() (*MabJob, bool) { + return &mj, true } -// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { +// AsJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsJob() (*Job, bool) { return nil, false } -// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { - return &pi, true +// AsBasicJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsBasicJob() (BasicJob, bool) { + return &mj, true } -// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. -func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { - return &pi, true +// MabJobExtendedInfo additional information for the MAB workload-specific job. +type MabJobExtendedInfo struct { + // TasksList - List of tasks for this job. + TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - The job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message specific to this job. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// ProtectionIntentQueryObject filters to list protection intent. -type ProtectionIntentQueryObject struct { - // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer' - ItemType IntentItemType `json:"itemType,omitempty"` - // ParentName - Parent name of the intent - ParentName *string `json:"parentName,omitempty"` - // ItemName - Item name of the intent - ItemName *string `json:"itemName,omitempty"` +// MarshalJSON is the custom marshaler for MabJobExtendedInfo. +func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mjei.TasksList != nil { + objectMap["tasksList"] = mjei.TasksList + } + if mjei.PropertyBag != nil { + objectMap["propertyBag"] = mjei.PropertyBag + } + if mjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// MabJobTaskDetails MAB workload-specific job task details. +type MabJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// ManagementUsage backup management usages of a vault. +type ManagementUsage struct { + // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + Unit UsagesUnit `json:"unit,omitempty"` + // QuotaPeriod - Quota period of usage. + QuotaPeriod *string `json:"quotaPeriod,omitempty"` + // NextResetTime - Next reset time of usage. + NextResetTime *date.Time `json:"nextResetTime,omitempty"` + // CurrentValue - Current value of usage. + CurrentValue *int64 `json:"currentValue,omitempty"` + // Limit - Limit of usage. + Limit *int64 `json:"limit,omitempty"` + // Name - Name of usage. + Name *NameInfo `json:"name,omitempty"` +} + +// ManagementUsageList backup management usage for vault. +type ManagementUsageList struct { + autorest.Response `json:"-"` + // Value - The list of backup management usages for the given vault. + Value *[]ManagementUsage `json:"value,omitempty"` +} + +// NameInfo the name of usage. +type NameInfo struct { + // Value - Value of usage. + Value *string `json:"value,omitempty"` + // LocalizedValue - Localized value of usage. + LocalizedValue *string `json:"localizedValue,omitempty"` } -// ProtectionIntentResource base class for backup ProtectionIntent. -type ProtectionIntentResource struct { +// OperationStatus operation status. +type OperationStatus struct { autorest.Response `json:"-"` - // Properties - ProtectionIntentResource properties - Properties BasicProtectionIntent `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id represents the complete path to the resource. + // ID - ID of the operation. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. + // Name - Name of the operation. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProtectionIntentResource. -func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["properties"] = pir.Properties - if pir.Location != nil { - objectMap["location"] = pir.Location - } - if pir.Tags != nil { - objectMap["tags"] = pir.Tags - } - if pir.ETag != nil { - objectMap["eTag"] = pir.ETag - } - return json.Marshal(objectMap) + // Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled' + Status OperationStatusValues `json:"status,omitempty"` + // StartTime - Operation start time. Format: ISO-8601. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Operation end time. Format: ISO-8601. + EndTime *date.Time `json:"endTime,omitempty"` + // Error - Error information related to this operation. + Error *OperationStatusError `json:"error,omitempty"` + // Properties - Additional information associated with this operation. + Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct. -func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. +func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -17634,14 +8575,6 @@ func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "properties": - if v != nil { - properties, err := unmarshalBasicProtectionIntent(*v) - if err != nil { - return err - } - pir.Properties = properties - } case "id": if v != nil { var ID string @@ -17649,7 +8582,7 @@ func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.ID = &ID + osVar.ID = &ID } case "name": if v != nil { @@ -17658,43 +8591,51 @@ func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - pir.Name = &name + osVar.Name = &name } - case "type": + case "status": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var status OperationStatusValues + err = json.Unmarshal(*v, &status) if err != nil { return err } - pir.Type = &typeVar + osVar.Status = status } - case "location": + case "startTime": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var startTime date.Time + err = json.Unmarshal(*v, &startTime) if err != nil { return err } - pir.Location = &location + osVar.StartTime = &startTime } - case "tags": + case "endTime": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var endTime date.Time + err = json.Unmarshal(*v, &endTime) if err != nil { return err } - pir.Tags = tags + osVar.EndTime = &endTime } - case "eTag": + case "error": if v != nil { - var eTag string - err = json.Unmarshal(*v, &eTag) + var errorVar OperationStatusError + err = json.Unmarshal(*v, &errorVar) if err != nil { return err } - pir.ETag = &eTag + osVar.Error = &errorVar + } + case "properties": + if v != nil { + properties, err := unmarshalBasicOperationStatusExtendedInfo(*v) + if err != nil { + return err + } + osVar.Properties = properties } } } @@ -17702,299 +8643,404 @@ func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { return nil } -// ProtectionIntentResourceList list of ProtectionIntent resources -type ProtectionIntentResourceList struct { - autorest.Response `json:"-"` - // Value - List of resources. - Value *[]ProtectionIntentResource `json:"value,omitempty"` - // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// OperationStatusError error information associated with operation status call. +type OperationStatusError struct { + // Code - Error code of the operation failure. + Code *string `json:"code,omitempty"` + // Message - Error message displayed if the operation failure. + Message *string `json:"message,omitempty"` } -// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource -// values. -type ProtectionIntentResourceListIterator struct { - i int - page ProtectionIntentResourceListPage +// BasicOperationStatusExtendedInfo base class for additional information of operation status. +type BasicOperationStatusExtendedInfo interface { + AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) + AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) + AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) + AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) +} + +// OperationStatusExtendedInfo base class for additional information of operation status. +type OperationStatusExtendedInfo struct { + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeOperationStatusJobExtendedInfo): + var osjei OperationStatusJobExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusJobsExtendedInfo): + var osjei OperationStatusJobsExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): + var ospiei OperationStatusProvisionILRExtendedInfo + err := json.Unmarshal(body, &ospiei) + return ospiei, err + default: + var osei OperationStatusExtendedInfo + err := json.Unmarshal(body, &osei) + return osei, err + } +} +func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage) + if err != nil { + return nil, err + } + oseiArray[index] = osei + } + return oseiArray, nil +} + +// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { + osei.ObjectType = ObjectTypeOperationStatusExtendedInfo + objectMap := make(map[string]interface{}) + if osei.ObjectType != "" { + objectMap["objectType"] = osei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return &osei, true +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osei, true +} + +// OperationStatusJobExtendedInfo operation status job extended info. +type OperationStatusJobExtendedInfo struct { + // JobID - ID of the job created for this protected item. + JobID *string `json:"jobId,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo + objectMap := make(map[string]interface{}) + if osjei.JobID != nil { + objectMap["jobId"] = osjei.JobID + } + if osjei.ObjectType != "" { + objectMap["objectType"] = osjei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return &osjei, true +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osjei, true } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// OperationStatusJobsExtendedInfo operation status extended info for list of jobs. +type OperationStatusJobsExtendedInfo struct { + // JobIds - IDs of the jobs created for the protected item. + JobIds *[]string `json:"jobIds,omitempty"` + // FailedJobsError - Stores all the failed jobs along with the corresponding error codes. + FailedJobsError map[string]*string `json:"failedJobsError"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo + objectMap := make(map[string]interface{}) + if osjei.JobIds != nil { + objectMap["jobIds"] = osjei.JobIds } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if osjei.FailedJobsError != nil { + objectMap["failedJobsError"] = osjei.FailedJobsError } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + if osjei.ObjectType != "" { + objectMap["objectType"] = osjei.ObjectType } - iter.i = 0 - return nil + return json.Marshal(objectMap) } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ProtectionIntentResourceListIterator) Next() error { - return iter.NextWithContext(context.Background()) +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProtectionIntentResourceListIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return &osjei, true } -// Response returns the raw server response from the last page request. -func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList { - return iter.page.Response() +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource { - if !iter.page.NotDone() { - return ProtectionIntentResource{} - } - return iter.page.Values()[iter.i] +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false } -// Creates a new instance of the ProtectionIntentResourceListIterator type. -func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator { - return ProtectionIntentResourceListIterator{page: page} +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osjei, true } -// IsEmpty returns true if the ListResult contains no values. -func (pirl ProtectionIntentResourceList) IsEmpty() bool { - return pirl.Value == nil || len(*pirl.Value) == 0 +// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action. +type OperationStatusProvisionILRExtendedInfo struct { + // RecoveryTarget - Target details for file / folder restore. + RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` } -// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) { - if pirl.NextLink == nil || len(to.String(pirl.NextLink)) < 1 { - return nil, nil +// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { + ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo + objectMap := make(map[string]interface{}) + if ospiei.RecoveryTarget != nil { + objectMap["recoveryTarget"] = ospiei.RecoveryTarget } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pirl.NextLink))) + if ospiei.ObjectType != "" { + objectMap["objectType"] = ospiei.ObjectType + } + return json.Marshal(objectMap) } -// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values. -type ProtectionIntentResourceListPage struct { - fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error) - pirl ProtectionIntentResourceList +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.pirl) - if err != nil { - return err - } - page.pirl = next - return nil +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ProtectionIntentResourceListPage) Next() error { - return page.NextWithContext(context.Background()) +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return &ospiei, true } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProtectionIntentResourceListPage) NotDone() bool { - return !page.pirl.IsEmpty() +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false } -// Response returns the raw server response from the last page request. -func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList { - return page.pirl +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &ospiei, true } -// Values returns the slice of values for the current page or nil if there are no values. -func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource { - if page.pirl.IsEmpty() { - return nil - } - return *page.pirl.Value +// PreBackupValidation pre-backup validation for Azure VM Workload provider. +type PreBackupValidation struct { + // Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed' + Status InquiryStatus `json:"status,omitempty"` + // Code - Error code of protectable item + Code *string `json:"code,omitempty"` + // Message - Message corresponding to the error code for the protectable item + Message *string `json:"message,omitempty"` } -// Creates a new instance of the ProtectionIntentResourceListPage type. -func NewProtectionIntentResourceListPage(getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage { - return ProtectionIntentResourceListPage{fn: getNextPage} +// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a +// given vault and given configuration. +// It will validate followings +// 1. Vault capacity +// 2. VM is already protected +// 3. Any VM related configuration passed in properties. +type PreValidateEnableBackupRequest struct { + // ResourceType - ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + ResourceType DataSourceType `json:"resourceType,omitempty"` + // ResourceID - ARM Virtual Machine Id + ResourceID *string `json:"resourceId,omitempty"` + // VaultID - ARM id of the Recovery Services Vault + VaultID *string `json:"vaultId,omitempty"` + // Properties - Configuration of VM if any needs to be validated like OS type etc + Properties *string `json:"properties,omitempty"` +} + +// PreValidateEnableBackupResponse response contract for enable backup validation request +type PreValidateEnableBackupResponse struct { + autorest.Response `json:"-"` + // Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed' + Status ValidationStatus `json:"status,omitempty"` + // ErrorCode - Response error code + ErrorCode *string `json:"errorCode,omitempty"` + // ErrorMessage - Response error message + ErrorMessage *string `json:"errorMessage,omitempty"` + // Recommendation - Recommended action for user + Recommendation *string `json:"recommendation,omitempty"` + // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + // for portal + ContainerName *string `json:"containerName,omitempty"` + // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal + ProtectedItemName *string `json:"protectedItemName,omitempty"` } -// BasicProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this class. -type BasicProtectionPolicy interface { - AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) - AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) - AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) - AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) - AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) - AsMabProtectionPolicy() (*MabProtectionPolicy, bool) - AsProtectionPolicy() (*ProtectionPolicy, bool) +// BasicProtectableContainer protectable Container Class. +type BasicProtectableContainer interface { + AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) + AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) + AsProtectableContainer() (*ProtectableContainer, bool) } -// ProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this -// class. -type ProtectionPolicy struct { - // ProtectedItemsCount - Number of items associated with this policy. - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' - BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +// ProtectableContainer protectable Container Class. +type ProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` } -func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) { +func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { return nil, err } - switch m["backupManagementType"] { - case string(BackupManagementTypeAzureWorkload): - var avwpp AzureVMWorkloadProtectionPolicy - err := json.Unmarshal(body, &avwpp) - return avwpp, err - case string(BackupManagementTypeAzureStorage): - var afspp AzureFileShareProtectionPolicy - err := json.Unmarshal(body, &afspp) - return afspp, err - case string(BackupManagementTypeAzureIaasVM): - var aispp AzureIaaSVMProtectionPolicy - err := json.Unmarshal(body, &aispp) - return aispp, err - case string(BackupManagementTypeAzureSQL): - var aspp AzureSQLProtectionPolicy - err := json.Unmarshal(body, &aspp) - return aspp, err - case string(BackupManagementTypeGenericProtectionPolicy): - var gpp GenericProtectionPolicy - err := json.Unmarshal(body, &gpp) - return gpp, err - case string(BackupManagementTypeMAB): - var mpp MabProtectionPolicy - err := json.Unmarshal(body, &mpp) - return mpp, err + switch m["protectableContainerType"] { + case string(ProtectableContainerTypeStorageContainer): + var aspc AzureStorageProtectableContainer + err := json.Unmarshal(body, &aspc) + return aspc, err + case string(ProtectableContainerTypeVMAppContainer): + var avacpc AzureVMAppContainerProtectableContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err default: - var pp ProtectionPolicy - err := json.Unmarshal(body, &pp) - return pp, err + var pc ProtectableContainer + err := json.Unmarshal(body, &pc) + return pc, err } } -func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) { +func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - ppArray := make([]BasicProtectionPolicy, len(rawMessages)) + pcArray := make([]BasicProtectableContainer, len(rawMessages)) for index, rawMessage := range rawMessages { - pp, err := unmarshalBasicProtectionPolicy(*rawMessage) + pc, err := unmarshalBasicProtectableContainer(*rawMessage) if err != nil { return nil, err } - ppArray[index] = pp + pcArray[index] = pc } - return ppArray, nil + return pcArray, nil } -// MarshalJSON is the custom marshaler for ProtectionPolicy. -func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) { - pp.BackupManagementType = BackupManagementTypeProtectionPolicy +// MarshalJSON is the custom marshaler for ProtectableContainer. +func (pc ProtectableContainer) MarshalJSON() ([]byte, error) { + pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer objectMap := make(map[string]interface{}) - if pp.ProtectedItemsCount != nil { - objectMap["protectedItemsCount"] = pp.ProtectedItemsCount + if pc.FriendlyName != nil { + objectMap["friendlyName"] = pc.FriendlyName + } + if pc.BackupManagementType != "" { + objectMap["backupManagementType"] = pc.BackupManagementType + } + if pc.HealthStatus != nil { + objectMap["healthStatus"] = pc.HealthStatus + } + if pc.ContainerID != nil { + objectMap["containerId"] = pc.ContainerID } - if pp.BackupManagementType != "" { - objectMap["backupManagementType"] = pp.BackupManagementType + if pc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = pc.ProtectableContainerType } return json.Marshal(objectMap) } -// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { - return nil, false -} - -// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { - return nil, false -} - -// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { - return nil, false -} - -// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { - return nil, false -} - -// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { return nil, false } -// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { return nil, false } -// AsProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { - return &pp, true -} - -// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. -func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { - return &pp, true +// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { + return &pc, true } -// ProtectionPolicyQueryObject filters the list backup policies API. -type ProtectionPolicyQueryObject struct { - // BackupManagementType - Backup management type for the backup policy. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' - BackupManagementType ManagementType `json:"backupManagementType,omitempty"` - // FabricName - Fabric name for filter - FabricName *string `json:"fabricName,omitempty"` - // WorkloadType - Workload type for the backup policy. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' - WorkloadType WorkloadType `json:"workloadType,omitempty"` +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &pc, true } -// ProtectionPolicyResource base class for backup policy. Workload-specific backup policies are derived -// from this class. -type ProtectionPolicyResource struct { - autorest.Response `json:"-"` - // Properties - ProtectionPolicyResource properties - Properties BasicProtectionPolicy `json:"properties,omitempty"` +// ProtectableContainerResource protectable Container Class. +type ProtectableContainerResource struct { + // Properties - ProtectableContainerResource properties + Properties BasicProtectableContainer `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id represents the complete path to the resource. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name associated with the resource. @@ -18009,24 +9055,24 @@ type ProtectionPolicyResource struct { ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for ProtectionPolicyResource. -func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ProtectableContainerResource. +func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - objectMap["properties"] = ppr.Properties - if ppr.Location != nil { - objectMap["location"] = ppr.Location + objectMap["properties"] = pcr.Properties + if pcr.Location != nil { + objectMap["location"] = pcr.Location } - if ppr.Tags != nil { - objectMap["tags"] = ppr.Tags + if pcr.Tags != nil { + objectMap["tags"] = pcr.Tags } - if ppr.ETag != nil { - objectMap["eTag"] = ppr.ETag + if pcr.ETag != nil { + objectMap["eTag"] = pcr.ETag } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct. -func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct. +func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -18036,11 +9082,11 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - properties, err := unmarshalBasicProtectionPolicy(*v) + properties, err := unmarshalBasicProtectableContainer(*v) if err != nil { return err } - ppr.Properties = properties + pcr.Properties = properties } case "id": if v != nil { @@ -18049,7 +9095,7 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ppr.ID = &ID + pcr.ID = &ID } case "name": if v != nil { @@ -18058,7 +9104,7 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ppr.Name = &name + pcr.Name = &name } case "type": if v != nil { @@ -18067,7 +9113,7 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ppr.Type = &typeVar + pcr.Type = &typeVar } case "location": if v != nil { @@ -18076,7 +9122,7 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ppr.Location = &location + pcr.Location = &location } case "tags": if v != nil { @@ -18085,7 +9131,7 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ppr.Tags = tags + pcr.Tags = tags } case "eTag": if v != nil { @@ -18094,7 +9140,7 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - ppr.ETag = &eTag + pcr.ETag = &eTag } } } @@ -18102,27 +9148,27 @@ func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { return nil } -// ProtectionPolicyResourceList list of ProtectionPolicy resources -type ProtectionPolicyResourceList struct { +// ProtectableContainerResourceList list of ProtectableContainer resources +type ProtectableContainerResourceList struct { autorest.Response `json:"-"` // Value - List of resources. - Value *[]ProtectionPolicyResource `json:"value,omitempty"` + Value *[]ProtectableContainerResource `json:"value,omitempty"` // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// ProtectionPolicyResourceListIterator provides access to a complete listing of ProtectionPolicyResource -// values. -type ProtectionPolicyResourceListIterator struct { +// ProtectableContainerResourceListIterator provides access to a complete listing of +// ProtectableContainerResource values. +type ProtectableContainerResourceListIterator struct { i int - page ProtectionPolicyResourceListPage + page ProtectableContainerResourceListPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -18147,62 +9193,62 @@ func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Co // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ProtectionPolicyResourceListIterator) Next() error { +func (iter *ProtectableContainerResourceListIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ProtectionPolicyResourceListIterator) NotDone() bool { +func (iter ProtectableContainerResourceListIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList { +func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource { +func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource { if !iter.page.NotDone() { - return ProtectionPolicyResource{} + return ProtectableContainerResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ProtectionPolicyResourceListIterator type. -func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator { - return ProtectionPolicyResourceListIterator{page: page} +// Creates a new instance of the ProtectableContainerResourceListIterator type. +func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator { + return ProtectableContainerResourceListIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (pprl ProtectionPolicyResourceList) IsEmpty() bool { - return pprl.Value == nil || len(*pprl.Value) == 0 +func (pcrl ProtectableContainerResourceList) IsEmpty() bool { + return pcrl.Value == nil || len(*pcrl.Value) == 0 } -// protectionPolicyResourceListPreparer prepares a request to retrieve the next set of results. +// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) { - if pprl.NextLink == nil || len(to.String(pprl.NextLink)) < 1 { +func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(pprl.NextLink))) + autorest.WithBaseURL(to.String(pcrl.NextLink))) } -// ProtectionPolicyResourceListPage contains a page of ProtectionPolicyResource values. -type ProtectionPolicyResourceListPage struct { - fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error) - pprl ProtectionPolicyResourceList +// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values. +type ProtectableContainerResourceListPage struct { + fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error) + pcrl ProtectableContainerResourceList } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) { +func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -18211,234 +9257,274 @@ func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.pprl) + next, err := page.fn(ctx, page.pcrl) if err != nil { return err } - page.pprl = next + page.pcrl = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ProtectionPolicyResourceListPage) Next() error { +func (page *ProtectableContainerResourceListPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ProtectionPolicyResourceListPage) NotDone() bool { - return !page.pprl.IsEmpty() +func (page ProtectableContainerResourceListPage) NotDone() bool { + return !page.pcrl.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList { - return page.pprl +func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList { + return page.pcrl } // Values returns the slice of values for the current page or nil if there are no values. -func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource { - if page.pprl.IsEmpty() { +func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource { + if page.pcrl.IsEmpty() { return nil } - return *page.pprl.Value + return *page.pcrl.Value } -// Creates a new instance of the ProtectionPolicyResourceListPage type. -func NewProtectionPolicyResourceListPage(getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage { - return ProtectionPolicyResourceListPage{fn: getNextPage} +// Creates a new instance of the ProtectableContainerResourceListPage type. +func NewProtectableContainerResourceListPage(getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage { + return ProtectableContainerResourceListPage{fn: getNextPage} } -// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. -type BasicRecoveryPoint interface { - AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) - AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) - AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) - AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) - AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) - AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) - AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) - AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) - AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) - AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) - AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) - AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) - AsRecoveryPoint() (*RecoveryPoint, bool) +// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived +// from this class. +type BasicProtectionContainer interface { + AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) + AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) + AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) + AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) + AsAzureSQLContainer() (*AzureSQLContainer, bool) + AsAzureStorageContainer() (*AzureStorageContainer, bool) + AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) + AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) + AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) + AsDpmContainer() (*DpmContainer, bool) + AsBasicDpmContainer() (BasicDpmContainer, bool) + AsGenericContainer() (*GenericContainer, bool) + AsIaaSVMContainer() (*IaaSVMContainer, bool) + AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) + AsMabContainer() (*MabContainer, bool) + AsProtectionContainer() (*ProtectionContainer, bool) } -// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. -type RecoveryPoint struct { - // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' - ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +// ProtectionContainer base class for container with backup items. Containers with specific workloads are +// derived from this class. +type ProtectionContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` } -func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) { +func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { return nil, err } - switch m["objectType"] { - case string(ObjectTypeAzureFileShareRecoveryPoint): - var afsrp AzureFileShareRecoveryPoint - err := json.Unmarshal(body, &afsrp) - return afsrp, err - case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): - var awpitrp AzureWorkloadPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awpitrp) - return awpitrp, err - case string(ObjectTypeAzureWorkloadRecoveryPoint): - var awrp AzureWorkloadRecoveryPoint - err := json.Unmarshal(body, &awrp) - return awrp, err - case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): - var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awshpitrp) - return awshpitrp, err - case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): - var awshrp AzureWorkloadSAPHanaRecoveryPoint - err := json.Unmarshal(body, &awshrp) - return awshrp, err - case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): - var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint - err := json.Unmarshal(body, &awspitrp) - return awspitrp, err - case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): - var awsrp AzureWorkloadSQLRecoveryPoint - err := json.Unmarshal(body, &awsrp) - return awsrp, err - case string(ObjectTypeGenericRecoveryPoint): - var grp GenericRecoveryPoint - err := json.Unmarshal(body, &grp) - return grp, err - case string(ObjectTypeIaasVMRecoveryPoint): - var ivrp IaasVMRecoveryPoint - err := json.Unmarshal(body, &ivrp) - return ivrp, err + switch m["containerType"] { + case string(ContainerTypeAzureBackupServerContainer1): + var absc AzureBackupServerContainer + err := json.Unmarshal(body, &absc) + return absc, err + case string(ContainerTypeMicrosoftClassicComputevirtualMachines): + var aisccvc AzureIaaSClassicComputeVMContainer + err := json.Unmarshal(body, &aisccvc) + return aisccvc, err + case string(ContainerTypeMicrosoftComputevirtualMachines): + var aiscvc AzureIaaSComputeVMContainer + err := json.Unmarshal(body, &aiscvc) + return aiscvc, err + case string(ContainerTypeSQLAGWorkLoadContainer1): + var aswcpc AzureSQLAGWorkloadContainerProtectionContainer + err := json.Unmarshal(body, &aswcpc) + return aswcpc, err + case string(ContainerTypeAzureSQLContainer1): + var asc AzureSQLContainer + err := json.Unmarshal(body, &asc) + return asc, err + case string(ContainerTypeStorageContainer1): + var asc AzureStorageContainer + err := json.Unmarshal(body, &asc) + return asc, err + case string(ContainerTypeVMAppContainer1): + var avacpc AzureVMAppContainerProtectionContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + case string(ContainerTypeAzureWorkloadContainer): + var awc AzureWorkloadContainer + err := json.Unmarshal(body, &awc) + return awc, err + case string(ContainerTypeDPMContainer1): + var dc DpmContainer + err := json.Unmarshal(body, &dc) + return dc, err + case string(ContainerTypeGenericContainer1): + var gc GenericContainer + err := json.Unmarshal(body, &gc) + return gc, err + case string(ContainerTypeIaaSVMContainer): + var isc IaaSVMContainer + err := json.Unmarshal(body, &isc) + return isc, err + case string(ContainerTypeWindows1): + var mc MabContainer + err := json.Unmarshal(body, &mc) + return mc, err default: - var rp RecoveryPoint - err := json.Unmarshal(body, &rp) - return rp, err + var pc ProtectionContainer + err := json.Unmarshal(body, &pc) + return pc, err } } -func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) { +func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - rpArray := make([]BasicRecoveryPoint, len(rawMessages)) + pcArray := make([]BasicProtectionContainer, len(rawMessages)) for index, rawMessage := range rawMessages { - rp, err := unmarshalBasicRecoveryPoint(*rawMessage) + pc, err := unmarshalBasicProtectionContainer(*rawMessage) if err != nil { return nil, err } - rpArray[index] = rp + pcArray[index] = pc } - return rpArray, nil + return pcArray, nil } -// MarshalJSON is the custom marshaler for RecoveryPoint. -func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { - rp.ObjectType = ObjectTypeRecoveryPoint +// MarshalJSON is the custom marshaler for ProtectionContainer. +func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { + pc.ContainerType = ContainerTypeProtectionContainer objectMap := make(map[string]interface{}) - if rp.ObjectType != "" { - objectMap["objectType"] = rp.ObjectType + if pc.FriendlyName != nil { + objectMap["friendlyName"] = pc.FriendlyName + } + if pc.BackupManagementType != "" { + objectMap["backupManagementType"] = pc.BackupManagementType + } + if pc.RegistrationStatus != nil { + objectMap["registrationStatus"] = pc.RegistrationStatus + } + if pc.HealthStatus != nil { + objectMap["healthStatus"] = pc.HealthStatus + } + if pc.ContainerType != "" { + objectMap["containerType"] = pc.ContainerType } return json.Marshal(objectMap) } -// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { return nil, false } -// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { +// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { return nil, false } -// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { +// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { return nil, false } -// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { return nil, false } -// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { return nil, false } -// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { return nil, false } -// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { +// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { return nil, false } -// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { +// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { return nil, false } -// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { +// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { return nil, false } -// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { +// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { return nil, false } -// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { return nil, false } -// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { +// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) { return nil, false } -// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { - return &rp, true -} - -// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. -func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { - return &rp, true +// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return &pc, true } -// RecoveryPointDiskConfiguration disk configuration -type RecoveryPointDiskConfiguration struct { - // NumberOfDisksIncludedInBackup - Number of disks included in backup - NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"` - // NumberOfDisksAttachedToVM - Number of disks attached to the VM - NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"` - // IncludedDiskList - Information of disks included in backup - IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"` - // ExcludedDiskList - Information of disks excluded from backup - ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"` +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &pc, true } -// RecoveryPointResource base class for backup copies. Workload-specific backup copies are derived from -// this class. -type RecoveryPointResource struct { +// ProtectionContainerResource base class for container with backup items. Containers with specific +// workloads are derived from this class. +type ProtectionContainerResource struct { autorest.Response `json:"-"` - // Properties - RecoveryPointResource properties - Properties BasicRecoveryPoint `json:"properties,omitempty"` + // Properties - ProtectionContainerResource properties + Properties BasicProtectionContainer `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id represents the complete path to the resource. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name associated with the resource. @@ -18453,24 +9539,24 @@ type RecoveryPointResource struct { ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for RecoveryPointResource. -func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ProtectionContainerResource. +func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - objectMap["properties"] = rpr.Properties - if rpr.Location != nil { - objectMap["location"] = rpr.Location + objectMap["properties"] = pcr.Properties + if pcr.Location != nil { + objectMap["location"] = pcr.Location } - if rpr.Tags != nil { - objectMap["tags"] = rpr.Tags + if pcr.Tags != nil { + objectMap["tags"] = pcr.Tags } - if rpr.ETag != nil { - objectMap["eTag"] = rpr.ETag + if pcr.ETag != nil { + objectMap["eTag"] = pcr.ETag } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct. -func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. +func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -18480,11 +9566,11 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - properties, err := unmarshalBasicRecoveryPoint(*v) + properties, err := unmarshalBasicProtectionContainer(*v) if err != nil { return err } - rpr.Properties = properties + pcr.Properties = properties } case "id": if v != nil { @@ -18493,7 +9579,7 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rpr.ID = &ID + pcr.ID = &ID } case "name": if v != nil { @@ -18502,7 +9588,7 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rpr.Name = &name + pcr.Name = &name } case "type": if v != nil { @@ -18511,7 +9597,7 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rpr.Type = &typeVar + pcr.Type = &typeVar } case "location": if v != nil { @@ -18520,7 +9606,7 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rpr.Location = &location + pcr.Location = &location } case "tags": if v != nil { @@ -18529,7 +9615,7 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rpr.Tags = tags + pcr.Tags = tags } case "eTag": if v != nil { @@ -18538,7 +9624,7 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rpr.ETag = &eTag + pcr.ETag = &eTag } } } @@ -18546,26 +9632,27 @@ func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { return nil } -// RecoveryPointResourceList list of RecoveryPoint resources -type RecoveryPointResourceList struct { +// ProtectionContainerResourceList list of ProtectionContainer resources +type ProtectionContainerResourceList struct { autorest.Response `json:"-"` // Value - List of resources. - Value *[]RecoveryPointResource `json:"value,omitempty"` + Value *[]ProtectionContainerResource `json:"value,omitempty"` // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. NextLink *string `json:"nextLink,omitempty"` } -// RecoveryPointResourceListIterator provides access to a complete listing of RecoveryPointResource values. -type RecoveryPointResourceListIterator struct { +// ProtectionContainerResourceListIterator provides access to a complete listing of +// ProtectionContainerResource values. +type ProtectionContainerResourceListIterator struct { i int - page RecoveryPointResourceListPage + page ProtectionContainerResourceListPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -18590,62 +9677,62 @@ func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Conte // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *RecoveryPointResourceListIterator) Next() error { +func (iter *ProtectionContainerResourceListIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RecoveryPointResourceListIterator) NotDone() bool { +func (iter ProtectionContainerResourceListIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList { +func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource { +func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource { if !iter.page.NotDone() { - return RecoveryPointResource{} + return ProtectionContainerResource{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the RecoveryPointResourceListIterator type. -func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator { - return RecoveryPointResourceListIterator{page: page} +// Creates a new instance of the ProtectionContainerResourceListIterator type. +func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator { + return ProtectionContainerResourceListIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (rprl RecoveryPointResourceList) IsEmpty() bool { - return rprl.Value == nil || len(*rprl.Value) == 0 +func (pcrl ProtectionContainerResourceList) IsEmpty() bool { + return pcrl.Value == nil || len(*pcrl.Value) == 0 } -// recoveryPointResourceListPreparer prepares a request to retrieve the next set of results. +// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) { - if rprl.NextLink == nil || len(to.String(rprl.NextLink)) < 1 { +func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(rprl.NextLink))) + autorest.WithBaseURL(to.String(pcrl.NextLink))) } -// RecoveryPointResourceListPage contains a page of RecoveryPointResource values. -type RecoveryPointResourceListPage struct { - fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error) - rprl RecoveryPointResourceList +// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values. +type ProtectionContainerResourceListPage struct { + fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error) + pcrl ProtectionContainerResourceList } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) { +func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -18654,151 +9741,202 @@ func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rprl) + next, err := page.fn(ctx, page.pcrl) if err != nil { return err } - page.rprl = next + page.pcrl = next return nil } // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *RecoveryPointResourceListPage) Next() error { +func (page *ProtectionContainerResourceListPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RecoveryPointResourceListPage) NotDone() bool { - return !page.rprl.IsEmpty() +func (page ProtectionContainerResourceListPage) NotDone() bool { + return !page.pcrl.IsEmpty() } // Response returns the raw server response from the last page request. -func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList { - return page.rprl +func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList { + return page.pcrl } // Values returns the slice of values for the current page or nil if there are no values. -func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource { - if page.rprl.IsEmpty() { +func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource { + if page.pcrl.IsEmpty() { return nil } - return *page.rprl.Value -} - -// Creates a new instance of the RecoveryPointResourceListPage type. -func NewRecoveryPointResourceListPage(getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage { - return RecoveryPointResourceListPage{fn: getNextPage} + return *page.pcrl.Value } -// RecoveryPointTierInformation recovery point tier information. -type RecoveryPointTierInformation struct { - // Type - Recovery point tier type. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP' - Type RecoveryPointTierType `json:"type,omitempty"` - // Status - Recovery point tier status. Possible values include: 'RecoveryPointTierStatusInvalid', 'RecoveryPointTierStatusValid', 'RecoveryPointTierStatusDisabled', 'RecoveryPointTierStatusDeleted' - Status RecoveryPointTierStatus `json:"status,omitempty"` +// Creates a new instance of the ProtectionContainerResourceListPage type. +func NewProtectionContainerResourceListPage(getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage { + return ProtectionContainerResourceListPage{fn: getNextPage} } -// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class. -type BasicRequest interface { - AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) - AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) - AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) - AsRequest() (*Request, bool) +// BasicProtectionIntent base class for backup ProtectionIntent. +type BasicProtectionIntent interface { + AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) + AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) + AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) + AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsProtectionIntent() (*ProtectionIntent, bool) } -// Request base class for backup request. Workload-specific backup requests are derived from this class. -type Request struct { - // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' - ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +// ProtectionIntent base class for backup ProtectionIntent. +type ProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` } -func unmarshalBasicRequest(body []byte) (BasicRequest, error) { +func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { return nil, err } - switch m["objectType"] { - case string(ObjectTypeAzureFileShareBackupRequest): - var afsbr AzureFileShareBackupRequest - err := json.Unmarshal(body, &afsbr) - return afsbr, err - case string(ObjectTypeAzureWorkloadBackupRequest): - var awbr AzureWorkloadBackupRequest - err := json.Unmarshal(body, &awbr) - return awbr, err - case string(ObjectTypeIaasVMBackupRequest): - var ivbr IaasVMBackupRequest - err := json.Unmarshal(body, &ivbr) - return ivbr, err + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): + var arsvpi AzureRecoveryServiceVaultProtectionIntent + err := json.Unmarshal(body, &arsvpi) + return arsvpi, err + case string(ProtectionIntentItemTypeAzureResourceItem): + var arpi AzureResourceProtectionIntent + err := json.Unmarshal(body, &arpi) + return arpi, err + case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err default: - var r Request - err := json.Unmarshal(body, &r) - return r, err + var pi ProtectionIntent + err := json.Unmarshal(body, &pi) + return pi, err } } -func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) { +func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - rArray := make([]BasicRequest, len(rawMessages)) + piArray := make([]BasicProtectionIntent, len(rawMessages)) for index, rawMessage := range rawMessages { - r, err := unmarshalBasicRequest(*rawMessage) + pi, err := unmarshalBasicProtectionIntent(*rawMessage) if err != nil { return nil, err } - rArray[index] = r + piArray[index] = pi } - return rArray, nil + return piArray, nil } -// MarshalJSON is the custom marshaler for Request. -func (r Request) MarshalJSON() ([]byte, error) { - r.ObjectType = ObjectTypeBackupRequest +// MarshalJSON is the custom marshaler for ProtectionIntent. +func (pi ProtectionIntent) MarshalJSON() ([]byte, error) { + pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent objectMap := make(map[string]interface{}) - if r.ObjectType != "" { - objectMap["objectType"] = r.ObjectType + if pi.BackupManagementType != "" { + objectMap["backupManagementType"] = pi.BackupManagementType + } + if pi.SourceResourceID != nil { + objectMap["sourceResourceId"] = pi.SourceResourceID + } + if pi.ItemID != nil { + objectMap["itemId"] = pi.ItemID + } + if pi.PolicyID != nil { + objectMap["policyId"] = pi.PolicyID + } + if pi.ProtectionState != "" { + objectMap["protectionState"] = pi.ProtectionState + } + if pi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType } return json.Marshal(objectMap) } -// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request. -func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { return nil, false } -// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request. -func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { return nil, false } -// AsIaasVMBackupRequest is the BasicRequest implementation for Request. -func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { return nil, false } -// AsRequest is the BasicRequest implementation for Request. -func (r Request) AsRequest() (*Request, bool) { - return &r, true +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false } -// AsBasicRequest is the BasicRequest implementation for Request. -func (r Request) AsBasicRequest() (BasicRequest, bool) { - return &r, true +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return nil, false } -// RequestResource base class for backup request. Workload-specific backup requests are derived from this -// class. -type RequestResource struct { - // Properties - BackupRequestResource properties - Properties BasicRequest `json:"properties,omitempty"` +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return &pi, true +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &pi, true +} + +// ProtectionIntentQueryObject filters to list protection intent. +type ProtectionIntentQueryObject struct { + // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer' + ItemType IntentItemType `json:"itemType,omitempty"` + // ParentName - Parent name of the intent + ParentName *string `json:"parentName,omitempty"` + // ItemName - Item name of the intent + ItemName *string `json:"itemName,omitempty"` +} + +// ProtectionIntentResource base class for backup ProtectionIntent. +type ProtectionIntentResource struct { + autorest.Response `json:"-"` + // Properties - ProtectionIntentResource properties + Properties BasicProtectionIntent `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id represents the complete path to the resource. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name associated with the resource. @@ -18813,24 +9951,24 @@ type RequestResource struct { ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for RequestResource. -func (rr RequestResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ProtectionIntentResource. +func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - objectMap["properties"] = rr.Properties - if rr.Location != nil { - objectMap["location"] = rr.Location + objectMap["properties"] = pir.Properties + if pir.Location != nil { + objectMap["location"] = pir.Location } - if rr.Tags != nil { - objectMap["tags"] = rr.Tags + if pir.Tags != nil { + objectMap["tags"] = pir.Tags } - if rr.ETag != nil { - objectMap["eTag"] = rr.ETag + if pir.ETag != nil { + objectMap["eTag"] = pir.ETag } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for RequestResource struct. -func (rr *RequestResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct. +func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -18840,11 +9978,11 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - properties, err := unmarshalBasicRequest(*v) + properties, err := unmarshalBasicProtectionIntent(*v) if err != nil { return err } - rr.Properties = properties + pir.Properties = properties } case "id": if v != nil { @@ -18853,7 +9991,7 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rr.ID = &ID + pir.ID = &ID } case "name": if v != nil { @@ -18862,7 +10000,7 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rr.Name = &name + pir.Name = &name } case "type": if v != nil { @@ -18871,7 +10009,7 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rr.Type = &typeVar + pir.Type = &typeVar } case "location": if v != nil { @@ -18880,7 +10018,7 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rr.Location = &location + pir.Location = &location } case "tags": if v != nil { @@ -18889,7 +10027,7 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rr.Tags = tags + pir.Tags = tags } case "eTag": if v != nil { @@ -18898,7 +10036,7 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rr.ETag = &eTag + pir.ETag = &eTag } } } @@ -18906,175 +10044,165 @@ func (rr *RequestResource) UnmarshalJSON(body []byte) error { return nil } -// Resource ARM Resource. -type Resource struct { - // ID - READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` +// ProtectionIntentResourceList list of ProtectionIntent resources +type ProtectionIntentResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectionIntentResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.Location != nil { - objectMap["location"] = r.Location +// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource +// values. +type ProtectionIntentResourceListIterator struct { + i int + page ProtectionIntentResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if r.Tags != nil { - objectMap["tags"] = r.Tags + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - if r.ETag != nil { - objectMap["eTag"] = r.ETag + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - return json.Marshal(objectMap) + iter.i = 0 + return nil } -// ResourceConfig the resource storage details. -type ResourceConfig struct { - // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' - StorageModelType StorageType `json:"storageModelType,omitempty"` - // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' - StorageType StorageType `json:"storageType,omitempty"` - // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' - StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionIntentResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// ResourceConfigResource the resource storage details. -type ResourceConfigResource struct { - autorest.Response `json:"-"` - // Properties - BackupResourceConfigResource properties - Properties *ResourceConfig `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionIntentResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// MarshalJSON is the custom marshaler for ResourceConfigResource. -func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rcr.Properties != nil { - objectMap["properties"] = rcr.Properties +// Response returns the raw server response from the last page request. +func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource { + if !iter.page.NotDone() { + return ProtectionIntentResource{} } - if rcr.Location != nil { - objectMap["location"] = rcr.Location + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionIntentResourceListIterator type. +func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator { + return ProtectionIntentResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pirl ProtectionIntentResourceList) IsEmpty() bool { + return pirl.Value == nil || len(*pirl.Value) == 0 +} + +// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pirl.NextLink == nil || len(to.String(pirl.NextLink)) < 1 { + return nil, nil } - if rcr.Tags != nil { - objectMap["tags"] = rcr.Tags + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pirl.NextLink))) +} + +// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values. +type ProtectionIntentResourceListPage struct { + fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error) + pirl ProtectionIntentResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if rcr.ETag != nil { - objectMap["eTag"] = rcr.ETag + next, err := page.fn(ctx, page.pirl) + if err != nil { + return err } - return json.Marshal(objectMap) + page.pirl = next + return nil } -// ResourceList base for all lists of resources. -type ResourceList struct { - // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. - NextLink *string `json:"nextLink,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionIntentResourceListPage) Next() error { + return page.NextWithContext(context.Background()) } -// ResourceVaultConfig backup resource vault config details. -type ResourceVaultConfig struct { - // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' - StorageModelType StorageType `json:"storageModelType,omitempty"` - // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' - StorageType StorageType `json:"storageType,omitempty"` - // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' - StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` - // EnhancedSecurityState - Enabled or Disabled. Possible values include: 'EnhancedSecurityStateInvalid', 'EnhancedSecurityStateEnabled', 'EnhancedSecurityStateDisabled' - EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` - // SoftDeleteFeatureState - Soft Delete feature state. Possible values include: 'SoftDeleteFeatureStateInvalid', 'SoftDeleteFeatureStateEnabled', 'SoftDeleteFeatureStateDisabled' - SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionIntentResourceListPage) NotDone() bool { + return !page.pirl.IsEmpty() } -// ResourceVaultConfigResource backup resource vault config details. -type ResourceVaultConfigResource struct { - autorest.Response `json:"-"` - // Properties - BackupResourceVaultConfigResource properties - Properties *ResourceVaultConfig `json:"properties,omitempty"` - // ID - READ-ONLY; Resource Id represents the complete path to the resource. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name associated with the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ETag - Optional ETag. - ETag *string `json:"eTag,omitempty"` +// Response returns the raw server response from the last page request. +func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList { + return page.pirl } -// MarshalJSON is the custom marshaler for ResourceVaultConfigResource. -func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rvcr.Properties != nil { - objectMap["properties"] = rvcr.Properties - } - if rvcr.Location != nil { - objectMap["location"] = rvcr.Location - } - if rvcr.Tags != nil { - objectMap["tags"] = rvcr.Tags - } - if rvcr.ETag != nil { - objectMap["eTag"] = rvcr.ETag +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource { + if page.pirl.IsEmpty() { + return nil } - return json.Marshal(objectMap) + return *page.pirl.Value } -// RestoreFileSpecs restore file specs like file path, type and target folder path info. -type RestoreFileSpecs struct { - // Path - Source File/Folder path - Path *string `json:"path,omitempty"` - // FileSpecType - Indicates what the Path variable stands for - FileSpecType *string `json:"fileSpecType,omitempty"` - // TargetFolderPath - Destination folder path in target FileShare - TargetFolderPath *string `json:"targetFolderPath,omitempty"` -} - -// BasicRestoreRequest base class for restore request. Workload-specific restore requests are derived from this class. -type BasicRestoreRequest interface { - AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) - AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) - AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) - AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) - AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) - AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) - AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) - AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) - AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) - AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) - AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) - AsRestoreRequest() (*RestoreRequest, bool) -} - -// RestoreRequest base class for restore request. Workload-specific restore requests are derived from this -// class. -type RestoreRequest struct { - // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' - ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +// Creates a new instance of the ProtectionIntentResourceListPage type. +func NewProtectionIntentResourceListPage(getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage { + return ProtectionIntentResourceListPage{fn: getNextPage} +} + +// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. +type BasicRecoveryPoint interface { + AsRecoveryPoint() (*RecoveryPoint, bool) +} + +// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. +type RecoveryPoint struct { + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` } -func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) { +func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) { var m map[string]interface{} err := json.Unmarshal(body, &m) if err != nil { @@ -19082,143 +10210,150 @@ func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) { } switch m["objectType"] { - case string(ObjectTypeAzureFileShareRestoreRequest): - var afsrr AzureFileShareRestoreRequest - err := json.Unmarshal(body, &afsrr) - return afsrr, err - case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): - var awpitrr AzureWorkloadPointInTimeRestoreRequest - err := json.Unmarshal(body, &awpitrr) - return awpitrr, err - case string(ObjectTypeAzureWorkloadRestoreRequest): - var awrr AzureWorkloadRestoreRequest - err := json.Unmarshal(body, &awrr) - return awrr, err - case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): - var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest - err := json.Unmarshal(body, &awshpitrr) - return awshpitrr, err - case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): - var awshrr AzureWorkloadSAPHanaRestoreRequest - err := json.Unmarshal(body, &awshrr) - return awshrr, err - case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): - var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest - err := json.Unmarshal(body, &awspitrr) - return awspitrr, err - case string(ObjectTypeAzureWorkloadSQLRestoreRequest): - var awsrr AzureWorkloadSQLRestoreRequest - err := json.Unmarshal(body, &awsrr) - return awsrr, err - case string(ObjectTypeIaasVMRestoreRequest): - var ivrr IaasVMRestoreRequest - err := json.Unmarshal(body, &ivrr) - return ivrr, err default: - var rr RestoreRequest - err := json.Unmarshal(body, &rr) - return rr, err + var rp RecoveryPoint + err := json.Unmarshal(body, &rp) + return rp, err } } -func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) { +func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) { var rawMessages []*json.RawMessage err := json.Unmarshal(body, &rawMessages) if err != nil { return nil, err } - rrArray := make([]BasicRestoreRequest, len(rawMessages)) + rpArray := make([]BasicRecoveryPoint, len(rawMessages)) for index, rawMessage := range rawMessages { - rr, err := unmarshalBasicRestoreRequest(*rawMessage) + rp, err := unmarshalBasicRecoveryPoint(*rawMessage) if err != nil { return nil, err } - rrArray[index] = rr + rpArray[index] = rp } - return rrArray, nil + return rpArray, nil } -// MarshalJSON is the custom marshaler for RestoreRequest. -func (rr RestoreRequest) MarshalJSON() ([]byte, error) { - rr.ObjectType = ObjectTypeRestoreRequest +// MarshalJSON is the custom marshaler for RecoveryPoint. +func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { + rp.ObjectType = ObjectTypeRecoveryPoint objectMap := make(map[string]interface{}) - if rr.ObjectType != "" { - objectMap["objectType"] = rr.ObjectType + if rp.ObjectType != "" { + objectMap["objectType"] = rp.ObjectType } return json.Marshal(objectMap) } -// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { - return nil, false +// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return &rp, true } -// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { - return nil, false +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &rp, true } -// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { - return nil, false +// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class. +type BasicRequest interface { + AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) + AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) + AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) + AsRequest() (*Request, bool) } -// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { - return nil, false +// Request base class for backup request. Workload-specific backup requests are derived from this class. +type Request struct { + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectType `json:"objectType,omitempty"` } -// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { - return nil, false -} +func unmarshalBasicRequest(body []byte) (BasicRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } -// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false + switch m["objectType"] { + case string(ObjectTypeAzureFileShareBackupRequest): + var afsbr AzureFileShareBackupRequest + err := json.Unmarshal(body, &afsbr) + return afsbr, err + case string(ObjectTypeAzureWorkloadBackupRequest): + var awbr AzureWorkloadBackupRequest + err := json.Unmarshal(body, &awbr) + return awbr, err + case string(ObjectTypeIaasVMBackupRequest): + var ivbr IaasVMBackupRequest + err := json.Unmarshal(body, &ivbr) + return ivbr, err + default: + var r Request + err := json.Unmarshal(body, &r) + return r, err + } } +func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } -// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { - return nil, false + rArray := make([]BasicRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + r, err := unmarshalBasicRequest(*rawMessage) + if err != nil { + return nil, err + } + rArray[index] = r + } + return rArray, nil } -// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { - return nil, false +// MarshalJSON is the custom marshaler for Request. +func (r Request) MarshalJSON() ([]byte, error) { + r.ObjectType = ObjectTypeBackupRequest + objectMap := make(map[string]interface{}) + if r.ObjectType != "" { + objectMap["objectType"] = r.ObjectType + } + return json.Marshal(objectMap) } -// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { +// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { return nil, false } -// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { return nil, false } -// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { +// AsIaasVMBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { return nil, false } -// AsRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { - return &rr, true +// AsRequest is the BasicRequest implementation for Request. +func (r Request) AsRequest() (*Request, bool) { + return &r, true } -// AsBasicRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. -func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { - return &rr, true +// AsBasicRequest is the BasicRequest implementation for Request. +func (r Request) AsBasicRequest() (BasicRequest, bool) { + return &r, true } -// RestoreRequestResource base class for restore request. Workload-specific restore requests are derived -// from this class. -type RestoreRequestResource struct { - // Properties - RestoreRequestResource properties - Properties BasicRestoreRequest `json:"properties,omitempty"` +// RequestResource base class for backup request. Workload-specific backup requests are derived from this +// class. +type RequestResource struct { + // Properties - BackupRequestResource properties + Properties BasicRequest `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id represents the complete path to the resource. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name associated with the resource. @@ -19233,24 +10368,24 @@ type RestoreRequestResource struct { ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for RestoreRequestResource. -func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for RequestResource. +func (rr RequestResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - objectMap["properties"] = rrr.Properties - if rrr.Location != nil { - objectMap["location"] = rrr.Location + objectMap["properties"] = rr.Properties + if rr.Location != nil { + objectMap["location"] = rr.Location } - if rrr.Tags != nil { - objectMap["tags"] = rrr.Tags + if rr.Tags != nil { + objectMap["tags"] = rr.Tags } - if rrr.ETag != nil { - objectMap["eTag"] = rrr.ETag + if rr.ETag != nil { + objectMap["eTag"] = rr.ETag } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct. -func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for RequestResource struct. +func (rr *RequestResource) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -19260,11 +10395,11 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - properties, err := unmarshalBasicRestoreRequest(*v) + properties, err := unmarshalBasicRequest(*v) if err != nil { return err } - rrr.Properties = properties + rr.Properties = properties } case "id": if v != nil { @@ -19273,7 +10408,7 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rrr.ID = &ID + rr.ID = &ID } case "name": if v != nil { @@ -19282,7 +10417,7 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rrr.Name = &name + rr.Name = &name } case "type": if v != nil { @@ -19291,7 +10426,7 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rrr.Type = &typeVar + rr.Type = &typeVar } case "location": if v != nil { @@ -19300,7 +10435,7 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rrr.Location = &location + rr.Location = &location } case "tags": if v != nil { @@ -19309,7 +10444,7 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rrr.Tags = tags + rr.Tags = tags } case "eTag": if v != nil { @@ -19318,7 +10453,7 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { if err != nil { return err } - rrr.ETag = &eTag + rr.ETag = &eTag } } } @@ -19326,304 +10461,88 @@ func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { return nil } -// RetentionDuration retention duration. -type RetentionDuration struct { - // Count - Count of duration types. Retention duration is obtained by the counting the duration type Count times. - // For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. - Count *int32 `json:"count,omitempty"` - // DurationType - Retention duration type of retention policy. Possible values include: 'RetentionDurationTypeInvalid', 'RetentionDurationTypeDays', 'RetentionDurationTypeWeeks', 'RetentionDurationTypeMonths', 'RetentionDurationTypeYears' - DurationType RetentionDurationType `json:"durationType,omitempty"` -} - -// BasicRetentionPolicy base class for retention policy. -type BasicRetentionPolicy interface { - AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) - AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) - AsRetentionPolicy() (*RetentionPolicy, bool) -} - -// RetentionPolicy base class for retention policy. -type RetentionPolicy struct { - // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' - RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` -} - -func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["retentionPolicyType"] { - case string(RetentionPolicyTypeLongTermRetentionPolicy): - var ltrp LongTermRetentionPolicy - err := json.Unmarshal(body, <rp) - return ltrp, err - case string(RetentionPolicyTypeSimpleRetentionPolicy): - var srp SimpleRetentionPolicy - err := json.Unmarshal(body, &srp) - return srp, err - default: - var rp RetentionPolicy - err := json.Unmarshal(body, &rp) - return rp, err - } -} -func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - rpArray := make([]BasicRetentionPolicy, len(rawMessages)) - - for index, rawMessage := range rawMessages { - rp, err := unmarshalBasicRetentionPolicy(*rawMessage) - if err != nil { - return nil, err - } - rpArray[index] = rp - } - return rpArray, nil -} - -// MarshalJSON is the custom marshaler for RetentionPolicy. -func (rp RetentionPolicy) MarshalJSON() ([]byte, error) { - rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy - objectMap := make(map[string]interface{}) - if rp.RetentionPolicyType != "" { - objectMap["retentionPolicyType"] = rp.RetentionPolicyType - } - return json.Marshal(objectMap) -} - -// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. -func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { - return nil, false -} - -// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. -func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { - return nil, false -} - -// AsRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. -func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { - return &rp, true -} - -// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. -func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { - return &rp, true -} - -// BasicSchedulePolicy base class for backup schedule. -type BasicSchedulePolicy interface { - AsLogSchedulePolicy() (*LogSchedulePolicy, bool) - AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) - AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) - AsSchedulePolicy() (*SchedulePolicy, bool) -} - -// SchedulePolicy base class for backup schedule. -type SchedulePolicy struct { - // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' - SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` -} - -func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["schedulePolicyType"] { - case string(SchedulePolicyTypeLogSchedulePolicy): - var lsp LogSchedulePolicy - err := json.Unmarshal(body, &lsp) - return lsp, err - case string(SchedulePolicyTypeLongTermSchedulePolicy): - var ltsp LongTermSchedulePolicy - err := json.Unmarshal(body, <sp) - return ltsp, err - case string(SchedulePolicyTypeSimpleSchedulePolicy): - var ssp SimpleSchedulePolicy - err := json.Unmarshal(body, &ssp) - return ssp, err - default: - var sp SchedulePolicy - err := json.Unmarshal(body, &sp) - return sp, err - } -} -func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - spArray := make([]BasicSchedulePolicy, len(rawMessages)) - - for index, rawMessage := range rawMessages { - sp, err := unmarshalBasicSchedulePolicy(*rawMessage) - if err != nil { - return nil, err - } - spArray[index] = sp - } - return spArray, nil +// Resource ARM Resource. +type Resource struct { + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for SchedulePolicy. -func (sp SchedulePolicy) MarshalJSON() ([]byte, error) { - sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if sp.SchedulePolicyType != "" { - objectMap["schedulePolicyType"] = sp.SchedulePolicyType + if r.Location != nil { + objectMap["location"] = r.Location } - return json.Marshal(objectMap) -} - -// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. -func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { - return nil, false -} - -// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. -func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { - return nil, false -} - -// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. -func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { - return nil, false -} - -// AsSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. -func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { - return &sp, true -} - -// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. -func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { - return &sp, true -} - -// Settings common settings field for backup management -type Settings struct { - // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". - TimeZone *string `json:"timeZone,omitempty"` - // Issqlcompression - SQL compression flag - Issqlcompression *bool `json:"issqlcompression,omitempty"` - // IsCompression - Workload compression flag. This has been added so that 'isSqlCompression' - // will be deprecated once clients upgrade to consider this flag. - IsCompression *bool `json:"isCompression,omitempty"` -} - -// SimpleRetentionPolicy simple policy retention. -type SimpleRetentionPolicy struct { - // RetentionDuration - Retention duration of the protection policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` - // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' - RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` -} - -// MarshalJSON is the custom marshaler for SimpleRetentionPolicy. -func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { - srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy - objectMap := make(map[string]interface{}) - if srp.RetentionDuration != nil { - objectMap["retentionDuration"] = srp.RetentionDuration + if r.Tags != nil { + objectMap["tags"] = r.Tags } - if srp.RetentionPolicyType != "" { - objectMap["retentionPolicyType"] = srp.RetentionPolicyType + if r.ETag != nil { + objectMap["eTag"] = r.ETag } return json.Marshal(objectMap) } -// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. -func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { - return nil, false -} - -// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. -func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { - return &srp, true -} - -// AsRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. -func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { - return nil, false -} - -// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. -func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { - return &srp, true +// ResourceConfig the resource storage details. +type ResourceConfig struct { + // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageModelType StorageType `json:"storageModelType,omitempty"` + // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageType StorageType `json:"storageType,omitempty"` + // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' + StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` } -// SimpleSchedulePolicy simple policy schedule. -type SimpleSchedulePolicy struct { - // ScheduleRunFrequency - Frequency of the schedule operation of this policy. Possible values include: 'ScheduleRunTypeInvalid', 'ScheduleRunTypeDaily', 'ScheduleRunTypeWeekly' - ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` - // ScheduleRunDays - List of days of week this schedule has to be run. - ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` - // ScheduleRunTimes - List of times of day this schedule has to be run. - ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` - // ScheduleWeeklyFrequency - At every number weeks this schedule has to be run. - ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` - // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' - SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +// ResourceConfigResource the resource storage details. +type ResourceConfigResource struct { + autorest.Response `json:"-"` + // Properties - BackupResourceConfigResource properties + Properties *ResourceConfig `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` } -// MarshalJSON is the custom marshaler for SimpleSchedulePolicy. -func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { - ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy +// MarshalJSON is the custom marshaler for ResourceConfigResource. +func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssp.ScheduleRunFrequency != "" { - objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency - } - if ssp.ScheduleRunDays != nil { - objectMap["scheduleRunDays"] = ssp.ScheduleRunDays + if rcr.Properties != nil { + objectMap["properties"] = rcr.Properties } - if ssp.ScheduleRunTimes != nil { - objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes + if rcr.Location != nil { + objectMap["location"] = rcr.Location } - if ssp.ScheduleWeeklyFrequency != nil { - objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency + if rcr.Tags != nil { + objectMap["tags"] = rcr.Tags } - if ssp.SchedulePolicyType != "" { - objectMap["schedulePolicyType"] = ssp.SchedulePolicyType + if rcr.ETag != nil { + objectMap["eTag"] = rcr.ETag } return json.Marshal(objectMap) } -// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. -func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { - return nil, false -} - -// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. -func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { - return nil, false -} - -// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. -func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { - return &ssp, true -} - -// AsSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. -func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { - return nil, false -} - -// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. -func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { - return &ssp, true +// ResourceList base for all lists of resources. +type ResourceList struct { + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` } // SQLDataDirectory sQLDataDirectory info @@ -19636,18 +10555,6 @@ type SQLDataDirectory struct { LogicalName *string `json:"logicalName,omitempty"` } -// SQLDataDirectoryMapping encapsulates information regarding data directory -type SQLDataDirectoryMapping struct { - // MappingType - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' - MappingType SQLDataDirectoryType `json:"mappingType,omitempty"` - // SourceLogicalName - Restore source logical name path - SourceLogicalName *string `json:"sourceLogicalName,omitempty"` - // SourcePath - Restore source path - SourcePath *string `json:"sourcePath,omitempty"` - // TargetPath - Target path - TargetPath *string `json:"targetPath,omitempty"` -} - // StatusRequest backupStatus request. type StatusRequest struct { // ResourceType - Container Type - VM, SQLPaaS, DPM, AzureFileShare. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' @@ -19681,74 +10588,6 @@ type StatusResponse struct { RegistrationStatus *string `json:"registrationStatus,omitempty"` } -// SubProtectionPolicy sub-protection policy which includes schedule and retention -type SubProtectionPolicy struct { - // PolicyType - Type of backup policy type. Possible values include: 'PolicyTypeInvalid', 'PolicyTypeFull', 'PolicyTypeDifferential', 'PolicyTypeLog', 'PolicyTypeCopyOnlyFull' - PolicyType PolicyType `json:"policyType,omitempty"` - // SchedulePolicy - Backup schedule specified as part of backup policy. - SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` - // RetentionPolicy - Retention policy with the details on backup copy retention ranges. - RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` -} - -// UnmarshalJSON is the custom unmarshaler for SubProtectionPolicy struct. -func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "policyType": - if v != nil { - var policyType PolicyType - err = json.Unmarshal(*v, &policyType) - if err != nil { - return err - } - spp.PolicyType = policyType - } - case "schedulePolicy": - if v != nil { - schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) - if err != nil { - return err - } - spp.SchedulePolicy = schedulePolicy - } - case "retentionPolicy": - if v != nil { - retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) - if err != nil { - return err - } - spp.RetentionPolicy = retentionPolicy - } - } - } - - return nil -} - -// TargetAFSRestoreInfo target Azure File Share Info. -type TargetAFSRestoreInfo struct { - // Name - File share name - Name *string `json:"name,omitempty"` - // TargetResourceID - Target file share resource ARM ID - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// TargetRestoreInfo details about target workload during restore operation. -type TargetRestoreInfo struct { - // OverwriteOption - Can Overwrite if Target DataBase already exists. Possible values include: 'OverwriteOptionsInvalid', 'OverwriteOptionsFailOnConflict', 'OverwriteOptionsOverwrite' - OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"` - // ContainerID - Resource Id name of the container in which Target DataBase resides - ContainerID *string `json:"containerId,omitempty"` - // DatabaseName - Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana - DatabaseName *string `json:"databaseName,omitempty"` -} - // TokenInformation the token information details. type TokenInformation struct { autorest.Response `json:"-"` @@ -19760,321 +10599,6 @@ type TokenInformation struct { SecurityPIN *string `json:"securityPIN,omitempty"` } -// ValidateIaasVMRestoreOperationRequest azureRestoreValidation request. -type ValidateIaasVMRestoreOperationRequest struct { - // RestoreRequest - Sets restore request to be validated - RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' - ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` -} - -// MarshalJSON is the custom marshaler for ValidateIaasVMRestoreOperationRequest. -func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { - vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest - objectMap := make(map[string]interface{}) - objectMap["restoreRequest"] = vivror.RestoreRequest - if vivror.ObjectType != "" { - objectMap["objectType"] = vivror.ObjectType - } - return json.Marshal(objectMap) -} - -// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. -func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { - return &vivror, true -} - -// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. -func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { - return nil, false -} - -// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. -func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { - return &vivror, true -} - -// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. -func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { - return nil, false -} - -// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. -func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { - return &vivror, true -} - -// UnmarshalJSON is the custom unmarshaler for ValidateIaasVMRestoreOperationRequest struct. -func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "restoreRequest": - if v != nil { - restoreRequest, err := unmarshalBasicRestoreRequest(*v) - if err != nil { - return err - } - vivror.RestoreRequest = restoreRequest - } - case "objectType": - if v != nil { - var objectType ObjectTypeBasicValidateOperationRequest - err = json.Unmarshal(*v, &objectType) - if err != nil { - return err - } - vivror.ObjectType = objectType - } - } - } - - return nil -} - -// BasicValidateOperationRequest base class for validate operation request. -type BasicValidateOperationRequest interface { - AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) - AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) - AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) - AsValidateOperationRequest() (*ValidateOperationRequest, bool) -} - -// ValidateOperationRequest base class for validate operation request. -type ValidateOperationRequest struct { - // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' - ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` -} - -func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeValidateIaasVMRestoreOperationRequest): - var vivror ValidateIaasVMRestoreOperationRequest - err := json.Unmarshal(body, &vivror) - return vivror, err - case string(ObjectTypeValidateRestoreOperationRequest): - var vror ValidateRestoreOperationRequest - err := json.Unmarshal(body, &vror) - return vror, err - default: - var vor ValidateOperationRequest - err := json.Unmarshal(body, &vor) - return vor, err - } -} -func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - vorArray := make([]BasicValidateOperationRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - vor, err := unmarshalBasicValidateOperationRequest(*rawMessage) - if err != nil { - return nil, err - } - vorArray[index] = vor - } - return vorArray, nil -} - -// MarshalJSON is the custom marshaler for ValidateOperationRequest. -func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) { - vor.ObjectType = ObjectTypeValidateOperationRequest - objectMap := make(map[string]interface{}) - if vor.ObjectType != "" { - objectMap["objectType"] = vor.ObjectType - } - return json.Marshal(objectMap) -} - -// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. -func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { - return nil, false -} - -// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. -func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { - return nil, false -} - -// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. -func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { - return nil, false -} - -// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. -func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { - return &vor, true -} - -// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. -func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { - return &vor, true -} - -// ValidateOperationResponse base class for validate operation response. -type ValidateOperationResponse struct { - // ValidationResults - Gets the validation result - ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"` -} - -// ValidateOperationsResponse ... -type ValidateOperationsResponse struct { - autorest.Response `json:"-"` - ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` -} - -// BasicValidateRestoreOperationRequest azureRestoreValidation request. -type BasicValidateRestoreOperationRequest interface { - AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) - AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) -} - -// ValidateRestoreOperationRequest azureRestoreValidation request. -type ValidateRestoreOperationRequest struct { - // RestoreRequest - Sets restore request to be validated - RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` - // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' - ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` -} - -func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) { - var m map[string]interface{} - err := json.Unmarshal(body, &m) - if err != nil { - return nil, err - } - - switch m["objectType"] { - case string(ObjectTypeValidateIaasVMRestoreOperationRequest): - var vivror ValidateIaasVMRestoreOperationRequest - err := json.Unmarshal(body, &vivror) - return vivror, err - default: - var vror ValidateRestoreOperationRequest - err := json.Unmarshal(body, &vror) - return vror, err - } -} -func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) { - var rawMessages []*json.RawMessage - err := json.Unmarshal(body, &rawMessages) - if err != nil { - return nil, err - } - - vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages)) - - for index, rawMessage := range rawMessages { - vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage) - if err != nil { - return nil, err - } - vrorArray[index] = vror - } - return vrorArray, nil -} - -// MarshalJSON is the custom marshaler for ValidateRestoreOperationRequest. -func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { - vror.ObjectType = ObjectTypeValidateRestoreOperationRequest - objectMap := make(map[string]interface{}) - objectMap["restoreRequest"] = vror.RestoreRequest - if vror.ObjectType != "" { - objectMap["objectType"] = vror.ObjectType - } - return json.Marshal(objectMap) -} - -// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. -func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { - return nil, false -} - -// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. -func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { - return &vror, true -} - -// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. -func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { - return &vror, true -} - -// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. -func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { - return nil, false -} - -// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. -func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { - return &vror, true -} - -// UnmarshalJSON is the custom unmarshaler for ValidateRestoreOperationRequest struct. -func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "restoreRequest": - if v != nil { - restoreRequest, err := unmarshalBasicRestoreRequest(*v) - if err != nil { - return err - } - vror.RestoreRequest = restoreRequest - } - case "objectType": - if v != nil { - var objectType ObjectTypeBasicValidateOperationRequest - err = json.Unmarshal(*v, &objectType) - if err != nil { - return err - } - vror.ObjectType = objectType - } - } - } - - return nil -} - -// WeeklyRetentionFormat weekly retention format. -type WeeklyRetentionFormat struct { - // DaysOfTheWeek - List of days of the week. - DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` - // WeeksOfTheMonth - List of weeks of month. - WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"` -} - -// WeeklyRetentionSchedule weekly retention schedule. -type WeeklyRetentionSchedule struct { - // DaysOfTheWeek - List of days of week for weekly retention policy. - DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` - // RetentionTimes - Retention times of retention policy. - RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` - // RetentionDuration - Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` -} - // WorkloadInquiryDetails details of an inquired protectable item. type WorkloadInquiryDetails struct { // Type - Type of the Workload such as SQL, Oracle etc. @@ -20968,19 +11492,3 @@ func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectab func NewWorkloadProtectableItemResourceListPage(getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage { return WorkloadProtectableItemResourceListPage{fn: getNextPage} } - -// YearlyRetentionSchedule yearly retention schedule. -type YearlyRetentionSchedule struct { - // RetentionScheduleFormatType - Retention schedule format for yearly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' - RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` - // MonthsOfYear - List of months of year of yearly retention policy. - MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"` - // RetentionScheduleDaily - Daily retention format for yearly retention policy. - RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` - // RetentionScheduleWeekly - Weekly retention format for yearly retention policy. - RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` - // RetentionTimes - Retention times of retention policy. - RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` - // RetentionDuration - Retention duration of retention Policy. - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` -} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go b/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go index 83f2afa24f43..91701ff371aa 100644 --- a/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go +++ b/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicies.go @@ -40,90 +40,6 @@ func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID strin return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can -// be fetched -// using GetPolicyOperationResult API. -// Parameters: -// vaultName - the name of the recovery services vault. -// resourceGroupName - the name of the resource group where the recovery services vault is present. -// policyName - backup policy to be created. -// parameters - resource backup policy -func (client ProtectionPoliciesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (result ProtectionPolicyResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, policyName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ProtectionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "policyName": autorest.Encode("path", policyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vaultName": autorest.Encode("path", vaultName), - } - - const APIVersion = "2019-05-13" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ProtectionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ProtectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ProtectionPolicyResource, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - // Delete deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status // of the // operation can be fetched using GetPolicyOperationResult API. @@ -203,83 +119,3 @@ func (client ProtectionPoliciesClient) DeleteResponder(resp *http.Response) (res result.Response = resp return } - -// Get provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous -// operation. Status of the operation can be fetched using GetPolicyOperationResult API. -// Parameters: -// vaultName - the name of the recovery services vault. -// resourceGroupName - the name of the resource group where the recovery services vault is present. -// policyName - backup policy information to be fetched. -func (client ProtectionPoliciesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result ProtectionPolicyResource, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, policyName) - if err != nil { - err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", resp, "Failure responding to request") - } - - return -} - -// GetPreparer prepares the Get request. -func (client ProtectionPoliciesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "policyName": autorest.Encode("path", policyName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vaultName": autorest.Encode("path", vaultName), - } - - const APIVersion = "2019-05-13" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ProtectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ProtectionPoliciesClient) GetResponder(resp *http.Response) (result ProtectionPolicyResource, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go new file mode 100644 index 000000000000..1ff58ed82bb0 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/client.go @@ -0,0 +1,55 @@ +// Package siterecovery implements the Azure ARM Siterecovery service API version 2018-07-10. +// +// +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Siterecovery + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Siterecovery. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string + ResourceGroupName string + ResourceName string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string, resourceGroupName string, resourceName string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + ResourceGroupName: resourceGroupName, + ResourceName: resourceName, + } +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go new file mode 100644 index 000000000000..172562674c72 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/migrationrecoverypoints.go @@ -0,0 +1,243 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MigrationRecoveryPointsClient is the client for the MigrationRecoveryPoints methods of the Siterecovery service. +type MigrationRecoveryPointsClient struct { + BaseClient +} + +// NewMigrationRecoveryPointsClient creates an instance of the MigrationRecoveryPointsClient client. +func NewMigrationRecoveryPointsClient(subscriptionID string, resourceGroupName string, resourceName string) MigrationRecoveryPointsClient { + return NewMigrationRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewMigrationRecoveryPointsClientWithBaseURI creates an instance of the MigrationRecoveryPointsClient client. +func NewMigrationRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) MigrationRecoveryPointsClient { + return MigrationRecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get sends the get request. +// Parameters: +// fabricName - fabric unique name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// migrationRecoveryPointName - the migration recovery point name. +func (client MigrationRecoveryPointsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string) (result MigrationRecoveryPoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, protectionContainerName, migrationItemName, migrationRecoveryPointName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MigrationRecoveryPointsClient) GetPreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "migrationRecoveryPointName": autorest.Encode("path", migrationRecoveryPointName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints/{migrationRecoveryPointName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MigrationRecoveryPointsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MigrationRecoveryPointsClient) GetResponder(resp *http.Response) (result MigrationRecoveryPoint, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByReplicationMigrationItems sends the list by replication migration items request. +// Parameters: +// fabricName - fabric unique name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +func (client MigrationRecoveryPointsClient) ListByReplicationMigrationItems(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result MigrationRecoveryPointCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointsClient.ListByReplicationMigrationItems") + defer func() { + sc := -1 + if result.mrpc.Response.Response != nil { + sc = result.mrpc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationMigrationItemsNextResults + req, err := client.ListByReplicationMigrationItemsPreparer(ctx, fabricName, protectionContainerName, migrationItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "ListByReplicationMigrationItems", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationMigrationItemsSender(req) + if err != nil { + result.mrpc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "ListByReplicationMigrationItems", resp, "Failure sending request") + return + } + + result.mrpc, err = client.ListByReplicationMigrationItemsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "ListByReplicationMigrationItems", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationMigrationItemsPreparer prepares the ListByReplicationMigrationItems request. +func (client MigrationRecoveryPointsClient) ListByReplicationMigrationItemsPreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrationRecoveryPoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationMigrationItemsSender sends the ListByReplicationMigrationItems request. The method will close the +// http.Response Body if it receives an error. +func (client MigrationRecoveryPointsClient) ListByReplicationMigrationItemsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationMigrationItemsResponder handles the response to the ListByReplicationMigrationItems request. The method always +// closes the http.Response Body. +func (client MigrationRecoveryPointsClient) ListByReplicationMigrationItemsResponder(resp *http.Response) (result MigrationRecoveryPointCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationMigrationItemsNextResults retrieves the next set of results, if any. +func (client MigrationRecoveryPointsClient) listByReplicationMigrationItemsNextResults(ctx context.Context, lastResults MigrationRecoveryPointCollection) (result MigrationRecoveryPointCollection, err error) { + req, err := lastResults.migrationRecoveryPointCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "listByReplicationMigrationItemsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationMigrationItemsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "listByReplicationMigrationItemsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationMigrationItemsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.MigrationRecoveryPointsClient", "listByReplicationMigrationItemsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationMigrationItemsComplete enumerates all values, automatically crossing page boundaries as required. +func (client MigrationRecoveryPointsClient) ListByReplicationMigrationItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result MigrationRecoveryPointCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointsClient.ListByReplicationMigrationItems") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationMigrationItems(ctx, fabricName, protectionContainerName, migrationItemName) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go new file mode 100644 index 000000000000..9231fa88d117 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/models.go @@ -0,0 +1,23605 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-07-10/siterecovery" + +// A2ARpRecoveryPointType enumerates the values for a2a rp recovery point type. +type A2ARpRecoveryPointType string + +const ( + // Latest ... + Latest A2ARpRecoveryPointType = "Latest" + // LatestApplicationConsistent ... + LatestApplicationConsistent A2ARpRecoveryPointType = "LatestApplicationConsistent" + // LatestCrashConsistent ... + LatestCrashConsistent A2ARpRecoveryPointType = "LatestCrashConsistent" + // LatestProcessed ... + LatestProcessed A2ARpRecoveryPointType = "LatestProcessed" +) + +// PossibleA2ARpRecoveryPointTypeValues returns an array of possible values for the A2ARpRecoveryPointType const type. +func PossibleA2ARpRecoveryPointTypeValues() []A2ARpRecoveryPointType { + return []A2ARpRecoveryPointType{Latest, LatestApplicationConsistent, LatestCrashConsistent, LatestProcessed} +} + +// AgentAutoUpdateStatus enumerates the values for agent auto update status. +type AgentAutoUpdateStatus string + +const ( + // Disabled ... + Disabled AgentAutoUpdateStatus = "Disabled" + // Enabled ... + Enabled AgentAutoUpdateStatus = "Enabled" +) + +// PossibleAgentAutoUpdateStatusValues returns an array of possible values for the AgentAutoUpdateStatus const type. +func PossibleAgentAutoUpdateStatusValues() []AgentAutoUpdateStatus { + return []AgentAutoUpdateStatus{Disabled, Enabled} +} + +// AgentVersionStatus enumerates the values for agent version status. +type AgentVersionStatus string + +const ( + // Deprecated ... + Deprecated AgentVersionStatus = "Deprecated" + // NotSupported ... + NotSupported AgentVersionStatus = "NotSupported" + // SecurityUpdateRequired ... + SecurityUpdateRequired AgentVersionStatus = "SecurityUpdateRequired" + // Supported ... + Supported AgentVersionStatus = "Supported" + // UpdateRequired ... + UpdateRequired AgentVersionStatus = "UpdateRequired" +) + +// PossibleAgentVersionStatusValues returns an array of possible values for the AgentVersionStatus const type. +func PossibleAgentVersionStatusValues() []AgentVersionStatus { + return []AgentVersionStatus{Deprecated, NotSupported, SecurityUpdateRequired, Supported, UpdateRequired} +} + +// AlternateLocationRecoveryOption enumerates the values for alternate location recovery option. +type AlternateLocationRecoveryOption string + +const ( + // CreateVMIfNotFound ... + CreateVMIfNotFound AlternateLocationRecoveryOption = "CreateVmIfNotFound" + // NoAction ... + NoAction AlternateLocationRecoveryOption = "NoAction" +) + +// PossibleAlternateLocationRecoveryOptionValues returns an array of possible values for the AlternateLocationRecoveryOption const type. +func PossibleAlternateLocationRecoveryOptionValues() []AlternateLocationRecoveryOption { + return []AlternateLocationRecoveryOption{CreateVMIfNotFound, NoAction} +} + +// DataSyncStatus enumerates the values for data sync status. +type DataSyncStatus string + +const ( + // ForDownTime ... + ForDownTime DataSyncStatus = "ForDownTime" + // ForSynchronization ... + ForSynchronization DataSyncStatus = "ForSynchronization" +) + +// PossibleDataSyncStatusValues returns an array of possible values for the DataSyncStatus const type. +func PossibleDataSyncStatusValues() []DataSyncStatus { + return []DataSyncStatus{ForDownTime, ForSynchronization} +} + +// DisableProtectionReason enumerates the values for disable protection reason. +type DisableProtectionReason string + +const ( + // MigrationComplete ... + MigrationComplete DisableProtectionReason = "MigrationComplete" + // NotSpecified ... + NotSpecified DisableProtectionReason = "NotSpecified" +) + +// PossibleDisableProtectionReasonValues returns an array of possible values for the DisableProtectionReason const type. +func PossibleDisableProtectionReasonValues() []DisableProtectionReason { + return []DisableProtectionReason{MigrationComplete, NotSpecified} +} + +// DiskAccountType enumerates the values for disk account type. +type DiskAccountType string + +const ( + // PremiumLRS ... + PremiumLRS DiskAccountType = "Premium_LRS" + // StandardLRS ... + StandardLRS DiskAccountType = "Standard_LRS" + // StandardSSDLRS ... + StandardSSDLRS DiskAccountType = "StandardSSD_LRS" +) + +// PossibleDiskAccountTypeValues returns an array of possible values for the DiskAccountType const type. +func PossibleDiskAccountTypeValues() []DiskAccountType { + return []DiskAccountType{PremiumLRS, StandardLRS, StandardSSDLRS} +} + +// DiskType enumerates the values for disk type. +type DiskType string + +const ( + // DiskTypePremiumLRS ... + DiskTypePremiumLRS DiskType = "Premium_LRS" + // DiskTypeStandardLRS ... + DiskTypeStandardLRS DiskType = "Standard_LRS" + // DiskTypeStandardSSDLRS ... + DiskTypeStandardSSDLRS DiskType = "StandardSSD_LRS" +) + +// PossibleDiskTypeValues returns an array of possible values for the DiskType const type. +func PossibleDiskTypeValues() []DiskType { + return []DiskType{DiskTypePremiumLRS, DiskTypeStandardLRS, DiskTypeStandardSSDLRS} +} + +// EthernetAddressType enumerates the values for ethernet address type. +type EthernetAddressType string + +const ( + // Dynamic ... + Dynamic EthernetAddressType = "Dynamic" + // Static ... + Static EthernetAddressType = "Static" +) + +// PossibleEthernetAddressTypeValues returns an array of possible values for the EthernetAddressType const type. +func PossibleEthernetAddressTypeValues() []EthernetAddressType { + return []EthernetAddressType{Dynamic, Static} +} + +// FailoverDeploymentModel enumerates the values for failover deployment model. +type FailoverDeploymentModel string + +const ( + // Classic ... + Classic FailoverDeploymentModel = "Classic" + // NotApplicable ... + NotApplicable FailoverDeploymentModel = "NotApplicable" + // ResourceManager ... + ResourceManager FailoverDeploymentModel = "ResourceManager" +) + +// PossibleFailoverDeploymentModelValues returns an array of possible values for the FailoverDeploymentModel const type. +func PossibleFailoverDeploymentModelValues() []FailoverDeploymentModel { + return []FailoverDeploymentModel{Classic, NotApplicable, ResourceManager} +} + +// HealthErrorCategory enumerates the values for health error category. +type HealthErrorCategory string + +const ( + // AgentAutoUpdate ... + AgentAutoUpdate HealthErrorCategory = "AgentAutoUpdate" + // Configuration ... + Configuration HealthErrorCategory = "Configuration" + // FabricInfrastructure ... + FabricInfrastructure HealthErrorCategory = "FabricInfrastructure" + // None ... + None HealthErrorCategory = "None" + // Replication ... + Replication HealthErrorCategory = "Replication" + // TestFailover ... + TestFailover HealthErrorCategory = "TestFailover" + // VersionExpiry ... + VersionExpiry HealthErrorCategory = "VersionExpiry" +) + +// PossibleHealthErrorCategoryValues returns an array of possible values for the HealthErrorCategory const type. +func PossibleHealthErrorCategoryValues() []HealthErrorCategory { + return []HealthErrorCategory{AgentAutoUpdate, Configuration, FabricInfrastructure, None, Replication, TestFailover, VersionExpiry} +} + +// HealthErrorCustomerResolvability enumerates the values for health error customer resolvability. +type HealthErrorCustomerResolvability string + +const ( + // Allowed ... + Allowed HealthErrorCustomerResolvability = "Allowed" + // NotAllowed ... + NotAllowed HealthErrorCustomerResolvability = "NotAllowed" +) + +// PossibleHealthErrorCustomerResolvabilityValues returns an array of possible values for the HealthErrorCustomerResolvability const type. +func PossibleHealthErrorCustomerResolvabilityValues() []HealthErrorCustomerResolvability { + return []HealthErrorCustomerResolvability{Allowed, NotAllowed} +} + +// HyperVReplicaAzureRpRecoveryPointType enumerates the values for hyper v replica azure rp recovery point +// type. +type HyperVReplicaAzureRpRecoveryPointType string + +const ( + // HyperVReplicaAzureRpRecoveryPointTypeLatest ... + HyperVReplicaAzureRpRecoveryPointTypeLatest HyperVReplicaAzureRpRecoveryPointType = "Latest" + // HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent ... + HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent HyperVReplicaAzureRpRecoveryPointType = "LatestApplicationConsistent" + // HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed ... + HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed HyperVReplicaAzureRpRecoveryPointType = "LatestProcessed" +) + +// PossibleHyperVReplicaAzureRpRecoveryPointTypeValues returns an array of possible values for the HyperVReplicaAzureRpRecoveryPointType const type. +func PossibleHyperVReplicaAzureRpRecoveryPointTypeValues() []HyperVReplicaAzureRpRecoveryPointType { + return []HyperVReplicaAzureRpRecoveryPointType{HyperVReplicaAzureRpRecoveryPointTypeLatest, HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent, HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed} +} + +// InMageV2RpRecoveryPointType enumerates the values for in mage v2 rp recovery point type. +type InMageV2RpRecoveryPointType string + +const ( + // InMageV2RpRecoveryPointTypeLatest ... + InMageV2RpRecoveryPointTypeLatest InMageV2RpRecoveryPointType = "Latest" + // InMageV2RpRecoveryPointTypeLatestApplicationConsistent ... + InMageV2RpRecoveryPointTypeLatestApplicationConsistent InMageV2RpRecoveryPointType = "LatestApplicationConsistent" + // InMageV2RpRecoveryPointTypeLatestCrashConsistent ... + InMageV2RpRecoveryPointTypeLatestCrashConsistent InMageV2RpRecoveryPointType = "LatestCrashConsistent" + // InMageV2RpRecoveryPointTypeLatestProcessed ... + InMageV2RpRecoveryPointTypeLatestProcessed InMageV2RpRecoveryPointType = "LatestProcessed" +) + +// PossibleInMageV2RpRecoveryPointTypeValues returns an array of possible values for the InMageV2RpRecoveryPointType const type. +func PossibleInMageV2RpRecoveryPointTypeValues() []InMageV2RpRecoveryPointType { + return []InMageV2RpRecoveryPointType{InMageV2RpRecoveryPointTypeLatest, InMageV2RpRecoveryPointTypeLatestApplicationConsistent, InMageV2RpRecoveryPointTypeLatestCrashConsistent, InMageV2RpRecoveryPointTypeLatestProcessed} +} + +// InstanceType enumerates the values for instance type. +type InstanceType string + +const ( + // InstanceTypeA2A ... + InstanceTypeA2A InstanceType = "A2A" + // InstanceTypeAddDisksProviderSpecificInput ... + InstanceTypeAddDisksProviderSpecificInput InstanceType = "AddDisksProviderSpecificInput" +) + +// PossibleInstanceTypeValues returns an array of possible values for the InstanceType const type. +func PossibleInstanceTypeValues() []InstanceType { + return []InstanceType{InstanceTypeA2A, InstanceTypeAddDisksProviderSpecificInput} +} + +// InstanceTypeBasicApplyRecoveryPointProviderSpecificInput enumerates the values for instance type basic apply +// recovery point provider specific input. +type InstanceTypeBasicApplyRecoveryPointProviderSpecificInput string + +const ( + // InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A ... + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = "A2A" + // InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput ... + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = "ApplyRecoveryPointProviderSpecificInput" + // InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = "HyperVReplicaAzure" + // InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 ... + InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeBasicApplyRecoveryPointProviderSpecificInput = "InMageAzureV2" +) + +// PossibleInstanceTypeBasicApplyRecoveryPointProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicApplyRecoveryPointProviderSpecificInput const type. +func PossibleInstanceTypeBasicApplyRecoveryPointProviderSpecificInputValues() []InstanceTypeBasicApplyRecoveryPointProviderSpecificInput { + return []InstanceTypeBasicApplyRecoveryPointProviderSpecificInput{InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A, InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput, InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2} +} + +// InstanceTypeBasicConfigurationSettings enumerates the values for instance type basic configuration settings. +type InstanceTypeBasicConfigurationSettings string + +const ( + // InstanceTypeConfigurationSettings ... + InstanceTypeConfigurationSettings InstanceTypeBasicConfigurationSettings = "ConfigurationSettings" + // InstanceTypeHyperVVirtualMachine ... + InstanceTypeHyperVVirtualMachine InstanceTypeBasicConfigurationSettings = "HyperVVirtualMachine" + // InstanceTypeReplicationGroupDetails ... + InstanceTypeReplicationGroupDetails InstanceTypeBasicConfigurationSettings = "ReplicationGroupDetails" + // InstanceTypeVmmVirtualMachine ... + InstanceTypeVmmVirtualMachine InstanceTypeBasicConfigurationSettings = "VmmVirtualMachine" + // InstanceTypeVMwareVirtualMachine ... + InstanceTypeVMwareVirtualMachine InstanceTypeBasicConfigurationSettings = "VMwareVirtualMachine" +) + +// PossibleInstanceTypeBasicConfigurationSettingsValues returns an array of possible values for the InstanceTypeBasicConfigurationSettings const type. +func PossibleInstanceTypeBasicConfigurationSettingsValues() []InstanceTypeBasicConfigurationSettings { + return []InstanceTypeBasicConfigurationSettings{InstanceTypeConfigurationSettings, InstanceTypeHyperVVirtualMachine, InstanceTypeReplicationGroupDetails, InstanceTypeVmmVirtualMachine, InstanceTypeVMwareVirtualMachine} +} + +// InstanceTypeBasicDisableProtectionProviderSpecificInput enumerates the values for instance type basic +// disable protection provider specific input. +type InstanceTypeBasicDisableProtectionProviderSpecificInput string + +const ( + // InstanceTypeDisableProtectionProviderSpecificInput ... + InstanceTypeDisableProtectionProviderSpecificInput InstanceTypeBasicDisableProtectionProviderSpecificInput = "DisableProtectionProviderSpecificInput" + // InstanceTypeInMage ... + InstanceTypeInMage InstanceTypeBasicDisableProtectionProviderSpecificInput = "InMage" +) + +// PossibleInstanceTypeBasicDisableProtectionProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicDisableProtectionProviderSpecificInput const type. +func PossibleInstanceTypeBasicDisableProtectionProviderSpecificInputValues() []InstanceTypeBasicDisableProtectionProviderSpecificInput { + return []InstanceTypeBasicDisableProtectionProviderSpecificInput{InstanceTypeDisableProtectionProviderSpecificInput, InstanceTypeInMage} +} + +// InstanceTypeBasicEnableMigrationProviderSpecificInput enumerates the values for instance type basic enable +// migration provider specific input. +type InstanceTypeBasicEnableMigrationProviderSpecificInput string + +const ( + // InstanceTypeEnableMigrationProviderSpecificInput ... + InstanceTypeEnableMigrationProviderSpecificInput InstanceTypeBasicEnableMigrationProviderSpecificInput = "EnableMigrationProviderSpecificInput" + // InstanceTypeVMwareCbt ... + InstanceTypeVMwareCbt InstanceTypeBasicEnableMigrationProviderSpecificInput = "VMwareCbt" +) + +// PossibleInstanceTypeBasicEnableMigrationProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicEnableMigrationProviderSpecificInput const type. +func PossibleInstanceTypeBasicEnableMigrationProviderSpecificInputValues() []InstanceTypeBasicEnableMigrationProviderSpecificInput { + return []InstanceTypeBasicEnableMigrationProviderSpecificInput{InstanceTypeEnableMigrationProviderSpecificInput, InstanceTypeVMwareCbt} +} + +// InstanceTypeBasicEnableProtectionProviderSpecificInput enumerates the values for instance type basic enable +// protection provider specific input. +type InstanceTypeBasicEnableProtectionProviderSpecificInput string + +const ( + // InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A ... + InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A InstanceTypeBasicEnableProtectionProviderSpecificInput = "A2A" + // InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput ... + InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput InstanceTypeBasicEnableProtectionProviderSpecificInput = "EnableProtectionProviderSpecificInput" + // InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicEnableProtectionProviderSpecificInput = "HyperVReplicaAzure" + // InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage ... + InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage InstanceTypeBasicEnableProtectionProviderSpecificInput = "InMage" + // InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 ... + InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeBasicEnableProtectionProviderSpecificInput = "InMageAzureV2" + // InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan ... + InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan InstanceTypeBasicEnableProtectionProviderSpecificInput = "San" +) + +// PossibleInstanceTypeBasicEnableProtectionProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicEnableProtectionProviderSpecificInput const type. +func PossibleInstanceTypeBasicEnableProtectionProviderSpecificInputValues() []InstanceTypeBasicEnableProtectionProviderSpecificInput { + return []InstanceTypeBasicEnableProtectionProviderSpecificInput{InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A, InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput, InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage, InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2, InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan} +} + +// InstanceTypeBasicEventProviderSpecificDetails enumerates the values for instance type basic event provider +// specific details. +type InstanceTypeBasicEventProviderSpecificDetails string + +const ( + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A InstanceTypeBasicEventProviderSpecificDetails = "A2A" + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails InstanceTypeBasicEventProviderSpecificDetails = "EventProviderSpecificDetails" + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012 ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012 InstanceTypeBasicEventProviderSpecificDetails = "HyperVReplica2012" + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 InstanceTypeBasicEventProviderSpecificDetails = "HyperVReplica2012R2" + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure InstanceTypeBasicEventProviderSpecificDetails = "HyperVReplicaAzure" + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails InstanceTypeBasicEventProviderSpecificDetails = "HyperVReplicaBaseEventDetails" + // InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2 ... + InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2 InstanceTypeBasicEventProviderSpecificDetails = "InMageAzureV2" +) + +// PossibleInstanceTypeBasicEventProviderSpecificDetailsValues returns an array of possible values for the InstanceTypeBasicEventProviderSpecificDetails const type. +func PossibleInstanceTypeBasicEventProviderSpecificDetailsValues() []InstanceTypeBasicEventProviderSpecificDetails { + return []InstanceTypeBasicEventProviderSpecificDetails{InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails, InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2} +} + +// InstanceTypeBasicEventSpecificDetails enumerates the values for instance type basic event specific details. +type InstanceTypeBasicEventSpecificDetails string + +const ( + // InstanceTypeEventSpecificDetails ... + InstanceTypeEventSpecificDetails InstanceTypeBasicEventSpecificDetails = "EventSpecificDetails" + // InstanceTypeJobStatus ... + InstanceTypeJobStatus InstanceTypeBasicEventSpecificDetails = "JobStatus" +) + +// PossibleInstanceTypeBasicEventSpecificDetailsValues returns an array of possible values for the InstanceTypeBasicEventSpecificDetails const type. +func PossibleInstanceTypeBasicEventSpecificDetailsValues() []InstanceTypeBasicEventSpecificDetails { + return []InstanceTypeBasicEventSpecificDetails{InstanceTypeEventSpecificDetails, InstanceTypeJobStatus} +} + +// InstanceTypeBasicFabricSpecificCreateNetworkMappingInput enumerates the values for instance type basic +// fabric specific create network mapping input. +type InstanceTypeBasicFabricSpecificCreateNetworkMappingInput string + +const ( + // InstanceTypeAzureToAzure ... + InstanceTypeAzureToAzure InstanceTypeBasicFabricSpecificCreateNetworkMappingInput = "AzureToAzure" + // InstanceTypeFabricSpecificCreateNetworkMappingInput ... + InstanceTypeFabricSpecificCreateNetworkMappingInput InstanceTypeBasicFabricSpecificCreateNetworkMappingInput = "FabricSpecificCreateNetworkMappingInput" + // InstanceTypeVmmToAzure ... + InstanceTypeVmmToAzure InstanceTypeBasicFabricSpecificCreateNetworkMappingInput = "VmmToAzure" + // InstanceTypeVmmToVmm ... + InstanceTypeVmmToVmm InstanceTypeBasicFabricSpecificCreateNetworkMappingInput = "VmmToVmm" +) + +// PossibleInstanceTypeBasicFabricSpecificCreateNetworkMappingInputValues returns an array of possible values for the InstanceTypeBasicFabricSpecificCreateNetworkMappingInput const type. +func PossibleInstanceTypeBasicFabricSpecificCreateNetworkMappingInputValues() []InstanceTypeBasicFabricSpecificCreateNetworkMappingInput { + return []InstanceTypeBasicFabricSpecificCreateNetworkMappingInput{InstanceTypeAzureToAzure, InstanceTypeFabricSpecificCreateNetworkMappingInput, InstanceTypeVmmToAzure, InstanceTypeVmmToVmm} +} + +// InstanceTypeBasicFabricSpecificCreationInput enumerates the values for instance type basic fabric specific +// creation input. +type InstanceTypeBasicFabricSpecificCreationInput string + +const ( + // InstanceTypeAzure ... + InstanceTypeAzure InstanceTypeBasicFabricSpecificCreationInput = "Azure" + // InstanceTypeFabricSpecificCreationInput ... + InstanceTypeFabricSpecificCreationInput InstanceTypeBasicFabricSpecificCreationInput = "FabricSpecificCreationInput" + // InstanceTypeVMwareV2 ... + InstanceTypeVMwareV2 InstanceTypeBasicFabricSpecificCreationInput = "VMwareV2" +) + +// PossibleInstanceTypeBasicFabricSpecificCreationInputValues returns an array of possible values for the InstanceTypeBasicFabricSpecificCreationInput const type. +func PossibleInstanceTypeBasicFabricSpecificCreationInputValues() []InstanceTypeBasicFabricSpecificCreationInput { + return []InstanceTypeBasicFabricSpecificCreationInput{InstanceTypeAzure, InstanceTypeFabricSpecificCreationInput, InstanceTypeVMwareV2} +} + +// InstanceTypeBasicFabricSpecificDetails enumerates the values for instance type basic fabric specific +// details. +type InstanceTypeBasicFabricSpecificDetails string + +const ( + // InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure ... + InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure InstanceTypeBasicFabricSpecificDetails = "Azure" + // InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails ... + InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails InstanceTypeBasicFabricSpecificDetails = "FabricSpecificDetails" + // InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite ... + InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite InstanceTypeBasicFabricSpecificDetails = "HyperVSite" + // InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM ... + InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM InstanceTypeBasicFabricSpecificDetails = "VMM" + // InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware ... + InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware InstanceTypeBasicFabricSpecificDetails = "VMware" + // InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2 ... + InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2 InstanceTypeBasicFabricSpecificDetails = "VMwareV2" +) + +// PossibleInstanceTypeBasicFabricSpecificDetailsValues returns an array of possible values for the InstanceTypeBasicFabricSpecificDetails const type. +func PossibleInstanceTypeBasicFabricSpecificDetailsValues() []InstanceTypeBasicFabricSpecificDetails { + return []InstanceTypeBasicFabricSpecificDetails{InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure, InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails, InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite, InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM, InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware, InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2} +} + +// InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput enumerates the values for instance type basic +// fabric specific update network mapping input. +type InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput string + +const ( + // InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure ... + InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput = "AzureToAzure" + // InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput ... + InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput = "FabricSpecificUpdateNetworkMappingInput" + // InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure ... + InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput = "VmmToAzure" + // InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm ... + InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput = "VmmToVmm" +) + +// PossibleInstanceTypeBasicFabricSpecificUpdateNetworkMappingInputValues returns an array of possible values for the InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput const type. +func PossibleInstanceTypeBasicFabricSpecificUpdateNetworkMappingInputValues() []InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput { + return []InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput{InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure, InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput, InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure, InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm} +} + +// InstanceTypeBasicGroupTaskDetails enumerates the values for instance type basic group task details. +type InstanceTypeBasicGroupTaskDetails string + +const ( + // InstanceTypeGroupTaskDetails ... + InstanceTypeGroupTaskDetails InstanceTypeBasicGroupTaskDetails = "GroupTaskDetails" + // InstanceTypeInlineWorkflowTaskDetails ... + InstanceTypeInlineWorkflowTaskDetails InstanceTypeBasicGroupTaskDetails = "InlineWorkflowTaskDetails" + // InstanceTypeRecoveryPlanGroupTaskDetails ... + InstanceTypeRecoveryPlanGroupTaskDetails InstanceTypeBasicGroupTaskDetails = "RecoveryPlanGroupTaskDetails" + // InstanceTypeRecoveryPlanShutdownGroupTaskDetails ... + InstanceTypeRecoveryPlanShutdownGroupTaskDetails InstanceTypeBasicGroupTaskDetails = "RecoveryPlanShutdownGroupTaskDetails" +) + +// PossibleInstanceTypeBasicGroupTaskDetailsValues returns an array of possible values for the InstanceTypeBasicGroupTaskDetails const type. +func PossibleInstanceTypeBasicGroupTaskDetailsValues() []InstanceTypeBasicGroupTaskDetails { + return []InstanceTypeBasicGroupTaskDetails{InstanceTypeGroupTaskDetails, InstanceTypeInlineWorkflowTaskDetails, InstanceTypeRecoveryPlanGroupTaskDetails, InstanceTypeRecoveryPlanShutdownGroupTaskDetails} +} + +// InstanceTypeBasicJobDetails enumerates the values for instance type basic job details. +type InstanceTypeBasicJobDetails string + +const ( + // InstanceTypeAsrJobDetails ... + InstanceTypeAsrJobDetails InstanceTypeBasicJobDetails = "AsrJobDetails" + // InstanceTypeExportJobDetails ... + InstanceTypeExportJobDetails InstanceTypeBasicJobDetails = "ExportJobDetails" + // InstanceTypeFailoverJobDetails ... + InstanceTypeFailoverJobDetails InstanceTypeBasicJobDetails = "FailoverJobDetails" + // InstanceTypeJobDetails ... + InstanceTypeJobDetails InstanceTypeBasicJobDetails = "JobDetails" + // InstanceTypeSwitchProtectionJobDetails ... + InstanceTypeSwitchProtectionJobDetails InstanceTypeBasicJobDetails = "SwitchProtectionJobDetails" + // InstanceTypeTestFailoverJobDetails ... + InstanceTypeTestFailoverJobDetails InstanceTypeBasicJobDetails = "TestFailoverJobDetails" +) + +// PossibleInstanceTypeBasicJobDetailsValues returns an array of possible values for the InstanceTypeBasicJobDetails const type. +func PossibleInstanceTypeBasicJobDetailsValues() []InstanceTypeBasicJobDetails { + return []InstanceTypeBasicJobDetails{InstanceTypeAsrJobDetails, InstanceTypeExportJobDetails, InstanceTypeFailoverJobDetails, InstanceTypeJobDetails, InstanceTypeSwitchProtectionJobDetails, InstanceTypeTestFailoverJobDetails} +} + +// InstanceTypeBasicMigrateProviderSpecificInput enumerates the values for instance type basic migrate provider +// specific input. +type InstanceTypeBasicMigrateProviderSpecificInput string + +const ( + // InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput ... + InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput InstanceTypeBasicMigrateProviderSpecificInput = "MigrateProviderSpecificInput" + // InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt ... + InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt InstanceTypeBasicMigrateProviderSpecificInput = "VMwareCbt" +) + +// PossibleInstanceTypeBasicMigrateProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicMigrateProviderSpecificInput const type. +func PossibleInstanceTypeBasicMigrateProviderSpecificInputValues() []InstanceTypeBasicMigrateProviderSpecificInput { + return []InstanceTypeBasicMigrateProviderSpecificInput{InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput, InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicMigrationProviderSpecificSettings enumerates the values for instance type basic migration +// provider specific settings. +type InstanceTypeBasicMigrationProviderSpecificSettings string + +const ( + // InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings ... + InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings InstanceTypeBasicMigrationProviderSpecificSettings = "MigrationProviderSpecificSettings" + // InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt ... + InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt InstanceTypeBasicMigrationProviderSpecificSettings = "VMwareCbt" +) + +// PossibleInstanceTypeBasicMigrationProviderSpecificSettingsValues returns an array of possible values for the InstanceTypeBasicMigrationProviderSpecificSettings const type. +func PossibleInstanceTypeBasicMigrationProviderSpecificSettingsValues() []InstanceTypeBasicMigrationProviderSpecificSettings { + return []InstanceTypeBasicMigrationProviderSpecificSettings{InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings, InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicNetworkMappingFabricSpecificSettings enumerates the values for instance type basic network +// mapping fabric specific settings. +type InstanceTypeBasicNetworkMappingFabricSpecificSettings string + +const ( + // InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure ... + InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure InstanceTypeBasicNetworkMappingFabricSpecificSettings = "AzureToAzure" + // InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings ... + InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings InstanceTypeBasicNetworkMappingFabricSpecificSettings = "NetworkMappingFabricSpecificSettings" + // InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure ... + InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure InstanceTypeBasicNetworkMappingFabricSpecificSettings = "VmmToAzure" + // InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm ... + InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm InstanceTypeBasicNetworkMappingFabricSpecificSettings = "VmmToVmm" +) + +// PossibleInstanceTypeBasicNetworkMappingFabricSpecificSettingsValues returns an array of possible values for the InstanceTypeBasicNetworkMappingFabricSpecificSettings const type. +func PossibleInstanceTypeBasicNetworkMappingFabricSpecificSettingsValues() []InstanceTypeBasicNetworkMappingFabricSpecificSettings { + return []InstanceTypeBasicNetworkMappingFabricSpecificSettings{InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure, InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings, InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure, InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm} +} + +// InstanceTypeBasicPolicyProviderSpecificDetails enumerates the values for instance type basic policy provider +// specific details. +type InstanceTypeBasicPolicyProviderSpecificDetails string + +const ( + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A InstanceTypeBasicPolicyProviderSpecificDetails = "A2A" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 InstanceTypeBasicPolicyProviderSpecificDetails = "HyperVReplica2012" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 InstanceTypeBasicPolicyProviderSpecificDetails = "HyperVReplica2012R2" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure InstanceTypeBasicPolicyProviderSpecificDetails = "HyperVReplicaAzure" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails InstanceTypeBasicPolicyProviderSpecificDetails = "HyperVReplicaBasePolicyDetails" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage InstanceTypeBasicPolicyProviderSpecificDetails = "InMage" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 InstanceTypeBasicPolicyProviderSpecificDetails = "InMageAzureV2" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails InstanceTypeBasicPolicyProviderSpecificDetails = "InMageBasePolicyDetails" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails InstanceTypeBasicPolicyProviderSpecificDetails = "PolicyProviderSpecificDetails" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration InstanceTypeBasicPolicyProviderSpecificDetails = "RcmAzureMigration" + // InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt ... + InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt InstanceTypeBasicPolicyProviderSpecificDetails = "VMwareCbt" +) + +// PossibleInstanceTypeBasicPolicyProviderSpecificDetailsValues returns an array of possible values for the InstanceTypeBasicPolicyProviderSpecificDetails const type. +func PossibleInstanceTypeBasicPolicyProviderSpecificDetailsValues() []InstanceTypeBasicPolicyProviderSpecificDetails { + return []InstanceTypeBasicPolicyProviderSpecificDetails{InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration, InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicPolicyProviderSpecificInput enumerates the values for instance type basic policy provider +// specific input. +type InstanceTypeBasicPolicyProviderSpecificInput string + +const ( + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A InstanceTypeBasicPolicyProviderSpecificInput = "A2A" + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012 ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012 InstanceTypeBasicPolicyProviderSpecificInput = "HyperVReplica2012" + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 InstanceTypeBasicPolicyProviderSpecificInput = "HyperVReplica2012R2" + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicPolicyProviderSpecificInput = "HyperVReplicaAzure" + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage InstanceTypeBasicPolicyProviderSpecificInput = "InMage" + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2 ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeBasicPolicyProviderSpecificInput = "InMageAzureV2" + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput InstanceTypeBasicPolicyProviderSpecificInput = "PolicyProviderSpecificInput" + // InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt ... + InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt InstanceTypeBasicPolicyProviderSpecificInput = "VMwareCbt" +) + +// PossibleInstanceTypeBasicPolicyProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicPolicyProviderSpecificInput const type. +func PossibleInstanceTypeBasicPolicyProviderSpecificInputValues() []InstanceTypeBasicPolicyProviderSpecificInput { + return []InstanceTypeBasicPolicyProviderSpecificInput{InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A, InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012, InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2, InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage, InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2, InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput, InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails enumerates the values for instance type +// basic protection container mapping provider specific details. +type InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails string + +const ( + // InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A ... + InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails = "A2A" + // InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails ... + InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails = "ProtectionContainerMappingProviderSpecificDetails" + // InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt ... + InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails = "VMwareCbt" +) + +// PossibleInstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsValues returns an array of possible values for the InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails const type. +func PossibleInstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsValues() []InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails { + return []InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails{InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A, InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails, InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicProviderSpecificFailoverInput enumerates the values for instance type basic provider +// specific failover input. +type InstanceTypeBasicProviderSpecificFailoverInput string + +const ( + // InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A ... + InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A InstanceTypeBasicProviderSpecificFailoverInput = "A2A" + // InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicProviderSpecificFailoverInput = "HyperVReplicaAzure" + // InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback ... + InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback InstanceTypeBasicProviderSpecificFailoverInput = "HyperVReplicaAzureFailback" + // InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage ... + InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage InstanceTypeBasicProviderSpecificFailoverInput = "InMage" + // InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2 ... + InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2 InstanceTypeBasicProviderSpecificFailoverInput = "InMageAzureV2" + // InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput ... + InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput InstanceTypeBasicProviderSpecificFailoverInput = "ProviderSpecificFailoverInput" +) + +// PossibleInstanceTypeBasicProviderSpecificFailoverInputValues returns an array of possible values for the InstanceTypeBasicProviderSpecificFailoverInput const type. +func PossibleInstanceTypeBasicProviderSpecificFailoverInputValues() []InstanceTypeBasicProviderSpecificFailoverInput { + return []InstanceTypeBasicProviderSpecificFailoverInput{InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A, InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback, InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage, InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2, InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput} +} + +// InstanceTypeBasicProviderSpecificRecoveryPointDetails enumerates the values for instance type basic provider +// specific recovery point details. +type InstanceTypeBasicProviderSpecificRecoveryPointDetails string + +const ( + // InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A ... + InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A InstanceTypeBasicProviderSpecificRecoveryPointDetails = "A2A" + // InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2 ... + InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2 InstanceTypeBasicProviderSpecificRecoveryPointDetails = "InMageAzureV2" + // InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails ... + InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails InstanceTypeBasicProviderSpecificRecoveryPointDetails = "ProviderSpecificRecoveryPointDetails" +) + +// PossibleInstanceTypeBasicProviderSpecificRecoveryPointDetailsValues returns an array of possible values for the InstanceTypeBasicProviderSpecificRecoveryPointDetails const type. +func PossibleInstanceTypeBasicProviderSpecificRecoveryPointDetailsValues() []InstanceTypeBasicProviderSpecificRecoveryPointDetails { + return []InstanceTypeBasicProviderSpecificRecoveryPointDetails{InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A, InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2, InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails} +} + +// InstanceTypeBasicRecoveryPlanActionDetails enumerates the values for instance type basic recovery plan +// action details. +type InstanceTypeBasicRecoveryPlanActionDetails string + +const ( + // InstanceTypeAutomationRunbookActionDetails ... + InstanceTypeAutomationRunbookActionDetails InstanceTypeBasicRecoveryPlanActionDetails = "AutomationRunbookActionDetails" + // InstanceTypeManualActionDetails ... + InstanceTypeManualActionDetails InstanceTypeBasicRecoveryPlanActionDetails = "ManualActionDetails" + // InstanceTypeRecoveryPlanActionDetails ... + InstanceTypeRecoveryPlanActionDetails InstanceTypeBasicRecoveryPlanActionDetails = "RecoveryPlanActionDetails" + // InstanceTypeScriptActionDetails ... + InstanceTypeScriptActionDetails InstanceTypeBasicRecoveryPlanActionDetails = "ScriptActionDetails" +) + +// PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues returns an array of possible values for the InstanceTypeBasicRecoveryPlanActionDetails const type. +func PossibleInstanceTypeBasicRecoveryPlanActionDetailsValues() []InstanceTypeBasicRecoveryPlanActionDetails { + return []InstanceTypeBasicRecoveryPlanActionDetails{InstanceTypeAutomationRunbookActionDetails, InstanceTypeManualActionDetails, InstanceTypeRecoveryPlanActionDetails, InstanceTypeScriptActionDetails} +} + +// InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput enumerates the values for instance type basic +// recovery plan provider specific failover input. +type InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput string + +const ( + // InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A ... + InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = "A2A" + // InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = "HyperVReplicaAzure" + // InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback ... + InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = "HyperVReplicaAzureFailback" + // InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage ... + InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = "InMage" + // InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 ... + InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = "InMageAzureV2" + // InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput ... + InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput = "RecoveryPlanProviderSpecificFailoverInput" +) + +// PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues returns an array of possible values for the InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput const type. +func PossibleInstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputValues() []InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput { + return []InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput{InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2, InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput} +} + +// InstanceTypeBasicRemoveDisksProviderSpecificInput enumerates the values for instance type basic remove disks +// provider specific input. +type InstanceTypeBasicRemoveDisksProviderSpecificInput string + +const ( + // InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A ... + InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A InstanceTypeBasicRemoveDisksProviderSpecificInput = "A2A" + // InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput ... + InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput InstanceTypeBasicRemoveDisksProviderSpecificInput = "RemoveDisksProviderSpecificInput" +) + +// PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicRemoveDisksProviderSpecificInput const type. +func PossibleInstanceTypeBasicRemoveDisksProviderSpecificInputValues() []InstanceTypeBasicRemoveDisksProviderSpecificInput { + return []InstanceTypeBasicRemoveDisksProviderSpecificInput{InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A, InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput} +} + +// InstanceTypeBasicReplicationProviderSpecificContainerCreationInput enumerates the values for instance type +// basic replication provider specific container creation input. +type InstanceTypeBasicReplicationProviderSpecificContainerCreationInput string + +const ( + // InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A ... + InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = "A2A" + // InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput ... + InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = "ReplicationProviderSpecificContainerCreationInput" + // InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero ... + InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero InstanceTypeBasicReplicationProviderSpecificContainerCreationInput = "6c7da455-506f-43ff-a16a-8eb101aebb70" +) + +// PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues returns an array of possible values for the InstanceTypeBasicReplicationProviderSpecificContainerCreationInput const type. +func PossibleInstanceTypeBasicReplicationProviderSpecificContainerCreationInputValues() []InstanceTypeBasicReplicationProviderSpecificContainerCreationInput { + return []InstanceTypeBasicReplicationProviderSpecificContainerCreationInput{InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A, InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput, InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero} +} + +// InstanceTypeBasicReplicationProviderSpecificContainerMappingInput enumerates the values for instance type +// basic replication provider specific container mapping input. +type InstanceTypeBasicReplicationProviderSpecificContainerMappingInput string + +const ( + // InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A ... + InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A InstanceTypeBasicReplicationProviderSpecificContainerMappingInput = "A2A" + // InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput ... + InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput InstanceTypeBasicReplicationProviderSpecificContainerMappingInput = "ReplicationProviderSpecificContainerMappingInput" + // InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt ... + InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt InstanceTypeBasicReplicationProviderSpecificContainerMappingInput = "VMwareCbt" +) + +// PossibleInstanceTypeBasicReplicationProviderSpecificContainerMappingInputValues returns an array of possible values for the InstanceTypeBasicReplicationProviderSpecificContainerMappingInput const type. +func PossibleInstanceTypeBasicReplicationProviderSpecificContainerMappingInputValues() []InstanceTypeBasicReplicationProviderSpecificContainerMappingInput { + return []InstanceTypeBasicReplicationProviderSpecificContainerMappingInput{InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A, InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput, InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicReplicationProviderSpecificSettings enumerates the values for instance type basic +// replication provider specific settings. +type InstanceTypeBasicReplicationProviderSpecificSettings string + +const ( + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A InstanceTypeBasicReplicationProviderSpecificSettings = "A2A" + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 InstanceTypeBasicReplicationProviderSpecificSettings = "HyperVReplica2012" + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 InstanceTypeBasicReplicationProviderSpecificSettings = "HyperVReplica2012R2" + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure InstanceTypeBasicReplicationProviderSpecificSettings = "HyperVReplicaAzure" + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails InstanceTypeBasicReplicationProviderSpecificSettings = "HyperVReplicaBaseReplicationDetails" + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage InstanceTypeBasicReplicationProviderSpecificSettings = "InMage" + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 InstanceTypeBasicReplicationProviderSpecificSettings = "InMageAzureV2" + // InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings ... + InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings InstanceTypeBasicReplicationProviderSpecificSettings = "ReplicationProviderSpecificSettings" +) + +// PossibleInstanceTypeBasicReplicationProviderSpecificSettingsValues returns an array of possible values for the InstanceTypeBasicReplicationProviderSpecificSettings const type. +func PossibleInstanceTypeBasicReplicationProviderSpecificSettingsValues() []InstanceTypeBasicReplicationProviderSpecificSettings { + return []InstanceTypeBasicReplicationProviderSpecificSettings{InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A, InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012, InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2, InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure, InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails, InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage, InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2, InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings} +} + +// InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput enumerates the values for instance +// type basic replication provider specific update container mapping input. +type InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput string + +const ( + // InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A ... + InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput = "A2A" + // InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput ... + InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput = "ReplicationProviderSpecificUpdateContainerMappingInput" +) + +// PossibleInstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputValues returns an array of possible values for the InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput const type. +func PossibleInstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputValues() []InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput { + return []InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput{InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A, InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput} +} + +// InstanceTypeBasicReverseReplicationProviderSpecificInput enumerates the values for instance type basic +// reverse replication provider specific input. +type InstanceTypeBasicReverseReplicationProviderSpecificInput string + +const ( + // InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A ... + InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A InstanceTypeBasicReverseReplicationProviderSpecificInput = "A2A" + // InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicReverseReplicationProviderSpecificInput = "HyperVReplicaAzure" + // InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage ... + InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage InstanceTypeBasicReverseReplicationProviderSpecificInput = "InMage" + // InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 ... + InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeBasicReverseReplicationProviderSpecificInput = "InMageAzureV2" + // InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput ... + InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput InstanceTypeBasicReverseReplicationProviderSpecificInput = "ReverseReplicationProviderSpecificInput" +) + +// PossibleInstanceTypeBasicReverseReplicationProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicReverseReplicationProviderSpecificInput const type. +func PossibleInstanceTypeBasicReverseReplicationProviderSpecificInputValues() []InstanceTypeBasicReverseReplicationProviderSpecificInput { + return []InstanceTypeBasicReverseReplicationProviderSpecificInput{InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A, InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage, InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2, InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput} +} + +// InstanceTypeBasicSwitchProtectionProviderSpecificInput enumerates the values for instance type basic switch +// protection provider specific input. +type InstanceTypeBasicSwitchProtectionProviderSpecificInput string + +const ( + // InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A ... + InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A InstanceTypeBasicSwitchProtectionProviderSpecificInput = "A2A" + // InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput ... + InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput InstanceTypeBasicSwitchProtectionProviderSpecificInput = "SwitchProtectionProviderSpecificInput" +) + +// PossibleInstanceTypeBasicSwitchProtectionProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicSwitchProtectionProviderSpecificInput const type. +func PossibleInstanceTypeBasicSwitchProtectionProviderSpecificInputValues() []InstanceTypeBasicSwitchProtectionProviderSpecificInput { + return []InstanceTypeBasicSwitchProtectionProviderSpecificInput{InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A, InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput} +} + +// InstanceTypeBasicTaskTypeDetails enumerates the values for instance type basic task type details. +type InstanceTypeBasicTaskTypeDetails string + +const ( + // InstanceTypeAutomationRunbookTaskDetails ... + InstanceTypeAutomationRunbookTaskDetails InstanceTypeBasicTaskTypeDetails = "AutomationRunbookTaskDetails" + // InstanceTypeConsistencyCheckTaskDetails ... + InstanceTypeConsistencyCheckTaskDetails InstanceTypeBasicTaskTypeDetails = "ConsistencyCheckTaskDetails" + // InstanceTypeFabricReplicationGroupTaskDetails ... + InstanceTypeFabricReplicationGroupTaskDetails InstanceTypeBasicTaskTypeDetails = "FabricReplicationGroupTaskDetails" + // InstanceTypeJobTaskDetails ... + InstanceTypeJobTaskDetails InstanceTypeBasicTaskTypeDetails = "JobTaskDetails" + // InstanceTypeManualActionTaskDetails ... + InstanceTypeManualActionTaskDetails InstanceTypeBasicTaskTypeDetails = "ManualActionTaskDetails" + // InstanceTypeScriptActionTaskDetails ... + InstanceTypeScriptActionTaskDetails InstanceTypeBasicTaskTypeDetails = "ScriptActionTaskDetails" + // InstanceTypeTaskTypeDetails ... + InstanceTypeTaskTypeDetails InstanceTypeBasicTaskTypeDetails = "TaskTypeDetails" + // InstanceTypeVirtualMachineTaskDetails ... + InstanceTypeVirtualMachineTaskDetails InstanceTypeBasicTaskTypeDetails = "VirtualMachineTaskDetails" + // InstanceTypeVMNicUpdatesTaskDetails ... + InstanceTypeVMNicUpdatesTaskDetails InstanceTypeBasicTaskTypeDetails = "VmNicUpdatesTaskDetails" +) + +// PossibleInstanceTypeBasicTaskTypeDetailsValues returns an array of possible values for the InstanceTypeBasicTaskTypeDetails const type. +func PossibleInstanceTypeBasicTaskTypeDetailsValues() []InstanceTypeBasicTaskTypeDetails { + return []InstanceTypeBasicTaskTypeDetails{InstanceTypeAutomationRunbookTaskDetails, InstanceTypeConsistencyCheckTaskDetails, InstanceTypeFabricReplicationGroupTaskDetails, InstanceTypeJobTaskDetails, InstanceTypeManualActionTaskDetails, InstanceTypeScriptActionTaskDetails, InstanceTypeTaskTypeDetails, InstanceTypeVirtualMachineTaskDetails, InstanceTypeVMNicUpdatesTaskDetails} +} + +// InstanceTypeBasicTestMigrateProviderSpecificInput enumerates the values for instance type basic test migrate +// provider specific input. +type InstanceTypeBasicTestMigrateProviderSpecificInput string + +const ( + // InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput ... + InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput InstanceTypeBasicTestMigrateProviderSpecificInput = "TestMigrateProviderSpecificInput" + // InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt ... + InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt InstanceTypeBasicTestMigrateProviderSpecificInput = "VMwareCbt" +) + +// PossibleInstanceTypeBasicTestMigrateProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicTestMigrateProviderSpecificInput const type. +func PossibleInstanceTypeBasicTestMigrateProviderSpecificInputValues() []InstanceTypeBasicTestMigrateProviderSpecificInput { + return []InstanceTypeBasicTestMigrateProviderSpecificInput{InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput, InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicUpdateMigrationItemProviderSpecificInput enumerates the values for instance type basic +// update migration item provider specific input. +type InstanceTypeBasicUpdateMigrationItemProviderSpecificInput string + +const ( + // InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput ... + InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput InstanceTypeBasicUpdateMigrationItemProviderSpecificInput = "UpdateMigrationItemProviderSpecificInput" + // InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt ... + InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt InstanceTypeBasicUpdateMigrationItemProviderSpecificInput = "VMwareCbt" +) + +// PossibleInstanceTypeBasicUpdateMigrationItemProviderSpecificInputValues returns an array of possible values for the InstanceTypeBasicUpdateMigrationItemProviderSpecificInput const type. +func PossibleInstanceTypeBasicUpdateMigrationItemProviderSpecificInputValues() []InstanceTypeBasicUpdateMigrationItemProviderSpecificInput { + return []InstanceTypeBasicUpdateMigrationItemProviderSpecificInput{InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput, InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt} +} + +// InstanceTypeBasicUpdateReplicationProtectedItemProviderInput enumerates the values for instance type basic +// update replication protected item provider input. +type InstanceTypeBasicUpdateReplicationProtectedItemProviderInput string + +const ( + // InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A ... + InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A InstanceTypeBasicUpdateReplicationProtectedItemProviderInput = "A2A" + // InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure ... + InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure InstanceTypeBasicUpdateReplicationProtectedItemProviderInput = "HyperVReplicaAzure" + // InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2 ... + InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2 InstanceTypeBasicUpdateReplicationProtectedItemProviderInput = "InMageAzureV2" + // InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput ... + InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput InstanceTypeBasicUpdateReplicationProtectedItemProviderInput = "UpdateReplicationProtectedItemProviderInput" +) + +// PossibleInstanceTypeBasicUpdateReplicationProtectedItemProviderInputValues returns an array of possible values for the InstanceTypeBasicUpdateReplicationProtectedItemProviderInput const type. +func PossibleInstanceTypeBasicUpdateReplicationProtectedItemProviderInputValues() []InstanceTypeBasicUpdateReplicationProtectedItemProviderInput { + return []InstanceTypeBasicUpdateReplicationProtectedItemProviderInput{InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A, InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure, InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2, InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput} +} + +// LicenseType enumerates the values for license type. +type LicenseType string + +const ( + // LicenseTypeNoLicenseType ... + LicenseTypeNoLicenseType LicenseType = "NoLicenseType" + // LicenseTypeNotSpecified ... + LicenseTypeNotSpecified LicenseType = "NotSpecified" + // LicenseTypeWindowsServer ... + LicenseTypeWindowsServer LicenseType = "WindowsServer" +) + +// PossibleLicenseTypeValues returns an array of possible values for the LicenseType const type. +func PossibleLicenseTypeValues() []LicenseType { + return []LicenseType{LicenseTypeNoLicenseType, LicenseTypeNotSpecified, LicenseTypeWindowsServer} +} + +// MigrationItemOperation enumerates the values for migration item operation. +type MigrationItemOperation string + +const ( + // DisableMigration ... + DisableMigration MigrationItemOperation = "DisableMigration" + // Migrate ... + Migrate MigrationItemOperation = "Migrate" + // TestMigrate ... + TestMigrate MigrationItemOperation = "TestMigrate" + // TestMigrateCleanup ... + TestMigrateCleanup MigrationItemOperation = "TestMigrateCleanup" +) + +// PossibleMigrationItemOperationValues returns an array of possible values for the MigrationItemOperation const type. +func PossibleMigrationItemOperationValues() []MigrationItemOperation { + return []MigrationItemOperation{DisableMigration, Migrate, TestMigrate, TestMigrateCleanup} +} + +// MigrationRecoveryPointType enumerates the values for migration recovery point type. +type MigrationRecoveryPointType string + +const ( + // MigrationRecoveryPointTypeApplicationConsistent ... + MigrationRecoveryPointTypeApplicationConsistent MigrationRecoveryPointType = "ApplicationConsistent" + // MigrationRecoveryPointTypeCrashConsistent ... + MigrationRecoveryPointTypeCrashConsistent MigrationRecoveryPointType = "CrashConsistent" + // MigrationRecoveryPointTypeNotSpecified ... + MigrationRecoveryPointTypeNotSpecified MigrationRecoveryPointType = "NotSpecified" +) + +// PossibleMigrationRecoveryPointTypeValues returns an array of possible values for the MigrationRecoveryPointType const type. +func PossibleMigrationRecoveryPointTypeValues() []MigrationRecoveryPointType { + return []MigrationRecoveryPointType{MigrationRecoveryPointTypeApplicationConsistent, MigrationRecoveryPointTypeCrashConsistent, MigrationRecoveryPointTypeNotSpecified} +} + +// MigrationState enumerates the values for migration state. +type MigrationState string + +const ( + // MigrationStateDisableMigrationFailed ... + MigrationStateDisableMigrationFailed MigrationState = "DisableMigrationFailed" + // MigrationStateDisableMigrationInProgress ... + MigrationStateDisableMigrationInProgress MigrationState = "DisableMigrationInProgress" + // MigrationStateEnableMigrationFailed ... + MigrationStateEnableMigrationFailed MigrationState = "EnableMigrationFailed" + // MigrationStateEnableMigrationInProgress ... + MigrationStateEnableMigrationInProgress MigrationState = "EnableMigrationInProgress" + // MigrationStateInitialSeedingFailed ... + MigrationStateInitialSeedingFailed MigrationState = "InitialSeedingFailed" + // MigrationStateInitialSeedingInProgress ... + MigrationStateInitialSeedingInProgress MigrationState = "InitialSeedingInProgress" + // MigrationStateMigrationFailed ... + MigrationStateMigrationFailed MigrationState = "MigrationFailed" + // MigrationStateMigrationInProgress ... + MigrationStateMigrationInProgress MigrationState = "MigrationInProgress" + // MigrationStateMigrationSucceeded ... + MigrationStateMigrationSucceeded MigrationState = "MigrationSucceeded" + // MigrationStateNone ... + MigrationStateNone MigrationState = "None" + // MigrationStateReplicating ... + MigrationStateReplicating MigrationState = "Replicating" +) + +// PossibleMigrationStateValues returns an array of possible values for the MigrationState const type. +func PossibleMigrationStateValues() []MigrationState { + return []MigrationState{MigrationStateDisableMigrationFailed, MigrationStateDisableMigrationInProgress, MigrationStateEnableMigrationFailed, MigrationStateEnableMigrationInProgress, MigrationStateInitialSeedingFailed, MigrationStateInitialSeedingInProgress, MigrationStateMigrationFailed, MigrationStateMigrationInProgress, MigrationStateMigrationSucceeded, MigrationStateNone, MigrationStateReplicating} +} + +// MultiVMGroupCreateOption enumerates the values for multi vm group create option. +type MultiVMGroupCreateOption string + +const ( + // AutoCreated ... + AutoCreated MultiVMGroupCreateOption = "AutoCreated" + // UserSpecified ... + UserSpecified MultiVMGroupCreateOption = "UserSpecified" +) + +// PossibleMultiVMGroupCreateOptionValues returns an array of possible values for the MultiVMGroupCreateOption const type. +func PossibleMultiVMGroupCreateOptionValues() []MultiVMGroupCreateOption { + return []MultiVMGroupCreateOption{AutoCreated, UserSpecified} +} + +// MultiVMSyncPointOption enumerates the values for multi vm sync point option. +type MultiVMSyncPointOption string + +const ( + // UseMultiVMSyncRecoveryPoint ... + UseMultiVMSyncRecoveryPoint MultiVMSyncPointOption = "UseMultiVmSyncRecoveryPoint" + // UsePerVMRecoveryPoint ... + UsePerVMRecoveryPoint MultiVMSyncPointOption = "UsePerVmRecoveryPoint" +) + +// PossibleMultiVMSyncPointOptionValues returns an array of possible values for the MultiVMSyncPointOption const type. +func PossibleMultiVMSyncPointOptionValues() []MultiVMSyncPointOption { + return []MultiVMSyncPointOption{UseMultiVMSyncRecoveryPoint, UsePerVMRecoveryPoint} +} + +// MultiVMSyncStatus enumerates the values for multi vm sync status. +type MultiVMSyncStatus string + +const ( + // MultiVMSyncStatusDisabled ... + MultiVMSyncStatusDisabled MultiVMSyncStatus = "Disabled" + // MultiVMSyncStatusEnabled ... + MultiVMSyncStatusEnabled MultiVMSyncStatus = "Enabled" +) + +// PossibleMultiVMSyncStatusValues returns an array of possible values for the MultiVMSyncStatus const type. +func PossibleMultiVMSyncStatusValues() []MultiVMSyncStatus { + return []MultiVMSyncStatus{MultiVMSyncStatusDisabled, MultiVMSyncStatusEnabled} +} + +// PossibleOperationsDirections enumerates the values for possible operations directions. +type PossibleOperationsDirections string + +const ( + // PrimaryToRecovery ... + PrimaryToRecovery PossibleOperationsDirections = "PrimaryToRecovery" + // RecoveryToPrimary ... + RecoveryToPrimary PossibleOperationsDirections = "RecoveryToPrimary" +) + +// PossiblePossibleOperationsDirectionsValues returns an array of possible values for the PossibleOperationsDirections const type. +func PossiblePossibleOperationsDirectionsValues() []PossibleOperationsDirections { + return []PossibleOperationsDirections{PrimaryToRecovery, RecoveryToPrimary} +} + +// PresenceStatus enumerates the values for presence status. +type PresenceStatus string + +const ( + // NotPresent ... + NotPresent PresenceStatus = "NotPresent" + // Present ... + Present PresenceStatus = "Present" + // Unknown ... + Unknown PresenceStatus = "Unknown" +) + +// PossiblePresenceStatusValues returns an array of possible values for the PresenceStatus const type. +func PossiblePresenceStatusValues() []PresenceStatus { + return []PresenceStatus{NotPresent, Present, Unknown} +} + +// RecoveryPlanActionLocation enumerates the values for recovery plan action location. +type RecoveryPlanActionLocation string + +const ( + // Primary ... + Primary RecoveryPlanActionLocation = "Primary" + // Recovery ... + Recovery RecoveryPlanActionLocation = "Recovery" +) + +// PossibleRecoveryPlanActionLocationValues returns an array of possible values for the RecoveryPlanActionLocation const type. +func PossibleRecoveryPlanActionLocationValues() []RecoveryPlanActionLocation { + return []RecoveryPlanActionLocation{Primary, Recovery} +} + +// RecoveryPlanGroupType enumerates the values for recovery plan group type. +type RecoveryPlanGroupType string + +const ( + // Boot ... + Boot RecoveryPlanGroupType = "Boot" + // Failover ... + Failover RecoveryPlanGroupType = "Failover" + // Shutdown ... + Shutdown RecoveryPlanGroupType = "Shutdown" +) + +// PossibleRecoveryPlanGroupTypeValues returns an array of possible values for the RecoveryPlanGroupType const type. +func PossibleRecoveryPlanGroupTypeValues() []RecoveryPlanGroupType { + return []RecoveryPlanGroupType{Boot, Failover, Shutdown} +} + +// RecoveryPointSyncType enumerates the values for recovery point sync type. +type RecoveryPointSyncType string + +const ( + // MultiVMSyncRecoveryPoint ... + MultiVMSyncRecoveryPoint RecoveryPointSyncType = "MultiVmSyncRecoveryPoint" + // PerVMRecoveryPoint ... + PerVMRecoveryPoint RecoveryPointSyncType = "PerVmRecoveryPoint" +) + +// PossibleRecoveryPointSyncTypeValues returns an array of possible values for the RecoveryPointSyncType const type. +func PossibleRecoveryPointSyncTypeValues() []RecoveryPointSyncType { + return []RecoveryPointSyncType{MultiVMSyncRecoveryPoint, PerVMRecoveryPoint} +} + +// RecoveryPointType enumerates the values for recovery point type. +type RecoveryPointType string + +const ( + // Custom ... + Custom RecoveryPointType = "Custom" + // LatestTag ... + LatestTag RecoveryPointType = "LatestTag" + // LatestTime ... + LatestTime RecoveryPointType = "LatestTime" +) + +// PossibleRecoveryPointTypeValues returns an array of possible values for the RecoveryPointType const type. +func PossibleRecoveryPointTypeValues() []RecoveryPointType { + return []RecoveryPointType{Custom, LatestTag, LatestTime} +} + +// ReplicationProtectedItemOperation enumerates the values for replication protected item operation. +type ReplicationProtectedItemOperation string + +const ( + // ReplicationProtectedItemOperationChangePit ... + ReplicationProtectedItemOperationChangePit ReplicationProtectedItemOperation = "ChangePit" + // ReplicationProtectedItemOperationCommit ... + ReplicationProtectedItemOperationCommit ReplicationProtectedItemOperation = "Commit" + // ReplicationProtectedItemOperationCompleteMigration ... + ReplicationProtectedItemOperationCompleteMigration ReplicationProtectedItemOperation = "CompleteMigration" + // ReplicationProtectedItemOperationDisableProtection ... + ReplicationProtectedItemOperationDisableProtection ReplicationProtectedItemOperation = "DisableProtection" + // ReplicationProtectedItemOperationFailback ... + ReplicationProtectedItemOperationFailback ReplicationProtectedItemOperation = "Failback" + // ReplicationProtectedItemOperationFinalizeFailback ... + ReplicationProtectedItemOperationFinalizeFailback ReplicationProtectedItemOperation = "FinalizeFailback" + // ReplicationProtectedItemOperationPlannedFailover ... + ReplicationProtectedItemOperationPlannedFailover ReplicationProtectedItemOperation = "PlannedFailover" + // ReplicationProtectedItemOperationRepairReplication ... + ReplicationProtectedItemOperationRepairReplication ReplicationProtectedItemOperation = "RepairReplication" + // ReplicationProtectedItemOperationReverseReplicate ... + ReplicationProtectedItemOperationReverseReplicate ReplicationProtectedItemOperation = "ReverseReplicate" + // ReplicationProtectedItemOperationSwitchProtection ... + ReplicationProtectedItemOperationSwitchProtection ReplicationProtectedItemOperation = "SwitchProtection" + // ReplicationProtectedItemOperationTestFailover ... + ReplicationProtectedItemOperationTestFailover ReplicationProtectedItemOperation = "TestFailover" + // ReplicationProtectedItemOperationTestFailoverCleanup ... + ReplicationProtectedItemOperationTestFailoverCleanup ReplicationProtectedItemOperation = "TestFailoverCleanup" + // ReplicationProtectedItemOperationUnplannedFailover ... + ReplicationProtectedItemOperationUnplannedFailover ReplicationProtectedItemOperation = "UnplannedFailover" +) + +// PossibleReplicationProtectedItemOperationValues returns an array of possible values for the ReplicationProtectedItemOperation const type. +func PossibleReplicationProtectedItemOperationValues() []ReplicationProtectedItemOperation { + return []ReplicationProtectedItemOperation{ReplicationProtectedItemOperationChangePit, ReplicationProtectedItemOperationCommit, ReplicationProtectedItemOperationCompleteMigration, ReplicationProtectedItemOperationDisableProtection, ReplicationProtectedItemOperationFailback, ReplicationProtectedItemOperationFinalizeFailback, ReplicationProtectedItemOperationPlannedFailover, ReplicationProtectedItemOperationRepairReplication, ReplicationProtectedItemOperationReverseReplicate, ReplicationProtectedItemOperationSwitchProtection, ReplicationProtectedItemOperationTestFailover, ReplicationProtectedItemOperationTestFailoverCleanup, ReplicationProtectedItemOperationUnplannedFailover} +} + +// RpInMageRecoveryPointType enumerates the values for rp in mage recovery point type. +type RpInMageRecoveryPointType string + +const ( + // RpInMageRecoveryPointTypeCustom ... + RpInMageRecoveryPointTypeCustom RpInMageRecoveryPointType = "Custom" + // RpInMageRecoveryPointTypeLatestTag ... + RpInMageRecoveryPointTypeLatestTag RpInMageRecoveryPointType = "LatestTag" + // RpInMageRecoveryPointTypeLatestTime ... + RpInMageRecoveryPointTypeLatestTime RpInMageRecoveryPointType = "LatestTime" +) + +// PossibleRpInMageRecoveryPointTypeValues returns an array of possible values for the RpInMageRecoveryPointType const type. +func PossibleRpInMageRecoveryPointTypeValues() []RpInMageRecoveryPointType { + return []RpInMageRecoveryPointType{RpInMageRecoveryPointTypeCustom, RpInMageRecoveryPointTypeLatestTag, RpInMageRecoveryPointTypeLatestTime} +} + +// SetMultiVMSyncStatus enumerates the values for set multi vm sync status. +type SetMultiVMSyncStatus string + +const ( + // Disable ... + Disable SetMultiVMSyncStatus = "Disable" + // Enable ... + Enable SetMultiVMSyncStatus = "Enable" +) + +// PossibleSetMultiVMSyncStatusValues returns an array of possible values for the SetMultiVMSyncStatus const type. +func PossibleSetMultiVMSyncStatusValues() []SetMultiVMSyncStatus { + return []SetMultiVMSyncStatus{Disable, Enable} +} + +// Severity enumerates the values for severity. +type Severity string + +const ( + // Error ... + Error Severity = "Error" + // Info ... + Info Severity = "Info" + // NONE ... + NONE Severity = "NONE" + // Warning ... + Warning Severity = "Warning" +) + +// PossibleSeverityValues returns an array of possible values for the Severity const type. +func PossibleSeverityValues() []Severity { + return []Severity{Error, Info, NONE, Warning} +} + +// SourceSiteOperations enumerates the values for source site operations. +type SourceSiteOperations string + +const ( + // NotRequired ... + NotRequired SourceSiteOperations = "NotRequired" + // Required ... + Required SourceSiteOperations = "Required" +) + +// PossibleSourceSiteOperationsValues returns an array of possible values for the SourceSiteOperations const type. +func PossibleSourceSiteOperationsValues() []SourceSiteOperations { + return []SourceSiteOperations{NotRequired, Required} +} + +// TestMigrationState enumerates the values for test migration state. +type TestMigrationState string + +const ( + // TestMigrationStateNone ... + TestMigrationStateNone TestMigrationState = "None" + // TestMigrationStateTestMigrationCleanupInProgress ... + TestMigrationStateTestMigrationCleanupInProgress TestMigrationState = "TestMigrationCleanupInProgress" + // TestMigrationStateTestMigrationFailed ... + TestMigrationStateTestMigrationFailed TestMigrationState = "TestMigrationFailed" + // TestMigrationStateTestMigrationInProgress ... + TestMigrationStateTestMigrationInProgress TestMigrationState = "TestMigrationInProgress" + // TestMigrationStateTestMigrationSucceeded ... + TestMigrationStateTestMigrationSucceeded TestMigrationState = "TestMigrationSucceeded" +) + +// PossibleTestMigrationStateValues returns an array of possible values for the TestMigrationState const type. +func PossibleTestMigrationStateValues() []TestMigrationState { + return []TestMigrationState{TestMigrationStateNone, TestMigrationStateTestMigrationCleanupInProgress, TestMigrationStateTestMigrationFailed, TestMigrationStateTestMigrationInProgress, TestMigrationStateTestMigrationSucceeded} +} + +// VMEncryptionType enumerates the values for vm encryption type. +type VMEncryptionType string + +const ( + // NotEncrypted ... + NotEncrypted VMEncryptionType = "NotEncrypted" + // OnePassEncrypted ... + OnePassEncrypted VMEncryptionType = "OnePassEncrypted" + // TwoPassEncrypted ... + TwoPassEncrypted VMEncryptionType = "TwoPassEncrypted" +) + +// PossibleVMEncryptionTypeValues returns an array of possible values for the VMEncryptionType const type. +func PossibleVMEncryptionTypeValues() []VMEncryptionType { + return []VMEncryptionType{NotEncrypted, OnePassEncrypted, TwoPassEncrypted} +} + +// A2AAddDisksInput a2A add disk(s) input. +type A2AAddDisksInput struct { + // VMDisks - The list of vm disk details. + VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + // VMManagedDisks - The list of vm managed disk details. + VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeAddDisksProviderSpecificInput', 'InstanceTypeA2A' + InstanceType InstanceType `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AAddDisksInput. +func (aadi A2AAddDisksInput) MarshalJSON() ([]byte, error) { + aadi.InstanceType = InstanceTypeA2A + objectMap := make(map[string]interface{}) + if aadi.VMDisks != nil { + objectMap["vmDisks"] = aadi.VMDisks + } + if aadi.VMManagedDisks != nil { + objectMap["vmManagedDisks"] = aadi.VMManagedDisks + } + if aadi.InstanceType != "" { + objectMap["instanceType"] = aadi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AAddDisksInput is the BasicAddDisksProviderSpecificInput implementation for A2AAddDisksInput. +func (aadi A2AAddDisksInput) AsA2AAddDisksInput() (*A2AAddDisksInput, bool) { + return &aadi, true +} + +// AsAddDisksProviderSpecificInput is the BasicAddDisksProviderSpecificInput implementation for A2AAddDisksInput. +func (aadi A2AAddDisksInput) AsAddDisksProviderSpecificInput() (*AddDisksProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicAddDisksProviderSpecificInput is the BasicAddDisksProviderSpecificInput implementation for A2AAddDisksInput. +func (aadi A2AAddDisksInput) AsBasicAddDisksProviderSpecificInput() (BasicAddDisksProviderSpecificInput, bool) { + return &aadi, true +} + +// A2AApplyRecoveryPointInput applyRecoveryPoint input specific to A2A provider. +type A2AApplyRecoveryPointInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + aarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if aarpi.InstanceType != "" { + objectMap["instanceType"] = aarpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { + return &aarpi, true +} + +// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { + return &aarpi, true +} + +// A2AContainerCreationInput a2A cloud creation input. +type A2AContainerCreationInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero' + InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AContainerCreationInput. +func (acci A2AContainerCreationInput) MarshalJSON() ([]byte, error) { + acci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if acci.InstanceType != "" { + objectMap["instanceType"] = acci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. +func (acci A2AContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { + return &acci, true +} + +// AsVMwareCbtContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. +func (acci A2AContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) { + return nil, false +} + +// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. +func (acci A2AContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. +func (acci A2AContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { + return &acci, true +} + +// A2AContainerMappingInput a2A container mapping input. +type A2AContainerMappingInput struct { + // AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' + AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` + // AutomationAccountArmID - The automation account arm id. + AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AContainerMappingInput. +func (acmi A2AContainerMappingInput) MarshalJSON() ([]byte, error) { + acmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if acmi.AgentAutoUpdateStatus != "" { + objectMap["agentAutoUpdateStatus"] = acmi.AgentAutoUpdateStatus + } + if acmi.AutomationAccountArmID != nil { + objectMap["automationAccountArmId"] = acmi.AutomationAccountArmID + } + if acmi.InstanceType != "" { + objectMap["instanceType"] = acmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. +func (acmi A2AContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) { + return &acmi, true +} + +// AsVMwareCbtContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. +func (acmi A2AContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) { + return nil, false +} + +// AsReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. +func (acmi A2AContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for A2AContainerMappingInput. +func (acmi A2AContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) { + return &acmi, true +} + +// A2AEnableProtectionInput a2A enable protection input. +type A2AEnableProtectionInput struct { + // FabricObjectID - The fabric specific object Id of the virtual machine. + FabricObjectID *string `json:"fabricObjectId,omitempty"` + // RecoveryContainerID - The recovery container Id. + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` + // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + // RecoveryAvailabilitySetID - The recovery availability set Id. + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + // VMDisks - The list of vm disk details. + VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + // VMManagedDisks - The list of vm managed disk details. + VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` + // MultiVMGroupName - The multi vm group name. + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + // RecoveryBootDiagStorageAccountID - The boot diagnostic storage account. + RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` + // DiskEncryptionInfo - The recovery disk encryption information. + DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` + // RecoveryAvailabilityZone - The recovery availability zone. + RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` + // RecoveryAzureNetworkID - The recovery Azure virtual network ARM id. + RecoveryAzureNetworkID *string `json:"recoveryAzureNetworkId,omitempty"` + // RecoverySubnetName - The recovery subnet name. + RecoverySubnetName *string `json:"recoverySubnetName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' + InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { + aepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if aepi.FabricObjectID != nil { + objectMap["fabricObjectId"] = aepi.FabricObjectID + } + if aepi.RecoveryContainerID != nil { + objectMap["recoveryContainerId"] = aepi.RecoveryContainerID + } + if aepi.RecoveryResourceGroupID != nil { + objectMap["recoveryResourceGroupId"] = aepi.RecoveryResourceGroupID + } + if aepi.RecoveryCloudServiceID != nil { + objectMap["recoveryCloudServiceId"] = aepi.RecoveryCloudServiceID + } + if aepi.RecoveryAvailabilitySetID != nil { + objectMap["recoveryAvailabilitySetId"] = aepi.RecoveryAvailabilitySetID + } + if aepi.VMDisks != nil { + objectMap["vmDisks"] = aepi.VMDisks + } + if aepi.VMManagedDisks != nil { + objectMap["vmManagedDisks"] = aepi.VMManagedDisks + } + if aepi.MultiVMGroupName != nil { + objectMap["multiVmGroupName"] = aepi.MultiVMGroupName + } + if aepi.RecoveryBootDiagStorageAccountID != nil { + objectMap["recoveryBootDiagStorageAccountId"] = aepi.RecoveryBootDiagStorageAccountID + } + if aepi.DiskEncryptionInfo != nil { + objectMap["diskEncryptionInfo"] = aepi.DiskEncryptionInfo + } + if aepi.RecoveryAvailabilityZone != nil { + objectMap["recoveryAvailabilityZone"] = aepi.RecoveryAvailabilityZone + } + if aepi.RecoveryAzureNetworkID != nil { + objectMap["recoveryAzureNetworkId"] = aepi.RecoveryAzureNetworkID + } + if aepi.RecoverySubnetName != nil { + objectMap["recoverySubnetName"] = aepi.RecoverySubnetName + } + if aepi.InstanceType != "" { + objectMap["instanceType"] = aepi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return &aepi, true +} + +// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { + return &aepi, true +} + +// A2AEventDetails model class for event details of a A2A event. +type A2AEventDetails struct { + // ProtectedItemName - The protected item arm name. + ProtectedItemName *string `json:"protectedItemName,omitempty"` + // FabricObjectID - The azure vm arm id. + FabricObjectID *string `json:"fabricObjectId,omitempty"` + // FabricName - Fabric arm name. + FabricName *string `json:"fabricName,omitempty"` + // FabricLocation - The fabric location. + FabricLocation *string `json:"fabricLocation,omitempty"` + // RemoteFabricName - Remote fabric arm name. + RemoteFabricName *string `json:"remoteFabricName,omitempty"` + // RemoteFabricLocation - Remote fabric location. + RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AEventDetails. +func (aed A2AEventDetails) MarshalJSON() ([]byte, error) { + aed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A + objectMap := make(map[string]interface{}) + if aed.ProtectedItemName != nil { + objectMap["protectedItemName"] = aed.ProtectedItemName + } + if aed.FabricObjectID != nil { + objectMap["fabricObjectId"] = aed.FabricObjectID + } + if aed.FabricName != nil { + objectMap["fabricName"] = aed.FabricName + } + if aed.FabricLocation != nil { + objectMap["fabricLocation"] = aed.FabricLocation + } + if aed.RemoteFabricName != nil { + objectMap["remoteFabricName"] = aed.RemoteFabricName + } + if aed.RemoteFabricLocation != nil { + objectMap["remoteFabricLocation"] = aed.RemoteFabricLocation + } + if aed.InstanceType != "" { + objectMap["instanceType"] = aed.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return &aed, true +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &aed, true +} + +// A2AFailoverProviderInput a2A provider specific input for failover. +type A2AFailoverProviderInput struct { + // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // CloudServiceCreationOption - A value indicating whether to use recovery cloud service for TFO or not. + CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) MarshalJSON() ([]byte, error) { + afpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if afpi.RecoveryPointID != nil { + objectMap["recoveryPointId"] = afpi.RecoveryPointID + } + if afpi.CloudServiceCreationOption != nil { + objectMap["cloudServiceCreationOption"] = afpi.CloudServiceCreationOption + } + if afpi.InstanceType != "" { + objectMap["instanceType"] = afpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return &afpi, true +} + +// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { + return &afpi, true +} + +// A2APolicyCreationInput a2A Policy creation input. +type A2APolicyCreationInput struct { + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' + MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) MarshalJSON() ([]byte, error) { + apci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if apci.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = apci.RecoveryPointHistory + } + if apci.CrashConsistentFrequencyInMinutes != nil { + objectMap["crashConsistentFrequencyInMinutes"] = apci.CrashConsistentFrequencyInMinutes + } + if apci.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = apci.AppConsistentFrequencyInMinutes + } + if apci.MultiVMSyncStatus != "" { + objectMap["multiVmSyncStatus"] = apci.MultiVMSyncStatus + } + if apci.InstanceType != "" { + objectMap["instanceType"] = apci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return &apci, true +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &apci, true +} + +// A2APolicyDetails a2A specific policy details. +type A2APolicyDetails struct { + // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2APolicyDetails. +func (apd A2APolicyDetails) MarshalJSON() ([]byte, error) { + apd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A + objectMap := make(map[string]interface{}) + if apd.RecoveryPointThresholdInMinutes != nil { + objectMap["recoveryPointThresholdInMinutes"] = apd.RecoveryPointThresholdInMinutes + } + if apd.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = apd.RecoveryPointHistory + } + if apd.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = apd.AppConsistentFrequencyInMinutes + } + if apd.MultiVMSyncStatus != nil { + objectMap["multiVmSyncStatus"] = apd.MultiVMSyncStatus + } + if apd.CrashConsistentFrequencyInMinutes != nil { + objectMap["crashConsistentFrequencyInMinutes"] = apd.CrashConsistentFrequencyInMinutes + } + if apd.InstanceType != "" { + objectMap["instanceType"] = apd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return &apd, true +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &apd, true +} + +// A2AProtectedDiskDetails a2A protected disk details. +type A2AProtectedDiskDetails struct { + // DiskURI - The disk uri. + DiskURI *string `json:"diskUri,omitempty"` + // RecoveryAzureStorageAccountID - The recovery disk storage account. + RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` + // PrimaryDiskAzureStorageAccountID - The primary disk storage account. + PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"` + // RecoveryDiskURI - Recovery disk uri. + RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"` + // DiskName - The disk name. + DiskName *string `json:"diskName,omitempty"` + // DiskCapacityInBytes - The disk capacity in bytes. + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + // PrimaryStagingAzureStorageAccountID - The primary staging storage account. + PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` + // DiskType - The type of disk. + DiskType *string `json:"diskType,omitempty"` + // ResyncRequired - A value indicating whether resync is required for this disk. + ResyncRequired *bool `json:"resyncRequired,omitempty"` + // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` + // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + MonitoringJobType *string `json:"monitoringJobType,omitempty"` + // DataPendingInStagingStorageAccountInMB - The data pending for replication in MB at staging account. + DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` + // DataPendingAtSourceAgentInMB - The data pending at source virtual machine in MB. + DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` + // DiskState - The disk state. + DiskState *string `json:"diskState,omitempty"` + // AllowedDiskLevelOperation - The disk level operations list. + AllowedDiskLevelOperation *[]string `json:"allowedDiskLevelOperation,omitempty"` + // IsDiskEncrypted - A value indicating whether vm has encrypted os disk or not. + IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"` + // SecretIdentifier - The secret URL / identifier (BEK). + SecretIdentifier *string `json:"secretIdentifier,omitempty"` + // DekKeyVaultArmID - The KeyVault resource id for secret (BEK). + DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"` + // IsDiskKeyEncrypted - A value indicating whether disk key got encrypted or not. + IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"` + // KeyIdentifier - The key URL / identifier (KEK). + KeyIdentifier *string `json:"keyIdentifier,omitempty"` + // KekKeyVaultArmID - The KeyVault resource id for key (KEK). + KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"` +} + +// A2AProtectedManagedDiskDetails a2A protected managed disk details. +type A2AProtectedManagedDiskDetails struct { + // DiskID - The managed disk Arm id. + DiskID *string `json:"diskId,omitempty"` + // RecoveryResourceGroupID - The recovery disk resource group Arm Id. + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + // RecoveryTargetDiskID - Recovery target disk Arm Id. + RecoveryTargetDiskID *string `json:"recoveryTargetDiskId,omitempty"` + // RecoveryReplicaDiskID - Recovery replica disk Arm Id. + RecoveryReplicaDiskID *string `json:"recoveryReplicaDiskId,omitempty"` + // RecoveryReplicaDiskAccountType - The replica disk type. Its an optional value and will be same as source disk type if not user provided. + RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` + // RecoveryTargetDiskAccountType - The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. + RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` + // DiskName - The disk name. + DiskName *string `json:"diskName,omitempty"` + // DiskCapacityInBytes - The disk capacity in bytes. + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + // PrimaryStagingAzureStorageAccountID - The primary staging storage account. + PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` + // DiskType - The type of disk. + DiskType *string `json:"diskType,omitempty"` + // ResyncRequired - A value indicating whether resync is required for this disk. + ResyncRequired *bool `json:"resyncRequired,omitempty"` + // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` + // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + MonitoringJobType *string `json:"monitoringJobType,omitempty"` + // DataPendingInStagingStorageAccountInMB - The data pending for replication in MB at staging account. + DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` + // DataPendingAtSourceAgentInMB - The data pending at source virtual machine in MB. + DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` + // DiskState - The disk state. + DiskState *string `json:"diskState,omitempty"` + // AllowedDiskLevelOperation - The disk level operations list. + AllowedDiskLevelOperation *[]string `json:"allowedDiskLevelOperation,omitempty"` + // IsDiskEncrypted - A value indicating whether vm has encrypted os disk or not. + IsDiskEncrypted *bool `json:"isDiskEncrypted,omitempty"` + // SecretIdentifier - The secret URL / identifier (BEK). + SecretIdentifier *string `json:"secretIdentifier,omitempty"` + // DekKeyVaultArmID - The KeyVault resource id for secret (BEK). + DekKeyVaultArmID *string `json:"dekKeyVaultArmId,omitempty"` + // IsDiskKeyEncrypted - A value indicating whether disk key got encrypted or not. + IsDiskKeyEncrypted *bool `json:"isDiskKeyEncrypted,omitempty"` + // KeyIdentifier - The key URL / identifier (KEK). + KeyIdentifier *string `json:"keyIdentifier,omitempty"` + // KekKeyVaultArmID - The KeyVault resource id for key (KEK). + KekKeyVaultArmID *string `json:"kekKeyVaultArmId,omitempty"` +} + +// A2AProtectionContainerMappingDetails a2A provider specific settings. +type A2AProtectionContainerMappingDetails struct { + // AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' + AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` + // AutomationAccountArmID - The automation account arm id. + AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` + // ScheduleName - The schedule arm name. + ScheduleName *string `json:"scheduleName,omitempty"` + // JobScheduleName - The job schedule arm name. + JobScheduleName *string `json:"jobScheduleName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AProtectionContainerMappingDetails. +func (apcmd A2AProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { + apcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A + objectMap := make(map[string]interface{}) + if apcmd.AgentAutoUpdateStatus != "" { + objectMap["agentAutoUpdateStatus"] = apcmd.AgentAutoUpdateStatus + } + if apcmd.AutomationAccountArmID != nil { + objectMap["automationAccountArmId"] = apcmd.AutomationAccountArmID + } + if apcmd.ScheduleName != nil { + objectMap["scheduleName"] = apcmd.ScheduleName + } + if apcmd.JobScheduleName != nil { + objectMap["jobScheduleName"] = apcmd.JobScheduleName + } + if apcmd.InstanceType != "" { + objectMap["instanceType"] = apcmd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. +func (apcmd A2AProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) { + return &apcmd, true +} + +// AsVMwareCbtProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. +func (apcmd A2AProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) { + return nil, false +} + +// AsProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. +func (apcmd A2AProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for A2AProtectionContainerMappingDetails. +func (apcmd A2AProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) { + return &apcmd, true +} + +// A2ARecoveryPointDetails a2A provider specific recovery point details. +type A2ARecoveryPointDetails struct { + // RecoveryPointSyncType - A value indicating whether the recovery point is multi VM consistent. Possible values include: 'MultiVMSyncRecoveryPoint', 'PerVMRecoveryPoint' + RecoveryPointSyncType RecoveryPointSyncType `json:"recoveryPointSyncType,omitempty"` + // Disks - List of disk ids representing a recovery point. + Disks *[]string `json:"disks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2ARecoveryPointDetails. +func (arpd A2ARecoveryPointDetails) MarshalJSON() ([]byte, error) { + arpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A + objectMap := make(map[string]interface{}) + if arpd.RecoveryPointSyncType != "" { + objectMap["recoveryPointSyncType"] = arpd.RecoveryPointSyncType + } + if arpd.Disks != nil { + objectMap["disks"] = arpd.Disks + } + if arpd.InstanceType != "" { + objectMap["instanceType"] = arpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2ARecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. +func (arpd A2ARecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) { + return &arpd, true +} + +// AsInMageAzureV2RecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. +func (arpd A2ARecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) { + return nil, false +} + +// AsProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. +func (arpd A2ARecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) { + return nil, false +} + +// AsBasicProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for A2ARecoveryPointDetails. +func (arpd A2ARecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) { + return &arpd, true +} + +// A2ARemoveDisksInput a2A remove disk(s) input. +type A2ARemoveDisksInput struct { + // VMDisksUris - The list of vm disk vhd URIs. + VMDisksUris *[]string `json:"vmDisksUris,omitempty"` + // VMManagedDisksIds - The list of vm managed disk Ids. + VMManagedDisksIds *[]string `json:"vmManagedDisksIds,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput', 'InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A' + InstanceType InstanceTypeBasicRemoveDisksProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2ARemoveDisksInput. +func (ardi A2ARemoveDisksInput) MarshalJSON() ([]byte, error) { + ardi.InstanceType = InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if ardi.VMDisksUris != nil { + objectMap["vmDisksUris"] = ardi.VMDisksUris + } + if ardi.VMManagedDisksIds != nil { + objectMap["vmManagedDisksIds"] = ardi.VMManagedDisksIds + } + if ardi.InstanceType != "" { + objectMap["instanceType"] = ardi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2ARemoveDisksInput is the BasicRemoveDisksProviderSpecificInput implementation for A2ARemoveDisksInput. +func (ardi A2ARemoveDisksInput) AsA2ARemoveDisksInput() (*A2ARemoveDisksInput, bool) { + return &ardi, true +} + +// AsRemoveDisksProviderSpecificInput is the BasicRemoveDisksProviderSpecificInput implementation for A2ARemoveDisksInput. +func (ardi A2ARemoveDisksInput) AsRemoveDisksProviderSpecificInput() (*RemoveDisksProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicRemoveDisksProviderSpecificInput is the BasicRemoveDisksProviderSpecificInput implementation for A2ARemoveDisksInput. +func (ardi A2ARemoveDisksInput) AsBasicRemoveDisksProviderSpecificInput() (BasicRemoveDisksProviderSpecificInput, bool) { + return &ardi, true +} + +// A2AReplicationDetails a2A provider specific settings. +type A2AReplicationDetails struct { + // FabricObjectID - The fabric specific object Id of the virtual machine. + FabricObjectID *string `json:"fabricObjectId,omitempty"` + // InitialPrimaryFabricLocation - READ-ONLY; The initial primary fabric location. + InitialPrimaryFabricLocation *string `json:"initialPrimaryFabricLocation,omitempty"` + // InitialRecoveryFabricLocation - READ-ONLY; The initial recovery fabric location. + InitialRecoveryFabricLocation *string `json:"initialRecoveryFabricLocation,omitempty"` + // MultiVMGroupID - The multi vm group Id. + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + // MultiVMGroupName - The multi vm group name. + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + // MultiVMGroupCreateOption - Whether Multi VM group is auto created or specified by user. Possible values include: 'AutoCreated', 'UserSpecified' + MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"` + // ManagementID - The management Id. + ManagementID *string `json:"managementId,omitempty"` + // ProtectedDisks - The list of protected disks. + ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"` + // UnprotectedDisks - The list of unprotected disks. + UnprotectedDisks *[]A2AUnprotectedDiskDetails `json:"unprotectedDisks,omitempty"` + // ProtectedManagedDisks - The list of protected managed disks. + ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"` + // RecoveryBootDiagStorageAccountID - The recovery boot diagnostic storage account Arm Id. + RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` + // PrimaryFabricLocation - Primary fabric location. + PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` + // RecoveryFabricLocation - The recovery fabric location. + RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` + // OsType - The type of operating system. + OsType *string `json:"osType,omitempty"` + // RecoveryAzureVMSize - The size of recovery virtual machine. + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + // RecoveryAzureVMName - The name of recovery virtual machine. + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + // RecoveryAzureResourceGroupID - The recovery resource group. + RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` + // RecoveryCloudService - The recovery cloud service. + RecoveryCloudService *string `json:"recoveryCloudService,omitempty"` + // RecoveryAvailabilitySet - The recovery availability set. + RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` + // SelectedRecoveryAzureNetworkID - The recovery virtual network. + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + // VMNics - The virtual machine nic details. + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + // VMSyncedConfigDetails - The synced configuration details. + VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` + // MonitoringPercentageCompletion - The percentage of the monitoring job. The type of the monitoring job is defined by MonitoringJobType property. + MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` + // MonitoringJobType - The type of the monitoring job. The progress is contained in MonitoringPercentageCompletion property. + MonitoringJobType *string `json:"monitoringJobType,omitempty"` + // LastHeartbeat - The last heartbeat received from the source server. + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + // AgentVersion - The agent version. + AgentVersion *string `json:"agentVersion,omitempty"` + // IsReplicationAgentUpdateRequired - A value indicating whether replication agent update is required. + IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"` + // RecoveryFabricObjectID - The recovery fabric object Id. + RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"` + // VMProtectionState - The protection state for the vm. + VMProtectionState *string `json:"vmProtectionState,omitempty"` + // VMProtectionStateDescription - The protection state description for the vm. + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + // LifecycleID - An id associated with the PE that survives actions like switch protection which change the backing PE/CPE objects internally.The lifecycle id gets carried forward to have a link/continuity in being able to have an Id that denotes the "same" protected item even though other internal Ids/ARM Id might be changing. + LifecycleID *string `json:"lifecycleId,omitempty"` + // TestFailoverRecoveryFabricObjectID - The test failover fabric object Id. + TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"` + // RpoInSeconds - The last RPO value in seconds. + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + // LastRpoCalculatedTime - The time (in UTC) when the last RPO value was calculated by Protection Service. + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` + // RecoveryAvailabilityZone - The recovery availability zone. + RecoveryAvailabilityZone *string `json:"recoveryAvailabilityZone,omitempty"` + // VMEncryptionType - READ-ONLY; The encryption type of the VM. Possible values include: 'NotEncrypted', 'OnePassEncrypted', 'TwoPassEncrypted' + VMEncryptionType VMEncryptionType `json:"vmEncryptionType,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AReplicationDetails. +func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) { + ard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A + objectMap := make(map[string]interface{}) + if ard.FabricObjectID != nil { + objectMap["fabricObjectId"] = ard.FabricObjectID + } + if ard.MultiVMGroupID != nil { + objectMap["multiVmGroupId"] = ard.MultiVMGroupID + } + if ard.MultiVMGroupName != nil { + objectMap["multiVmGroupName"] = ard.MultiVMGroupName + } + if ard.MultiVMGroupCreateOption != "" { + objectMap["multiVmGroupCreateOption"] = ard.MultiVMGroupCreateOption + } + if ard.ManagementID != nil { + objectMap["managementId"] = ard.ManagementID + } + if ard.ProtectedDisks != nil { + objectMap["protectedDisks"] = ard.ProtectedDisks + } + if ard.UnprotectedDisks != nil { + objectMap["unprotectedDisks"] = ard.UnprotectedDisks + } + if ard.ProtectedManagedDisks != nil { + objectMap["protectedManagedDisks"] = ard.ProtectedManagedDisks + } + if ard.RecoveryBootDiagStorageAccountID != nil { + objectMap["recoveryBootDiagStorageAccountId"] = ard.RecoveryBootDiagStorageAccountID + } + if ard.PrimaryFabricLocation != nil { + objectMap["primaryFabricLocation"] = ard.PrimaryFabricLocation + } + if ard.RecoveryFabricLocation != nil { + objectMap["recoveryFabricLocation"] = ard.RecoveryFabricLocation + } + if ard.OsType != nil { + objectMap["osType"] = ard.OsType + } + if ard.RecoveryAzureVMSize != nil { + objectMap["recoveryAzureVMSize"] = ard.RecoveryAzureVMSize + } + if ard.RecoveryAzureVMName != nil { + objectMap["recoveryAzureVMName"] = ard.RecoveryAzureVMName + } + if ard.RecoveryAzureResourceGroupID != nil { + objectMap["recoveryAzureResourceGroupId"] = ard.RecoveryAzureResourceGroupID + } + if ard.RecoveryCloudService != nil { + objectMap["recoveryCloudService"] = ard.RecoveryCloudService + } + if ard.RecoveryAvailabilitySet != nil { + objectMap["recoveryAvailabilitySet"] = ard.RecoveryAvailabilitySet + } + if ard.SelectedRecoveryAzureNetworkID != nil { + objectMap["selectedRecoveryAzureNetworkId"] = ard.SelectedRecoveryAzureNetworkID + } + if ard.VMNics != nil { + objectMap["vmNics"] = ard.VMNics + } + if ard.VMSyncedConfigDetails != nil { + objectMap["vmSyncedConfigDetails"] = ard.VMSyncedConfigDetails + } + if ard.MonitoringPercentageCompletion != nil { + objectMap["monitoringPercentageCompletion"] = ard.MonitoringPercentageCompletion + } + if ard.MonitoringJobType != nil { + objectMap["monitoringJobType"] = ard.MonitoringJobType + } + if ard.LastHeartbeat != nil { + objectMap["lastHeartbeat"] = ard.LastHeartbeat + } + if ard.AgentVersion != nil { + objectMap["agentVersion"] = ard.AgentVersion + } + if ard.IsReplicationAgentUpdateRequired != nil { + objectMap["isReplicationAgentUpdateRequired"] = ard.IsReplicationAgentUpdateRequired + } + if ard.RecoveryFabricObjectID != nil { + objectMap["recoveryFabricObjectId"] = ard.RecoveryFabricObjectID + } + if ard.VMProtectionState != nil { + objectMap["vmProtectionState"] = ard.VMProtectionState + } + if ard.VMProtectionStateDescription != nil { + objectMap["vmProtectionStateDescription"] = ard.VMProtectionStateDescription + } + if ard.LifecycleID != nil { + objectMap["lifecycleId"] = ard.LifecycleID + } + if ard.TestFailoverRecoveryFabricObjectID != nil { + objectMap["testFailoverRecoveryFabricObjectId"] = ard.TestFailoverRecoveryFabricObjectID + } + if ard.RpoInSeconds != nil { + objectMap["rpoInSeconds"] = ard.RpoInSeconds + } + if ard.LastRpoCalculatedTime != nil { + objectMap["lastRpoCalculatedTime"] = ard.LastRpoCalculatedTime + } + if ard.RecoveryAvailabilityZone != nil { + objectMap["recoveryAvailabilityZone"] = ard.RecoveryAvailabilityZone + } + if ard.InstanceType != "" { + objectMap["instanceType"] = ard.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return &ard, true +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &ard, true +} + +// A2AReprotectInput azure specific reprotect input. +type A2AReprotectInput struct { + // RecoveryContainerID - The recovery container Id. + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` + // VMDisks - The list of vm disk details. + VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + // RecoveryAvailabilitySetID - The recovery availability set. + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + // PolicyID - The Policy Id. + PolicyID *string `json:"policyId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' + InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AReprotectInput. +func (ari A2AReprotectInput) MarshalJSON() ([]byte, error) { + ari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if ari.RecoveryContainerID != nil { + objectMap["recoveryContainerId"] = ari.RecoveryContainerID + } + if ari.VMDisks != nil { + objectMap["vmDisks"] = ari.VMDisks + } + if ari.RecoveryResourceGroupID != nil { + objectMap["recoveryResourceGroupId"] = ari.RecoveryResourceGroupID + } + if ari.RecoveryCloudServiceID != nil { + objectMap["recoveryCloudServiceId"] = ari.RecoveryCloudServiceID + } + if ari.RecoveryAvailabilitySetID != nil { + objectMap["recoveryAvailabilitySetId"] = ari.RecoveryAvailabilitySetID + } + if ari.PolicyID != nil { + objectMap["policyId"] = ari.PolicyID + } + if ari.InstanceType != "" { + objectMap["instanceType"] = ari.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return &ari, true +} + +// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return nil, false +} + +// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return nil, false +} + +// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return nil, false +} + +// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { + return &ari, true +} + +// A2ASwitchProtectionInput a2A specific switch protection input. +type A2ASwitchProtectionInput struct { + // RecoveryContainerID - The recovery container Id. + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` + // VMDisks - The list of vm disk details. + VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + // VMManagedDisks - The list of vm managed disk details. + VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` + // RecoveryResourceGroupID - The recovery resource group Id. Valid for V2 scenarios. + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + // RecoveryCloudServiceID - The recovery cloud service Id. Valid for V1 scenarios. + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + // RecoveryAvailabilitySetID - The recovery availability set. + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + // PolicyID - The Policy Id. + PolicyID *string `json:"policyId,omitempty"` + // RecoveryBootDiagStorageAccountID - The boot diagnostic storage account. + RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` + // DiskEncryptionInfo - The recovery disk encryption information. + DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput', 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A' + InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2ASwitchProtectionInput. +func (aspi A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { + aspi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if aspi.RecoveryContainerID != nil { + objectMap["recoveryContainerId"] = aspi.RecoveryContainerID + } + if aspi.VMDisks != nil { + objectMap["vmDisks"] = aspi.VMDisks + } + if aspi.VMManagedDisks != nil { + objectMap["vmManagedDisks"] = aspi.VMManagedDisks + } + if aspi.RecoveryResourceGroupID != nil { + objectMap["recoveryResourceGroupId"] = aspi.RecoveryResourceGroupID + } + if aspi.RecoveryCloudServiceID != nil { + objectMap["recoveryCloudServiceId"] = aspi.RecoveryCloudServiceID + } + if aspi.RecoveryAvailabilitySetID != nil { + objectMap["recoveryAvailabilitySetId"] = aspi.RecoveryAvailabilitySetID + } + if aspi.PolicyID != nil { + objectMap["policyId"] = aspi.PolicyID + } + if aspi.RecoveryBootDiagStorageAccountID != nil { + objectMap["recoveryBootDiagStorageAccountId"] = aspi.RecoveryBootDiagStorageAccountID + } + if aspi.DiskEncryptionInfo != nil { + objectMap["diskEncryptionInfo"] = aspi.DiskEncryptionInfo + } + if aspi.InstanceType != "" { + objectMap["instanceType"] = aspi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2ASwitchProtectionInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. +func (aspi A2ASwitchProtectionInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) { + return &aspi, true +} + +// AsSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. +func (aspi A2ASwitchProtectionInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. +func (aspi A2ASwitchProtectionInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) { + return &aspi, true +} + +// A2AUnprotectedDiskDetails a2A unprotected disk details. +type A2AUnprotectedDiskDetails struct { + // DiskLunID - The source lun Id for the data disk. + DiskLunID *int32 `json:"diskLunId,omitempty"` +} + +// A2AUpdateContainerMappingInput a2A update protection container mapping. +type A2AUpdateContainerMappingInput struct { + // AgentAutoUpdateStatus - A value indicating whether the auto update is enabled. Possible values include: 'Disabled', 'Enabled' + AgentAutoUpdateStatus AgentAutoUpdateStatus `json:"agentAutoUpdateStatus,omitempty"` + // AutomationAccountArmID - The automation account arm id. + AutomationAccountArmID *string `json:"automationAccountArmId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A' + InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AUpdateContainerMappingInput. +func (aucmi A2AUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { + aucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if aucmi.AgentAutoUpdateStatus != "" { + objectMap["agentAutoUpdateStatus"] = aucmi.AgentAutoUpdateStatus + } + if aucmi.AutomationAccountArmID != nil { + objectMap["automationAccountArmId"] = aucmi.AutomationAccountArmID + } + if aucmi.InstanceType != "" { + objectMap["instanceType"] = aucmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for A2AUpdateContainerMappingInput. +func (aucmi A2AUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) { + return &aucmi, true +} + +// AsReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for A2AUpdateContainerMappingInput. +func (aucmi A2AUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for A2AUpdateContainerMappingInput. +func (aucmi A2AUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) { + return &aucmi, true +} + +// A2AUpdateReplicationProtectedItemInput inMage Azure V2 input to update replication protected item. +type A2AUpdateReplicationProtectedItemInput struct { + // RecoveryCloudServiceID - The target cloud service ARM Id (for V1). + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + // RecoveryResourceGroupID - The target resource group ARM Id (for V2). + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + // ManagedDiskUpdateDetails - Managed disk update details. + ManagedDiskUpdateDetails *[]A2AVMManagedDiskUpdateDetails `json:"managedDiskUpdateDetails,omitempty"` + // RecoveryBootDiagStorageAccountID - The boot diagnostic storage account. + RecoveryBootDiagStorageAccountID *string `json:"recoveryBootDiagStorageAccountId,omitempty"` + // DiskEncryptionInfo - The recovery os disk encryption information. + DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + aurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if aurpii.RecoveryCloudServiceID != nil { + objectMap["recoveryCloudServiceId"] = aurpii.RecoveryCloudServiceID + } + if aurpii.RecoveryResourceGroupID != nil { + objectMap["recoveryResourceGroupId"] = aurpii.RecoveryResourceGroupID + } + if aurpii.ManagedDiskUpdateDetails != nil { + objectMap["managedDiskUpdateDetails"] = aurpii.ManagedDiskUpdateDetails + } + if aurpii.RecoveryBootDiagStorageAccountID != nil { + objectMap["recoveryBootDiagStorageAccountId"] = aurpii.RecoveryBootDiagStorageAccountID + } + if aurpii.DiskEncryptionInfo != nil { + objectMap["diskEncryptionInfo"] = aurpii.DiskEncryptionInfo + } + if aurpii.InstanceType != "" { + objectMap["instanceType"] = aurpii.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { + return &aurpii, true +} + +// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { + return nil, false +} + +// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { + return &aurpii, true +} + +// A2AVMDiskInputDetails azure VM disk input details. +type A2AVMDiskInputDetails struct { + // DiskURI - The disk Uri. + DiskURI *string `json:"diskUri,omitempty"` + // RecoveryAzureStorageAccountID - The recovery VHD storage account Id. + RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` + // PrimaryStagingAzureStorageAccountID - The primary staging storage account Id. + PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` +} + +// A2AVMManagedDiskInputDetails azure VM managed disk input details. +type A2AVMManagedDiskInputDetails struct { + // DiskID - The disk Id. + DiskID *string `json:"diskId,omitempty"` + // PrimaryStagingAzureStorageAccountID - The primary staging storage account Arm Id. + PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` + // RecoveryResourceGroupID - The target resource group Arm Id. + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + // RecoveryReplicaDiskAccountType - The replica disk type. Its an optional value and will be same as source disk type if not user provided. + RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` + // RecoveryTargetDiskAccountType - The target disk type after failover. Its an optional value and will be same as source disk type if not user provided. + RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` + // DiskEncryptionInfo - The recovery disk encryption information (for one / single pass flows). + DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` +} + +// A2AVMManagedDiskUpdateDetails azure VM managed disk update input details. +type A2AVMManagedDiskUpdateDetails struct { + // DiskID - The disk Id. + DiskID *string `json:"diskId,omitempty"` + // RecoveryTargetDiskAccountType - The target disk type before failover. + RecoveryTargetDiskAccountType *string `json:"recoveryTargetDiskAccountType,omitempty"` + // RecoveryReplicaDiskAccountType - The replica disk type before failover. + RecoveryReplicaDiskAccountType *string `json:"recoveryReplicaDiskAccountType,omitempty"` + // DiskEncryptionInfo - The recovery disk encryption information (for one / single pass flows). + DiskEncryptionInfo *DiskEncryptionInfo `json:"diskEncryptionInfo,omitempty"` +} + +// AddDisksInput input for add disk(s) operation. +type AddDisksInput struct { + // Properties - Add disks input properties. + Properties *AddDisksInputProperties `json:"properties,omitempty"` +} + +// AddDisksInputProperties add Disks input properties. +type AddDisksInputProperties struct { + // ProviderSpecificDetails - The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. + ProviderSpecificDetails BasicAddDisksProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for AddDisksInputProperties struct. +func (adip *AddDisksInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicAddDisksProviderSpecificInput(*v) + if err != nil { + return err + } + adip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicAddDisksProviderSpecificInput add Disks provider specific input. +type BasicAddDisksProviderSpecificInput interface { + AsA2AAddDisksInput() (*A2AAddDisksInput, bool) + AsAddDisksProviderSpecificInput() (*AddDisksProviderSpecificInput, bool) +} + +// AddDisksProviderSpecificInput add Disks provider specific input. +type AddDisksProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeAddDisksProviderSpecificInput', 'InstanceTypeA2A' + InstanceType InstanceType `json:"instanceType,omitempty"` +} + +func unmarshalBasicAddDisksProviderSpecificInput(body []byte) (BasicAddDisksProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeA2A): + var aadi A2AAddDisksInput + err := json.Unmarshal(body, &aadi) + return aadi, err + default: + var adpsi AddDisksProviderSpecificInput + err := json.Unmarshal(body, &adpsi) + return adpsi, err + } +} +func unmarshalBasicAddDisksProviderSpecificInputArray(body []byte) ([]BasicAddDisksProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + adpsiArray := make([]BasicAddDisksProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + adpsi, err := unmarshalBasicAddDisksProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + adpsiArray[index] = adpsi + } + return adpsiArray, nil +} + +// MarshalJSON is the custom marshaler for AddDisksProviderSpecificInput. +func (adpsi AddDisksProviderSpecificInput) MarshalJSON() ([]byte, error) { + adpsi.InstanceType = InstanceTypeAddDisksProviderSpecificInput + objectMap := make(map[string]interface{}) + if adpsi.InstanceType != "" { + objectMap["instanceType"] = adpsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AAddDisksInput is the BasicAddDisksProviderSpecificInput implementation for AddDisksProviderSpecificInput. +func (adpsi AddDisksProviderSpecificInput) AsA2AAddDisksInput() (*A2AAddDisksInput, bool) { + return nil, false +} + +// AsAddDisksProviderSpecificInput is the BasicAddDisksProviderSpecificInput implementation for AddDisksProviderSpecificInput. +func (adpsi AddDisksProviderSpecificInput) AsAddDisksProviderSpecificInput() (*AddDisksProviderSpecificInput, bool) { + return &adpsi, true +} + +// AsBasicAddDisksProviderSpecificInput is the BasicAddDisksProviderSpecificInput implementation for AddDisksProviderSpecificInput. +func (adpsi AddDisksProviderSpecificInput) AsBasicAddDisksProviderSpecificInput() (BasicAddDisksProviderSpecificInput, bool) { + return &adpsi, true +} + +// AddRecoveryServicesProviderInput input required to add a provider. +type AddRecoveryServicesProviderInput struct { + // Properties - The properties of an add provider request. + Properties *AddRecoveryServicesProviderInputProperties `json:"properties,omitempty"` +} + +// AddRecoveryServicesProviderInputProperties the properties of an add provider request. +type AddRecoveryServicesProviderInputProperties struct { + // MachineName - The name of the machine where the provider is getting added. + MachineName *string `json:"machineName,omitempty"` + // AuthenticationIdentityInput - The identity provider input for DRA authentication. + AuthenticationIdentityInput *IdentityProviderInput `json:"authenticationIdentityInput,omitempty"` + // ResourceAccessIdentityInput - The identity provider input for resource access. + ResourceAccessIdentityInput *IdentityProviderInput `json:"resourceAccessIdentityInput,omitempty"` +} + +// AddVCenterRequest input required to add vCenter. +type AddVCenterRequest struct { + // Properties - The properties of an add vCenter request. + Properties *AddVCenterRequestProperties `json:"properties,omitempty"` +} + +// AddVCenterRequestProperties the properties of an add vCenter request. +type AddVCenterRequestProperties struct { + // FriendlyName - The friendly name of the vCenter. + FriendlyName *string `json:"friendlyName,omitempty"` + // IPAddress - The IP address of the vCenter to be discovered. + IPAddress *string `json:"ipAddress,omitempty"` + // ProcessServerID - The process server Id from where the discovery is orchestrated. + ProcessServerID *string `json:"processServerId,omitempty"` + // Port - The port number for discovery. + Port *string `json:"port,omitempty"` + // RunAsAccountID - The account Id which has privileges to discover the vCenter. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` +} + +// Alert implements the Alert class. +type Alert struct { + autorest.Response `json:"-"` + // Properties - Alert related data. + Properties *AlertProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// AlertCollection collection of alerts. +type AlertCollection struct { + autorest.Response `json:"-"` + // Value - The list of alerts. + Value *[]Alert `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// AlertCollectionIterator provides access to a complete listing of Alert values. +type AlertCollectionIterator struct { + i int + page AlertCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *AlertCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *AlertCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AlertCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter AlertCollectionIterator) Response() AlertCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter AlertCollectionIterator) Value() Alert { + if !iter.page.NotDone() { + return Alert{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AlertCollectionIterator type. +func NewAlertCollectionIterator(page AlertCollectionPage) AlertCollectionIterator { + return AlertCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ac AlertCollection) IsEmpty() bool { + return ac.Value == nil || len(*ac.Value) == 0 +} + +// alertCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ac AlertCollection) alertCollectionPreparer(ctx context.Context) (*http.Request, error) { + if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ac.NextLink))) +} + +// AlertCollectionPage contains a page of Alert values. +type AlertCollectionPage struct { + fn func(context.Context, AlertCollection) (AlertCollection, error) + ac AlertCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *AlertCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AlertCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ac) + if err != nil { + return err + } + page.ac = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *AlertCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AlertCollectionPage) NotDone() bool { + return !page.ac.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AlertCollectionPage) Response() AlertCollection { + return page.ac +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AlertCollectionPage) Values() []Alert { + if page.ac.IsEmpty() { + return nil + } + return *page.ac.Value +} + +// Creates a new instance of the AlertCollectionPage type. +func NewAlertCollectionPage(getNextPage func(context.Context, AlertCollection) (AlertCollection, error)) AlertCollectionPage { + return AlertCollectionPage{fn: getNextPage} +} + +// AlertProperties the properties of an alert. +type AlertProperties struct { + // SendToOwners - A value indicating whether to send email to subscription administrator. + SendToOwners *string `json:"sendToOwners,omitempty"` + // CustomEmailAddresses - The custom email address for sending emails. + CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"` + // Locale - The locale for the email notification. + Locale *string `json:"locale,omitempty"` +} + +// ApplyRecoveryPointInput input to apply recovery point. +type ApplyRecoveryPointInput struct { + // Properties - The input properties to apply recovery point. + Properties *ApplyRecoveryPointInputProperties `json:"properties,omitempty"` +} + +// ApplyRecoveryPointInputProperties input properties to apply recovery point. +type ApplyRecoveryPointInputProperties struct { + // RecoveryPointID - The recovery point Id. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // ProviderSpecificDetails - Provider specific input for applying recovery point. + ProviderSpecificDetails BasicApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ApplyRecoveryPointInputProperties struct. +func (arpip *ApplyRecoveryPointInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "recoveryPointId": + if v != nil { + var recoveryPointID string + err = json.Unmarshal(*v, &recoveryPointID) + if err != nil { + return err + } + arpip.RecoveryPointID = &recoveryPointID + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*v) + if err != nil { + return err + } + arpip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicApplyRecoveryPointProviderSpecificInput provider specific input for apply recovery point. +type BasicApplyRecoveryPointProviderSpecificInput interface { + AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) + AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) + AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) + AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) +} + +// ApplyRecoveryPointProviderSpecificInput provider specific input for apply recovery point. +type ApplyRecoveryPointProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicApplyRecoveryPointProviderSpecificInput(body []byte) (BasicApplyRecoveryPointProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A): + var aarpi A2AApplyRecoveryPointInput + err := json.Unmarshal(body, &aarpi) + return aarpi, err + case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure): + var hvraarpi HyperVReplicaAzureApplyRecoveryPointInput + err := json.Unmarshal(body, &hvraarpi) + return hvraarpi, err + case string(InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2): + var imavarpi InMageAzureV2ApplyRecoveryPointInput + err := json.Unmarshal(body, &imavarpi) + return imavarpi, err + default: + var arppsi ApplyRecoveryPointProviderSpecificInput + err := json.Unmarshal(body, &arppsi) + return arppsi, err + } +} +func unmarshalBasicApplyRecoveryPointProviderSpecificInputArray(body []byte) ([]BasicApplyRecoveryPointProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + arppsiArray := make([]BasicApplyRecoveryPointProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + arppsi, err := unmarshalBasicApplyRecoveryPointProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + arppsiArray[index] = arppsi + } + return arppsiArray, nil +} + +// MarshalJSON is the custom marshaler for ApplyRecoveryPointProviderSpecificInput. +func (arppsi ApplyRecoveryPointProviderSpecificInput) MarshalJSON() ([]byte, error) { + arppsi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput + objectMap := make(map[string]interface{}) + if arppsi.InstanceType != "" { + objectMap["instanceType"] = arppsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. +func (arppsi ApplyRecoveryPointProviderSpecificInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. +func (arppsi ApplyRecoveryPointProviderSpecificInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. +func (arppsi ApplyRecoveryPointProviderSpecificInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. +func (arppsi ApplyRecoveryPointProviderSpecificInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { + return &arppsi, true +} + +// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for ApplyRecoveryPointProviderSpecificInput. +func (arppsi ApplyRecoveryPointProviderSpecificInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { + return &arppsi, true +} + +// AsrJobDetails this class represents job details based on specific job type. +type AsrJobDetails struct { + // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` + // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' + InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AsrJobDetails. +func (ajd AsrJobDetails) MarshalJSON() ([]byte, error) { + ajd.InstanceType = InstanceTypeAsrJobDetails + objectMap := make(map[string]interface{}) + if ajd.AffectedObjectDetails != nil { + objectMap["affectedObjectDetails"] = ajd.AffectedObjectDetails + } + if ajd.InstanceType != "" { + objectMap["instanceType"] = ajd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAsrJobDetails is the BasicJobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return &ajd, true +} + +// AsExportJobDetails is the BasicJobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the BasicJobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the BasicJobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsJobDetails is the BasicJobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsJobDetails() (*JobDetails, bool) { + return nil, false +} + +// AsBasicJobDetails is the BasicJobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { + return &ajd, true +} + +// ASRTask task of the Job. +type ASRTask struct { + // TaskID - The Id. + TaskID *string `json:"taskId,omitempty"` + // Name - The unique Task name. + Name *string `json:"name,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // AllowedActions - The state/actions applicable on this task. + AllowedActions *[]string `json:"allowedActions,omitempty"` + // FriendlyName - The name. + FriendlyName *string `json:"friendlyName,omitempty"` + // State - The State. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + State *string `json:"state,omitempty"` + // StateDescription - The description of the task state. For example - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. + StateDescription *string `json:"stateDescription,omitempty"` + // TaskType - The type of task. Details in CustomDetails property depend on this type. + TaskType *string `json:"taskType,omitempty"` + // CustomDetails - The custom task details based on the task type. + CustomDetails BasicTaskTypeDetails `json:"customDetails,omitempty"` + // GroupTaskCustomDetails - The custom task details based on the task type, if the task type is GroupTaskDetails or one of the types derived from it. + GroupTaskCustomDetails BasicGroupTaskDetails `json:"groupTaskCustomDetails,omitempty"` + // Errors - The task error details. + Errors *[]JobErrorDetails `json:"errors,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ASRTask struct. +func (at *ASRTask) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "taskId": + if v != nil { + var taskID string + err = json.Unmarshal(*v, &taskID) + if err != nil { + return err + } + at.TaskID = &taskID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + at.Name = &name + } + case "startTime": + if v != nil { + var startTime date.Time + err = json.Unmarshal(*v, &startTime) + if err != nil { + return err + } + at.StartTime = &startTime + } + case "endTime": + if v != nil { + var endTime date.Time + err = json.Unmarshal(*v, &endTime) + if err != nil { + return err + } + at.EndTime = &endTime + } + case "allowedActions": + if v != nil { + var allowedActions []string + err = json.Unmarshal(*v, &allowedActions) + if err != nil { + return err + } + at.AllowedActions = &allowedActions + } + case "friendlyName": + if v != nil { + var friendlyName string + err = json.Unmarshal(*v, &friendlyName) + if err != nil { + return err + } + at.FriendlyName = &friendlyName + } + case "state": + if v != nil { + var state string + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + at.State = &state + } + case "stateDescription": + if v != nil { + var stateDescription string + err = json.Unmarshal(*v, &stateDescription) + if err != nil { + return err + } + at.StateDescription = &stateDescription + } + case "taskType": + if v != nil { + var taskType string + err = json.Unmarshal(*v, &taskType) + if err != nil { + return err + } + at.TaskType = &taskType + } + case "customDetails": + if v != nil { + customDetails, err := unmarshalBasicTaskTypeDetails(*v) + if err != nil { + return err + } + at.CustomDetails = customDetails + } + case "groupTaskCustomDetails": + if v != nil { + groupTaskCustomDetails, err := unmarshalBasicGroupTaskDetails(*v) + if err != nil { + return err + } + at.GroupTaskCustomDetails = groupTaskCustomDetails + } + case "errors": + if v != nil { + var errorsVar []JobErrorDetails + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + at.Errors = &errorsVar + } + } + } + + return nil +} + +// AutomationRunbookTaskDetails this class represents the task details for an automation runbook. +type AutomationRunbookTaskDetails struct { + // Name - The recovery plan task name. + Name *string `json:"name,omitempty"` + // CloudServiceName - The cloud service of the automation runbook account. + CloudServiceName *string `json:"cloudServiceName,omitempty"` + // SubscriptionID - The subscription Id of the automation runbook account. + SubscriptionID *string `json:"subscriptionId,omitempty"` + // AccountName - The automation account name of the runbook. + AccountName *string `json:"accountName,omitempty"` + // RunbookID - The runbook Id. + RunbookID *string `json:"runbookId,omitempty"` + // RunbookName - The runbook name. + RunbookName *string `json:"runbookName,omitempty"` + // JobID - The job Id of the runbook execution. + JobID *string `json:"jobId,omitempty"` + // JobOutput - The execution output of the runbook. + JobOutput *string `json:"jobOutput,omitempty"` + // IsPrimarySideScript - A value indicating whether it is a primary side script or not. + IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { + artd.InstanceType = InstanceTypeAutomationRunbookTaskDetails + objectMap := make(map[string]interface{}) + if artd.Name != nil { + objectMap["name"] = artd.Name + } + if artd.CloudServiceName != nil { + objectMap["cloudServiceName"] = artd.CloudServiceName + } + if artd.SubscriptionID != nil { + objectMap["subscriptionId"] = artd.SubscriptionID + } + if artd.AccountName != nil { + objectMap["accountName"] = artd.AccountName + } + if artd.RunbookID != nil { + objectMap["runbookId"] = artd.RunbookID + } + if artd.RunbookName != nil { + objectMap["runbookName"] = artd.RunbookName + } + if artd.JobID != nil { + objectMap["jobId"] = artd.JobID + } + if artd.JobOutput != nil { + objectMap["jobOutput"] = artd.JobOutput + } + if artd.IsPrimarySideScript != nil { + objectMap["isPrimarySideScript"] = artd.IsPrimarySideScript + } + if artd.InstanceType != "" { + objectMap["instanceType"] = artd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return &artd, true +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &artd, true +} + +// AzureFabricCreationInput fabric provider specific settings. +type AzureFabricCreationInput struct { + // Location - The Location. + Location *string `json:"location,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) MarshalJSON() ([]byte, error) { + afci.InstanceType = InstanceTypeAzure + objectMap := make(map[string]interface{}) + if afci.Location != nil { + objectMap["location"] = afci.Location + } + if afci.InstanceType != "" { + objectMap["instanceType"] = afci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { + return &afci, true +} + +// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { + return nil, false +} + +// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { + return &afci, true +} + +// AzureFabricSpecificDetails azure Fabric Specific Details. +type AzureFabricSpecificDetails struct { + // Location - The Location for the Azure fabric. + Location *string `json:"location,omitempty"` + // ContainerIds - The container Ids for the Azure fabric. + ContainerIds *[]string `json:"containerIds,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { + afsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure + objectMap := make(map[string]interface{}) + if afsd.Location != nil { + objectMap["location"] = afsd.Location + } + if afsd.ContainerIds != nil { + objectMap["containerIds"] = afsd.ContainerIds + } + if afsd.InstanceType != "" { + objectMap["instanceType"] = afsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return &afsd, true +} + +// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVmmDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false +} + +// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { + return nil, false +} + +// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { + return &afsd, true +} + +// AzureToAzureCreateNetworkMappingInput create network mappings input properties/behavior specific to +// Azure to Azure Network mapping. +type AzureToAzureCreateNetworkMappingInput struct { + // PrimaryNetworkID - The primary azure vnet Id. + PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + atacnmi.InstanceType = InstanceTypeAzureToAzure + objectMap := make(map[string]interface{}) + if atacnmi.PrimaryNetworkID != nil { + objectMap["primaryNetworkId"] = atacnmi.PrimaryNetworkID + } + if atacnmi.InstanceType != "" { + objectMap["instanceType"] = atacnmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { + return &atacnmi, true +} + +// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { + return &atacnmi, true +} + +// AzureToAzureNetworkMappingSettings a2A Network Mapping fabric specific settings. +type AzureToAzureNetworkMappingSettings struct { + // PrimaryFabricLocation - The primary fabric location. + PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` + // RecoveryFabricLocation - The recovery fabric location. + RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { + atanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure + objectMap := make(map[string]interface{}) + if atanms.PrimaryFabricLocation != nil { + objectMap["primaryFabricLocation"] = atanms.PrimaryFabricLocation + } + if atanms.RecoveryFabricLocation != nil { + objectMap["recoveryFabricLocation"] = atanms.RecoveryFabricLocation + } + if atanms.InstanceType != "" { + objectMap["instanceType"] = atanms.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { + return &atanms, true +} + +// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { + return nil, false +} + +// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { + return nil, false +} + +// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { + return &atanms, true +} + +// AzureToAzureUpdateNetworkMappingInput updates network mappings input. +type AzureToAzureUpdateNetworkMappingInput struct { + // PrimaryNetworkID - The primary azure vnet Id. + PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + ataunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure + objectMap := make(map[string]interface{}) + if ataunmi.PrimaryNetworkID != nil { + objectMap["primaryNetworkId"] = ataunmi.PrimaryNetworkID + } + if ataunmi.InstanceType != "" { + objectMap["instanceType"] = ataunmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { + return &ataunmi, true +} + +// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { + return &ataunmi, true +} + +// AzureToAzureVMSyncedConfigDetails azure to Azure VM synced configuration details. +type AzureToAzureVMSyncedConfigDetails struct { + // Tags - The Azure VM tags. + Tags map[string]*string `json:"tags"` + // InputEndpoints - The Azure VM input endpoints. + InputEndpoints *[]InputEndpoint `json:"inputEndpoints,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureToAzureVMSyncedConfigDetails. +func (atavscd AzureToAzureVMSyncedConfigDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if atavscd.Tags != nil { + objectMap["tags"] = atavscd.Tags + } + if atavscd.InputEndpoints != nil { + objectMap["inputEndpoints"] = atavscd.InputEndpoints + } + return json.Marshal(objectMap) +} + +// AzureVMDiskDetails disk details for E2A provider. +type AzureVMDiskDetails struct { + // VhdType - VHD type. + VhdType *string `json:"vhdType,omitempty"` + // VhdID - The VHD id. + VhdID *string `json:"vhdId,omitempty"` + // VhdName - VHD name. + VhdName *string `json:"vhdName,omitempty"` + // MaxSizeMB - Max side in MB. + MaxSizeMB *string `json:"maxSizeMB,omitempty"` + // TargetDiskLocation - Blob uri of the Azure disk. + TargetDiskLocation *string `json:"targetDiskLocation,omitempty"` + // TargetDiskName - The target Azure disk name. + TargetDiskName *string `json:"targetDiskName,omitempty"` + // LunID - Ordinal\LunId of the disk for the Azure VM. + LunID *string `json:"lunId,omitempty"` +} + +// ComputeSizeErrorDetails represents the error used to indicate why the target compute size is not +// applicable. +type ComputeSizeErrorDetails struct { + // Message - The error message. + Message *string `json:"message,omitempty"` + // Severity - The severity of the error. + Severity *string `json:"severity,omitempty"` +} + +// BasicConfigurationSettings replication provider specific settings. +type BasicConfigurationSettings interface { + AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) + AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) + AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) + AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) + AsConfigurationSettings() (*ConfigurationSettings, bool) +} + +// ConfigurationSettings replication provider specific settings. +type ConfigurationSettings struct { + // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' + InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` +} + +func unmarshalBasicConfigurationSettings(body []byte) (BasicConfigurationSettings, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeHyperVVirtualMachine): + var hvvmd HyperVVirtualMachineDetails + err := json.Unmarshal(body, &hvvmd) + return hvvmd, err + case string(InstanceTypeReplicationGroupDetails): + var rgd ReplicationGroupDetails + err := json.Unmarshal(body, &rgd) + return rgd, err + case string(InstanceTypeVmmVirtualMachine): + var vvmd VmmVirtualMachineDetails + err := json.Unmarshal(body, &vvmd) + return vvmd, err + case string(InstanceTypeVMwareVirtualMachine): + var vmvmd VMwareVirtualMachineDetails + err := json.Unmarshal(body, &vmvmd) + return vmvmd, err + default: + var cs ConfigurationSettings + err := json.Unmarshal(body, &cs) + return cs, err + } +} +func unmarshalBasicConfigurationSettingsArray(body []byte) ([]BasicConfigurationSettings, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + csArray := make([]BasicConfigurationSettings, len(rawMessages)) + + for index, rawMessage := range rawMessages { + cs, err := unmarshalBasicConfigurationSettings(*rawMessage) + if err != nil { + return nil, err + } + csArray[index] = cs + } + return csArray, nil +} + +// MarshalJSON is the custom marshaler for ConfigurationSettings. +func (cs ConfigurationSettings) MarshalJSON() ([]byte, error) { + cs.InstanceType = InstanceTypeConfigurationSettings + objectMap := make(map[string]interface{}) + if cs.InstanceType != "" { + objectMap["instanceType"] = cs.InstanceType + } + return json.Marshal(objectMap) +} + +// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. +func (cs ConfigurationSettings) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return nil, false +} + +// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. +func (cs ConfigurationSettings) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return nil, false +} + +// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. +func (cs ConfigurationSettings) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { + return nil, false +} + +// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for ConfigurationSettings. +func (cs ConfigurationSettings) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return nil, false +} + +// AsConfigurationSettings is the BasicConfigurationSettings implementation for ConfigurationSettings. +func (cs ConfigurationSettings) AsConfigurationSettings() (*ConfigurationSettings, bool) { + return &cs, true +} + +// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for ConfigurationSettings. +func (cs ConfigurationSettings) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { + return &cs, true +} + +// ConfigureAlertRequest request to configure alerts for the system. +type ConfigureAlertRequest struct { + // Properties - The properties of a configure alert request. + Properties *ConfigureAlertRequestProperties `json:"properties,omitempty"` +} + +// ConfigureAlertRequestProperties properties of a configure alert request. +type ConfigureAlertRequestProperties struct { + // SendToOwners - A value indicating whether to send email to subscription administrator. + SendToOwners *string `json:"sendToOwners,omitempty"` + // CustomEmailAddresses - The custom email address for sending emails. + CustomEmailAddresses *[]string `json:"customEmailAddresses,omitempty"` + // Locale - The locale for the email notification. + Locale *string `json:"locale,omitempty"` +} + +// ConsistencyCheckTaskDetails this class contains monitoring details of all the inconsistent Protected +// Entities in Vmm. +type ConsistencyCheckTaskDetails struct { + // VMDetails - The list of inconsistent Vm details. + VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { + cctd.InstanceType = InstanceTypeConsistencyCheckTaskDetails + objectMap := make(map[string]interface{}) + if cctd.VMDetails != nil { + objectMap["vmDetails"] = cctd.VMDetails + } + if cctd.InstanceType != "" { + objectMap["instanceType"] = cctd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return &cctd, true +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &cctd, true +} + +// CreateNetworkMappingInput create network mappings input. +type CreateNetworkMappingInput struct { + // Properties - Input properties for creating network mapping. + Properties *CreateNetworkMappingInputProperties `json:"properties,omitempty"` +} + +// CreateNetworkMappingInputProperties common input details for network mapping operation. +type CreateNetworkMappingInputProperties struct { + // RecoveryFabricName - Recovery fabric Name. + RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` + // RecoveryNetworkID - Recovery network Id. + RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` + // FabricSpecificDetails - Fabric specific input properties. + FabricSpecificDetails BasicFabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CreateNetworkMappingInputProperties struct. +func (cnmip *CreateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "recoveryFabricName": + if v != nil { + var recoveryFabricName string + err = json.Unmarshal(*v, &recoveryFabricName) + if err != nil { + return err + } + cnmip.RecoveryFabricName = &recoveryFabricName + } + case "recoveryNetworkId": + if v != nil { + var recoveryNetworkID string + err = json.Unmarshal(*v, &recoveryNetworkID) + if err != nil { + return err + } + cnmip.RecoveryNetworkID = &recoveryNetworkID + } + case "fabricSpecificDetails": + if v != nil { + fabricSpecificDetails, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*v) + if err != nil { + return err + } + cnmip.FabricSpecificDetails = fabricSpecificDetails + } + } + } + + return nil +} + +// CreatePolicyInput protection Policy input. +type CreatePolicyInput struct { + // Properties - Policy creation properties. + Properties *CreatePolicyInputProperties `json:"properties,omitempty"` +} + +// CreatePolicyInputProperties policy creation properties. +type CreatePolicyInputProperties struct { + // ProviderSpecificInput - The ReplicationProviderSettings. + ProviderSpecificInput BasicPolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CreatePolicyInputProperties struct. +func (cpip *CreatePolicyInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificInput": + if v != nil { + providerSpecificInput, err := unmarshalBasicPolicyProviderSpecificInput(*v) + if err != nil { + return err + } + cpip.ProviderSpecificInput = providerSpecificInput + } + } + } + + return nil +} + +// CreateProtectionContainerInput create protection container input. +type CreateProtectionContainerInput struct { + // Properties - Create protection container input properties. + Properties *CreateProtectionContainerInputProperties `json:"properties,omitempty"` +} + +// CreateProtectionContainerInputProperties create protection container input properties. +type CreateProtectionContainerInputProperties struct { + // ProviderSpecificInput - Provider specific inputs for container creation. + ProviderSpecificInput *[]BasicReplicationProviderSpecificContainerCreationInput `json:"providerSpecificInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CreateProtectionContainerInputProperties struct. +func (cpcip *CreateProtectionContainerInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificInput": + if v != nil { + providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(*v) + if err != nil { + return err + } + cpcip.ProviderSpecificInput = &providerSpecificInput + } + } + } + + return nil +} + +// CreateProtectionContainerMappingInput configure pairing input. +type CreateProtectionContainerMappingInput struct { + // Properties - Configure protection input properties. + Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"` +} + +// CreateProtectionContainerMappingInputProperties configure pairing input properties. +type CreateProtectionContainerMappingInputProperties struct { + // TargetProtectionContainerID - The target unique protection container name. + TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` + // PolicyID - Applicable policy. + PolicyID *string `json:"policyId,omitempty"` + // ProviderSpecificInput - Provider specific input for pairing. + ProviderSpecificInput BasicReplicationProviderSpecificContainerMappingInput `json:"providerSpecificInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CreateProtectionContainerMappingInputProperties struct. +func (cpcmip *CreateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "targetProtectionContainerId": + if v != nil { + var targetProtectionContainerID string + err = json.Unmarshal(*v, &targetProtectionContainerID) + if err != nil { + return err + } + cpcmip.TargetProtectionContainerID = &targetProtectionContainerID + } + case "policyId": + if v != nil { + var policyID string + err = json.Unmarshal(*v, &policyID) + if err != nil { + return err + } + cpcmip.PolicyID = &policyID + } + case "providerSpecificInput": + if v != nil { + providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*v) + if err != nil { + return err + } + cpcmip.ProviderSpecificInput = providerSpecificInput + } + } + } + + return nil +} + +// CreateRecoveryPlanInput create recovery plan input class. +type CreateRecoveryPlanInput struct { + // Properties - Recovery plan creation properties. + Properties *CreateRecoveryPlanInputProperties `json:"properties,omitempty"` +} + +// CreateRecoveryPlanInputProperties recovery plan creation properties. +type CreateRecoveryPlanInputProperties struct { + // PrimaryFabricID - The primary fabric Id. + PrimaryFabricID *string `json:"primaryFabricId,omitempty"` + // RecoveryFabricID - The recovery fabric Id. + RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` + // FailoverDeploymentModel - The failover deployment model. Possible values include: 'NotApplicable', 'Classic', 'ResourceManager' + FailoverDeploymentModel FailoverDeploymentModel `json:"failoverDeploymentModel,omitempty"` + // Groups - The recovery plan groups. + Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` +} + +// CurrentJobDetails current job details of the migration item. +type CurrentJobDetails struct { + // JobName - The job name. + JobName *string `json:"jobName,omitempty"` + // JobID - The ARM Id of the job being executed. + JobID *string `json:"jobId,omitempty"` + // StartTime - The start time of the job. + StartTime *date.Time `json:"startTime,omitempty"` +} + +// CurrentScenarioDetails current scenario details of the protected entity. +type CurrentScenarioDetails struct { + // ScenarioName - Scenario name. + ScenarioName *string `json:"scenarioName,omitempty"` + // JobID - ARM Id of the job being executed. + JobID *string `json:"jobId,omitempty"` + // StartTime - Start time of the workflow. + StartTime *date.Time `json:"startTime,omitempty"` +} + +// DataStore the data store details of the MT. +type DataStore struct { + // SymbolicName - The symbolic name of data store. + SymbolicName *string `json:"symbolicName,omitempty"` + // UUID - The uuid of data store. + UUID *string `json:"uuid,omitempty"` + // Capacity - The capacity of data store in GBs. + Capacity *string `json:"capacity,omitempty"` + // FreeSpace - The free space of data store in GBs. + FreeSpace *string `json:"freeSpace,omitempty"` + // Type - The type of data store. + Type *string `json:"type,omitempty"` +} + +// DisableProtectionInput disable protection input. +type DisableProtectionInput struct { + // Properties - Disable protection input properties. + Properties *DisableProtectionInputProperties `json:"properties,omitempty"` +} + +// DisableProtectionInputProperties disable protection input properties. +type DisableProtectionInputProperties struct { + // DisableProtectionReason - Disable protection reason. It can have values NotSpecified/MigrationComplete. Possible values include: 'NotSpecified', 'MigrationComplete' + DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"` + // ReplicationProviderInput - Replication provider specific input. + ReplicationProviderInput BasicDisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DisableProtectionInputProperties struct. +func (dpip *DisableProtectionInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "disableProtectionReason": + if v != nil { + var disableProtectionReason DisableProtectionReason + err = json.Unmarshal(*v, &disableProtectionReason) + if err != nil { + return err + } + dpip.DisableProtectionReason = disableProtectionReason + } + case "replicationProviderInput": + if v != nil { + replicationProviderInput, err := unmarshalBasicDisableProtectionProviderSpecificInput(*v) + if err != nil { + return err + } + dpip.ReplicationProviderInput = replicationProviderInput + } + } + } + + return nil +} + +// BasicDisableProtectionProviderSpecificInput disable protection provider specific input. +type BasicDisableProtectionProviderSpecificInput interface { + AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) + AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) +} + +// DisableProtectionProviderSpecificInput disable protection provider specific input. +type DisableProtectionProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeDisableProtectionProviderSpecificInput', 'InstanceTypeInMage' + InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicDisableProtectionProviderSpecificInput(body []byte) (BasicDisableProtectionProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeInMage): + var imdppsi InMageDisableProtectionProviderSpecificInput + err := json.Unmarshal(body, &imdppsi) + return imdppsi, err + default: + var dppsi DisableProtectionProviderSpecificInput + err := json.Unmarshal(body, &dppsi) + return dppsi, err + } +} +func unmarshalBasicDisableProtectionProviderSpecificInputArray(body []byte) ([]BasicDisableProtectionProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dppsiArray := make([]BasicDisableProtectionProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dppsi, err := unmarshalBasicDisableProtectionProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + dppsiArray[index] = dppsi + } + return dppsiArray, nil +} + +// MarshalJSON is the custom marshaler for DisableProtectionProviderSpecificInput. +func (dppsi DisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + dppsi.InstanceType = InstanceTypeDisableProtectionProviderSpecificInput + objectMap := make(map[string]interface{}) + if dppsi.InstanceType != "" { + objectMap["instanceType"] = dppsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsInMageDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. +func (dppsi DisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. +func (dppsi DisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) { + return &dppsi, true +} + +// AsBasicDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for DisableProtectionProviderSpecificInput. +func (dppsi DisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) { + return &dppsi, true +} + +// DiscoverProtectableItemRequest request to add a physical machine as a protectable item in a container. +type DiscoverProtectableItemRequest struct { + // Properties - The properties of a discover protectable item request. + Properties *DiscoverProtectableItemRequestProperties `json:"properties,omitempty"` +} + +// DiscoverProtectableItemRequestProperties discover protectable item properties. +type DiscoverProtectableItemRequestProperties struct { + // FriendlyName - The friendly name of the physical machine. + FriendlyName *string `json:"friendlyName,omitempty"` + // IPAddress - The IP address of the physical machine to be discovered. + IPAddress *string `json:"ipAddress,omitempty"` + // OsType - The OS type on the physical machine. + OsType *string `json:"osType,omitempty"` +} + +// DiskDetails on-prem disk details data. +type DiskDetails struct { + // MaxSizeMB - The hard disk max size in MB. + MaxSizeMB *int64 `json:"maxSizeMB,omitempty"` + // VhdType - The type of the volume. + VhdType *string `json:"vhdType,omitempty"` + // VhdID - The VHD Id. + VhdID *string `json:"vhdId,omitempty"` + // VhdName - The VHD name. + VhdName *string `json:"vhdName,omitempty"` +} + +// DiskEncryptionInfo recovery disk encryption info (BEK and KEK). +type DiskEncryptionInfo struct { + // DiskEncryptionKeyInfo - The recovery KeyVault reference for secret. + DiskEncryptionKeyInfo *DiskEncryptionKeyInfo `json:"diskEncryptionKeyInfo,omitempty"` + // KeyEncryptionKeyInfo - The recovery KeyVault reference for key. + KeyEncryptionKeyInfo *KeyEncryptionKeyInfo `json:"keyEncryptionKeyInfo,omitempty"` +} + +// DiskEncryptionKeyInfo disk Encryption Key Information (BitLocker Encryption Key (BEK) on Windows). +type DiskEncryptionKeyInfo struct { + // SecretIdentifier - The secret url / identifier. + SecretIdentifier *string `json:"secretIdentifier,omitempty"` + // KeyVaultResourceArmID - The KeyVault resource ARM id for secret. + KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"` +} + +// DiskVolumeDetails volume details. +type DiskVolumeDetails struct { + // Label - The volume label. + Label *string `json:"label,omitempty"` + // Name - The volume name. + Name *string `json:"name,omitempty"` +} + +// Display contains the localized display information for this particular operation / action. These value +// will be used by several clients for (1) custom role definitions for RBAC; (2) complex query filters for +// the event service; and (3) audit history / records for management operations. +type Display struct { + // Provider - The provider. The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible. It should use Title Casing and begin with "Microsoft" for 1st party services. e.g. "Microsoft Monitoring Insights" or "Microsoft Compute." + Provider *string `json:"provider,omitempty"` + // Resource - The resource. The localized friendly form of the resource related to this action/operation – it should match the public documentation for the resource provider. It should use Title Casing. This value should be unique for a particular URL type (e.g. nested types should *not* reuse their parent’s display.resource field). e.g. "Virtual Machines" or "Scheduler Job Collections", or "Virtual Machine VM Sizes" or "Scheduler Jobs" + Resource *string `json:"resource,omitempty"` + // Operation - The operation. The localized friendly name for the operation, as it should be shown to the user. It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing. Prescriptive guidance: Read Create or Update Delete 'ActionName' + Operation *string `json:"operation,omitempty"` + // Description - The description. The localized friendly description for the operation, as it should be shown to the user. It should be thorough, yet concise – it will be used in tool tips and detailed views. Prescriptive guidance for namespaces: Read any 'display.provider' resource Create or Update any 'display.provider' resource Delete any 'display.provider' resource Perform any other action on any 'display.provider' resource Prescriptive guidance for namespaces: Read any 'display.resource' Create or Update any 'display.resource' Delete any 'display.resource' 'ActionName' any 'display.resources' + Description *string `json:"description,omitempty"` +} + +// EnableMigrationInput enable migration input. +type EnableMigrationInput struct { + // Properties - Enable migration input properties. + Properties *EnableMigrationInputProperties `json:"properties,omitempty"` +} + +// EnableMigrationInputProperties enable migration input properties. +type EnableMigrationInputProperties struct { + // PolicyID - The policy Id. + PolicyID *string `json:"policyId,omitempty"` + // ProviderSpecificDetails - The provider specific details. + ProviderSpecificDetails BasicEnableMigrationProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for EnableMigrationInputProperties struct. +func (emip *EnableMigrationInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "policyId": + if v != nil { + var policyID string + err = json.Unmarshal(*v, &policyID) + if err != nil { + return err + } + emip.PolicyID = &policyID + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicEnableMigrationProviderSpecificInput(*v) + if err != nil { + return err + } + emip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicEnableMigrationProviderSpecificInput enable migration provider specific input. +type BasicEnableMigrationProviderSpecificInput interface { + AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) + AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) +} + +// EnableMigrationProviderSpecificInput enable migration provider specific input. +type EnableMigrationProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeEnableMigrationProviderSpecificInput', 'InstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicEnableMigrationProviderSpecificInput(body []byte) (BasicEnableMigrationProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeVMwareCbt): + var vmcemi VMwareCbtEnableMigrationInput + err := json.Unmarshal(body, &vmcemi) + return vmcemi, err + default: + var empsi EnableMigrationProviderSpecificInput + err := json.Unmarshal(body, &empsi) + return empsi, err + } +} +func unmarshalBasicEnableMigrationProviderSpecificInputArray(body []byte) ([]BasicEnableMigrationProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + empsiArray := make([]BasicEnableMigrationProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + empsi, err := unmarshalBasicEnableMigrationProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + empsiArray[index] = empsi + } + return empsiArray, nil +} + +// MarshalJSON is the custom marshaler for EnableMigrationProviderSpecificInput. +func (empsi EnableMigrationProviderSpecificInput) MarshalJSON() ([]byte, error) { + empsi.InstanceType = InstanceTypeEnableMigrationProviderSpecificInput + objectMap := make(map[string]interface{}) + if empsi.InstanceType != "" { + objectMap["instanceType"] = empsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtEnableMigrationInput is the BasicEnableMigrationProviderSpecificInput implementation for EnableMigrationProviderSpecificInput. +func (empsi EnableMigrationProviderSpecificInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) { + return nil, false +} + +// AsEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for EnableMigrationProviderSpecificInput. +func (empsi EnableMigrationProviderSpecificInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) { + return &empsi, true +} + +// AsBasicEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for EnableMigrationProviderSpecificInput. +func (empsi EnableMigrationProviderSpecificInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) { + return &empsi, true +} + +// EnableProtectionInput enable protection input. +type EnableProtectionInput struct { + // Properties - Enable protection input properties. + Properties *EnableProtectionInputProperties `json:"properties,omitempty"` +} + +// EnableProtectionInputProperties enable protection input properties. +type EnableProtectionInputProperties struct { + // PolicyID - The Policy Id. + PolicyID *string `json:"policyId,omitempty"` + // ProtectableItemID - The protectable item Id. + ProtectableItemID *string `json:"protectableItemId,omitempty"` + // ProviderSpecificDetails - The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. + ProviderSpecificDetails BasicEnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for EnableProtectionInputProperties struct. +func (epip *EnableProtectionInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "policyId": + if v != nil { + var policyID string + err = json.Unmarshal(*v, &policyID) + if err != nil { + return err + } + epip.PolicyID = &policyID + } + case "protectableItemId": + if v != nil { + var protectableItemID string + err = json.Unmarshal(*v, &protectableItemID) + if err != nil { + return err + } + epip.ProtectableItemID = &protectableItemID + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicEnableProtectionProviderSpecificInput(*v) + if err != nil { + return err + } + epip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicEnableProtectionProviderSpecificInput enable protection provider specific input. +type BasicEnableProtectionProviderSpecificInput interface { + AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) + AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) + AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) + AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) + AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) + AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) +} + +// EnableProtectionProviderSpecificInput enable protection provider specific input. +type EnableProtectionProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' + InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicEnableProtectionProviderSpecificInput(body []byte) (BasicEnableProtectionProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A): + var aepi A2AEnableProtectionInput + err := json.Unmarshal(body, &aepi) + return aepi, err + case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure): + var hvraepi HyperVReplicaAzureEnableProtectionInput + err := json.Unmarshal(body, &hvraepi) + return hvraepi, err + case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2): + var imavepi InMageAzureV2EnableProtectionInput + err := json.Unmarshal(body, &imavepi) + return imavepi, err + case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage): + var imepi InMageEnableProtectionInput + err := json.Unmarshal(body, &imepi) + return imepi, err + case string(InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan): + var sepi SanEnableProtectionInput + err := json.Unmarshal(body, &sepi) + return sepi, err + default: + var eppsi EnableProtectionProviderSpecificInput + err := json.Unmarshal(body, &eppsi) + return eppsi, err + } +} +func unmarshalBasicEnableProtectionProviderSpecificInputArray(body []byte) ([]BasicEnableProtectionProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + eppsiArray := make([]BasicEnableProtectionProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + eppsi, err := unmarshalBasicEnableProtectionProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + eppsiArray[index] = eppsi + } + return eppsiArray, nil +} + +// MarshalJSON is the custom marshaler for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + eppsi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput + objectMap := make(map[string]interface{}) + if eppsi.InstanceType != "" { + objectMap["instanceType"] = eppsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { + return &eppsi, true +} + +// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for EnableProtectionProviderSpecificInput. +func (eppsi EnableProtectionProviderSpecificInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { + return &eppsi, true +} + +// EncryptionDetails encryption details for the fabric. +type EncryptionDetails struct { + // KekState - The key encryption key state for the Vmm. + KekState *string `json:"kekState,omitempty"` + // KekCertThumbprint - The key encryption key certificate thumbprint. + KekCertThumbprint *string `json:"kekCertThumbprint,omitempty"` + // KekCertExpiryDate - The key encryption key certificate expiry date. + KekCertExpiryDate *date.Time `json:"kekCertExpiryDate,omitempty"` +} + +// Event implements the Event class. +type Event struct { + autorest.Response `json:"-"` + // Properties - Event related data. + Properties *EventProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// EventCollection collection of fabric details. +type EventCollection struct { + autorest.Response `json:"-"` + // Value - The list of events. + Value *[]Event `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// EventCollectionIterator provides access to a complete listing of Event values. +type EventCollectionIterator struct { + i int + page EventCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *EventCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *EventCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EventCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter EventCollectionIterator) Response() EventCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter EventCollectionIterator) Value() Event { + if !iter.page.NotDone() { + return Event{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EventCollectionIterator type. +func NewEventCollectionIterator(page EventCollectionPage) EventCollectionIterator { + return EventCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ec EventCollection) IsEmpty() bool { + return ec.Value == nil || len(*ec.Value) == 0 +} + +// eventCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ec EventCollection) eventCollectionPreparer(ctx context.Context) (*http.Request, error) { + if ec.NextLink == nil || len(to.String(ec.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ec.NextLink))) +} + +// EventCollectionPage contains a page of Event values. +type EventCollectionPage struct { + fn func(context.Context, EventCollection) (EventCollection, error) + ec EventCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *EventCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EventCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ec) + if err != nil { + return err + } + page.ec = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *EventCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EventCollectionPage) NotDone() bool { + return !page.ec.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EventCollectionPage) Response() EventCollection { + return page.ec +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EventCollectionPage) Values() []Event { + if page.ec.IsEmpty() { + return nil + } + return *page.ec.Value +} + +// Creates a new instance of the EventCollectionPage type. +func NewEventCollectionPage(getNextPage func(context.Context, EventCollection) (EventCollection, error)) EventCollectionPage { + return EventCollectionPage{fn: getNextPage} +} + +// EventProperties the properties of a monitoring event. +type EventProperties struct { + // EventCode - The Id of the monitoring event. + EventCode *string `json:"eventCode,omitempty"` + // Description - The event name. + Description *string `json:"description,omitempty"` + // EventType - The type of the event. for example: VM Health, Server Health, Job Failure etc. + EventType *string `json:"eventType,omitempty"` + // AffectedObjectFriendlyName - The friendly name of the source of the event on which it is raised (for example, VM, VMM etc). + AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` + // Severity - The severity of the event. + Severity *string `json:"severity,omitempty"` + // TimeOfOccurrence - The time of occurrence of the event. + TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"` + // FabricID - The ARM ID of the fabric. + FabricID *string `json:"fabricId,omitempty"` + // ProviderSpecificDetails - The provider specific settings. + ProviderSpecificDetails BasicEventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` + // EventSpecificDetails - The event specific settings. + EventSpecificDetails BasicEventSpecificDetails `json:"eventSpecificDetails,omitempty"` + // HealthErrors - The list of errors / warnings capturing details associated with the issue(s). + HealthErrors *[]HealthError `json:"healthErrors,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for EventProperties struct. +func (ep *EventProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "eventCode": + if v != nil { + var eventCode string + err = json.Unmarshal(*v, &eventCode) + if err != nil { + return err + } + ep.EventCode = &eventCode + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + ep.Description = &description + } + case "eventType": + if v != nil { + var eventType string + err = json.Unmarshal(*v, &eventType) + if err != nil { + return err + } + ep.EventType = &eventType + } + case "affectedObjectFriendlyName": + if v != nil { + var affectedObjectFriendlyName string + err = json.Unmarshal(*v, &affectedObjectFriendlyName) + if err != nil { + return err + } + ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName + } + case "severity": + if v != nil { + var severity string + err = json.Unmarshal(*v, &severity) + if err != nil { + return err + } + ep.Severity = &severity + } + case "timeOfOccurrence": + if v != nil { + var timeOfOccurrence date.Time + err = json.Unmarshal(*v, &timeOfOccurrence) + if err != nil { + return err + } + ep.TimeOfOccurrence = &timeOfOccurrence + } + case "fabricId": + if v != nil { + var fabricID string + err = json.Unmarshal(*v, &fabricID) + if err != nil { + return err + } + ep.FabricID = &fabricID + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicEventProviderSpecificDetails(*v) + if err != nil { + return err + } + ep.ProviderSpecificDetails = providerSpecificDetails + } + case "eventSpecificDetails": + if v != nil { + eventSpecificDetails, err := unmarshalBasicEventSpecificDetails(*v) + if err != nil { + return err + } + ep.EventSpecificDetails = eventSpecificDetails + } + case "healthErrors": + if v != nil { + var healthErrors []HealthError + err = json.Unmarshal(*v, &healthErrors) + if err != nil { + return err + } + ep.HealthErrors = &healthErrors + } + } + } + + return nil +} + +// BasicEventProviderSpecificDetails model class for provider specific details for an event. +type BasicEventProviderSpecificDetails interface { + AsA2AEventDetails() (*A2AEventDetails, bool) + AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) + AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) + AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) + AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) + AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) + AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) +} + +// EventProviderSpecificDetails model class for provider specific details for an event. +type EventProviderSpecificDetails struct { + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicEventProviderSpecificDetails(body []byte) (BasicEventProviderSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A): + var aed A2AEventDetails + err := json.Unmarshal(body, &aed) + return aed, err + case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012): + var hvr2ed HyperVReplica2012EventDetails + err := json.Unmarshal(body, &hvr2ed) + return hvr2ed, err + case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2): + var hvr2ed HyperVReplica2012R2EventDetails + err := json.Unmarshal(body, &hvr2ed) + return hvr2ed, err + case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure): + var hvraed HyperVReplicaAzureEventDetails + err := json.Unmarshal(body, &hvraed) + return hvraed, err + case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails): + var hvrbed HyperVReplicaBaseEventDetails + err := json.Unmarshal(body, &hvrbed) + return hvrbed, err + case string(InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2): + var imaved InMageAzureV2EventDetails + err := json.Unmarshal(body, &imaved) + return imaved, err + default: + var epsd EventProviderSpecificDetails + err := json.Unmarshal(body, &epsd) + return epsd, err + } +} +func unmarshalBasicEventProviderSpecificDetailsArray(body []byte) ([]BasicEventProviderSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + epsdArray := make([]BasicEventProviderSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + epsd, err := unmarshalBasicEventProviderSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + epsdArray[index] = epsd + } + return epsdArray, nil +} + +// MarshalJSON is the custom marshaler for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) MarshalJSON() ([]byte, error) { + epsd.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails + objectMap := make(map[string]interface{}) + if epsd.InstanceType != "" { + objectMap["instanceType"] = epsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return &epsd, true +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for EventProviderSpecificDetails. +func (epsd EventProviderSpecificDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &epsd, true +} + +// EventQueryParameter implements the event query parameter. +type EventQueryParameter struct { + // EventCode - The source id of the events to be queried. + EventCode *string `json:"eventCode,omitempty"` + // Severity - The severity of the events to be queried. + Severity *string `json:"severity,omitempty"` + // EventType - The type of the events to be queried. + EventType *string `json:"eventType,omitempty"` + // FabricName - The affected object server id of the events to be queried. + FabricName *string `json:"fabricName,omitempty"` + // AffectedObjectFriendlyName - The affected object name of the events to be queried. + AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` + // StartTime - The start time of the time range within which the events are to be queried. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the time range within which the events are to be queried. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// BasicEventSpecificDetails model class for event specific details for an event. +type BasicEventSpecificDetails interface { + AsJobStatusEventDetails() (*JobStatusEventDetails, bool) + AsEventSpecificDetails() (*EventSpecificDetails, bool) +} + +// EventSpecificDetails model class for event specific details for an event. +type EventSpecificDetails struct { + // InstanceType - Possible values include: 'InstanceTypeEventSpecificDetails', 'InstanceTypeJobStatus' + InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicEventSpecificDetails(body []byte) (BasicEventSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeJobStatus): + var jsed JobStatusEventDetails + err := json.Unmarshal(body, &jsed) + return jsed, err + default: + var esd EventSpecificDetails + err := json.Unmarshal(body, &esd) + return esd, err + } +} +func unmarshalBasicEventSpecificDetailsArray(body []byte) ([]BasicEventSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + esdArray := make([]BasicEventSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + esd, err := unmarshalBasicEventSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + esdArray[index] = esd + } + return esdArray, nil +} + +// MarshalJSON is the custom marshaler for EventSpecificDetails. +func (esd EventSpecificDetails) MarshalJSON() ([]byte, error) { + esd.InstanceType = InstanceTypeEventSpecificDetails + objectMap := make(map[string]interface{}) + if esd.InstanceType != "" { + objectMap["instanceType"] = esd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsJobStatusEventDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. +func (esd EventSpecificDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) { + return nil, false +} + +// AsEventSpecificDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. +func (esd EventSpecificDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) { + return &esd, true +} + +// AsBasicEventSpecificDetails is the BasicEventSpecificDetails implementation for EventSpecificDetails. +func (esd EventSpecificDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) { + return &esd, true +} + +// ExportJobDetails this class represents details for export jobs workflow. +type ExportJobDetails struct { + // BlobURI - BlobUri of the exported jobs. + BlobURI *string `json:"blobUri,omitempty"` + // SasToken - The sas token to access blob. + SasToken *string `json:"sasToken,omitempty"` + // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` + // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' + InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExportJobDetails. +func (ejd ExportJobDetails) MarshalJSON() ([]byte, error) { + ejd.InstanceType = InstanceTypeExportJobDetails + objectMap := make(map[string]interface{}) + if ejd.BlobURI != nil { + objectMap["blobUri"] = ejd.BlobURI + } + if ejd.SasToken != nil { + objectMap["sasToken"] = ejd.SasToken + } + if ejd.AffectedObjectDetails != nil { + objectMap["affectedObjectDetails"] = ejd.AffectedObjectDetails + } + if ejd.InstanceType != "" { + objectMap["instanceType"] = ejd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAsrJobDetails is the BasicJobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the BasicJobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return &ejd, true +} + +// AsFailoverJobDetails is the BasicJobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the BasicJobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsJobDetails is the BasicJobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsJobDetails() (*JobDetails, bool) { + return nil, false +} + +// AsBasicJobDetails is the BasicJobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { + return &ejd, true +} + +// Fabric fabric definition. +type Fabric struct { + autorest.Response `json:"-"` + // Properties - Fabric related data. + Properties *FabricProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// FabricCollection collection of fabric details. +type FabricCollection struct { + autorest.Response `json:"-"` + // Value - The fabric details. + Value *[]Fabric `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// FabricCollectionIterator provides access to a complete listing of Fabric values. +type FabricCollectionIterator struct { + i int + page FabricCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *FabricCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *FabricCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter FabricCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter FabricCollectionIterator) Response() FabricCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter FabricCollectionIterator) Value() Fabric { + if !iter.page.NotDone() { + return Fabric{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the FabricCollectionIterator type. +func NewFabricCollectionIterator(page FabricCollectionPage) FabricCollectionIterator { + return FabricCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (fc FabricCollection) IsEmpty() bool { + return fc.Value == nil || len(*fc.Value) == 0 +} + +// fabricCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (fc FabricCollection) fabricCollectionPreparer(ctx context.Context) (*http.Request, error) { + if fc.NextLink == nil || len(to.String(fc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(fc.NextLink))) +} + +// FabricCollectionPage contains a page of Fabric values. +type FabricCollectionPage struct { + fn func(context.Context, FabricCollection) (FabricCollection, error) + fc FabricCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *FabricCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FabricCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.fc) + if err != nil { + return err + } + page.fc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *FabricCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page FabricCollectionPage) NotDone() bool { + return !page.fc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page FabricCollectionPage) Response() FabricCollection { + return page.fc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page FabricCollectionPage) Values() []Fabric { + if page.fc.IsEmpty() { + return nil + } + return *page.fc.Value +} + +// Creates a new instance of the FabricCollectionPage type. +func NewFabricCollectionPage(getNextPage func(context.Context, FabricCollection) (FabricCollection, error)) FabricCollectionPage { + return FabricCollectionPage{fn: getNextPage} +} + +// FabricCreationInput site details provided during the time of site creation +type FabricCreationInput struct { + // Properties - Fabric creation input. + Properties *FabricCreationInputProperties `json:"properties,omitempty"` +} + +// FabricCreationInputProperties properties of site details provided during the time of site creation +type FabricCreationInputProperties struct { + // CustomDetails - Fabric provider specific creation input. + CustomDetails BasicFabricSpecificCreationInput `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for FabricCreationInputProperties struct. +func (fcip *FabricCreationInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "customDetails": + if v != nil { + customDetails, err := unmarshalBasicFabricSpecificCreationInput(*v) + if err != nil { + return err + } + fcip.CustomDetails = customDetails + } + } + } + + return nil +} + +// FabricProperties fabric properties. +type FabricProperties struct { + // FriendlyName - Friendly name of the fabric. + FriendlyName *string `json:"friendlyName,omitempty"` + // EncryptionDetails - Encryption details for the fabric. + EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` + // RolloverEncryptionDetails - Rollover encryption details for the fabric. + RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"` + // InternalIdentifier - Dra Registration Id. + InternalIdentifier *string `json:"internalIdentifier,omitempty"` + // BcdrState - BCDR state of the fabric. + BcdrState *string `json:"bcdrState,omitempty"` + // CustomDetails - Fabric specific settings. + CustomDetails BasicFabricSpecificDetails `json:"customDetails,omitempty"` + // HealthErrorDetails - Fabric health error details. + HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` + // Health - Health of fabric. + Health *string `json:"health,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for FabricProperties struct. +func (fp *FabricProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "friendlyName": + if v != nil { + var friendlyName string + err = json.Unmarshal(*v, &friendlyName) + if err != nil { + return err + } + fp.FriendlyName = &friendlyName + } + case "encryptionDetails": + if v != nil { + var encryptionDetails EncryptionDetails + err = json.Unmarshal(*v, &encryptionDetails) + if err != nil { + return err + } + fp.EncryptionDetails = &encryptionDetails + } + case "rolloverEncryptionDetails": + if v != nil { + var rolloverEncryptionDetails EncryptionDetails + err = json.Unmarshal(*v, &rolloverEncryptionDetails) + if err != nil { + return err + } + fp.RolloverEncryptionDetails = &rolloverEncryptionDetails + } + case "internalIdentifier": + if v != nil { + var internalIdentifier string + err = json.Unmarshal(*v, &internalIdentifier) + if err != nil { + return err + } + fp.InternalIdentifier = &internalIdentifier + } + case "bcdrState": + if v != nil { + var bcdrState string + err = json.Unmarshal(*v, &bcdrState) + if err != nil { + return err + } + fp.BcdrState = &bcdrState + } + case "customDetails": + if v != nil { + customDetails, err := unmarshalBasicFabricSpecificDetails(*v) + if err != nil { + return err + } + fp.CustomDetails = customDetails + } + case "healthErrorDetails": + if v != nil { + var healthErrorDetails []HealthError + err = json.Unmarshal(*v, &healthErrorDetails) + if err != nil { + return err + } + fp.HealthErrorDetails = &healthErrorDetails + } + case "health": + if v != nil { + var health string + err = json.Unmarshal(*v, &health) + if err != nil { + return err + } + fp.Health = &health + } + } + } + + return nil +} + +// FabricReplicationGroupTaskDetails this class represents the fabric replication group task details. +type FabricReplicationGroupTaskDetails struct { + // SkippedReason - The skipped reason. + SkippedReason *string `json:"skippedReason,omitempty"` + // SkippedReasonString - The skipped reason string. + SkippedReasonString *string `json:"skippedReasonString,omitempty"` + // JobTask - The job entity. + JobTask *JobEntity `json:"jobTask,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { + frgtd.InstanceType = InstanceTypeFabricReplicationGroupTaskDetails + objectMap := make(map[string]interface{}) + if frgtd.SkippedReason != nil { + objectMap["skippedReason"] = frgtd.SkippedReason + } + if frgtd.SkippedReasonString != nil { + objectMap["skippedReasonString"] = frgtd.SkippedReasonString + } + if frgtd.JobTask != nil { + objectMap["jobTask"] = frgtd.JobTask + } + if frgtd.InstanceType != "" { + objectMap["instanceType"] = frgtd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return &frgtd, true +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &frgtd, true +} + +// BasicFabricSpecificCreateNetworkMappingInput input details specific to fabrics during Network Mapping. +type BasicFabricSpecificCreateNetworkMappingInput interface { + AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) + AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) + AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) + AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) +} + +// FabricSpecificCreateNetworkMappingInput input details specific to fabrics during Network Mapping. +type FabricSpecificCreateNetworkMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicFabricSpecificCreateNetworkMappingInput(body []byte) (BasicFabricSpecificCreateNetworkMappingInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAzureToAzure): + var atacnmi AzureToAzureCreateNetworkMappingInput + err := json.Unmarshal(body, &atacnmi) + return atacnmi, err + case string(InstanceTypeVmmToAzure): + var vtacnmi VmmToAzureCreateNetworkMappingInput + err := json.Unmarshal(body, &vtacnmi) + return vtacnmi, err + case string(InstanceTypeVmmToVmm): + var vtvcnmi VmmToVmmCreateNetworkMappingInput + err := json.Unmarshal(body, &vtvcnmi) + return vtvcnmi, err + default: + var fscnmi FabricSpecificCreateNetworkMappingInput + err := json.Unmarshal(body, &fscnmi) + return fscnmi, err + } +} +func unmarshalBasicFabricSpecificCreateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificCreateNetworkMappingInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fscnmiArray := make([]BasicFabricSpecificCreateNetworkMappingInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fscnmi, err := unmarshalBasicFabricSpecificCreateNetworkMappingInput(*rawMessage) + if err != nil { + return nil, err + } + fscnmiArray[index] = fscnmi + } + return fscnmiArray, nil +} + +// MarshalJSON is the custom marshaler for FabricSpecificCreateNetworkMappingInput. +func (fscnmi FabricSpecificCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + fscnmi.InstanceType = InstanceTypeFabricSpecificCreateNetworkMappingInput + objectMap := make(map[string]interface{}) + if fscnmi.InstanceType != "" { + objectMap["instanceType"] = fscnmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. +func (fscnmi FabricSpecificCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. +func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. +func (fscnmi FabricSpecificCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. +func (fscnmi FabricSpecificCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { + return &fscnmi, true +} + +// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for FabricSpecificCreateNetworkMappingInput. +func (fscnmi FabricSpecificCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { + return &fscnmi, true +} + +// BasicFabricSpecificCreationInput fabric provider specific settings. +type BasicFabricSpecificCreationInput interface { + AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) + AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) + AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) +} + +// FabricSpecificCreationInput fabric provider specific settings. +type FabricSpecificCreationInput struct { + // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicFabricSpecificCreationInput(body []byte) (BasicFabricSpecificCreationInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAzure): + var afci AzureFabricCreationInput + err := json.Unmarshal(body, &afci) + return afci, err + case string(InstanceTypeVMwareV2): + var vmvfci VMwareV2FabricCreationInput + err := json.Unmarshal(body, &vmvfci) + return vmvfci, err + default: + var fsci FabricSpecificCreationInput + err := json.Unmarshal(body, &fsci) + return fsci, err + } +} +func unmarshalBasicFabricSpecificCreationInputArray(body []byte) ([]BasicFabricSpecificCreationInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsciArray := make([]BasicFabricSpecificCreationInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsci, err := unmarshalBasicFabricSpecificCreationInput(*rawMessage) + if err != nil { + return nil, err + } + fsciArray[index] = fsci + } + return fsciArray, nil +} + +// MarshalJSON is the custom marshaler for FabricSpecificCreationInput. +func (fsci FabricSpecificCreationInput) MarshalJSON() ([]byte, error) { + fsci.InstanceType = InstanceTypeFabricSpecificCreationInput + objectMap := make(map[string]interface{}) + if fsci.InstanceType != "" { + objectMap["instanceType"] = fsci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. +func (fsci FabricSpecificCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { + return nil, false +} + +// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. +func (fsci FabricSpecificCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { + return nil, false +} + +// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. +func (fsci FabricSpecificCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { + return &fsci, true +} + +// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for FabricSpecificCreationInput. +func (fsci FabricSpecificCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { + return &fsci, true +} + +// BasicFabricSpecificDetails fabric specific details. +type BasicFabricSpecificDetails interface { + AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) + AsHyperVSiteDetails() (*HyperVSiteDetails, bool) + AsVmmDetails() (*VmmDetails, bool) + AsVMwareDetails() (*VMwareDetails, bool) + AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) + AsFabricSpecificDetails() (*FabricSpecificDetails, bool) +} + +// FabricSpecificDetails fabric specific details. +type FabricSpecificDetails struct { + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicFabricSpecificDetails(body []byte) (BasicFabricSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure): + var afsd AzureFabricSpecificDetails + err := json.Unmarshal(body, &afsd) + return afsd, err + case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite): + var hvsd HyperVSiteDetails + err := json.Unmarshal(body, &hvsd) + return hvsd, err + case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM): + var vd VmmDetails + err := json.Unmarshal(body, &vd) + return vd, err + case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware): + var vmd VMwareDetails + err := json.Unmarshal(body, &vmd) + return vmd, err + case string(InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2): + var vmvfsd VMwareV2FabricSpecificDetails + err := json.Unmarshal(body, &vmvfsd) + return vmvfsd, err + default: + var fsd FabricSpecificDetails + err := json.Unmarshal(body, &fsd) + return fsd, err + } +} +func unmarshalBasicFabricSpecificDetailsArray(body []byte) ([]BasicFabricSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsdArray := make([]BasicFabricSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsd, err := unmarshalBasicFabricSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + fsdArray[index] = fsd + } + return fsdArray, nil +} + +// MarshalJSON is the custom marshaler for FabricSpecificDetails. +func (fsd FabricSpecificDetails) MarshalJSON() ([]byte, error) { + fsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails + objectMap := make(map[string]interface{}) + if fsd.InstanceType != "" { + objectMap["instanceType"] = fsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. +func (fsd FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. +func (fsd FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVmmDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. +func (fsd FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. +func (fsd FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. +func (fsd FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false +} + +// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. +func (fsd FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { + return &fsd, true +} + +// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for FabricSpecificDetails. +func (fsd FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { + return &fsd, true +} + +// BasicFabricSpecificUpdateNetworkMappingInput input details specific to fabrics during Network Mapping. +type BasicFabricSpecificUpdateNetworkMappingInput interface { + AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) + AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) + AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) + AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) +} + +// FabricSpecificUpdateNetworkMappingInput input details specific to fabrics during Network Mapping. +type FabricSpecificUpdateNetworkMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicFabricSpecificUpdateNetworkMappingInput(body []byte) (BasicFabricSpecificUpdateNetworkMappingInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure): + var ataunmi AzureToAzureUpdateNetworkMappingInput + err := json.Unmarshal(body, &ataunmi) + return ataunmi, err + case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure): + var vtaunmi VmmToAzureUpdateNetworkMappingInput + err := json.Unmarshal(body, &vtaunmi) + return vtaunmi, err + case string(InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm): + var vtvunmi VmmToVmmUpdateNetworkMappingInput + err := json.Unmarshal(body, &vtvunmi) + return vtvunmi, err + default: + var fsunmi FabricSpecificUpdateNetworkMappingInput + err := json.Unmarshal(body, &fsunmi) + return fsunmi, err + } +} +func unmarshalBasicFabricSpecificUpdateNetworkMappingInputArray(body []byte) ([]BasicFabricSpecificUpdateNetworkMappingInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsunmiArray := make([]BasicFabricSpecificUpdateNetworkMappingInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsunmi, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*rawMessage) + if err != nil { + return nil, err + } + fsunmiArray[index] = fsunmi + } + return fsunmiArray, nil +} + +// MarshalJSON is the custom marshaler for FabricSpecificUpdateNetworkMappingInput. +func (fsunmi FabricSpecificUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + fsunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput + objectMap := make(map[string]interface{}) + if fsunmi.InstanceType != "" { + objectMap["instanceType"] = fsunmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. +func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. +func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. +func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. +func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { + return &fsunmi, true +} + +// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for FabricSpecificUpdateNetworkMappingInput. +func (fsunmi FabricSpecificUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { + return &fsunmi, true +} + +// FailoverJobDetails this class represents the details for a failover job. +type FailoverJobDetails struct { + // ProtectedItemDetails - The test VM details. + ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` + // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` + // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' + InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for FailoverJobDetails. +func (fjd FailoverJobDetails) MarshalJSON() ([]byte, error) { + fjd.InstanceType = InstanceTypeFailoverJobDetails + objectMap := make(map[string]interface{}) + if fjd.ProtectedItemDetails != nil { + objectMap["protectedItemDetails"] = fjd.ProtectedItemDetails + } + if fjd.AffectedObjectDetails != nil { + objectMap["affectedObjectDetails"] = fjd.AffectedObjectDetails + } + if fjd.InstanceType != "" { + objectMap["instanceType"] = fjd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAsrJobDetails is the BasicJobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the BasicJobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the BasicJobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return &fjd, true +} + +// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the BasicJobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsJobDetails is the BasicJobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsJobDetails() (*JobDetails, bool) { + return nil, false +} + +// AsBasicJobDetails is the BasicJobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { + return &fjd, true +} + +// FailoverProcessServerRequest request to failover a process server. +type FailoverProcessServerRequest struct { + // Properties - The properties of the PS Failover request. + Properties *FailoverProcessServerRequestProperties `json:"properties,omitempty"` +} + +// FailoverProcessServerRequestProperties the properties of the Failover Process Server request. +type FailoverProcessServerRequestProperties struct { + // ContainerName - The container identifier. + ContainerName *string `json:"containerName,omitempty"` + // SourceProcessServerID - The source process server. + SourceProcessServerID *string `json:"sourceProcessServerId,omitempty"` + // TargetProcessServerID - The new process server. + TargetProcessServerID *string `json:"targetProcessServerId,omitempty"` + // VmsToMigrate - The VMS to migrate. + VmsToMigrate *[]string `json:"vmsToMigrate,omitempty"` + // UpdateType - A value for failover type. It can be systemlevel/serverlevel + UpdateType *string `json:"updateType,omitempty"` +} + +// FailoverReplicationProtectedItemDetails failover details for a replication protected item. +type FailoverReplicationProtectedItemDetails struct { + // Name - The name. + Name *string `json:"name,omitempty"` + // FriendlyName - The friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` + // TestVMName - The test Vm name. + TestVMName *string `json:"testVmName,omitempty"` + // TestVMFriendlyName - The test Vm friendly name. + TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"` + // NetworkConnectionStatus - The network connection status. + NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"` + // NetworkFriendlyName - The network friendly name. + NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` + // Subnet - The network subnet. + Subnet *string `json:"subnet,omitempty"` + // RecoveryPointID - The recovery point Id. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // RecoveryPointTime - The recovery point time. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` +} + +// BasicGroupTaskDetails this class represents the group task details when parent child relationship exists in the +// drill down. +type BasicGroupTaskDetails interface { + AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) + AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) + AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) + AsGroupTaskDetails() (*GroupTaskDetails, bool) +} + +// GroupTaskDetails this class represents the group task details when parent child relationship exists in the +// drill down. +type GroupTaskDetails struct { + // ChildTasks - The child tasks. + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' + InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicGroupTaskDetails(body []byte) (BasicGroupTaskDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeInlineWorkflowTaskDetails): + var iwtd InlineWorkflowTaskDetails + err := json.Unmarshal(body, &iwtd) + return iwtd, err + case string(InstanceTypeRecoveryPlanGroupTaskDetails): + var rpgtd RecoveryPlanGroupTaskDetails + err := json.Unmarshal(body, &rpgtd) + return rpgtd, err + case string(InstanceTypeRecoveryPlanShutdownGroupTaskDetails): + var rpsgtd RecoveryPlanShutdownGroupTaskDetails + err := json.Unmarshal(body, &rpsgtd) + return rpsgtd, err + default: + var gtd GroupTaskDetails + err := json.Unmarshal(body, >d) + return gtd, err + } +} +func unmarshalBasicGroupTaskDetailsArray(body []byte) ([]BasicGroupTaskDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + gtdArray := make([]BasicGroupTaskDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + gtd, err := unmarshalBasicGroupTaskDetails(*rawMessage) + if err != nil { + return nil, err + } + gtdArray[index] = gtd + } + return gtdArray, nil +} + +// MarshalJSON is the custom marshaler for GroupTaskDetails. +func (gtd GroupTaskDetails) MarshalJSON() ([]byte, error) { + gtd.InstanceType = InstanceTypeGroupTaskDetails + objectMap := make(map[string]interface{}) + if gtd.ChildTasks != nil { + objectMap["childTasks"] = gtd.ChildTasks + } + if gtd.InstanceType != "" { + objectMap["instanceType"] = gtd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. +func (gtd GroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. +func (gtd GroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. +func (gtd GroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { + return nil, false +} + +// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. +func (gtd GroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { + return >d, true +} + +// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for GroupTaskDetails. +func (gtd GroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { + return >d, true +} + +// HealthError health Error +type HealthError struct { + // InnerHealthErrors - The inner health errors. HealthError having a list of HealthError as child errors is problematic. InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can utilize this in the same fashion as Exception -> InnerException. + InnerHealthErrors *[]InnerHealthError `json:"innerHealthErrors,omitempty"` + // ErrorSource - Source of error. + ErrorSource *string `json:"errorSource,omitempty"` + // ErrorType - Type of error. + ErrorType *string `json:"errorType,omitempty"` + // ErrorLevel - Level of error. + ErrorLevel *string `json:"errorLevel,omitempty"` + // ErrorCategory - Category of error. + ErrorCategory *string `json:"errorCategory,omitempty"` + // ErrorCode - Error code. + ErrorCode *string `json:"errorCode,omitempty"` + // SummaryMessage - Summary message of the entity. + SummaryMessage *string `json:"summaryMessage,omitempty"` + // ErrorMessage - Error message. + ErrorMessage *string `json:"errorMessage,omitempty"` + // PossibleCauses - Possible causes of error. + PossibleCauses *string `json:"possibleCauses,omitempty"` + // RecommendedAction - Recommended action to resolve error. + RecommendedAction *string `json:"recommendedAction,omitempty"` + // CreationTimeUtc - Error creation time (UTC) + CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"` + // RecoveryProviderErrorMessage - DRA error message. + RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` + // EntityID - ID of the entity. + EntityID *string `json:"entityId,omitempty"` + // ErrorID - The health error unique id. + ErrorID *string `json:"errorId,omitempty"` + // CustomerResolvability - Value indicating whether the health error is customer resolvable. Possible values include: 'Allowed', 'NotAllowed' + CustomerResolvability HealthErrorCustomerResolvability `json:"customerResolvability,omitempty"` +} + +// HealthErrorSummary class to define the summary of the health error details. +type HealthErrorSummary struct { + // SummaryCode - The code of the health error. + SummaryCode *string `json:"summaryCode,omitempty"` + // Category - The category of the health error. Possible values include: 'None', 'Replication', 'TestFailover', 'Configuration', 'FabricInfrastructure', 'VersionExpiry', 'AgentAutoUpdate' + Category HealthErrorCategory `json:"category,omitempty"` + // Severity - Severity of error. Possible values include: 'NONE', 'Warning', 'Error', 'Info' + Severity Severity `json:"severity,omitempty"` + // SummaryMessage - The summary message of the health error. + SummaryMessage *string `json:"summaryMessage,omitempty"` + // AffectedResourceType - The type of affected ARM resource. + AffectedResourceType *string `json:"affectedResourceType,omitempty"` + // AffectedResourceSubtype - The sub type of any subcomponent within the ARM resource that this might be applicable. Value remains null if not applicable. + AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"` + // AffectedResourceCorrelationIds - The list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific category and severity as well as count of item affected by an specific issue. + AffectedResourceCorrelationIds *[]string `json:"affectedResourceCorrelationIds,omitempty"` +} + +// HyperVReplica2012EventDetails model class for event details of a HyperVReplica E2E event. +type HyperVReplica2012EventDetails struct { + // ContainerName - The container friendly name. + ContainerName *string `json:"containerName,omitempty"` + // FabricName - The fabric friendly name. + FabricName *string `json:"fabricName,omitempty"` + // RemoteContainerName - The remote container name. + RemoteContainerName *string `json:"remoteContainerName,omitempty"` + // RemoteFabricName - The remote fabric name. + RemoteFabricName *string `json:"remoteFabricName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { + hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012 + objectMap := make(map[string]interface{}) + if hvr2ed.ContainerName != nil { + objectMap["containerName"] = hvr2ed.ContainerName + } + if hvr2ed.FabricName != nil { + objectMap["fabricName"] = hvr2ed.FabricName + } + if hvr2ed.RemoteContainerName != nil { + objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName + } + if hvr2ed.RemoteFabricName != nil { + objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName + } + if hvr2ed.InstanceType != "" { + objectMap["instanceType"] = hvr2ed.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return &hvr2ed, true +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &hvr2ed, true +} + +// HyperVReplica2012R2EventDetails model class for event details of a HyperVReplica blue E2E event. +type HyperVReplica2012R2EventDetails struct { + // ContainerName - The container friendly name. + ContainerName *string `json:"containerName,omitempty"` + // FabricName - The fabric friendly name. + FabricName *string `json:"fabricName,omitempty"` + // RemoteContainerName - The remote container name. + RemoteContainerName *string `json:"remoteContainerName,omitempty"` + // RemoteFabricName - The remote fabric name. + RemoteFabricName *string `json:"remoteFabricName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { + hvr2ed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 + objectMap := make(map[string]interface{}) + if hvr2ed.ContainerName != nil { + objectMap["containerName"] = hvr2ed.ContainerName + } + if hvr2ed.FabricName != nil { + objectMap["fabricName"] = hvr2ed.FabricName + } + if hvr2ed.RemoteContainerName != nil { + objectMap["remoteContainerName"] = hvr2ed.RemoteContainerName + } + if hvr2ed.RemoteFabricName != nil { + objectMap["remoteFabricName"] = hvr2ed.RemoteFabricName + } + if hvr2ed.InstanceType != "" { + objectMap["instanceType"] = hvr2ed.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return &hvr2ed, true +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &hvr2ed, true +} + +// HyperVReplicaAzureApplyRecoveryPointInput applyRecoveryPoint input specific to HyperVReplicaAzure +// provider. +type HyperVReplicaAzureApplyRecoveryPointInput struct { + // VaultLocation - The vault location where the recovery Vm resides. + VaultLocation *string `json:"vaultLocation,omitempty"` + // PrimaryKekCertificatePfx - The primary kek certificate pfx. + PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` + // SecondaryKekCertificatePfx - The secondary kek certificate pfx. + SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + hvraarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvraarpi.VaultLocation != nil { + objectMap["vaultLocation"] = hvraarpi.VaultLocation + } + if hvraarpi.PrimaryKekCertificatePfx != nil { + objectMap["primaryKekCertificatePfx"] = hvraarpi.PrimaryKekCertificatePfx + } + if hvraarpi.SecondaryKekCertificatePfx != nil { + objectMap["secondaryKekCertificatePfx"] = hvraarpi.SecondaryKekCertificatePfx + } + if hvraarpi.InstanceType != "" { + objectMap["instanceType"] = hvraarpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { + return &hvraarpi, true +} + +// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { + return &hvraarpi, true +} + +// HyperVReplicaAzureEnableProtectionInput azure specific enable protection input. +type HyperVReplicaAzureEnableProtectionInput struct { + // HvHostVMID - The Hyper-V host Vm Id. + HvHostVMID *string `json:"hvHostVmId,omitempty"` + // VMName - The Vm Name. + VMName *string `json:"vmName,omitempty"` + // OsType - The OS type associated with vm. + OsType *string `json:"osType,omitempty"` + // VhdID - The OS disk VHD id associated with vm. + VhdID *string `json:"vhdId,omitempty"` + // TargetStorageAccountID - The storage account name. + TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"` + // TargetAzureNetworkID - The selected target Azure network Id. + TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` + // TargetAzureSubnetID - The selected target Azure subnet Id. + TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` + // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` + // TargetAzureVMName - The target azure Vm Name. + TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` + // LogStorageAccountID - The storage account to be used for logging during replication. + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + // DisksToInclude - The list of VHD IDs of disks to be protected. + DisksToInclude *[]string `json:"disksToInclude,omitempty"` + // TargetAzureV1ResourceGroupID - The Id of the target resource group (for classic deployment) in which the failover VM is to be created. + TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` + // TargetAzureV2ResourceGroupID - The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` + // UseManagedDisks - A value indicating whether managed disks should be used during failover. + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' + InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { + hvraepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvraepi.HvHostVMID != nil { + objectMap["hvHostVmId"] = hvraepi.HvHostVMID + } + if hvraepi.VMName != nil { + objectMap["vmName"] = hvraepi.VMName + } + if hvraepi.OsType != nil { + objectMap["osType"] = hvraepi.OsType + } + if hvraepi.VhdID != nil { + objectMap["vhdId"] = hvraepi.VhdID + } + if hvraepi.TargetStorageAccountID != nil { + objectMap["targetStorageAccountId"] = hvraepi.TargetStorageAccountID + } + if hvraepi.TargetAzureNetworkID != nil { + objectMap["targetAzureNetworkId"] = hvraepi.TargetAzureNetworkID + } + if hvraepi.TargetAzureSubnetID != nil { + objectMap["targetAzureSubnetId"] = hvraepi.TargetAzureSubnetID + } + if hvraepi.EnableRdpOnTargetOption != nil { + objectMap["enableRdpOnTargetOption"] = hvraepi.EnableRdpOnTargetOption + } + if hvraepi.TargetAzureVMName != nil { + objectMap["targetAzureVmName"] = hvraepi.TargetAzureVMName + } + if hvraepi.LogStorageAccountID != nil { + objectMap["logStorageAccountId"] = hvraepi.LogStorageAccountID + } + if hvraepi.DisksToInclude != nil { + objectMap["disksToInclude"] = hvraepi.DisksToInclude + } + if hvraepi.TargetAzureV1ResourceGroupID != nil { + objectMap["targetAzureV1ResourceGroupId"] = hvraepi.TargetAzureV1ResourceGroupID + } + if hvraepi.TargetAzureV2ResourceGroupID != nil { + objectMap["targetAzureV2ResourceGroupId"] = hvraepi.TargetAzureV2ResourceGroupID + } + if hvraepi.UseManagedDisks != nil { + objectMap["useManagedDisks"] = hvraepi.UseManagedDisks + } + if hvraepi.InstanceType != "" { + objectMap["instanceType"] = hvraepi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return &hvraepi, true +} + +// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { + return &hvraepi, true +} + +// HyperVReplicaAzureEventDetails model class for event details of a HyperVReplica E2A event. +type HyperVReplicaAzureEventDetails struct { + // ContainerName - The container friendly name. + ContainerName *string `json:"containerName,omitempty"` + // FabricName - The fabric friendly name. + FabricName *string `json:"fabricName,omitempty"` + // RemoteContainerName - The remote container name. + RemoteContainerName *string `json:"remoteContainerName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { + hvraed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvraed.ContainerName != nil { + objectMap["containerName"] = hvraed.ContainerName + } + if hvraed.FabricName != nil { + objectMap["fabricName"] = hvraed.FabricName + } + if hvraed.RemoteContainerName != nil { + objectMap["remoteContainerName"] = hvraed.RemoteContainerName + } + if hvraed.InstanceType != "" { + objectMap["instanceType"] = hvraed.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return &hvraed, true +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &hvraed, true +} + +// HyperVReplicaAzureFailbackProviderInput hvrA provider specific input for failback. +type HyperVReplicaAzureFailbackProviderInput struct { + // DataSyncOption - Data sync option. + DataSyncOption *string `json:"dataSyncOption,omitempty"` + // RecoveryVMCreationOption - ALR options to create alternate recovery. + RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` + // ProviderIDForAlternateRecovery - Provider ID for alternate location + ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { + hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback + objectMap := make(map[string]interface{}) + if hvrafpi.DataSyncOption != nil { + objectMap["dataSyncOption"] = hvrafpi.DataSyncOption + } + if hvrafpi.RecoveryVMCreationOption != nil { + objectMap["recoveryVmCreationOption"] = hvrafpi.RecoveryVMCreationOption + } + if hvrafpi.ProviderIDForAlternateRecovery != nil { + objectMap["providerIdForAlternateRecovery"] = hvrafpi.ProviderIDForAlternateRecovery + } + if hvrafpi.InstanceType != "" { + objectMap["instanceType"] = hvrafpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return &hvrafpi, true +} + +// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { + return &hvrafpi, true +} + +// HyperVReplicaAzureFailoverProviderInput hvrA provider specific input for failover. +type HyperVReplicaAzureFailoverProviderInput struct { + // VaultLocation - Location of the vault. + VaultLocation *string `json:"vaultLocation,omitempty"` + // PrimaryKekCertificatePfx - Primary kek certificate pfx. + PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` + // SecondaryKekCertificatePfx - Secondary kek certificate pfx. + SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` + // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) MarshalJSON() ([]byte, error) { + hvrafpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvrafpi.VaultLocation != nil { + objectMap["vaultLocation"] = hvrafpi.VaultLocation + } + if hvrafpi.PrimaryKekCertificatePfx != nil { + objectMap["primaryKekCertificatePfx"] = hvrafpi.PrimaryKekCertificatePfx + } + if hvrafpi.SecondaryKekCertificatePfx != nil { + objectMap["secondaryKekCertificatePfx"] = hvrafpi.SecondaryKekCertificatePfx + } + if hvrafpi.RecoveryPointID != nil { + objectMap["recoveryPointId"] = hvrafpi.RecoveryPointID + } + if hvrafpi.InstanceType != "" { + objectMap["instanceType"] = hvrafpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return &hvrafpi, true +} + +// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { + return &hvrafpi, true +} + +// HyperVReplicaAzurePolicyDetails hyper-V Replica Azure specific protection profile details. +type HyperVReplicaAzurePolicyDetails struct { + // RecoveryPointHistoryDurationInHours - The duration (in hours) to which point the recovery history needs to be maintained. + RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"` + // ApplicationConsistentSnapshotFrequencyInHours - The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + // ReplicationInterval - The replication interval. + ReplicationInterval *int32 `json:"replicationInterval,omitempty"` + // OnlineReplicationStartTime - The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + // Encryption - A value indicating whether encryption is enabled for virtual machines in this cloud. + Encryption *string `json:"encryption,omitempty"` + // ActiveStorageAccountID - The active storage account Id. + ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { + hvrapd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvrapd.RecoveryPointHistoryDurationInHours != nil { + objectMap["recoveryPointHistoryDurationInHours"] = hvrapd.RecoveryPointHistoryDurationInHours + } + if hvrapd.ApplicationConsistentSnapshotFrequencyInHours != nil { + objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapd.ApplicationConsistentSnapshotFrequencyInHours + } + if hvrapd.ReplicationInterval != nil { + objectMap["replicationInterval"] = hvrapd.ReplicationInterval + } + if hvrapd.OnlineReplicationStartTime != nil { + objectMap["onlineReplicationStartTime"] = hvrapd.OnlineReplicationStartTime + } + if hvrapd.Encryption != nil { + objectMap["encryption"] = hvrapd.Encryption + } + if hvrapd.ActiveStorageAccountID != nil { + objectMap["activeStorageAccountId"] = hvrapd.ActiveStorageAccountID + } + if hvrapd.InstanceType != "" { + objectMap["instanceType"] = hvrapd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return &hvrapd, true +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &hvrapd, true +} + +// HyperVReplicaAzurePolicyInput hyper-V Replica Azure specific input for creating a protection profile. +type HyperVReplicaAzurePolicyInput struct { + // RecoveryPointHistoryDuration - The duration (in hours) to which point the recovery history needs to be maintained. + RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"` + // ApplicationConsistentSnapshotFrequencyInHours - The interval (in hours) at which Hyper-V Replica should create an application consistent snapshot within the VM. + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + // ReplicationInterval - The replication interval. + ReplicationInterval *int32 `json:"replicationInterval,omitempty"` + // OnlineReplicationStartTime - The scheduled start time for the initial replication. If this parameter is Null, the initial replication starts immediately. + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + // StorageAccounts - The list of storage accounts to which the VMs in the primary cloud can replicate to. + StorageAccounts *[]string `json:"storageAccounts,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { + hvrapi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvrapi.RecoveryPointHistoryDuration != nil { + objectMap["recoveryPointHistoryDuration"] = hvrapi.RecoveryPointHistoryDuration + } + if hvrapi.ApplicationConsistentSnapshotFrequencyInHours != nil { + objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrapi.ApplicationConsistentSnapshotFrequencyInHours + } + if hvrapi.ReplicationInterval != nil { + objectMap["replicationInterval"] = hvrapi.ReplicationInterval + } + if hvrapi.OnlineReplicationStartTime != nil { + objectMap["onlineReplicationStartTime"] = hvrapi.OnlineReplicationStartTime + } + if hvrapi.StorageAccounts != nil { + objectMap["storageAccounts"] = hvrapi.StorageAccounts + } + if hvrapi.InstanceType != "" { + objectMap["instanceType"] = hvrapi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return &hvrapi, true +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &hvrapi, true +} + +// HyperVReplicaAzureReplicationDetails hyper V Replica Azure provider specific settings. +type HyperVReplicaAzureReplicationDetails struct { + // AzureVMDiskDetails - Azure VM Disk details. + AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVmDiskDetails,omitempty"` + // RecoveryAzureVMName - Recovery Azure given name. + RecoveryAzureVMName *string `json:"recoveryAzureVmName,omitempty"` + // RecoveryAzureVMSize - The Recovery Azure VM size. + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + // RecoveryAzureStorageAccount - The recovery Azure storage account. + RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` + // RecoveryAzureLogStorageAccountID - The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. + RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` + // LastReplicatedTime - The Last replication time. + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + // RpoInSeconds - Last RPO value. + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + // LastRpoCalculatedTime - The last RPO calculated time. + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` + // VMID - The virtual machine Id. + VMID *string `json:"vmId,omitempty"` + // VMProtectionState - The protection state for the vm. + VMProtectionState *string `json:"vmProtectionState,omitempty"` + // VMProtectionStateDescription - The protection state description for the vm. + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + // InitialReplicationDetails - Initial replication details. + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + // VMNics - The PE Network details. + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + // SelectedRecoveryAzureNetworkID - The selected recovery azure network Id. + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + // SelectedSourceNicID - The selected source nic Id which will be used as the primary nic during failover. + SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` + // Encryption - The encryption info. + Encryption *string `json:"encryption,omitempty"` + // OSDetails - The operating system info. + OSDetails *OSDetails `json:"oSDetails,omitempty"` + // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. + SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` + // SourceVMCPUCount - The CPU count of the VM on the primary side. + SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` + // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` + // RecoveryAzureResourceGroupID - The target resource group Id. + RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` + // RecoveryAvailabilitySetID - The recovery availability set Id. + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + // UseManagedDisks - A value indicating whether managed disks should be used during failover. + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + // LicenseType - License Type of the VM to be used. + LicenseType *string `json:"licenseType,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { + hvrard.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvrard.AzureVMDiskDetails != nil { + objectMap["azureVmDiskDetails"] = hvrard.AzureVMDiskDetails + } + if hvrard.RecoveryAzureVMName != nil { + objectMap["recoveryAzureVmName"] = hvrard.RecoveryAzureVMName + } + if hvrard.RecoveryAzureVMSize != nil { + objectMap["recoveryAzureVMSize"] = hvrard.RecoveryAzureVMSize + } + if hvrard.RecoveryAzureStorageAccount != nil { + objectMap["recoveryAzureStorageAccount"] = hvrard.RecoveryAzureStorageAccount + } + if hvrard.RecoveryAzureLogStorageAccountID != nil { + objectMap["recoveryAzureLogStorageAccountId"] = hvrard.RecoveryAzureLogStorageAccountID + } + if hvrard.LastReplicatedTime != nil { + objectMap["lastReplicatedTime"] = hvrard.LastReplicatedTime + } + if hvrard.RpoInSeconds != nil { + objectMap["rpoInSeconds"] = hvrard.RpoInSeconds + } + if hvrard.LastRpoCalculatedTime != nil { + objectMap["lastRpoCalculatedTime"] = hvrard.LastRpoCalculatedTime + } + if hvrard.VMID != nil { + objectMap["vmId"] = hvrard.VMID + } + if hvrard.VMProtectionState != nil { + objectMap["vmProtectionState"] = hvrard.VMProtectionState + } + if hvrard.VMProtectionStateDescription != nil { + objectMap["vmProtectionStateDescription"] = hvrard.VMProtectionStateDescription + } + if hvrard.InitialReplicationDetails != nil { + objectMap["initialReplicationDetails"] = hvrard.InitialReplicationDetails + } + if hvrard.VMNics != nil { + objectMap["vmNics"] = hvrard.VMNics + } + if hvrard.SelectedRecoveryAzureNetworkID != nil { + objectMap["selectedRecoveryAzureNetworkId"] = hvrard.SelectedRecoveryAzureNetworkID + } + if hvrard.SelectedSourceNicID != nil { + objectMap["selectedSourceNicId"] = hvrard.SelectedSourceNicID + } + if hvrard.Encryption != nil { + objectMap["encryption"] = hvrard.Encryption + } + if hvrard.OSDetails != nil { + objectMap["oSDetails"] = hvrard.OSDetails + } + if hvrard.SourceVMRAMSizeInMB != nil { + objectMap["sourceVmRamSizeInMB"] = hvrard.SourceVMRAMSizeInMB + } + if hvrard.SourceVMCPUCount != nil { + objectMap["sourceVmCpuCount"] = hvrard.SourceVMCPUCount + } + if hvrard.EnableRdpOnTargetOption != nil { + objectMap["enableRdpOnTargetOption"] = hvrard.EnableRdpOnTargetOption + } + if hvrard.RecoveryAzureResourceGroupID != nil { + objectMap["recoveryAzureResourceGroupId"] = hvrard.RecoveryAzureResourceGroupID + } + if hvrard.RecoveryAvailabilitySetID != nil { + objectMap["recoveryAvailabilitySetId"] = hvrard.RecoveryAvailabilitySetID + } + if hvrard.UseManagedDisks != nil { + objectMap["useManagedDisks"] = hvrard.UseManagedDisks + } + if hvrard.LicenseType != nil { + objectMap["licenseType"] = hvrard.LicenseType + } + if hvrard.InstanceType != "" { + objectMap["instanceType"] = hvrard.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return &hvrard, true +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &hvrard, true +} + +// HyperVReplicaAzureReprotectInput azure specific reprotect input. +type HyperVReplicaAzureReprotectInput struct { + // HvHostVMID - The Hyper-V host Vm Id. + HvHostVMID *string `json:"hvHostVmId,omitempty"` + // VMName - The Vm Name. + VMName *string `json:"vmName,omitempty"` + // OsType - The OS type associated with vm. + OsType *string `json:"osType,omitempty"` + // VHDID - The OS disk VHD id associated with vm. + VHDID *string `json:"vHDId,omitempty"` + // StorageAccountID - The storage account name. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // LogStorageAccountID - The storage account to be used for logging during replication. + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' + InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { + hvrari.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvrari.HvHostVMID != nil { + objectMap["hvHostVmId"] = hvrari.HvHostVMID + } + if hvrari.VMName != nil { + objectMap["vmName"] = hvrari.VMName + } + if hvrari.OsType != nil { + objectMap["osType"] = hvrari.OsType + } + if hvrari.VHDID != nil { + objectMap["vHDId"] = hvrari.VHDID + } + if hvrari.StorageAccountID != nil { + objectMap["storageAccountId"] = hvrari.StorageAccountID + } + if hvrari.LogStorageAccountID != nil { + objectMap["logStorageAccountId"] = hvrari.LogStorageAccountID + } + if hvrari.InstanceType != "" { + objectMap["instanceType"] = hvrari.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return &hvrari, true +} + +// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return nil, false +} + +// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return nil, false +} + +// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { + return &hvrari, true +} + +// HyperVReplicaAzureUpdateReplicationProtectedItemInput hyperV replica Azure input to update replication +// protected item. +type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { + // RecoveryAzureV1ResourceGroupID - The recovery Azure resource group Id for classic deployment. + RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` + // RecoveryAzureV2ResourceGroupID - The recovery Azure resource group Id for resource manager deployment. + RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` + // UseManagedDisks - A value indicating whether managed disks should be used during failover. + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + hvraurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if hvraurpii.RecoveryAzureV1ResourceGroupID != nil { + objectMap["recoveryAzureV1ResourceGroupId"] = hvraurpii.RecoveryAzureV1ResourceGroupID + } + if hvraurpii.RecoveryAzureV2ResourceGroupID != nil { + objectMap["recoveryAzureV2ResourceGroupId"] = hvraurpii.RecoveryAzureV2ResourceGroupID + } + if hvraurpii.UseManagedDisks != nil { + objectMap["useManagedDisks"] = hvraurpii.UseManagedDisks + } + if hvraurpii.InstanceType != "" { + objectMap["instanceType"] = hvraurpii.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { + return &hvraurpii, true +} + +// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { + return nil, false +} + +// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { + return &hvraurpii, true +} + +// HyperVReplicaBaseEventDetails abstract model class for event details of a HyperVReplica E2E event. +type HyperVReplicaBaseEventDetails struct { + // ContainerName - The container friendly name. + ContainerName *string `json:"containerName,omitempty"` + // FabricName - The fabric friendly name. + FabricName *string `json:"fabricName,omitempty"` + // RemoteContainerName - The remote container name. + RemoteContainerName *string `json:"remoteContainerName,omitempty"` + // RemoteFabricName - The remote fabric name. + RemoteFabricName *string `json:"remoteFabricName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { + hvrbed.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails + objectMap := make(map[string]interface{}) + if hvrbed.ContainerName != nil { + objectMap["containerName"] = hvrbed.ContainerName + } + if hvrbed.FabricName != nil { + objectMap["fabricName"] = hvrbed.FabricName + } + if hvrbed.RemoteContainerName != nil { + objectMap["remoteContainerName"] = hvrbed.RemoteContainerName + } + if hvrbed.RemoteFabricName != nil { + objectMap["remoteFabricName"] = hvrbed.RemoteFabricName + } + if hvrbed.InstanceType != "" { + objectMap["instanceType"] = hvrbed.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return &hvrbed, true +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &hvrbed, true +} + +// HyperVReplicaBasePolicyDetails base class for HyperVReplica policy details. +type HyperVReplicaBasePolicyDetails struct { + // RecoveryPoints - A value indicating the number of recovery points. + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + // Compression - A value indicating whether compression has to be enabled. + Compression *string `json:"compression,omitempty"` + // InitialReplicationMethod - A value indicating whether IR is online. + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + // OnlineReplicationStartTime - A value indicating the online IR start time. + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + // OfflineReplicationImportPath - A value indicating the offline IR import path. + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + // OfflineReplicationExportPath - A value indicating the offline IR export path. + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + // ReplicationPort - A value indicating the recovery HTTPS port. + ReplicationPort *int32 `json:"replicationPort,omitempty"` + // AllowedAuthenticationType - A value indicating the authentication type. + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud + ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { + hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails + objectMap := make(map[string]interface{}) + if hvrbpd.RecoveryPoints != nil { + objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints + } + if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil { + objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours + } + if hvrbpd.Compression != nil { + objectMap["compression"] = hvrbpd.Compression + } + if hvrbpd.InitialReplicationMethod != nil { + objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod + } + if hvrbpd.OnlineReplicationStartTime != nil { + objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime + } + if hvrbpd.OfflineReplicationImportPath != nil { + objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath + } + if hvrbpd.OfflineReplicationExportPath != nil { + objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath + } + if hvrbpd.ReplicationPort != nil { + objectMap["replicationPort"] = hvrbpd.ReplicationPort + } + if hvrbpd.AllowedAuthenticationType != nil { + objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType + } + if hvrbpd.ReplicaDeletionOption != nil { + objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption + } + if hvrbpd.InstanceType != "" { + objectMap["instanceType"] = hvrbpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return &hvrbpd, true +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &hvrbpd, true +} + +// HyperVReplicaBaseReplicationDetails hyper V replica provider specific settings base class. +type HyperVReplicaBaseReplicationDetails struct { + // LastReplicatedTime - The Last replication time. + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + // VMNics - The PE Network details. + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + // VMID - The virtual machine Id. + VMID *string `json:"vmId,omitempty"` + // VMProtectionState - The protection state for the vm. + VMProtectionState *string `json:"vmProtectionState,omitempty"` + // VMProtectionStateDescription - The protection state description for the vm. + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + // InitialReplicationDetails - Initial replication details. + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + // VMDiskDetails - VM disk details. + VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { + hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails + objectMap := make(map[string]interface{}) + if hvrbrd.LastReplicatedTime != nil { + objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime + } + if hvrbrd.VMNics != nil { + objectMap["vmNics"] = hvrbrd.VMNics + } + if hvrbrd.VMID != nil { + objectMap["vmId"] = hvrbrd.VMID + } + if hvrbrd.VMProtectionState != nil { + objectMap["vmProtectionState"] = hvrbrd.VMProtectionState + } + if hvrbrd.VMProtectionStateDescription != nil { + objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription + } + if hvrbrd.InitialReplicationDetails != nil { + objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails + } + if hvrbrd.VMDiskDetails != nil { + objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails + } + if hvrbrd.InstanceType != "" { + objectMap["instanceType"] = hvrbrd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return &hvrbrd, true +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &hvrbrd, true +} + +// HyperVReplicaBluePolicyDetails hyper-V Replica Blue specific protection profile details. +type HyperVReplicaBluePolicyDetails struct { + // ReplicationFrequencyInSeconds - A value indicating the replication interval. + ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` + // RecoveryPoints - A value indicating the number of recovery points. + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + // Compression - A value indicating whether compression has to be enabled. + Compression *string `json:"compression,omitempty"` + // InitialReplicationMethod - A value indicating whether IR is online. + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + // OnlineReplicationStartTime - A value indicating the online IR start time. + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + // OfflineReplicationImportPath - A value indicating the offline IR import path. + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + // OfflineReplicationExportPath - A value indicating the offline IR export path. + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + // ReplicationPort - A value indicating the recovery HTTPS port. + ReplicationPort *int32 `json:"replicationPort,omitempty"` + // AllowedAuthenticationType - A value indicating the authentication type. + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud + ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { + hvrbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 + objectMap := make(map[string]interface{}) + if hvrbpd.ReplicationFrequencyInSeconds != nil { + objectMap["replicationFrequencyInSeconds"] = hvrbpd.ReplicationFrequencyInSeconds + } + if hvrbpd.RecoveryPoints != nil { + objectMap["recoveryPoints"] = hvrbpd.RecoveryPoints + } + if hvrbpd.ApplicationConsistentSnapshotFrequencyInHours != nil { + objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpd.ApplicationConsistentSnapshotFrequencyInHours + } + if hvrbpd.Compression != nil { + objectMap["compression"] = hvrbpd.Compression + } + if hvrbpd.InitialReplicationMethod != nil { + objectMap["initialReplicationMethod"] = hvrbpd.InitialReplicationMethod + } + if hvrbpd.OnlineReplicationStartTime != nil { + objectMap["onlineReplicationStartTime"] = hvrbpd.OnlineReplicationStartTime + } + if hvrbpd.OfflineReplicationImportPath != nil { + objectMap["offlineReplicationImportPath"] = hvrbpd.OfflineReplicationImportPath + } + if hvrbpd.OfflineReplicationExportPath != nil { + objectMap["offlineReplicationExportPath"] = hvrbpd.OfflineReplicationExportPath + } + if hvrbpd.ReplicationPort != nil { + objectMap["replicationPort"] = hvrbpd.ReplicationPort + } + if hvrbpd.AllowedAuthenticationType != nil { + objectMap["allowedAuthenticationType"] = hvrbpd.AllowedAuthenticationType + } + if hvrbpd.ReplicaDeletionOption != nil { + objectMap["replicaDeletionOption"] = hvrbpd.ReplicaDeletionOption + } + if hvrbpd.InstanceType != "" { + objectMap["instanceType"] = hvrbpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return &hvrbpd, true +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &hvrbpd, true +} + +// HyperVReplicaBluePolicyInput hyperV Replica Blue policy input. +type HyperVReplicaBluePolicyInput struct { + // ReplicationFrequencyInSeconds - A value indicating the replication interval. + ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` + // RecoveryPoints - A value indicating the number of recovery points. + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + // Compression - A value indicating whether compression has to be enabled. + Compression *string `json:"compression,omitempty"` + // InitialReplicationMethod - A value indicating whether IR is online. + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + // OnlineReplicationStartTime - A value indicating the online IR start time. + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + // OfflineReplicationImportPath - A value indicating the offline IR import path. + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + // OfflineReplicationExportPath - A value indicating the offline IR export path. + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + // ReplicationPort - A value indicating the recovery HTTPS port. + ReplicationPort *int32 `json:"replicationPort,omitempty"` + // AllowedAuthenticationType - A value indicating the authentication type. + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + // ReplicaDeletion - A value indicating whether the VM has to be auto deleted. + ReplicaDeletion *string `json:"replicaDeletion,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { + hvrbpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 + objectMap := make(map[string]interface{}) + if hvrbpi.ReplicationFrequencyInSeconds != nil { + objectMap["replicationFrequencyInSeconds"] = hvrbpi.ReplicationFrequencyInSeconds + } + if hvrbpi.RecoveryPoints != nil { + objectMap["recoveryPoints"] = hvrbpi.RecoveryPoints + } + if hvrbpi.ApplicationConsistentSnapshotFrequencyInHours != nil { + objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrbpi.ApplicationConsistentSnapshotFrequencyInHours + } + if hvrbpi.Compression != nil { + objectMap["compression"] = hvrbpi.Compression + } + if hvrbpi.InitialReplicationMethod != nil { + objectMap["initialReplicationMethod"] = hvrbpi.InitialReplicationMethod + } + if hvrbpi.OnlineReplicationStartTime != nil { + objectMap["onlineReplicationStartTime"] = hvrbpi.OnlineReplicationStartTime + } + if hvrbpi.OfflineReplicationImportPath != nil { + objectMap["offlineReplicationImportPath"] = hvrbpi.OfflineReplicationImportPath + } + if hvrbpi.OfflineReplicationExportPath != nil { + objectMap["offlineReplicationExportPath"] = hvrbpi.OfflineReplicationExportPath + } + if hvrbpi.ReplicationPort != nil { + objectMap["replicationPort"] = hvrbpi.ReplicationPort + } + if hvrbpi.AllowedAuthenticationType != nil { + objectMap["allowedAuthenticationType"] = hvrbpi.AllowedAuthenticationType + } + if hvrbpi.ReplicaDeletion != nil { + objectMap["replicaDeletion"] = hvrbpi.ReplicaDeletion + } + if hvrbpi.InstanceType != "" { + objectMap["instanceType"] = hvrbpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return &hvrbpi, true +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &hvrbpi, true +} + +// HyperVReplicaBlueReplicationDetails hyperV replica 2012 R2 (Blue) replication details. +type HyperVReplicaBlueReplicationDetails struct { + // LastReplicatedTime - The Last replication time. + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + // VMNics - The PE Network details. + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + // VMID - The virtual machine Id. + VMID *string `json:"vmId,omitempty"` + // VMProtectionState - The protection state for the vm. + VMProtectionState *string `json:"vmProtectionState,omitempty"` + // VMProtectionStateDescription - The protection state description for the vm. + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + // InitialReplicationDetails - Initial replication details. + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + // VMDiskDetails - VM disk details. + VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { + hvrbrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 + objectMap := make(map[string]interface{}) + if hvrbrd.LastReplicatedTime != nil { + objectMap["lastReplicatedTime"] = hvrbrd.LastReplicatedTime + } + if hvrbrd.VMNics != nil { + objectMap["vmNics"] = hvrbrd.VMNics + } + if hvrbrd.VMID != nil { + objectMap["vmId"] = hvrbrd.VMID + } + if hvrbrd.VMProtectionState != nil { + objectMap["vmProtectionState"] = hvrbrd.VMProtectionState + } + if hvrbrd.VMProtectionStateDescription != nil { + objectMap["vmProtectionStateDescription"] = hvrbrd.VMProtectionStateDescription + } + if hvrbrd.InitialReplicationDetails != nil { + objectMap["initialReplicationDetails"] = hvrbrd.InitialReplicationDetails + } + if hvrbrd.VMDiskDetails != nil { + objectMap["vMDiskDetails"] = hvrbrd.VMDiskDetails + } + if hvrbrd.InstanceType != "" { + objectMap["instanceType"] = hvrbrd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return &hvrbrd, true +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &hvrbrd, true +} + +// HyperVReplicaPolicyDetails hyper-V Replica Blue specific protection profile details. +type HyperVReplicaPolicyDetails struct { + // RecoveryPoints - A value indicating the number of recovery points. + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + // Compression - A value indicating whether compression has to be enabled. + Compression *string `json:"compression,omitempty"` + // InitialReplicationMethod - A value indicating whether IR is online. + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + // OnlineReplicationStartTime - A value indicating the online IR start time. + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + // OfflineReplicationImportPath - A value indicating the offline IR import path. + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + // OfflineReplicationExportPath - A value indicating the offline IR export path. + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + // ReplicationPort - A value indicating the recovery HTTPS port. + ReplicationPort *int32 `json:"replicationPort,omitempty"` + // AllowedAuthenticationType - A value indicating the authentication type. + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + // ReplicaDeletionOption - A value indicating whether the VM has to be auto deleted. Supported Values: String.Empty, None, OnRecoveryCloud + ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { + hvrpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 + objectMap := make(map[string]interface{}) + if hvrpd.RecoveryPoints != nil { + objectMap["recoveryPoints"] = hvrpd.RecoveryPoints + } + if hvrpd.ApplicationConsistentSnapshotFrequencyInHours != nil { + objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpd.ApplicationConsistentSnapshotFrequencyInHours + } + if hvrpd.Compression != nil { + objectMap["compression"] = hvrpd.Compression + } + if hvrpd.InitialReplicationMethod != nil { + objectMap["initialReplicationMethod"] = hvrpd.InitialReplicationMethod + } + if hvrpd.OnlineReplicationStartTime != nil { + objectMap["onlineReplicationStartTime"] = hvrpd.OnlineReplicationStartTime + } + if hvrpd.OfflineReplicationImportPath != nil { + objectMap["offlineReplicationImportPath"] = hvrpd.OfflineReplicationImportPath + } + if hvrpd.OfflineReplicationExportPath != nil { + objectMap["offlineReplicationExportPath"] = hvrpd.OfflineReplicationExportPath + } + if hvrpd.ReplicationPort != nil { + objectMap["replicationPort"] = hvrpd.ReplicationPort + } + if hvrpd.AllowedAuthenticationType != nil { + objectMap["allowedAuthenticationType"] = hvrpd.AllowedAuthenticationType + } + if hvrpd.ReplicaDeletionOption != nil { + objectMap["replicaDeletionOption"] = hvrpd.ReplicaDeletionOption + } + if hvrpd.InstanceType != "" { + objectMap["instanceType"] = hvrpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return &hvrpd, true +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &hvrpd, true +} + +// HyperVReplicaPolicyInput hyper-V Replica specific policy Input. +type HyperVReplicaPolicyInput struct { + // RecoveryPoints - A value indicating the number of recovery points. + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + // ApplicationConsistentSnapshotFrequencyInHours - A value indicating the application consistent frequency. + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + // Compression - A value indicating whether compression has to be enabled. + Compression *string `json:"compression,omitempty"` + // InitialReplicationMethod - A value indicating whether IR is online. + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + // OnlineReplicationStartTime - A value indicating the online IR start time. + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + // OfflineReplicationImportPath - A value indicating the offline IR import path. + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + // OfflineReplicationExportPath - A value indicating the offline IR export path. + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + // ReplicationPort - A value indicating the recovery HTTPS port. + ReplicationPort *int32 `json:"replicationPort,omitempty"` + // AllowedAuthenticationType - A value indicating the authentication type. + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + // ReplicaDeletion - A value indicating whether the VM has to be auto deleted. + ReplicaDeletion *string `json:"replicaDeletion,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { + hvrpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012 + objectMap := make(map[string]interface{}) + if hvrpi.RecoveryPoints != nil { + objectMap["recoveryPoints"] = hvrpi.RecoveryPoints + } + if hvrpi.ApplicationConsistentSnapshotFrequencyInHours != nil { + objectMap["applicationConsistentSnapshotFrequencyInHours"] = hvrpi.ApplicationConsistentSnapshotFrequencyInHours + } + if hvrpi.Compression != nil { + objectMap["compression"] = hvrpi.Compression + } + if hvrpi.InitialReplicationMethod != nil { + objectMap["initialReplicationMethod"] = hvrpi.InitialReplicationMethod + } + if hvrpi.OnlineReplicationStartTime != nil { + objectMap["onlineReplicationStartTime"] = hvrpi.OnlineReplicationStartTime + } + if hvrpi.OfflineReplicationImportPath != nil { + objectMap["offlineReplicationImportPath"] = hvrpi.OfflineReplicationImportPath + } + if hvrpi.OfflineReplicationExportPath != nil { + objectMap["offlineReplicationExportPath"] = hvrpi.OfflineReplicationExportPath + } + if hvrpi.ReplicationPort != nil { + objectMap["replicationPort"] = hvrpi.ReplicationPort + } + if hvrpi.AllowedAuthenticationType != nil { + objectMap["allowedAuthenticationType"] = hvrpi.AllowedAuthenticationType + } + if hvrpi.ReplicaDeletion != nil { + objectMap["replicaDeletion"] = hvrpi.ReplicaDeletion + } + if hvrpi.InstanceType != "" { + objectMap["instanceType"] = hvrpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return &hvrpi, true +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &hvrpi, true +} + +// HyperVReplicaReplicationDetails hyperV replica 2012 replication details. +type HyperVReplicaReplicationDetails struct { + // LastReplicatedTime - The Last replication time. + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + // VMNics - The PE Network details. + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + // VMID - The virtual machine Id. + VMID *string `json:"vmId,omitempty"` + // VMProtectionState - The protection state for the vm. + VMProtectionState *string `json:"vmProtectionState,omitempty"` + // VMProtectionStateDescription - The protection state description for the vm. + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + // InitialReplicationDetails - Initial replication details. + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + // VMDiskDetails - VM disk details. + VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { + hvrrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 + objectMap := make(map[string]interface{}) + if hvrrd.LastReplicatedTime != nil { + objectMap["lastReplicatedTime"] = hvrrd.LastReplicatedTime + } + if hvrrd.VMNics != nil { + objectMap["vmNics"] = hvrrd.VMNics + } + if hvrrd.VMID != nil { + objectMap["vmId"] = hvrrd.VMID + } + if hvrrd.VMProtectionState != nil { + objectMap["vmProtectionState"] = hvrrd.VMProtectionState + } + if hvrrd.VMProtectionStateDescription != nil { + objectMap["vmProtectionStateDescription"] = hvrrd.VMProtectionStateDescription + } + if hvrrd.InitialReplicationDetails != nil { + objectMap["initialReplicationDetails"] = hvrrd.InitialReplicationDetails + } + if hvrrd.VMDiskDetails != nil { + objectMap["vMDiskDetails"] = hvrrd.VMDiskDetails + } + if hvrrd.InstanceType != "" { + objectMap["instanceType"] = hvrrd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return &hvrrd, true +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &hvrrd, true +} + +// HyperVSiteDetails hyperVSite fabric specific details. +type HyperVSiteDetails struct { + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) MarshalJSON() ([]byte, error) { + hvsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite + objectMap := make(map[string]interface{}) + if hvsd.InstanceType != "" { + objectMap["instanceType"] = hvsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return &hvsd, true +} + +// AsVmmDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false +} + +// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { + return nil, false +} + +// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { + return &hvsd, true +} + +// HyperVVirtualMachineDetails single Host fabric provider specific VM settings. +type HyperVVirtualMachineDetails struct { + // SourceItemID - The source id of the object. + SourceItemID *string `json:"sourceItemId,omitempty"` + // Generation - The id of the object in fabric. + Generation *string `json:"generation,omitempty"` + // OsDetails - The Last replication time. + OsDetails *OSDetails `json:"osDetails,omitempty"` + // DiskDetails - The Last successful failover time. + DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` + // HasPhysicalDisk - A value indicating whether the VM has a physical disk attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' + HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"` + // HasFibreChannelAdapter - A value indicating whether the VM has a fibre channel adapter attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' + HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` + // HasSharedVhd - A value indicating whether the VM has a shared VHD attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' + HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' + InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { + hvvmd.InstanceType = InstanceTypeHyperVVirtualMachine + objectMap := make(map[string]interface{}) + if hvvmd.SourceItemID != nil { + objectMap["sourceItemId"] = hvvmd.SourceItemID + } + if hvvmd.Generation != nil { + objectMap["generation"] = hvvmd.Generation + } + if hvvmd.OsDetails != nil { + objectMap["osDetails"] = hvvmd.OsDetails + } + if hvvmd.DiskDetails != nil { + objectMap["diskDetails"] = hvvmd.DiskDetails + } + if hvvmd.HasPhysicalDisk != "" { + objectMap["hasPhysicalDisk"] = hvvmd.HasPhysicalDisk + } + if hvvmd.HasFibreChannelAdapter != "" { + objectMap["hasFibreChannelAdapter"] = hvvmd.HasFibreChannelAdapter + } + if hvvmd.HasSharedVhd != "" { + objectMap["hasSharedVhd"] = hvvmd.HasSharedVhd + } + if hvvmd.InstanceType != "" { + objectMap["instanceType"] = hvvmd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return &hvvmd, true +} + +// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return nil, false +} + +// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { + return nil, false +} + +// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return nil, false +} + +// AsConfigurationSettings is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { + return nil, false +} + +// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { + return &hvvmd, true +} + +// IdentityProviderDetails identity provider details. +type IdentityProviderDetails struct { + // TenantID - The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + TenantID *string `json:"tenantId,omitempty"` + // ApplicationID - The application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + ApplicationID *string `json:"applicationId,omitempty"` + // ObjectID - The object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + ObjectID *string `json:"objectId,omitempty"` + // Audience - The intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + Audience *string `json:"audience,omitempty"` + // AadAuthority - The base authority for Azure Active Directory authentication. + AadAuthority *string `json:"aadAuthority,omitempty"` +} + +// IdentityProviderInput identity provider input. +type IdentityProviderInput struct { + // TenantID - The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + TenantID *string `json:"tenantId,omitempty"` + // ApplicationID - The application/client Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. + ApplicationID *string `json:"applicationId,omitempty"` + // ObjectID - The object Id of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + ObjectID *string `json:"objectId,omitempty"` + // Audience - The intended Audience of the service principal with which the on-premise management/data plane components would communicate with our Azure services. + Audience *string `json:"audience,omitempty"` + // AadAuthority - The base authority for Azure Active Directory authentication. + AadAuthority *string `json:"aadAuthority,omitempty"` +} + +// InconsistentVMDetails this class stores the monitoring details for consistency check of inconsistent +// Protected Entity. +type InconsistentVMDetails struct { + // VMName - The Vm name. + VMName *string `json:"vmName,omitempty"` + // CloudName - The Cloud name. + CloudName *string `json:"cloudName,omitempty"` + // Details - The list of details regarding state of the Protected Entity in SRS and On prem. + Details *[]string `json:"details,omitempty"` + // ErrorIds - The list of error ids. + ErrorIds *[]string `json:"errorIds,omitempty"` +} + +// InitialReplicationDetails initial replication details. +type InitialReplicationDetails struct { + // InitialReplicationType - Initial replication type. + InitialReplicationType *string `json:"initialReplicationType,omitempty"` + // InitialReplicationProgressPercentage - The initial replication progress percentage. + InitialReplicationProgressPercentage *string `json:"initialReplicationProgressPercentage,omitempty"` +} + +// InlineWorkflowTaskDetails this class represents the inline workflow task details. +type InlineWorkflowTaskDetails struct { + // WorkflowIds - The list of child workflow ids. + WorkflowIds *[]string `json:"workflowIds,omitempty"` + // ChildTasks - The child tasks. + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' + InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { + iwtd.InstanceType = InstanceTypeInlineWorkflowTaskDetails + objectMap := make(map[string]interface{}) + if iwtd.WorkflowIds != nil { + objectMap["workflowIds"] = iwtd.WorkflowIds + } + if iwtd.ChildTasks != nil { + objectMap["childTasks"] = iwtd.ChildTasks + } + if iwtd.InstanceType != "" { + objectMap["instanceType"] = iwtd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { + return &iwtd, true +} + +// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { + return nil, false +} + +// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { + return nil, false +} + +// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { + return &iwtd, true +} + +// InMageAgentDetails the details of the InMage agent. +type InMageAgentDetails struct { + // AgentVersion - The agent version. + AgentVersion *string `json:"agentVersion,omitempty"` + // AgentUpdateStatus - A value indicating whether installed agent needs to be updated. + AgentUpdateStatus *string `json:"agentUpdateStatus,omitempty"` + // PostUpdateRebootStatus - A value indicating whether reboot is required after update is applied. + PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"` + // AgentExpiryDate - Agent expiry date. + AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` +} + +// InMageAgentVersionDetails inMage agent version details. +type InMageAgentVersionDetails struct { + // PostUpdateRebootStatus - A value indicating whether reboot is required after update is applied. + PostUpdateRebootStatus *string `json:"postUpdateRebootStatus,omitempty"` + // Version - The agent version. + Version *string `json:"version,omitempty"` + // ExpiryDate - Version expiry date. + ExpiryDate *date.Time `json:"expiryDate,omitempty"` + // Status - A value indicating whether security update required. Possible values include: 'Supported', 'NotSupported', 'Deprecated', 'UpdateRequired', 'SecurityUpdateRequired' + Status AgentVersionStatus `json:"status,omitempty"` +} + +// InMageAzureV2ApplyRecoveryPointInput applyRecoveryPoint input specific to InMageAzureV2 provider. +type InMageAzureV2ApplyRecoveryPointInput struct { + // VaultLocation - The vault location where the recovery Vm resides. + VaultLocation *string `json:"vaultLocation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeApplyRecoveryPointProviderSpecificInput', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicApplyRecoveryPointProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + imavarpi.InstanceType = InstanceTypeBasicApplyRecoveryPointProviderSpecificInputInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavarpi.VaultLocation != nil { + objectMap["vaultLocation"] = imavarpi.VaultLocation + } + if imavarpi.InstanceType != "" { + objectMap["instanceType"] = imavarpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsInMageAzureV2ApplyRecoveryPointInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { + return &imavarpi, true +} + +// AsApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsApplyRecoveryPointProviderSpecificInput() (*ApplyRecoveryPointProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicApplyRecoveryPointProviderSpecificInput is the BasicApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsBasicApplyRecoveryPointProviderSpecificInput() (BasicApplyRecoveryPointProviderSpecificInput, bool) { + return &imavarpi, true +} + +// InMageAzureV2DiskInputDetails disk input details. +type InMageAzureV2DiskInputDetails struct { + // DiskID - The DiskId. + DiskID *string `json:"diskId,omitempty"` + // LogStorageAccountID - The LogStorageAccountId. + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + // DiskType - The DiskType. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS' + DiskType DiskAccountType `json:"diskType,omitempty"` +} + +// InMageAzureV2EnableProtectionInput vMware Azure specific enable protection input. +type InMageAzureV2EnableProtectionInput struct { + // MasterTargetID - The Master target Id. + MasterTargetID *string `json:"masterTargetId,omitempty"` + // ProcessServerID - The Process Server Id. + ProcessServerID *string `json:"processServerId,omitempty"` + // StorageAccountID - The storage account name. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // RunAsAccountID - The CS account Id. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + // MultiVMGroupID - The multi vm group Id. + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + // MultiVMGroupName - The multi vm group name. + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + // DisksToInclude - The disks to include list. + DisksToInclude *[]InMageAzureV2DiskInputDetails `json:"disksToInclude,omitempty"` + // TargetAzureNetworkID - The selected target Azure network Id. + TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` + // TargetAzureSubnetID - The selected target Azure subnet Id. + TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` + // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` + // TargetAzureVMName - The target azure Vm Name. + TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` + // LogStorageAccountID - The storage account to be used for logging during replication. + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + // TargetAzureV1ResourceGroupID - The Id of the target resource group (for classic deployment) in which the failover VM is to be created. + TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` + // TargetAzureV2ResourceGroupID - The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created. + TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` + // DiskType - The DiskType. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS' + DiskType DiskAccountType `json:"diskType,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' + InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { + imavepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavepi.MasterTargetID != nil { + objectMap["masterTargetId"] = imavepi.MasterTargetID + } + if imavepi.ProcessServerID != nil { + objectMap["processServerId"] = imavepi.ProcessServerID + } + if imavepi.StorageAccountID != nil { + objectMap["storageAccountId"] = imavepi.StorageAccountID + } + if imavepi.RunAsAccountID != nil { + objectMap["runAsAccountId"] = imavepi.RunAsAccountID + } + if imavepi.MultiVMGroupID != nil { + objectMap["multiVmGroupId"] = imavepi.MultiVMGroupID + } + if imavepi.MultiVMGroupName != nil { + objectMap["multiVmGroupName"] = imavepi.MultiVMGroupName + } + if imavepi.DisksToInclude != nil { + objectMap["disksToInclude"] = imavepi.DisksToInclude + } + if imavepi.TargetAzureNetworkID != nil { + objectMap["targetAzureNetworkId"] = imavepi.TargetAzureNetworkID + } + if imavepi.TargetAzureSubnetID != nil { + objectMap["targetAzureSubnetId"] = imavepi.TargetAzureSubnetID + } + if imavepi.EnableRdpOnTargetOption != nil { + objectMap["enableRdpOnTargetOption"] = imavepi.EnableRdpOnTargetOption + } + if imavepi.TargetAzureVMName != nil { + objectMap["targetAzureVmName"] = imavepi.TargetAzureVMName + } + if imavepi.LogStorageAccountID != nil { + objectMap["logStorageAccountId"] = imavepi.LogStorageAccountID + } + if imavepi.TargetAzureV1ResourceGroupID != nil { + objectMap["targetAzureV1ResourceGroupId"] = imavepi.TargetAzureV1ResourceGroupID + } + if imavepi.TargetAzureV2ResourceGroupID != nil { + objectMap["targetAzureV2ResourceGroupId"] = imavepi.TargetAzureV2ResourceGroupID + } + if imavepi.DiskType != "" { + objectMap["diskType"] = imavepi.DiskType + } + if imavepi.InstanceType != "" { + objectMap["instanceType"] = imavepi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return &imavepi, true +} + +// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { + return &imavepi, true +} + +// InMageAzureV2EventDetails model class for event details of a VMwareAzureV2 event. +type InMageAzureV2EventDetails struct { + // EventType - InMage Event type. Takes one of the values of {InMageDataContract.InMageMonitoringEventType}. + EventType *string `json:"eventType,omitempty"` + // Category - InMage Event Category. + Category *string `json:"category,omitempty"` + // Component - InMage Event Component. + Component *string `json:"component,omitempty"` + // CorrectiveAction - Corrective Action string for the event. + CorrectiveAction *string `json:"correctiveAction,omitempty"` + // Details - InMage Event Details. + Details *string `json:"details,omitempty"` + // Summary - InMage Event Summary. + Summary *string `json:"summary,omitempty"` + // SiteName - VMware Site name. + SiteName *string `json:"siteName,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeEventProviderSpecificDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeHyperVReplicaBaseEventDetails', 'InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicEventProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { + imaved.InstanceType = InstanceTypeBasicEventProviderSpecificDetailsInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imaved.EventType != nil { + objectMap["eventType"] = imaved.EventType + } + if imaved.Category != nil { + objectMap["category"] = imaved.Category + } + if imaved.Component != nil { + objectMap["component"] = imaved.Component + } + if imaved.CorrectiveAction != nil { + objectMap["correctiveAction"] = imaved.CorrectiveAction + } + if imaved.Details != nil { + objectMap["details"] = imaved.Details + } + if imaved.Summary != nil { + objectMap["summary"] = imaved.Summary + } + if imaved.SiteName != nil { + objectMap["siteName"] = imaved.SiteName + } + if imaved.InstanceType != "" { + objectMap["instanceType"] = imaved.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseEventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return &imaved, true +} + +// AsEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsEventProviderSpecificDetails() (*EventProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventProviderSpecificDetails is the BasicEventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsBasicEventProviderSpecificDetails() (BasicEventProviderSpecificDetails, bool) { + return &imaved, true +} + +// InMageAzureV2FailoverProviderInput inMageAzureV2 provider specific input for failover. +type InMageAzureV2FailoverProviderInput struct { + // VaultLocation - Location of the vault. + VaultLocation *string `json:"vaultLocation,omitempty"` + // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) MarshalJSON() ([]byte, error) { + imavfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavfpi.VaultLocation != nil { + objectMap["vaultLocation"] = imavfpi.VaultLocation + } + if imavfpi.RecoveryPointID != nil { + objectMap["recoveryPointId"] = imavfpi.RecoveryPointID + } + if imavfpi.InstanceType != "" { + objectMap["instanceType"] = imavfpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return &imavfpi, true +} + +// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { + return &imavfpi, true +} + +// InMageAzureV2ManagedDiskDetails inMageAzureV2 Managed disk details. +type InMageAzureV2ManagedDiskDetails struct { + // DiskID - The disk id. + DiskID *string `json:"diskId,omitempty"` + // SeedManagedDiskID - Seed managed disk Id. + SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"` + // ReplicaDiskType - The replica disk type. + ReplicaDiskType *string `json:"replicaDiskType,omitempty"` +} + +// InMageAzureV2PolicyDetails inMage Azure v2 specific protection profile details. +type InMageAzureV2PolicyDetails struct { + // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { + imavpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavpd.CrashConsistentFrequencyInMinutes != nil { + objectMap["crashConsistentFrequencyInMinutes"] = imavpd.CrashConsistentFrequencyInMinutes + } + if imavpd.RecoveryPointThresholdInMinutes != nil { + objectMap["recoveryPointThresholdInMinutes"] = imavpd.RecoveryPointThresholdInMinutes + } + if imavpd.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = imavpd.RecoveryPointHistory + } + if imavpd.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = imavpd.AppConsistentFrequencyInMinutes + } + if imavpd.MultiVMSyncStatus != nil { + objectMap["multiVmSyncStatus"] = imavpd.MultiVMSyncStatus + } + if imavpd.InstanceType != "" { + objectMap["instanceType"] = imavpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return &imavpd, true +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &imavpd, true +} + +// InMageAzureV2PolicyInput vMWare Azure specific policy Input. +type InMageAzureV2PolicyInput struct { + // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' + MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { + imavpi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavpi.RecoveryPointThresholdInMinutes != nil { + objectMap["recoveryPointThresholdInMinutes"] = imavpi.RecoveryPointThresholdInMinutes + } + if imavpi.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = imavpi.RecoveryPointHistory + } + if imavpi.CrashConsistentFrequencyInMinutes != nil { + objectMap["crashConsistentFrequencyInMinutes"] = imavpi.CrashConsistentFrequencyInMinutes + } + if imavpi.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = imavpi.AppConsistentFrequencyInMinutes + } + if imavpi.MultiVMSyncStatus != "" { + objectMap["multiVmSyncStatus"] = imavpi.MultiVMSyncStatus + } + if imavpi.InstanceType != "" { + objectMap["instanceType"] = imavpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return &imavpi, true +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &imavpi, true +} + +// InMageAzureV2ProtectedDiskDetails inMageAzureV2 protected disk details. +type InMageAzureV2ProtectedDiskDetails struct { + // DiskID - The disk id. + DiskID *string `json:"diskId,omitempty"` + // DiskName - The disk name. + DiskName *string `json:"diskName,omitempty"` + // ProtectionStage - The protection stage. + ProtectionStage *string `json:"protectionStage,omitempty"` + // HealthErrorCode - The health error code for the disk. + HealthErrorCode *string `json:"healthErrorCode,omitempty"` + // RpoInSeconds - The RPO in seconds. + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + // ResyncRequired - A value indicating whether resync is required for this disk. + ResyncRequired *string `json:"resyncRequired,omitempty"` + // ResyncProgressPercentage - The resync progress percentage. + ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` + // ResyncDurationInSeconds - The resync duration in seconds. + ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` + // DiskCapacityInBytes - The disk capacity in bytes. + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + // FileSystemCapacityInBytes - The disk file system capacity in bytes. + FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` + // SourceDataInMegaBytes - The source data transit in MB. + SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"` + // PsDataInMegaBytes - The PS data transit in MB. + PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"` + // TargetDataInMegaBytes - The target data transit in MB. + TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"` + // DiskResized - A value indicating whether disk is resized. + DiskResized *string `json:"diskResized,omitempty"` + // LastRpoCalculatedTime - The last RPO calculated time. + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` +} + +// InMageAzureV2RecoveryPointDetails inMage Azure V2 provider specific recovery point details. +type InMageAzureV2RecoveryPointDetails struct { + // IsMultiVMSyncPoint - A value indicating whether the recovery point is multi VM consistent. + IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2RecoveryPointDetails. +func (imavrpd InMageAzureV2RecoveryPointDetails) MarshalJSON() ([]byte, error) { + imavrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavrpd.IsMultiVMSyncPoint != nil { + objectMap["isMultiVmSyncPoint"] = imavrpd.IsMultiVMSyncPoint + } + if imavrpd.InstanceType != "" { + objectMap["instanceType"] = imavrpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2ARecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. +func (imavrpd InMageAzureV2RecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) { + return nil, false +} + +// AsInMageAzureV2RecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. +func (imavrpd InMageAzureV2RecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) { + return &imavrpd, true +} + +// AsProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. +func (imavrpd InMageAzureV2RecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) { + return nil, false +} + +// AsBasicProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for InMageAzureV2RecoveryPointDetails. +func (imavrpd InMageAzureV2RecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) { + return &imavrpd, true +} + +// InMageAzureV2ReplicationDetails inMageAzureV2 provider specific settings +type InMageAzureV2ReplicationDetails struct { + // InfrastructureVMID - The infrastructure VM Id. + InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` + // VCenterInfrastructureID - The vCenter infrastructure Id. + VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` + // ProtectionStage - The protection stage. + ProtectionStage *string `json:"protectionStage,omitempty"` + // VMID - The virtual machine Id. + VMID *string `json:"vmId,omitempty"` + // VMProtectionState - The protection state for the vm. + VMProtectionState *string `json:"vmProtectionState,omitempty"` + // VMProtectionStateDescription - The protection state description for the vm. + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + // ResyncProgressPercentage - The resync progress percentage. + ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` + // RpoInSeconds - The RPO in seconds. + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + // CompressedDataRateInMB - The compressed data change rate in MB. + CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` + // UncompressedDataRateInMB - The uncompressed data change rate in MB. + UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` + // IPAddress - The source IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // AgentVersion - The agent version. + AgentVersion *string `json:"agentVersion,omitempty"` + // AgentExpiryDate - Agent expiry date. + AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` + // IsAgentUpdateRequired - A value indicating whether installed agent needs to be updated. + IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` + // IsRebootAfterUpdateRequired - A value indicating whether the source server requires a restart after update. + IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` + // LastHeartbeat - The last heartbeat received from the source server. + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + // ProcessServerID - The process server Id. + ProcessServerID *string `json:"processServerId,omitempty"` + // MultiVMGroupID - The multi vm group Id. + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + // MultiVMGroupName - The multi vm group name. + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi vm sync is enabled or disabled. + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + // ProtectedDisks - The list of protected disks. + ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` + // DiskResized - A value indicating whether any disk is resized for this VM. + DiskResized *string `json:"diskResized,omitempty"` + // MasterTargetID - The master target Id. + MasterTargetID *string `json:"masterTargetId,omitempty"` + // SourceVMCPUCount - The CPU count of the VM on the primary side. + SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` + // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. + SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` + // OsType - The type of the OS on the VM. + OsType *string `json:"osType,omitempty"` + // VhdName - The OS disk VHD name. + VhdName *string `json:"vhdName,omitempty"` + // OsDiskID - The id of the disk containing the OS. + OsDiskID *string `json:"osDiskId,omitempty"` + // AzureVMDiskDetails - Azure VM Disk details. + AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` + // RecoveryAzureVMName - Recovery Azure given name. + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + // RecoveryAzureVMSize - The Recovery Azure VM size. + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + // RecoveryAzureStorageAccount - The recovery Azure storage account. + RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` + // RecoveryAzureLogStorageAccountID - The ARM id of the log storage account used for replication. This will be set to null if no log storage account was provided during enable protection. + RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` + // VMNics - The PE Network details. + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + // SelectedRecoveryAzureNetworkID - The selected recovery azure network Id. + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + // SelectedSourceNicID - The selected source nic Id which will be used as the primary nic during failover. + SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` + // DiscoveryType - A value indicating the discovery type of the machine. Value can be vCenter or physical. + DiscoveryType *string `json:"discoveryType,omitempty"` + // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` + // Datastores - The data stores of the on-premise machine. Value can be list of strings that contain data store names. + Datastores *[]string `json:"datastores,omitempty"` + // TargetVMID - The ARM Id of the target Azure VM. This value will be null until the VM is failed over. Only after failure it will be populated with the ARM Id of the Azure VM. + TargetVMID *string `json:"targetVmId,omitempty"` + // RecoveryAzureResourceGroupID - The target resource group Id. + RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` + // RecoveryAvailabilitySetID - The recovery availability set Id. + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + // UseManagedDisks - A value indicating whether managed disks should be used during failover. + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + // LicenseType - License Type of the VM to be used. + LicenseType *string `json:"licenseType,omitempty"` + // ValidationErrors - The validation errors of the on-premise machine Value can be list of validation errors. + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + // LastRpoCalculatedTime - The last RPO calculated time. + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` + // LastUpdateReceivedTime - The last update time received from on-prem components. + LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` + // ReplicaID - The replica id of the protected item. + ReplicaID *string `json:"replicaId,omitempty"` + // OsVersion - The OS Version of the protected item. + OsVersion *string `json:"osVersion,omitempty"` + // ProtectedManagedDisks - The list of protected managed disks. + ProtectedManagedDisks *[]InMageAzureV2ManagedDiskDetails `json:"protectedManagedDisks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { + imavrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavrd.InfrastructureVMID != nil { + objectMap["infrastructureVmId"] = imavrd.InfrastructureVMID + } + if imavrd.VCenterInfrastructureID != nil { + objectMap["vCenterInfrastructureId"] = imavrd.VCenterInfrastructureID + } + if imavrd.ProtectionStage != nil { + objectMap["protectionStage"] = imavrd.ProtectionStage + } + if imavrd.VMID != nil { + objectMap["vmId"] = imavrd.VMID + } + if imavrd.VMProtectionState != nil { + objectMap["vmProtectionState"] = imavrd.VMProtectionState + } + if imavrd.VMProtectionStateDescription != nil { + objectMap["vmProtectionStateDescription"] = imavrd.VMProtectionStateDescription + } + if imavrd.ResyncProgressPercentage != nil { + objectMap["resyncProgressPercentage"] = imavrd.ResyncProgressPercentage + } + if imavrd.RpoInSeconds != nil { + objectMap["rpoInSeconds"] = imavrd.RpoInSeconds + } + if imavrd.CompressedDataRateInMB != nil { + objectMap["compressedDataRateInMB"] = imavrd.CompressedDataRateInMB + } + if imavrd.UncompressedDataRateInMB != nil { + objectMap["uncompressedDataRateInMB"] = imavrd.UncompressedDataRateInMB + } + if imavrd.IPAddress != nil { + objectMap["ipAddress"] = imavrd.IPAddress + } + if imavrd.AgentVersion != nil { + objectMap["agentVersion"] = imavrd.AgentVersion + } + if imavrd.AgentExpiryDate != nil { + objectMap["agentExpiryDate"] = imavrd.AgentExpiryDate + } + if imavrd.IsAgentUpdateRequired != nil { + objectMap["isAgentUpdateRequired"] = imavrd.IsAgentUpdateRequired + } + if imavrd.IsRebootAfterUpdateRequired != nil { + objectMap["isRebootAfterUpdateRequired"] = imavrd.IsRebootAfterUpdateRequired + } + if imavrd.LastHeartbeat != nil { + objectMap["lastHeartbeat"] = imavrd.LastHeartbeat + } + if imavrd.ProcessServerID != nil { + objectMap["processServerId"] = imavrd.ProcessServerID + } + if imavrd.MultiVMGroupID != nil { + objectMap["multiVmGroupId"] = imavrd.MultiVMGroupID + } + if imavrd.MultiVMGroupName != nil { + objectMap["multiVmGroupName"] = imavrd.MultiVMGroupName + } + if imavrd.MultiVMSyncStatus != nil { + objectMap["multiVmSyncStatus"] = imavrd.MultiVMSyncStatus + } + if imavrd.ProtectedDisks != nil { + objectMap["protectedDisks"] = imavrd.ProtectedDisks + } + if imavrd.DiskResized != nil { + objectMap["diskResized"] = imavrd.DiskResized + } + if imavrd.MasterTargetID != nil { + objectMap["masterTargetId"] = imavrd.MasterTargetID + } + if imavrd.SourceVMCPUCount != nil { + objectMap["sourceVmCpuCount"] = imavrd.SourceVMCPUCount + } + if imavrd.SourceVMRAMSizeInMB != nil { + objectMap["sourceVmRamSizeInMB"] = imavrd.SourceVMRAMSizeInMB + } + if imavrd.OsType != nil { + objectMap["osType"] = imavrd.OsType + } + if imavrd.VhdName != nil { + objectMap["vhdName"] = imavrd.VhdName + } + if imavrd.OsDiskID != nil { + objectMap["osDiskId"] = imavrd.OsDiskID + } + if imavrd.AzureVMDiskDetails != nil { + objectMap["azureVMDiskDetails"] = imavrd.AzureVMDiskDetails + } + if imavrd.RecoveryAzureVMName != nil { + objectMap["recoveryAzureVMName"] = imavrd.RecoveryAzureVMName + } + if imavrd.RecoveryAzureVMSize != nil { + objectMap["recoveryAzureVMSize"] = imavrd.RecoveryAzureVMSize + } + if imavrd.RecoveryAzureStorageAccount != nil { + objectMap["recoveryAzureStorageAccount"] = imavrd.RecoveryAzureStorageAccount + } + if imavrd.RecoveryAzureLogStorageAccountID != nil { + objectMap["recoveryAzureLogStorageAccountId"] = imavrd.RecoveryAzureLogStorageAccountID + } + if imavrd.VMNics != nil { + objectMap["vmNics"] = imavrd.VMNics + } + if imavrd.SelectedRecoveryAzureNetworkID != nil { + objectMap["selectedRecoveryAzureNetworkId"] = imavrd.SelectedRecoveryAzureNetworkID + } + if imavrd.SelectedSourceNicID != nil { + objectMap["selectedSourceNicId"] = imavrd.SelectedSourceNicID + } + if imavrd.DiscoveryType != nil { + objectMap["discoveryType"] = imavrd.DiscoveryType + } + if imavrd.EnableRdpOnTargetOption != nil { + objectMap["enableRdpOnTargetOption"] = imavrd.EnableRdpOnTargetOption + } + if imavrd.Datastores != nil { + objectMap["datastores"] = imavrd.Datastores + } + if imavrd.TargetVMID != nil { + objectMap["targetVmId"] = imavrd.TargetVMID + } + if imavrd.RecoveryAzureResourceGroupID != nil { + objectMap["recoveryAzureResourceGroupId"] = imavrd.RecoveryAzureResourceGroupID + } + if imavrd.RecoveryAvailabilitySetID != nil { + objectMap["recoveryAvailabilitySetId"] = imavrd.RecoveryAvailabilitySetID + } + if imavrd.UseManagedDisks != nil { + objectMap["useManagedDisks"] = imavrd.UseManagedDisks + } + if imavrd.LicenseType != nil { + objectMap["licenseType"] = imavrd.LicenseType + } + if imavrd.ValidationErrors != nil { + objectMap["validationErrors"] = imavrd.ValidationErrors + } + if imavrd.LastRpoCalculatedTime != nil { + objectMap["lastRpoCalculatedTime"] = imavrd.LastRpoCalculatedTime + } + if imavrd.LastUpdateReceivedTime != nil { + objectMap["lastUpdateReceivedTime"] = imavrd.LastUpdateReceivedTime + } + if imavrd.ReplicaID != nil { + objectMap["replicaId"] = imavrd.ReplicaID + } + if imavrd.OsVersion != nil { + objectMap["osVersion"] = imavrd.OsVersion + } + if imavrd.ProtectedManagedDisks != nil { + objectMap["protectedManagedDisks"] = imavrd.ProtectedManagedDisks + } + if imavrd.InstanceType != "" { + objectMap["instanceType"] = imavrd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return &imavrd, true +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &imavrd, true +} + +// InMageAzureV2ReprotectInput inMageAzureV2 specific provider input. +type InMageAzureV2ReprotectInput struct { + // MasterTargetID - The Master target Id. + MasterTargetID *string `json:"masterTargetId,omitempty"` + // ProcessServerID - The Process Server Id. + ProcessServerID *string `json:"processServerId,omitempty"` + // StorageAccountID - The storage account id. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // RunAsAccountID - The CS account Id. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + // PolicyID - The Policy Id. + PolicyID *string `json:"policyId,omitempty"` + // LogStorageAccountID - The storage account to be used for logging during replication. + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + // DisksToInclude - The disks to include list. + DisksToInclude *[]string `json:"disksToInclude,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' + InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { + imavri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavri.MasterTargetID != nil { + objectMap["masterTargetId"] = imavri.MasterTargetID + } + if imavri.ProcessServerID != nil { + objectMap["processServerId"] = imavri.ProcessServerID + } + if imavri.StorageAccountID != nil { + objectMap["storageAccountId"] = imavri.StorageAccountID + } + if imavri.RunAsAccountID != nil { + objectMap["runAsAccountId"] = imavri.RunAsAccountID + } + if imavri.PolicyID != nil { + objectMap["policyId"] = imavri.PolicyID + } + if imavri.LogStorageAccountID != nil { + objectMap["logStorageAccountId"] = imavri.LogStorageAccountID + } + if imavri.DisksToInclude != nil { + objectMap["disksToInclude"] = imavri.DisksToInclude + } + if imavri.InstanceType != "" { + objectMap["instanceType"] = imavri.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return nil, false +} + +// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return &imavri, true +} + +// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return nil, false +} + +// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { + return &imavri, true +} + +// InMageAzureV2UpdateReplicationProtectedItemInput inMage Azure V2 input to update replication protected +// item. +type InMageAzureV2UpdateReplicationProtectedItemInput struct { + // RecoveryAzureV1ResourceGroupID - The recovery Azure resource group Id for classic deployment. + RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` + // RecoveryAzureV2ResourceGroupID - The recovery Azure resource group Id for resource manager deployment. + RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` + // UseManagedDisks - A value indicating whether managed disks should be used during failover. + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + imavurpii.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if imavurpii.RecoveryAzureV1ResourceGroupID != nil { + objectMap["recoveryAzureV1ResourceGroupId"] = imavurpii.RecoveryAzureV1ResourceGroupID + } + if imavurpii.RecoveryAzureV2ResourceGroupID != nil { + objectMap["recoveryAzureV2ResourceGroupId"] = imavurpii.RecoveryAzureV2ResourceGroupID + } + if imavurpii.UseManagedDisks != nil { + objectMap["useManagedDisks"] = imavurpii.UseManagedDisks + } + if imavurpii.InstanceType != "" { + objectMap["instanceType"] = imavurpii.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { + return &imavurpii, true +} + +// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { + return nil, false +} + +// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { + return &imavurpii, true +} + +// InMageBasePolicyDetails base class for the policies of providers using InMage replication. +type InMageBasePolicyDetails struct { + // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { + imbpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails + objectMap := make(map[string]interface{}) + if imbpd.RecoveryPointThresholdInMinutes != nil { + objectMap["recoveryPointThresholdInMinutes"] = imbpd.RecoveryPointThresholdInMinutes + } + if imbpd.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = imbpd.RecoveryPointHistory + } + if imbpd.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = imbpd.AppConsistentFrequencyInMinutes + } + if imbpd.MultiVMSyncStatus != nil { + objectMap["multiVmSyncStatus"] = imbpd.MultiVMSyncStatus + } + if imbpd.InstanceType != "" { + objectMap["instanceType"] = imbpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return &imbpd, true +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &imbpd, true +} + +// InMageDisableProtectionProviderSpecificInput inMage disable protection provider specific input. +type InMageDisableProtectionProviderSpecificInput struct { + // ReplicaVMDeletionStatus - A value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. + ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeDisableProtectionProviderSpecificInput', 'InstanceTypeInMage' + InstanceType InstanceTypeBasicDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageDisableProtectionProviderSpecificInput. +func (imdppsi InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + imdppsi.InstanceType = InstanceTypeInMage + objectMap := make(map[string]interface{}) + if imdppsi.ReplicaVMDeletionStatus != nil { + objectMap["replicaVmDeletionStatus"] = imdppsi.ReplicaVMDeletionStatus + } + if imdppsi.InstanceType != "" { + objectMap["instanceType"] = imdppsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsInMageDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. +func (imdppsi InMageDisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) { + return &imdppsi, true +} + +// AsDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. +func (imdppsi InMageDisableProtectionProviderSpecificInput) AsDisableProtectionProviderSpecificInput() (*DisableProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicDisableProtectionProviderSpecificInput is the BasicDisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. +func (imdppsi InMageDisableProtectionProviderSpecificInput) AsBasicDisableProtectionProviderSpecificInput() (BasicDisableProtectionProviderSpecificInput, bool) { + return &imdppsi, true +} + +// InMageDiskDetails vMware/Physical specific Disk Details +type InMageDiskDetails struct { + // DiskID - The disk Id. + DiskID *string `json:"diskId,omitempty"` + // DiskName - The disk name. + DiskName *string `json:"diskName,omitempty"` + // DiskSizeInMB - The disk size in MB. + DiskSizeInMB *string `json:"diskSizeInMB,omitempty"` + // DiskType - Whether disk is system disk or data disk. + DiskType *string `json:"diskType,omitempty"` + // DiskConfiguration - Whether disk is dynamic disk or basic disk. + DiskConfiguration *string `json:"diskConfiguration,omitempty"` + // VolumeList - Volumes of the disk. + VolumeList *[]DiskVolumeDetails `json:"volumeList,omitempty"` +} + +// InMageDiskExclusionInput diskExclusionInput when doing enable protection of virtual machine in InMage +// provider. +type InMageDiskExclusionInput struct { + // VolumeOptions - The volume label based option for disk exclusion. + VolumeOptions *[]InMageVolumeExclusionOptions `json:"volumeOptions,omitempty"` + // DiskSignatureOptions - The guest disk signature based option for disk exclusion. + DiskSignatureOptions *[]InMageDiskSignatureExclusionOptions `json:"diskSignatureOptions,omitempty"` +} + +// InMageDiskSignatureExclusionOptions guest disk signature based disk exclusion option when doing enable +// protection of virtual machine in InMage provider. +type InMageDiskSignatureExclusionOptions struct { + // DiskSignature - The guest signature of disk to be excluded from replication. + DiskSignature *string `json:"diskSignature,omitempty"` +} + +// InMageEnableProtectionInput vMware Azure specific enable protection input. +type InMageEnableProtectionInput struct { + // VMFriendlyName - The Vm Name. + VMFriendlyName *string `json:"vmFriendlyName,omitempty"` + // MasterTargetID - The Master Target Id. + MasterTargetID *string `json:"masterTargetId,omitempty"` + // ProcessServerID - The Process Server Id. + ProcessServerID *string `json:"processServerId,omitempty"` + // RetentionDrive - The retention drive to use on the MT. + RetentionDrive *string `json:"retentionDrive,omitempty"` + // RunAsAccountID - The CS account Id. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + // MultiVMGroupID - The multi vm group Id. + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + // MultiVMGroupName - The multi vm group name. + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + // DatastoreName - The target data store name. + DatastoreName *string `json:"datastoreName,omitempty"` + // DiskExclusionInput - The enable disk exclusion input. + DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` + // DisksToInclude - The disks to include list. + DisksToInclude *[]string `json:"disksToInclude,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' + InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { + imepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage + objectMap := make(map[string]interface{}) + if imepi.VMFriendlyName != nil { + objectMap["vmFriendlyName"] = imepi.VMFriendlyName + } + if imepi.MasterTargetID != nil { + objectMap["masterTargetId"] = imepi.MasterTargetID + } + if imepi.ProcessServerID != nil { + objectMap["processServerId"] = imepi.ProcessServerID + } + if imepi.RetentionDrive != nil { + objectMap["retentionDrive"] = imepi.RetentionDrive + } + if imepi.RunAsAccountID != nil { + objectMap["runAsAccountId"] = imepi.RunAsAccountID + } + if imepi.MultiVMGroupID != nil { + objectMap["multiVmGroupId"] = imepi.MultiVMGroupID + } + if imepi.MultiVMGroupName != nil { + objectMap["multiVmGroupName"] = imepi.MultiVMGroupName + } + if imepi.DatastoreName != nil { + objectMap["datastoreName"] = imepi.DatastoreName + } + if imepi.DiskExclusionInput != nil { + objectMap["diskExclusionInput"] = imepi.DiskExclusionInput + } + if imepi.DisksToInclude != nil { + objectMap["disksToInclude"] = imepi.DisksToInclude + } + if imepi.InstanceType != "" { + objectMap["instanceType"] = imepi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return &imepi, true +} + +// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { + return &imepi, true +} + +// InMageFailoverProviderInput provider specific input for InMage failover. +type InMageFailoverProviderInput struct { + // RecoveryPointType - The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided by RecoveryPointId will be used. In the other two cases, recovery point id will be ignored. Possible values include: 'LatestTime', 'LatestTag', 'Custom' + RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"` + // RecoveryPointID - The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) MarshalJSON() ([]byte, error) { + imfpi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage + objectMap := make(map[string]interface{}) + if imfpi.RecoveryPointType != "" { + objectMap["recoveryPointType"] = imfpi.RecoveryPointType + } + if imfpi.RecoveryPointID != nil { + objectMap["recoveryPointId"] = imfpi.RecoveryPointID + } + if imfpi.InstanceType != "" { + objectMap["instanceType"] = imfpi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return &imfpi, true +} + +// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { + return &imfpi, true +} + +// InMagePolicyDetails inMage specific protection profile details. +type InMagePolicyDetails struct { + // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMagePolicyDetails. +func (impd InMagePolicyDetails) MarshalJSON() ([]byte, error) { + impd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage + objectMap := make(map[string]interface{}) + if impd.RecoveryPointThresholdInMinutes != nil { + objectMap["recoveryPointThresholdInMinutes"] = impd.RecoveryPointThresholdInMinutes + } + if impd.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = impd.RecoveryPointHistory + } + if impd.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = impd.AppConsistentFrequencyInMinutes + } + if impd.MultiVMSyncStatus != nil { + objectMap["multiVmSyncStatus"] = impd.MultiVMSyncStatus + } + if impd.InstanceType != "" { + objectMap["instanceType"] = impd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return &impd, true +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &impd, true +} + +// InMagePolicyInput vMWare Azure specific protection profile Input. +type InMagePolicyInput struct { + // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. Possible values include: 'Enable', 'Disable' + MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMagePolicyInput. +func (impi InMagePolicyInput) MarshalJSON() ([]byte, error) { + impi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage + objectMap := make(map[string]interface{}) + if impi.RecoveryPointThresholdInMinutes != nil { + objectMap["recoveryPointThresholdInMinutes"] = impi.RecoveryPointThresholdInMinutes + } + if impi.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = impi.RecoveryPointHistory + } + if impi.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = impi.AppConsistentFrequencyInMinutes + } + if impi.MultiVMSyncStatus != "" { + objectMap["multiVmSyncStatus"] = impi.MultiVMSyncStatus + } + if impi.InstanceType != "" { + objectMap["instanceType"] = impi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return &impi, true +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &impi, true +} + +// InMageProtectedDiskDetails inMage protected disk details. +type InMageProtectedDiskDetails struct { + // DiskID - The disk id. + DiskID *string `json:"diskId,omitempty"` + // DiskName - The disk name. + DiskName *string `json:"diskName,omitempty"` + // ProtectionStage - The protection stage. + ProtectionStage *string `json:"protectionStage,omitempty"` + // HealthErrorCode - The health error code for the disk. + HealthErrorCode *string `json:"healthErrorCode,omitempty"` + // RpoInSeconds - The RPO in seconds. + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + // ResyncRequired - A value indicating whether resync is required for this disk. + ResyncRequired *string `json:"resyncRequired,omitempty"` + // ResyncProgressPercentage - The resync progress percentage. + ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` + // ResyncDurationInSeconds - The resync duration in seconds. + ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` + // DiskCapacityInBytes - The disk capacity in bytes. + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + // FileSystemCapacityInBytes - The file system capacity in bytes. + FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` + // SourceDataInMB - The source data transit in MB. + SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"` + // PsDataInMB - The PS data transit in MB. + PsDataInMB *float64 `json:"psDataInMB,omitempty"` + // TargetDataInMB - The target data transit in MB. + TargetDataInMB *float64 `json:"targetDataInMB,omitempty"` + // DiskResized - A value indicating whether disk is resized. + DiskResized *string `json:"diskResized,omitempty"` + // LastRpoCalculatedTime - The last RPO calculated time. + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` +} + +// InMageReplicationDetails inMage provider specific settings +type InMageReplicationDetails struct { + // ActiveSiteType - The active location of the VM. If the VM is being protected from Azure, this field will take values from { Azure, OnPrem }. If the VM is being protected between two data-centers, this field will be OnPrem always. + ActiveSiteType *string `json:"activeSiteType,omitempty"` + // SourceVMCPUCount - The CPU count of the VM on the primary side. + SourceVMCPUCount *int32 `json:"sourceVmCpuCount,omitempty"` + // SourceVMRAMSizeInMB - The RAM size of the VM on the primary side. + SourceVMRAMSizeInMB *int32 `json:"sourceVmRamSizeInMB,omitempty"` + // OsDetails - The OS details. + OsDetails *OSDiskDetails `json:"osDetails,omitempty"` + // ProtectionStage - The protection stage. + ProtectionStage *string `json:"protectionStage,omitempty"` + // VMID - The virtual machine Id. + VMID *string `json:"vmId,omitempty"` + // VMProtectionState - The protection state for the vm. + VMProtectionState *string `json:"vmProtectionState,omitempty"` + // VMProtectionStateDescription - The protection state description for the vm. + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + // ResyncDetails - The resync details of the machine + ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"` + // RetentionWindowStart - The retention window start time. + RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"` + // RetentionWindowEnd - The retention window end time. + RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"` + // CompressedDataRateInMB - The compressed data change rate in MB. + CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` + // UncompressedDataRateInMB - The uncompressed data change rate in MB. + UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` + // RpoInSeconds - The RPO in seconds. + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + // ProtectedDisks - The list of protected disks. + ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"` + // IPAddress - The source IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // LastHeartbeat - The last heartbeat received from the source server. + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + // ProcessServerID - The process server Id. + ProcessServerID *string `json:"processServerId,omitempty"` + // MasterTargetID - The master target Id. + MasterTargetID *string `json:"masterTargetId,omitempty"` + // ConsistencyPoints - The collection of Consistency points. + ConsistencyPoints map[string]*date.Time `json:"consistencyPoints"` + // DiskResized - A value indicating whether any disk is resized for this VM. + DiskResized *string `json:"diskResized,omitempty"` + // RebootAfterUpdateStatus - A value indicating whether the source server requires a restart after update. + RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"` + // MultiVMGroupID - The multi vm group Id, if any. + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + // MultiVMGroupName - The multi vm group name, if any. + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + // MultiVMSyncStatus - A value indicating whether the multi vm sync is enabled or disabled. + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + // AgentDetails - The agent details. + AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"` + // VCenterInfrastructureID - The vCenter infrastructure Id. + VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` + // InfrastructureVMID - The infrastructure VM Id. + InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` + // VMNics - The PE Network details. + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + // DiscoveryType - A value indicating the discovery type of the machine. + DiscoveryType *string `json:"discoveryType,omitempty"` + // AzureStorageAccountID - A value indicating the underlying Azure storage account. If the VM is not running in Azure, this value shall be set to null. + AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"` + // Datastores - The data stores of the on-premise machine Value can be list of strings that contain data store names + Datastores *[]string `json:"datastores,omitempty"` + // ValidationErrors - The validation errors of the on-premise machine Value can be list of validation errors + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + // LastRpoCalculatedTime - The last RPO calculated time. + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` + // LastUpdateReceivedTime - The last update time received from on-prem components. + LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` + // ReplicaID - The replica id of the protected item. + ReplicaID *string `json:"replicaId,omitempty"` + // OsVersion - The OS Version of the protected item. + OsVersion *string `json:"osVersion,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageReplicationDetails. +func (imrd InMageReplicationDetails) MarshalJSON() ([]byte, error) { + imrd.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage + objectMap := make(map[string]interface{}) + if imrd.ActiveSiteType != nil { + objectMap["activeSiteType"] = imrd.ActiveSiteType + } + if imrd.SourceVMCPUCount != nil { + objectMap["sourceVmCpuCount"] = imrd.SourceVMCPUCount + } + if imrd.SourceVMRAMSizeInMB != nil { + objectMap["sourceVmRamSizeInMB"] = imrd.SourceVMRAMSizeInMB + } + if imrd.OsDetails != nil { + objectMap["osDetails"] = imrd.OsDetails + } + if imrd.ProtectionStage != nil { + objectMap["protectionStage"] = imrd.ProtectionStage + } + if imrd.VMID != nil { + objectMap["vmId"] = imrd.VMID + } + if imrd.VMProtectionState != nil { + objectMap["vmProtectionState"] = imrd.VMProtectionState + } + if imrd.VMProtectionStateDescription != nil { + objectMap["vmProtectionStateDescription"] = imrd.VMProtectionStateDescription + } + if imrd.ResyncDetails != nil { + objectMap["resyncDetails"] = imrd.ResyncDetails + } + if imrd.RetentionWindowStart != nil { + objectMap["retentionWindowStart"] = imrd.RetentionWindowStart + } + if imrd.RetentionWindowEnd != nil { + objectMap["retentionWindowEnd"] = imrd.RetentionWindowEnd + } + if imrd.CompressedDataRateInMB != nil { + objectMap["compressedDataRateInMB"] = imrd.CompressedDataRateInMB + } + if imrd.UncompressedDataRateInMB != nil { + objectMap["uncompressedDataRateInMB"] = imrd.UncompressedDataRateInMB + } + if imrd.RpoInSeconds != nil { + objectMap["rpoInSeconds"] = imrd.RpoInSeconds + } + if imrd.ProtectedDisks != nil { + objectMap["protectedDisks"] = imrd.ProtectedDisks + } + if imrd.IPAddress != nil { + objectMap["ipAddress"] = imrd.IPAddress + } + if imrd.LastHeartbeat != nil { + objectMap["lastHeartbeat"] = imrd.LastHeartbeat + } + if imrd.ProcessServerID != nil { + objectMap["processServerId"] = imrd.ProcessServerID + } + if imrd.MasterTargetID != nil { + objectMap["masterTargetId"] = imrd.MasterTargetID + } + if imrd.ConsistencyPoints != nil { + objectMap["consistencyPoints"] = imrd.ConsistencyPoints + } + if imrd.DiskResized != nil { + objectMap["diskResized"] = imrd.DiskResized + } + if imrd.RebootAfterUpdateStatus != nil { + objectMap["rebootAfterUpdateStatus"] = imrd.RebootAfterUpdateStatus + } + if imrd.MultiVMGroupID != nil { + objectMap["multiVmGroupId"] = imrd.MultiVMGroupID + } + if imrd.MultiVMGroupName != nil { + objectMap["multiVmGroupName"] = imrd.MultiVMGroupName + } + if imrd.MultiVMSyncStatus != nil { + objectMap["multiVmSyncStatus"] = imrd.MultiVMSyncStatus + } + if imrd.AgentDetails != nil { + objectMap["agentDetails"] = imrd.AgentDetails + } + if imrd.VCenterInfrastructureID != nil { + objectMap["vCenterInfrastructureId"] = imrd.VCenterInfrastructureID + } + if imrd.InfrastructureVMID != nil { + objectMap["infrastructureVmId"] = imrd.InfrastructureVMID + } + if imrd.VMNics != nil { + objectMap["vmNics"] = imrd.VMNics + } + if imrd.DiscoveryType != nil { + objectMap["discoveryType"] = imrd.DiscoveryType + } + if imrd.AzureStorageAccountID != nil { + objectMap["azureStorageAccountId"] = imrd.AzureStorageAccountID + } + if imrd.Datastores != nil { + objectMap["datastores"] = imrd.Datastores + } + if imrd.ValidationErrors != nil { + objectMap["validationErrors"] = imrd.ValidationErrors + } + if imrd.LastRpoCalculatedTime != nil { + objectMap["lastRpoCalculatedTime"] = imrd.LastRpoCalculatedTime + } + if imrd.LastUpdateReceivedTime != nil { + objectMap["lastUpdateReceivedTime"] = imrd.LastUpdateReceivedTime + } + if imrd.ReplicaID != nil { + objectMap["replicaId"] = imrd.ReplicaID + } + if imrd.OsVersion != nil { + objectMap["osVersion"] = imrd.OsVersion + } + if imrd.InstanceType != "" { + objectMap["instanceType"] = imrd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return &imrd, true +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &imrd, true +} + +// InMageReprotectInput inMageAzureV2 specific provider input. +type InMageReprotectInput struct { + // MasterTargetID - The Master Target Id. + MasterTargetID *string `json:"masterTargetId,omitempty"` + // ProcessServerID - The Process Server Id. + ProcessServerID *string `json:"processServerId,omitempty"` + // RetentionDrive - The retention drive to use on the MT. + RetentionDrive *string `json:"retentionDrive,omitempty"` + // RunAsAccountID - The CS account Id. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + // DatastoreName - The target data store name. + DatastoreName *string `json:"datastoreName,omitempty"` + // DiskExclusionInput - The enable disk exclusion input. + DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` + // ProfileID - The Policy Id. + ProfileID *string `json:"profileId,omitempty"` + // DisksToInclude - The disks to include list. + DisksToInclude *[]string `json:"disksToInclude,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' + InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageReprotectInput. +func (imri InMageReprotectInput) MarshalJSON() ([]byte, error) { + imri.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage + objectMap := make(map[string]interface{}) + if imri.MasterTargetID != nil { + objectMap["masterTargetId"] = imri.MasterTargetID + } + if imri.ProcessServerID != nil { + objectMap["processServerId"] = imri.ProcessServerID + } + if imri.RetentionDrive != nil { + objectMap["retentionDrive"] = imri.RetentionDrive + } + if imri.RunAsAccountID != nil { + objectMap["runAsAccountId"] = imri.RunAsAccountID + } + if imri.DatastoreName != nil { + objectMap["datastoreName"] = imri.DatastoreName + } + if imri.DiskExclusionInput != nil { + objectMap["diskExclusionInput"] = imri.DiskExclusionInput + } + if imri.ProfileID != nil { + objectMap["profileId"] = imri.ProfileID + } + if imri.DisksToInclude != nil { + objectMap["disksToInclude"] = imri.DisksToInclude + } + if imri.InstanceType != "" { + objectMap["instanceType"] = imri.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return nil, false +} + +// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return nil, false +} + +// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return &imri, true +} + +// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { + return &imri, true +} + +// InMageVolumeExclusionOptions guest disk signature based disk exclusion option when doing enable +// protection of virtual machine in InMage provider. +type InMageVolumeExclusionOptions struct { + // VolumeLabel - The volume label. The disk having any volume with this label will be excluded from replication. + VolumeLabel *string `json:"volumeLabel,omitempty"` + // OnlyExcludeIfSingleVolume - The value indicating whether to exclude multi volume disk or not. If a disk has multiple volumes and one of the volume has label matching with VolumeLabel this disk will be excluded from replication if OnlyExcludeIfSingleVolume is false. + OnlyExcludeIfSingleVolume *string `json:"onlyExcludeIfSingleVolume,omitempty"` +} + +// InnerHealthError implements InnerHealthError class. HealthError object has a list of InnerHealthErrors +// as child errors. InnerHealthError is used because this will prevent an infinite loop of structures when +// Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health +// errors and all API consumers can utilize this in the same fashion as Exception -> InnerException. +type InnerHealthError struct { + // ErrorSource - Source of error. + ErrorSource *string `json:"errorSource,omitempty"` + // ErrorType - Type of error. + ErrorType *string `json:"errorType,omitempty"` + // ErrorLevel - Level of error. + ErrorLevel *string `json:"errorLevel,omitempty"` + // ErrorCategory - Category of error. + ErrorCategory *string `json:"errorCategory,omitempty"` + // ErrorCode - Error code. + ErrorCode *string `json:"errorCode,omitempty"` + // SummaryMessage - Summary message of the entity. + SummaryMessage *string `json:"summaryMessage,omitempty"` + // ErrorMessage - Error message. + ErrorMessage *string `json:"errorMessage,omitempty"` + // PossibleCauses - Possible causes of error. + PossibleCauses *string `json:"possibleCauses,omitempty"` + // RecommendedAction - Recommended action to resolve error. + RecommendedAction *string `json:"recommendedAction,omitempty"` + // CreationTimeUtc - Error creation time (UTC) + CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"` + // RecoveryProviderErrorMessage - DRA error message. + RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` + // EntityID - ID of the entity. + EntityID *string `json:"entityId,omitempty"` +} + +// InputEndpoint azure VM input endpoint details. +type InputEndpoint struct { + // EndpointName - The input endpoint name. + EndpointName *string `json:"endpointName,omitempty"` + // PrivatePort - The input endpoint private port. + PrivatePort *int32 `json:"privatePort,omitempty"` + // PublicPort - The input endpoint public port. + PublicPort *int32 `json:"publicPort,omitempty"` + // Protocol - The input endpoint protocol. + Protocol *string `json:"protocol,omitempty"` +} + +// Job job details. +type Job struct { + autorest.Response `json:"-"` + // Properties - The custom data. + Properties *JobProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// JobCollection collection of jobs. +type JobCollection struct { + autorest.Response `json:"-"` + // Value - The list of jobs. + Value *[]Job `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// JobCollectionIterator provides access to a complete listing of Job values. +type JobCollectionIterator struct { + i int + page JobCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *JobCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *JobCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter JobCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter JobCollectionIterator) Response() JobCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter JobCollectionIterator) Value() Job { + if !iter.page.NotDone() { + return Job{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the JobCollectionIterator type. +func NewJobCollectionIterator(page JobCollectionPage) JobCollectionIterator { + return JobCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (jc JobCollection) IsEmpty() bool { + return jc.Value == nil || len(*jc.Value) == 0 +} + +// jobCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (jc JobCollection) jobCollectionPreparer(ctx context.Context) (*http.Request, error) { + if jc.NextLink == nil || len(to.String(jc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(jc.NextLink))) +} + +// JobCollectionPage contains a page of Job values. +type JobCollectionPage struct { + fn func(context.Context, JobCollection) (JobCollection, error) + jc JobCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *JobCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.jc) + if err != nil { + return err + } + page.jc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *JobCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page JobCollectionPage) NotDone() bool { + return !page.jc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page JobCollectionPage) Response() JobCollection { + return page.jc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page JobCollectionPage) Values() []Job { + if page.jc.IsEmpty() { + return nil + } + return *page.jc.Value +} + +// Creates a new instance of the JobCollectionPage type. +func NewJobCollectionPage(getNextPage func(context.Context, JobCollection) (JobCollection, error)) JobCollectionPage { + return JobCollectionPage{fn: getNextPage} +} + +// BasicJobDetails job details based on specific job type. +type BasicJobDetails interface { + AsAsrJobDetails() (*AsrJobDetails, bool) + AsExportJobDetails() (*ExportJobDetails, bool) + AsFailoverJobDetails() (*FailoverJobDetails, bool) + AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) + AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) + AsJobDetails() (*JobDetails, bool) +} + +// JobDetails job details based on specific job type. +type JobDetails struct { + // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` + // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' + InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicJobDetails(body []byte) (BasicJobDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAsrJobDetails): + var ajd AsrJobDetails + err := json.Unmarshal(body, &ajd) + return ajd, err + case string(InstanceTypeExportJobDetails): + var ejd ExportJobDetails + err := json.Unmarshal(body, &ejd) + return ejd, err + case string(InstanceTypeFailoverJobDetails): + var fjd FailoverJobDetails + err := json.Unmarshal(body, &fjd) + return fjd, err + case string(InstanceTypeSwitchProtectionJobDetails): + var spjd SwitchProtectionJobDetails + err := json.Unmarshal(body, &spjd) + return spjd, err + case string(InstanceTypeTestFailoverJobDetails): + var tfjd TestFailoverJobDetails + err := json.Unmarshal(body, &tfjd) + return tfjd, err + default: + var jd JobDetails + err := json.Unmarshal(body, &jd) + return jd, err + } +} +func unmarshalBasicJobDetailsArray(body []byte) ([]BasicJobDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + jdArray := make([]BasicJobDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + jd, err := unmarshalBasicJobDetails(*rawMessage) + if err != nil { + return nil, err + } + jdArray[index] = jd + } + return jdArray, nil +} + +// MarshalJSON is the custom marshaler for JobDetails. +func (jd JobDetails) MarshalJSON() ([]byte, error) { + jd.InstanceType = InstanceTypeJobDetails + objectMap := make(map[string]interface{}) + if jd.AffectedObjectDetails != nil { + objectMap["affectedObjectDetails"] = jd.AffectedObjectDetails + } + if jd.InstanceType != "" { + objectMap["instanceType"] = jd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAsrJobDetails is the BasicJobDetails implementation for JobDetails. +func (jd JobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the BasicJobDetails implementation for JobDetails. +func (jd JobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the BasicJobDetails implementation for JobDetails. +func (jd JobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for JobDetails. +func (jd JobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the BasicJobDetails implementation for JobDetails. +func (jd JobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsJobDetails is the BasicJobDetails implementation for JobDetails. +func (jd JobDetails) AsJobDetails() (*JobDetails, bool) { + return &jd, true +} + +// AsBasicJobDetails is the BasicJobDetails implementation for JobDetails. +func (jd JobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { + return &jd, true +} + +// JobEntity this class contains the minimal job details required to navigate to the desired drill down. +type JobEntity struct { + // JobID - The job id. + JobID *string `json:"jobId,omitempty"` + // JobFriendlyName - The job display name. + JobFriendlyName *string `json:"jobFriendlyName,omitempty"` + // TargetObjectID - The object id. + TargetObjectID *string `json:"targetObjectId,omitempty"` + // TargetObjectName - The object name. + TargetObjectName *string `json:"targetObjectName,omitempty"` + // TargetInstanceType - The workflow affected object type. + TargetInstanceType *string `json:"targetInstanceType,omitempty"` + // JobScenarioName - The job name. Enum type ScenarioName. + JobScenarioName *string `json:"jobScenarioName,omitempty"` +} + +// JobErrorDetails this class contains the error details per object. +type JobErrorDetails struct { + // ServiceErrorDetails - The Service error details. + ServiceErrorDetails *ServiceError `json:"serviceErrorDetails,omitempty"` + // ProviderErrorDetails - The Provider error details. + ProviderErrorDetails *ProviderError `json:"providerErrorDetails,omitempty"` + // ErrorLevel - Error level of error. + ErrorLevel *string `json:"errorLevel,omitempty"` + // CreationTime - The creation time of job error. + CreationTime *date.Time `json:"creationTime,omitempty"` + // TaskID - The Id of the task. + TaskID *string `json:"taskId,omitempty"` +} + +// JobProperties job custom data details. +type JobProperties struct { + // ActivityID - The activity id. + ActivityID *string `json:"activityId,omitempty"` + // ScenarioName - The ScenarioName. + ScenarioName *string `json:"scenarioName,omitempty"` + // FriendlyName - The DisplayName. + FriendlyName *string `json:"friendlyName,omitempty"` + // State - The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. + State *string `json:"state,omitempty"` + // StateDescription - The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. + StateDescription *string `json:"stateDescription,omitempty"` + // Tasks - The tasks. + Tasks *[]ASRTask `json:"tasks,omitempty"` + // Errors - The errors. + Errors *[]JobErrorDetails `json:"errors,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // AllowedActions - The Allowed action the job. + AllowedActions *[]string `json:"allowedActions,omitempty"` + // TargetObjectID - The affected Object Id. + TargetObjectID *string `json:"targetObjectId,omitempty"` + // TargetObjectName - The name of the affected object. + TargetObjectName *string `json:"targetObjectName,omitempty"` + // TargetInstanceType - The type of the affected object which is of {Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType} class. + TargetInstanceType *string `json:"targetInstanceType,omitempty"` + // CustomDetails - The custom job details like test failover job details. + CustomDetails BasicJobDetails `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for JobProperties struct. +func (jp *JobProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "activityId": + if v != nil { + var activityID string + err = json.Unmarshal(*v, &activityID) + if err != nil { + return err + } + jp.ActivityID = &activityID + } + case "scenarioName": + if v != nil { + var scenarioName string + err = json.Unmarshal(*v, &scenarioName) + if err != nil { + return err + } + jp.ScenarioName = &scenarioName + } + case "friendlyName": + if v != nil { + var friendlyName string + err = json.Unmarshal(*v, &friendlyName) + if err != nil { + return err + } + jp.FriendlyName = &friendlyName + } + case "state": + if v != nil { + var state string + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + jp.State = &state + } + case "stateDescription": + if v != nil { + var stateDescription string + err = json.Unmarshal(*v, &stateDescription) + if err != nil { + return err + } + jp.StateDescription = &stateDescription + } + case "tasks": + if v != nil { + var tasks []ASRTask + err = json.Unmarshal(*v, &tasks) + if err != nil { + return err + } + jp.Tasks = &tasks + } + case "errors": + if v != nil { + var errorsVar []JobErrorDetails + err = json.Unmarshal(*v, &errorsVar) + if err != nil { + return err + } + jp.Errors = &errorsVar + } + case "startTime": + if v != nil { + var startTime date.Time + err = json.Unmarshal(*v, &startTime) + if err != nil { + return err + } + jp.StartTime = &startTime + } + case "endTime": + if v != nil { + var endTime date.Time + err = json.Unmarshal(*v, &endTime) + if err != nil { + return err + } + jp.EndTime = &endTime + } + case "allowedActions": + if v != nil { + var allowedActions []string + err = json.Unmarshal(*v, &allowedActions) + if err != nil { + return err + } + jp.AllowedActions = &allowedActions + } + case "targetObjectId": + if v != nil { + var targetObjectID string + err = json.Unmarshal(*v, &targetObjectID) + if err != nil { + return err + } + jp.TargetObjectID = &targetObjectID + } + case "targetObjectName": + if v != nil { + var targetObjectName string + err = json.Unmarshal(*v, &targetObjectName) + if err != nil { + return err + } + jp.TargetObjectName = &targetObjectName + } + case "targetInstanceType": + if v != nil { + var targetInstanceType string + err = json.Unmarshal(*v, &targetInstanceType) + if err != nil { + return err + } + jp.TargetInstanceType = &targetInstanceType + } + case "customDetails": + if v != nil { + customDetails, err := unmarshalBasicJobDetails(*v) + if err != nil { + return err + } + jp.CustomDetails = customDetails + } + } + } + + return nil +} + +// JobQueryParameter query parameter to enumerate jobs. +type JobQueryParameter struct { + // StartTime - Date time to get jobs from. + StartTime *string `json:"startTime,omitempty"` + // EndTime - Date time to get jobs up to. + EndTime *string `json:"endTime,omitempty"` + // FabricID - The Id of the fabric to search jobs under. + FabricID *string `json:"fabricId,omitempty"` + // AffectedObjectTypes - The type of objects. + AffectedObjectTypes *string `json:"affectedObjectTypes,omitempty"` + // JobStatus - The states of the job to be filtered can be in. + JobStatus *string `json:"jobStatus,omitempty"` +} + +// JobStatusEventDetails model class for event details of a job status event. +type JobStatusEventDetails struct { + // JobID - Job arm id for the event. + JobID *string `json:"jobId,omitempty"` + // JobFriendlyName - JobName for the Event. + JobFriendlyName *string `json:"jobFriendlyName,omitempty"` + // JobStatus - JobStatus for the Event. + JobStatus *string `json:"jobStatus,omitempty"` + // AffectedObjectType - AffectedObjectType for the event. + AffectedObjectType *string `json:"affectedObjectType,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeEventSpecificDetails', 'InstanceTypeJobStatus' + InstanceType InstanceTypeBasicEventSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobStatusEventDetails. +func (jsed JobStatusEventDetails) MarshalJSON() ([]byte, error) { + jsed.InstanceType = InstanceTypeJobStatus + objectMap := make(map[string]interface{}) + if jsed.JobID != nil { + objectMap["jobId"] = jsed.JobID + } + if jsed.JobFriendlyName != nil { + objectMap["jobFriendlyName"] = jsed.JobFriendlyName + } + if jsed.JobStatus != nil { + objectMap["jobStatus"] = jsed.JobStatus + } + if jsed.AffectedObjectType != nil { + objectMap["affectedObjectType"] = jsed.AffectedObjectType + } + if jsed.InstanceType != "" { + objectMap["instanceType"] = jsed.InstanceType + } + return json.Marshal(objectMap) +} + +// AsJobStatusEventDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. +func (jsed JobStatusEventDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) { + return &jsed, true +} + +// AsEventSpecificDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. +func (jsed JobStatusEventDetails) AsEventSpecificDetails() (*EventSpecificDetails, bool) { + return nil, false +} + +// AsBasicEventSpecificDetails is the BasicEventSpecificDetails implementation for JobStatusEventDetails. +func (jsed JobStatusEventDetails) AsBasicEventSpecificDetails() (BasicEventSpecificDetails, bool) { + return &jsed, true +} + +// JobTaskDetails this class represents a task which is actually a workflow so that one can navigate to its +// individual drill down. +type JobTaskDetails struct { + // JobTask - The job entity. + JobTask *JobEntity `json:"jobTask,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobTaskDetails. +func (jtd JobTaskDetails) MarshalJSON() ([]byte, error) { + jtd.InstanceType = InstanceTypeJobTaskDetails + objectMap := make(map[string]interface{}) + if jtd.JobTask != nil { + objectMap["jobTask"] = jtd.JobTask + } + if jtd.InstanceType != "" { + objectMap["instanceType"] = jtd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return &jtd, true +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &jtd, true +} + +// KeyEncryptionKeyInfo key Encryption Key (KEK) information. +type KeyEncryptionKeyInfo struct { + // KeyIdentifier - The key url / identifier. + KeyIdentifier *string `json:"keyIdentifier,omitempty"` + // KeyVaultResourceArmID - The KeyVault resource ARM id for key. + KeyVaultResourceArmID *string `json:"keyVaultResourceArmId,omitempty"` +} + +// LogicalNetwork logical network data model. +type LogicalNetwork struct { + autorest.Response `json:"-"` + // Properties - The Logical Network Properties. + Properties *LogicalNetworkProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// LogicalNetworkCollection list of logical networks. +type LogicalNetworkCollection struct { + autorest.Response `json:"-"` + // Value - The Logical Networks list details. + Value *[]LogicalNetwork `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// LogicalNetworkCollectionIterator provides access to a complete listing of LogicalNetwork values. +type LogicalNetworkCollectionIterator struct { + i int + page LogicalNetworkCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *LogicalNetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *LogicalNetworkCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter LogicalNetworkCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter LogicalNetworkCollectionIterator) Response() LogicalNetworkCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter LogicalNetworkCollectionIterator) Value() LogicalNetwork { + if !iter.page.NotDone() { + return LogicalNetwork{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the LogicalNetworkCollectionIterator type. +func NewLogicalNetworkCollectionIterator(page LogicalNetworkCollectionPage) LogicalNetworkCollectionIterator { + return LogicalNetworkCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lnc LogicalNetworkCollection) IsEmpty() bool { + return lnc.Value == nil || len(*lnc.Value) == 0 +} + +// logicalNetworkCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lnc LogicalNetworkCollection) logicalNetworkCollectionPreparer(ctx context.Context) (*http.Request, error) { + if lnc.NextLink == nil || len(to.String(lnc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lnc.NextLink))) +} + +// LogicalNetworkCollectionPage contains a page of LogicalNetwork values. +type LogicalNetworkCollectionPage struct { + fn func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error) + lnc LogicalNetworkCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *LogicalNetworkCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LogicalNetworkCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lnc) + if err != nil { + return err + } + page.lnc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *LogicalNetworkCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LogicalNetworkCollectionPage) NotDone() bool { + return !page.lnc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LogicalNetworkCollectionPage) Response() LogicalNetworkCollection { + return page.lnc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LogicalNetworkCollectionPage) Values() []LogicalNetwork { + if page.lnc.IsEmpty() { + return nil + } + return *page.lnc.Value +} + +// Creates a new instance of the LogicalNetworkCollectionPage type. +func NewLogicalNetworkCollectionPage(getNextPage func(context.Context, LogicalNetworkCollection) (LogicalNetworkCollection, error)) LogicalNetworkCollectionPage { + return LogicalNetworkCollectionPage{fn: getNextPage} +} + +// LogicalNetworkProperties logical Network Properties. +type LogicalNetworkProperties struct { + // FriendlyName - The Friendly Name. + FriendlyName *string `json:"friendlyName,omitempty"` + // NetworkVirtualizationStatus - A value indicating whether Network Virtualization is enabled for the logical network. + NetworkVirtualizationStatus *string `json:"networkVirtualizationStatus,omitempty"` + // LogicalNetworkUsage - A value indicating whether logical network is used as private test network by test failover. + LogicalNetworkUsage *string `json:"logicalNetworkUsage,omitempty"` + // LogicalNetworkDefinitionsStatus - A value indicating whether logical network definitions are isolated. + LogicalNetworkDefinitionsStatus *string `json:"logicalNetworkDefinitionsStatus,omitempty"` +} + +// ManualActionTaskDetails this class represents the manual action task details. +type ManualActionTaskDetails struct { + // Name - The name. + Name *string `json:"name,omitempty"` + // Instructions - The instructions. + Instructions *string `json:"instructions,omitempty"` + // Observation - The observation. + Observation *string `json:"observation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) MarshalJSON() ([]byte, error) { + matd.InstanceType = InstanceTypeManualActionTaskDetails + objectMap := make(map[string]interface{}) + if matd.Name != nil { + objectMap["name"] = matd.Name + } + if matd.Instructions != nil { + objectMap["instructions"] = matd.Instructions + } + if matd.Observation != nil { + objectMap["observation"] = matd.Observation + } + if matd.InstanceType != "" { + objectMap["instanceType"] = matd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return &matd, true +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &matd, true +} + +// MasterTargetServer details of a Master Target Server. +type MasterTargetServer struct { + // ID - The server Id. + ID *string `json:"id,omitempty"` + // IPAddress - The IP address of the server. + IPAddress *string `json:"ipAddress,omitempty"` + // Name - The server name. + Name *string `json:"name,omitempty"` + // OsType - The OS type of the server. + OsType *string `json:"osType,omitempty"` + // AgentVersion - The version of the scout component on the server. + AgentVersion *string `json:"agentVersion,omitempty"` + // LastHeartbeat - The last heartbeat received from the server. + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + // VersionStatus - Version status + VersionStatus *string `json:"versionStatus,omitempty"` + // RetentionVolumes - The retention volumes of Master target Server. + RetentionVolumes *[]RetentionVolume `json:"retentionVolumes,omitempty"` + // DataStores - The list of data stores in the fabric. + DataStores *[]DataStore `json:"dataStores,omitempty"` + // ValidationErrors - Validation errors. + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + // HealthErrors - Health errors. + HealthErrors *[]HealthError `json:"healthErrors,omitempty"` + // DiskCount - Disk count of the master target. + DiskCount *int32 `json:"diskCount,omitempty"` + // OsVersion - OS Version of the master target. + OsVersion *string `json:"osVersion,omitempty"` + // AgentExpiryDate - Agent expiry date. + AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` + // MarsAgentVersion - MARS agent version. + MarsAgentVersion *string `json:"marsAgentVersion,omitempty"` + // MarsAgentExpiryDate - MARS agent expiry date. + MarsAgentExpiryDate *date.Time `json:"marsAgentExpiryDate,omitempty"` + // AgentVersionDetails - Agent version details. + AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` + // MarsAgentVersionDetails - Mars agent version details. + MarsAgentVersionDetails *VersionDetails `json:"marsAgentVersionDetails,omitempty"` +} + +// MigrateInput input for migrate. +type MigrateInput struct { + // Properties - Migrate input properties. + Properties *MigrateInputProperties `json:"properties,omitempty"` +} + +// MigrateInputProperties migrate input properties. +type MigrateInputProperties struct { + // ProviderSpecificDetails - The provider specific details. + ProviderSpecificDetails BasicMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for MigrateInputProperties struct. +func (mip *MigrateInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicMigrateProviderSpecificInput(*v) + if err != nil { + return err + } + mip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicMigrateProviderSpecificInput migrate provider specific input. +type BasicMigrateProviderSpecificInput interface { + AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) + AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) +} + +// MigrateProviderSpecificInput migrate provider specific input. +type MigrateProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput', 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicMigrateProviderSpecificInput(body []byte) (BasicMigrateProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt): + var vmcmi VMwareCbtMigrateInput + err := json.Unmarshal(body, &vmcmi) + return vmcmi, err + default: + var mpsi MigrateProviderSpecificInput + err := json.Unmarshal(body, &mpsi) + return mpsi, err + } +} +func unmarshalBasicMigrateProviderSpecificInputArray(body []byte) ([]BasicMigrateProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + mpsiArray := make([]BasicMigrateProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + mpsi, err := unmarshalBasicMigrateProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + mpsiArray[index] = mpsi + } + return mpsiArray, nil +} + +// MarshalJSON is the custom marshaler for MigrateProviderSpecificInput. +func (mpsi MigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { + mpsi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput + objectMap := make(map[string]interface{}) + if mpsi.InstanceType != "" { + objectMap["instanceType"] = mpsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtMigrateInput is the BasicMigrateProviderSpecificInput implementation for MigrateProviderSpecificInput. +func (mpsi MigrateProviderSpecificInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) { + return nil, false +} + +// AsMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for MigrateProviderSpecificInput. +func (mpsi MigrateProviderSpecificInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) { + return &mpsi, true +} + +// AsBasicMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for MigrateProviderSpecificInput. +func (mpsi MigrateProviderSpecificInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) { + return &mpsi, true +} + +// MigrationItem migration item. +type MigrationItem struct { + autorest.Response `json:"-"` + // Properties - The migration item properties. + Properties *MigrationItemProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// MigrationItemCollection migration item collection. +type MigrationItemCollection struct { + autorest.Response `json:"-"` + // Value - The list of migration items. + Value *[]MigrationItem `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// MigrationItemCollectionIterator provides access to a complete listing of MigrationItem values. +type MigrationItemCollectionIterator struct { + i int + page MigrationItemCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *MigrationItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *MigrationItemCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter MigrationItemCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter MigrationItemCollectionIterator) Response() MigrationItemCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter MigrationItemCollectionIterator) Value() MigrationItem { + if !iter.page.NotDone() { + return MigrationItem{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the MigrationItemCollectionIterator type. +func NewMigrationItemCollectionIterator(page MigrationItemCollectionPage) MigrationItemCollectionIterator { + return MigrationItemCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (mic MigrationItemCollection) IsEmpty() bool { + return mic.Value == nil || len(*mic.Value) == 0 +} + +// migrationItemCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (mic MigrationItemCollection) migrationItemCollectionPreparer(ctx context.Context) (*http.Request, error) { + if mic.NextLink == nil || len(to.String(mic.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(mic.NextLink))) +} + +// MigrationItemCollectionPage contains a page of MigrationItem values. +type MigrationItemCollectionPage struct { + fn func(context.Context, MigrationItemCollection) (MigrationItemCollection, error) + mic MigrationItemCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *MigrationItemCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MigrationItemCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.mic) + if err != nil { + return err + } + page.mic = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *MigrationItemCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page MigrationItemCollectionPage) NotDone() bool { + return !page.mic.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page MigrationItemCollectionPage) Response() MigrationItemCollection { + return page.mic +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page MigrationItemCollectionPage) Values() []MigrationItem { + if page.mic.IsEmpty() { + return nil + } + return *page.mic.Value +} + +// Creates a new instance of the MigrationItemCollectionPage type. +func NewMigrationItemCollectionPage(getNextPage func(context.Context, MigrationItemCollection) (MigrationItemCollection, error)) MigrationItemCollectionPage { + return MigrationItemCollectionPage{fn: getNextPage} +} + +// MigrationItemProperties migration item properties. +type MigrationItemProperties struct { + // MachineName - READ-ONLY; The on-premise virtual machine name. + MachineName *string `json:"machineName,omitempty"` + // PolicyID - READ-ONLY; The ARM Id of policy governing this item. + PolicyID *string `json:"policyId,omitempty"` + // PolicyFriendlyName - READ-ONLY; The name of policy governing this item. + PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` + // RecoveryServicesProviderID - READ-ONLY; The recovery services provider ARM Id. + RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` + // MigrationState - READ-ONLY; The migration status. Possible values include: 'MigrationStateNone', 'MigrationStateEnableMigrationInProgress', 'MigrationStateEnableMigrationFailed', 'MigrationStateDisableMigrationInProgress', 'MigrationStateDisableMigrationFailed', 'MigrationStateInitialSeedingInProgress', 'MigrationStateInitialSeedingFailed', 'MigrationStateReplicating', 'MigrationStateMigrationInProgress', 'MigrationStateMigrationSucceeded', 'MigrationStateMigrationFailed' + MigrationState MigrationState `json:"migrationState,omitempty"` + // MigrationStateDescription - READ-ONLY; The migration state description. + MigrationStateDescription *string `json:"migrationStateDescription,omitempty"` + // TestMigrateState - READ-ONLY; The test migrate state. Possible values include: 'TestMigrationStateNone', 'TestMigrationStateTestMigrationInProgress', 'TestMigrationStateTestMigrationSucceeded', 'TestMigrationStateTestMigrationFailed', 'TestMigrationStateTestMigrationCleanupInProgress' + TestMigrateState TestMigrationState `json:"testMigrateState,omitempty"` + // TestMigrateStateDescription - READ-ONLY; The test migrate state description. + TestMigrateStateDescription *string `json:"testMigrateStateDescription,omitempty"` + // Health - READ-ONLY; The consolidated health. + Health *string `json:"health,omitempty"` + // HealthErrors - READ-ONLY; The list of health errors. + HealthErrors *[]HealthError `json:"healthErrors,omitempty"` + // AllowedOperations - READ-ONLY; The allowed operations on the migration item, based on the current migration state of the item. + AllowedOperations *[]MigrationItemOperation `json:"allowedOperations,omitempty"` + // CurrentJob - READ-ONLY; The current job details. + CurrentJob *CurrentJobDetails `json:"currentJob,omitempty"` + // ProviderSpecificDetails - The migration provider custom settings. + ProviderSpecificDetails BasicMigrationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for MigrationItemProperties struct. +func (mip *MigrationItemProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "machineName": + if v != nil { + var machineName string + err = json.Unmarshal(*v, &machineName) + if err != nil { + return err + } + mip.MachineName = &machineName + } + case "policyId": + if v != nil { + var policyID string + err = json.Unmarshal(*v, &policyID) + if err != nil { + return err + } + mip.PolicyID = &policyID + } + case "policyFriendlyName": + if v != nil { + var policyFriendlyName string + err = json.Unmarshal(*v, &policyFriendlyName) + if err != nil { + return err + } + mip.PolicyFriendlyName = &policyFriendlyName + } + case "recoveryServicesProviderId": + if v != nil { + var recoveryServicesProviderID string + err = json.Unmarshal(*v, &recoveryServicesProviderID) + if err != nil { + return err + } + mip.RecoveryServicesProviderID = &recoveryServicesProviderID + } + case "migrationState": + if v != nil { + var migrationState MigrationState + err = json.Unmarshal(*v, &migrationState) + if err != nil { + return err + } + mip.MigrationState = migrationState + } + case "migrationStateDescription": + if v != nil { + var migrationStateDescription string + err = json.Unmarshal(*v, &migrationStateDescription) + if err != nil { + return err + } + mip.MigrationStateDescription = &migrationStateDescription + } + case "testMigrateState": + if v != nil { + var testMigrateState TestMigrationState + err = json.Unmarshal(*v, &testMigrateState) + if err != nil { + return err + } + mip.TestMigrateState = testMigrateState + } + case "testMigrateStateDescription": + if v != nil { + var testMigrateStateDescription string + err = json.Unmarshal(*v, &testMigrateStateDescription) + if err != nil { + return err + } + mip.TestMigrateStateDescription = &testMigrateStateDescription + } + case "health": + if v != nil { + var health string + err = json.Unmarshal(*v, &health) + if err != nil { + return err + } + mip.Health = &health + } + case "healthErrors": + if v != nil { + var healthErrors []HealthError + err = json.Unmarshal(*v, &healthErrors) + if err != nil { + return err + } + mip.HealthErrors = &healthErrors + } + case "allowedOperations": + if v != nil { + var allowedOperations []MigrationItemOperation + err = json.Unmarshal(*v, &allowedOperations) + if err != nil { + return err + } + mip.AllowedOperations = &allowedOperations + } + case "currentJob": + if v != nil { + var currentJob CurrentJobDetails + err = json.Unmarshal(*v, ¤tJob) + if err != nil { + return err + } + mip.CurrentJob = ¤tJob + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicMigrationProviderSpecificSettings(*v) + if err != nil { + return err + } + mip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// MigrationItemsQueryParameter query parameter to enumerate migration items. +type MigrationItemsQueryParameter struct { + // SourceFabricName - The source fabric name filter. + SourceFabricName *string `json:"sourceFabricName,omitempty"` + // InstanceType - The replication provider type. + InstanceType *string `json:"instanceType,omitempty"` +} + +// BasicMigrationProviderSpecificSettings migration provider specific settings. +type BasicMigrationProviderSpecificSettings interface { + AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) + AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) +} + +// MigrationProviderSpecificSettings migration provider specific settings. +type MigrationProviderSpecificSettings struct { + // InstanceType - Possible values include: 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings', 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +func unmarshalBasicMigrationProviderSpecificSettings(body []byte) (BasicMigrationProviderSpecificSettings, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt): + var vmcmd VMwareCbtMigrationDetails + err := json.Unmarshal(body, &vmcmd) + return vmcmd, err + default: + var mpss MigrationProviderSpecificSettings + err := json.Unmarshal(body, &mpss) + return mpss, err + } +} +func unmarshalBasicMigrationProviderSpecificSettingsArray(body []byte) ([]BasicMigrationProviderSpecificSettings, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + mpssArray := make([]BasicMigrationProviderSpecificSettings, len(rawMessages)) + + for index, rawMessage := range rawMessages { + mpss, err := unmarshalBasicMigrationProviderSpecificSettings(*rawMessage) + if err != nil { + return nil, err + } + mpssArray[index] = mpss + } + return mpssArray, nil +} + +// MarshalJSON is the custom marshaler for MigrationProviderSpecificSettings. +func (mpss MigrationProviderSpecificSettings) MarshalJSON() ([]byte, error) { + mpss.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings + objectMap := make(map[string]interface{}) + if mpss.InstanceType != "" { + objectMap["instanceType"] = mpss.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtMigrationDetails is the BasicMigrationProviderSpecificSettings implementation for MigrationProviderSpecificSettings. +func (mpss MigrationProviderSpecificSettings) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) { + return nil, false +} + +// AsMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for MigrationProviderSpecificSettings. +func (mpss MigrationProviderSpecificSettings) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) { + return &mpss, true +} + +// AsBasicMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for MigrationProviderSpecificSettings. +func (mpss MigrationProviderSpecificSettings) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) { + return &mpss, true +} + +// MigrationRecoveryPoint recovery point for a migration item. +type MigrationRecoveryPoint struct { + autorest.Response `json:"-"` + // Properties - Recovery point properties. + Properties *MigrationRecoveryPointProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// MigrationRecoveryPointCollection collection of migration recovery points. +type MigrationRecoveryPointCollection struct { + autorest.Response `json:"-"` + // Value - The migration recovery point details. + Value *[]MigrationRecoveryPoint `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// MigrationRecoveryPointCollectionIterator provides access to a complete listing of MigrationRecoveryPoint +// values. +type MigrationRecoveryPointCollectionIterator struct { + i int + page MigrationRecoveryPointCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *MigrationRecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *MigrationRecoveryPointCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter MigrationRecoveryPointCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter MigrationRecoveryPointCollectionIterator) Response() MigrationRecoveryPointCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter MigrationRecoveryPointCollectionIterator) Value() MigrationRecoveryPoint { + if !iter.page.NotDone() { + return MigrationRecoveryPoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the MigrationRecoveryPointCollectionIterator type. +func NewMigrationRecoveryPointCollectionIterator(page MigrationRecoveryPointCollectionPage) MigrationRecoveryPointCollectionIterator { + return MigrationRecoveryPointCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (mrpc MigrationRecoveryPointCollection) IsEmpty() bool { + return mrpc.Value == nil || len(*mrpc.Value) == 0 +} + +// migrationRecoveryPointCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (mrpc MigrationRecoveryPointCollection) migrationRecoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) { + if mrpc.NextLink == nil || len(to.String(mrpc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(mrpc.NextLink))) +} + +// MigrationRecoveryPointCollectionPage contains a page of MigrationRecoveryPoint values. +type MigrationRecoveryPointCollectionPage struct { + fn func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error) + mrpc MigrationRecoveryPointCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *MigrationRecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MigrationRecoveryPointCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.mrpc) + if err != nil { + return err + } + page.mrpc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *MigrationRecoveryPointCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page MigrationRecoveryPointCollectionPage) NotDone() bool { + return !page.mrpc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page MigrationRecoveryPointCollectionPage) Response() MigrationRecoveryPointCollection { + return page.mrpc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page MigrationRecoveryPointCollectionPage) Values() []MigrationRecoveryPoint { + if page.mrpc.IsEmpty() { + return nil + } + return *page.mrpc.Value +} + +// Creates a new instance of the MigrationRecoveryPointCollectionPage type. +func NewMigrationRecoveryPointCollectionPage(getNextPage func(context.Context, MigrationRecoveryPointCollection) (MigrationRecoveryPointCollection, error)) MigrationRecoveryPointCollectionPage { + return MigrationRecoveryPointCollectionPage{fn: getNextPage} +} + +// MigrationRecoveryPointProperties migration item recovery point properties. +type MigrationRecoveryPointProperties struct { + // RecoveryPointTime - READ-ONLY; The recovery point time. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // RecoveryPointType - READ-ONLY; The recovery point type. Possible values include: 'MigrationRecoveryPointTypeNotSpecified', 'MigrationRecoveryPointTypeApplicationConsistent', 'MigrationRecoveryPointTypeCrashConsistent' + RecoveryPointType MigrationRecoveryPointType `json:"recoveryPointType,omitempty"` +} + +// MobilityServiceUpdate the Mobility Service update details. +type MobilityServiceUpdate struct { + // Version - The version of the latest update. + Version *string `json:"version,omitempty"` + // RebootStatus - The reboot status of the update - whether it is required or not. + RebootStatus *string `json:"rebootStatus,omitempty"` + // OsType - The OS type. + OsType *string `json:"osType,omitempty"` +} + +// Network network model. +type Network struct { + autorest.Response `json:"-"` + // Properties - The Network Properties. + Properties *NetworkProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// NetworkCollection list of networks. +type NetworkCollection struct { + autorest.Response `json:"-"` + // Value - The Networks list details. + Value *[]Network `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// NetworkCollectionIterator provides access to a complete listing of Network values. +type NetworkCollectionIterator struct { + i int + page NetworkCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *NetworkCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *NetworkCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter NetworkCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter NetworkCollectionIterator) Response() NetworkCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter NetworkCollectionIterator) Value() Network { + if !iter.page.NotDone() { + return Network{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the NetworkCollectionIterator type. +func NewNetworkCollectionIterator(page NetworkCollectionPage) NetworkCollectionIterator { + return NetworkCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (nc NetworkCollection) IsEmpty() bool { + return nc.Value == nil || len(*nc.Value) == 0 +} + +// networkCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (nc NetworkCollection) networkCollectionPreparer(ctx context.Context) (*http.Request, error) { + if nc.NextLink == nil || len(to.String(nc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(nc.NextLink))) +} + +// NetworkCollectionPage contains a page of Network values. +type NetworkCollectionPage struct { + fn func(context.Context, NetworkCollection) (NetworkCollection, error) + nc NetworkCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *NetworkCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.nc) + if err != nil { + return err + } + page.nc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *NetworkCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page NetworkCollectionPage) NotDone() bool { + return !page.nc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page NetworkCollectionPage) Response() NetworkCollection { + return page.nc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page NetworkCollectionPage) Values() []Network { + if page.nc.IsEmpty() { + return nil + } + return *page.nc.Value +} + +// Creates a new instance of the NetworkCollectionPage type. +func NewNetworkCollectionPage(getNextPage func(context.Context, NetworkCollection) (NetworkCollection, error)) NetworkCollectionPage { + return NetworkCollectionPage{fn: getNextPage} +} + +// NetworkMapping network Mapping model. Ideally it should have been possible to inherit this class from +// prev version in InheritedModels as long as there is no difference in structure or method signature. +// Since there were no base Models for certain fields and methods viz NetworkMappingProperties and Load +// with required return type, the class has been introduced in its entirety with references to base models +// to facilitate extensions in subsequent versions. +type NetworkMapping struct { + autorest.Response `json:"-"` + // Properties - The Network Mapping Properties. + Properties *NetworkMappingProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// NetworkMappingCollection list of network mappings. As with NetworkMapping, it should be possible to +// reuse a prev version of this class. It doesn't seem likely this class could be anything more than a +// slightly bespoke collection of NetworkMapping. Hence it makes sense to override Load with +// Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. +type NetworkMappingCollection struct { + autorest.Response `json:"-"` + // Value - The Network Mappings list. + Value *[]NetworkMapping `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// NetworkMappingCollectionIterator provides access to a complete listing of NetworkMapping values. +type NetworkMappingCollectionIterator struct { + i int + page NetworkMappingCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *NetworkMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *NetworkMappingCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter NetworkMappingCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter NetworkMappingCollectionIterator) Response() NetworkMappingCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter NetworkMappingCollectionIterator) Value() NetworkMapping { + if !iter.page.NotDone() { + return NetworkMapping{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the NetworkMappingCollectionIterator type. +func NewNetworkMappingCollectionIterator(page NetworkMappingCollectionPage) NetworkMappingCollectionIterator { + return NetworkMappingCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (nmc NetworkMappingCollection) IsEmpty() bool { + return nmc.Value == nil || len(*nmc.Value) == 0 +} + +// networkMappingCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (nmc NetworkMappingCollection) networkMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { + if nmc.NextLink == nil || len(to.String(nmc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(nmc.NextLink))) +} + +// NetworkMappingCollectionPage contains a page of NetworkMapping values. +type NetworkMappingCollectionPage struct { + fn func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error) + nmc NetworkMappingCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *NetworkMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NetworkMappingCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.nmc) + if err != nil { + return err + } + page.nmc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *NetworkMappingCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page NetworkMappingCollectionPage) NotDone() bool { + return !page.nmc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page NetworkMappingCollectionPage) Response() NetworkMappingCollection { + return page.nmc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page NetworkMappingCollectionPage) Values() []NetworkMapping { + if page.nmc.IsEmpty() { + return nil + } + return *page.nmc.Value +} + +// Creates a new instance of the NetworkMappingCollectionPage type. +func NewNetworkMappingCollectionPage(getNextPage func(context.Context, NetworkMappingCollection) (NetworkMappingCollection, error)) NetworkMappingCollectionPage { + return NetworkMappingCollectionPage{fn: getNextPage} +} + +// BasicNetworkMappingFabricSpecificSettings network Mapping fabric specific settings. +type BasicNetworkMappingFabricSpecificSettings interface { + AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) + AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) + AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) + AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) +} + +// NetworkMappingFabricSpecificSettings network Mapping fabric specific settings. +type NetworkMappingFabricSpecificSettings struct { + // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` +} + +func unmarshalBasicNetworkMappingFabricSpecificSettings(body []byte) (BasicNetworkMappingFabricSpecificSettings, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure): + var atanms AzureToAzureNetworkMappingSettings + err := json.Unmarshal(body, &atanms) + return atanms, err + case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure): + var vtanms VmmToAzureNetworkMappingSettings + err := json.Unmarshal(body, &vtanms) + return vtanms, err + case string(InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm): + var vtvnms VmmToVmmNetworkMappingSettings + err := json.Unmarshal(body, &vtvnms) + return vtvnms, err + default: + var nmfss NetworkMappingFabricSpecificSettings + err := json.Unmarshal(body, &nmfss) + return nmfss, err + } +} +func unmarshalBasicNetworkMappingFabricSpecificSettingsArray(body []byte) ([]BasicNetworkMappingFabricSpecificSettings, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + nmfssArray := make([]BasicNetworkMappingFabricSpecificSettings, len(rawMessages)) + + for index, rawMessage := range rawMessages { + nmfss, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*rawMessage) + if err != nil { + return nil, err + } + nmfssArray[index] = nmfss + } + return nmfssArray, nil +} + +// MarshalJSON is the custom marshaler for NetworkMappingFabricSpecificSettings. +func (nmfss NetworkMappingFabricSpecificSettings) MarshalJSON() ([]byte, error) { + nmfss.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings + objectMap := make(map[string]interface{}) + if nmfss.InstanceType != "" { + objectMap["instanceType"] = nmfss.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. +func (nmfss NetworkMappingFabricSpecificSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. +func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. +func (nmfss NetworkMappingFabricSpecificSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { + return nil, false +} + +// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. +func (nmfss NetworkMappingFabricSpecificSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { + return &nmfss, true +} + +// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for NetworkMappingFabricSpecificSettings. +func (nmfss NetworkMappingFabricSpecificSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { + return &nmfss, true +} + +// NetworkMappingProperties network Mapping Properties. +type NetworkMappingProperties struct { + // State - The pairing state for network mapping. + State *string `json:"state,omitempty"` + // PrimaryNetworkFriendlyName - The primary network friendly name. + PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"` + // PrimaryNetworkID - The primary network id for network mapping. + PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` + // PrimaryFabricFriendlyName - The primary fabric friendly name. + PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` + // RecoveryNetworkFriendlyName - The recovery network friendly name. + RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"` + // RecoveryNetworkID - The recovery network id for network mapping. + RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` + // RecoveryFabricArmID - The recovery fabric ARM id. + RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"` + // RecoveryFabricFriendlyName - The recovery fabric friendly name. + RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` + // FabricSpecificSettings - The fabric specific settings. + FabricSpecificSettings BasicNetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for NetworkMappingProperties struct. +func (nmp *NetworkMappingProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "state": + if v != nil { + var state string + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + nmp.State = &state + } + case "primaryNetworkFriendlyName": + if v != nil { + var primaryNetworkFriendlyName string + err = json.Unmarshal(*v, &primaryNetworkFriendlyName) + if err != nil { + return err + } + nmp.PrimaryNetworkFriendlyName = &primaryNetworkFriendlyName + } + case "primaryNetworkId": + if v != nil { + var primaryNetworkID string + err = json.Unmarshal(*v, &primaryNetworkID) + if err != nil { + return err + } + nmp.PrimaryNetworkID = &primaryNetworkID + } + case "primaryFabricFriendlyName": + if v != nil { + var primaryFabricFriendlyName string + err = json.Unmarshal(*v, &primaryFabricFriendlyName) + if err != nil { + return err + } + nmp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName + } + case "recoveryNetworkFriendlyName": + if v != nil { + var recoveryNetworkFriendlyName string + err = json.Unmarshal(*v, &recoveryNetworkFriendlyName) + if err != nil { + return err + } + nmp.RecoveryNetworkFriendlyName = &recoveryNetworkFriendlyName + } + case "recoveryNetworkId": + if v != nil { + var recoveryNetworkID string + err = json.Unmarshal(*v, &recoveryNetworkID) + if err != nil { + return err + } + nmp.RecoveryNetworkID = &recoveryNetworkID + } + case "recoveryFabricArmId": + if v != nil { + var recoveryFabricArmID string + err = json.Unmarshal(*v, &recoveryFabricArmID) + if err != nil { + return err + } + nmp.RecoveryFabricArmID = &recoveryFabricArmID + } + case "recoveryFabricFriendlyName": + if v != nil { + var recoveryFabricFriendlyName string + err = json.Unmarshal(*v, &recoveryFabricFriendlyName) + if err != nil { + return err + } + nmp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName + } + case "fabricSpecificSettings": + if v != nil { + fabricSpecificSettings, err := unmarshalBasicNetworkMappingFabricSpecificSettings(*v) + if err != nil { + return err + } + nmp.FabricSpecificSettings = fabricSpecificSettings + } + } + } + + return nil +} + +// NetworkProperties network Properties +type NetworkProperties struct { + // FabricType - The Fabric Type. + FabricType *string `json:"fabricType,omitempty"` + // Subnets - The List of subnets. + Subnets *[]Subnet `json:"subnets,omitempty"` + // FriendlyName - The Friendly Name. + FriendlyName *string `json:"friendlyName,omitempty"` + // NetworkType - The Network Type. + NetworkType *string `json:"networkType,omitempty"` +} + +// OperationsDiscovery operations discovery class. +type OperationsDiscovery struct { + // Name - Name of the API. The name of the operation being performed on this particular object. It should match the action name that appears in RBAC / the event service. Examples of operations include: * Microsoft.Compute/virtualMachine/capture/action * Microsoft.Compute/virtualMachine/restart/action * Microsoft.Compute/virtualMachine/write * Microsoft.Compute/virtualMachine/read * Microsoft.Compute/virtualMachine/delete Each action should include, in order: (1) Resource Provider Namespace (2) Type hierarchy for which the action applies (e.g. server/databases for a SQL Azure database) (3) Read, Write, Action or Delete indicating which type applies. If it is a PUT/PATCH on a collection or named value, Write should be used. If it is a GET, Read should be used. If it is a DELETE, Delete should be used. If it is a POST, Action should be used. As a note: all resource providers would need to include the "{Resource Provider Namespace}/register/action" operation in their response. This API is used to register for their service, and should include details about the operation (e.g. a localized name for the resource provider + any special considerations like PII release) + Name *string `json:"name,omitempty"` + // Display - Object type + Display *Display `json:"display,omitempty"` + // Origin - Origin. The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is "user,system" + Origin *string `json:"origin,omitempty"` + // Properties - Properties. Reserved for future use. + Properties interface{} `json:"properties,omitempty"` +} + +// OperationsDiscoveryCollection collection of ClientDiscovery details. +type OperationsDiscoveryCollection struct { + autorest.Response `json:"-"` + // Value - The ClientDiscovery details. + Value *[]OperationsDiscovery `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationsDiscoveryCollectionIterator provides access to a complete listing of OperationsDiscovery +// values. +type OperationsDiscoveryCollectionIterator struct { + i int + page OperationsDiscoveryCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OperationsDiscoveryCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OperationsDiscoveryCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationsDiscoveryCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OperationsDiscoveryCollectionIterator) Response() OperationsDiscoveryCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OperationsDiscoveryCollectionIterator) Value() OperationsDiscovery { + if !iter.page.NotDone() { + return OperationsDiscovery{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationsDiscoveryCollectionIterator type. +func NewOperationsDiscoveryCollectionIterator(page OperationsDiscoveryCollectionPage) OperationsDiscoveryCollectionIterator { + return OperationsDiscoveryCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (odc OperationsDiscoveryCollection) IsEmpty() bool { + return odc.Value == nil || len(*odc.Value) == 0 +} + +// operationsDiscoveryCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (odc OperationsDiscoveryCollection) operationsDiscoveryCollectionPreparer(ctx context.Context) (*http.Request, error) { + if odc.NextLink == nil || len(to.String(odc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(odc.NextLink))) +} + +// OperationsDiscoveryCollectionPage contains a page of OperationsDiscovery values. +type OperationsDiscoveryCollectionPage struct { + fn func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error) + odc OperationsDiscoveryCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationsDiscoveryCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsDiscoveryCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.odc) + if err != nil { + return err + } + page.odc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationsDiscoveryCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationsDiscoveryCollectionPage) NotDone() bool { + return !page.odc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationsDiscoveryCollectionPage) Response() OperationsDiscoveryCollection { + return page.odc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationsDiscoveryCollectionPage) Values() []OperationsDiscovery { + if page.odc.IsEmpty() { + return nil + } + return *page.odc.Value +} + +// Creates a new instance of the OperationsDiscoveryCollectionPage type. +func NewOperationsDiscoveryCollectionPage(getNextPage func(context.Context, OperationsDiscoveryCollection) (OperationsDiscoveryCollection, error)) OperationsDiscoveryCollectionPage { + return OperationsDiscoveryCollectionPage{fn: getNextPage} +} + +// OSDetails disk Details. +type OSDetails struct { + // OsType - VM Disk details. + OsType *string `json:"osType,omitempty"` + // ProductType - Product type. + ProductType *string `json:"productType,omitempty"` + // OsEdition - The OSEdition. + OsEdition *string `json:"osEdition,omitempty"` + // OSVersion - The OS Version. + OSVersion *string `json:"oSVersion,omitempty"` + // OSMajorVersion - The OS Major Version. + OSMajorVersion *string `json:"oSMajorVersion,omitempty"` + // OSMinorVersion - The OS Minor Version. + OSMinorVersion *string `json:"oSMinorVersion,omitempty"` +} + +// OSDiskDetails details of the OS Disk. +type OSDiskDetails struct { + // OsVhdID - The id of the disk containing the OS. + OsVhdID *string `json:"osVhdId,omitempty"` + // OsType - The type of the OS on the VM. + OsType *string `json:"osType,omitempty"` + // VhdName - The OS disk VHD name. + VhdName *string `json:"vhdName,omitempty"` +} + +// OSVersionWrapper wrapper model for OSVersion to include version and service pack info. +type OSVersionWrapper struct { + // Version - The version. + Version *string `json:"version,omitempty"` + // ServicePack - Service pack. + ServicePack *string `json:"servicePack,omitempty"` +} + +// PlannedFailoverInput input definition for planned failover. +type PlannedFailoverInput struct { + // Properties - Planned failover input properties + Properties *PlannedFailoverInputProperties `json:"properties,omitempty"` +} + +// PlannedFailoverInputProperties input definition for planned failover input properties. +type PlannedFailoverInputProperties struct { + // FailoverDirection - Failover direction. + FailoverDirection *string `json:"failoverDirection,omitempty"` + // ProviderSpecificDetails - Provider specific settings + ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PlannedFailoverInputProperties struct. +func (pfip *PlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "failoverDirection": + if v != nil { + var failoverDirection string + err = json.Unmarshal(*v, &failoverDirection) + if err != nil { + return err + } + pfip.FailoverDirection = &failoverDirection + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) + if err != nil { + return err + } + pfip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// Policy protection profile details. +type Policy struct { + autorest.Response `json:"-"` + // Properties - The custom data. + Properties *PolicyProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// PolicyCollection protection Profile Collection details. +type PolicyCollection struct { + autorest.Response `json:"-"` + // Value - The policy details. + Value *[]Policy `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// PolicyCollectionIterator provides access to a complete listing of Policy values. +type PolicyCollectionIterator struct { + i int + page PolicyCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *PolicyCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *PolicyCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PolicyCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter PolicyCollectionIterator) Response() PolicyCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter PolicyCollectionIterator) Value() Policy { + if !iter.page.NotDone() { + return Policy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PolicyCollectionIterator type. +func NewPolicyCollectionIterator(page PolicyCollectionPage) PolicyCollectionIterator { + return PolicyCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pc PolicyCollection) IsEmpty() bool { + return pc.Value == nil || len(*pc.Value) == 0 +} + +// policyCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pc PolicyCollection) policyCollectionPreparer(ctx context.Context) (*http.Request, error) { + if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pc.NextLink))) +} + +// PolicyCollectionPage contains a page of Policy values. +type PolicyCollectionPage struct { + fn func(context.Context, PolicyCollection) (PolicyCollection, error) + pc PolicyCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *PolicyCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PolicyCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pc) + if err != nil { + return err + } + page.pc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *PolicyCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PolicyCollectionPage) NotDone() bool { + return !page.pc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PolicyCollectionPage) Response() PolicyCollection { + return page.pc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PolicyCollectionPage) Values() []Policy { + if page.pc.IsEmpty() { + return nil + } + return *page.pc.Value +} + +// Creates a new instance of the PolicyCollectionPage type. +func NewPolicyCollectionPage(getNextPage func(context.Context, PolicyCollection) (PolicyCollection, error)) PolicyCollectionPage { + return PolicyCollectionPage{fn: getNextPage} +} + +// PolicyProperties protection profile custom data details. +type PolicyProperties struct { + // FriendlyName - The FriendlyName. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProviderSpecificDetails - The ReplicationChannelSetting. + ProviderSpecificDetails BasicPolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PolicyProperties struct. +func (pp *PolicyProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "friendlyName": + if v != nil { + var friendlyName string + err = json.Unmarshal(*v, &friendlyName) + if err != nil { + return err + } + pp.FriendlyName = &friendlyName + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicPolicyProviderSpecificDetails(*v) + if err != nil { + return err + } + pp.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicPolicyProviderSpecificDetails base class for Provider specific details for policies. +type BasicPolicyProviderSpecificDetails interface { + AsA2APolicyDetails() (*A2APolicyDetails, bool) + AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) + AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) + AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) + AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) + AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) + AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) + AsInMagePolicyDetails() (*InMagePolicyDetails, bool) + AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) + AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) + AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) +} + +// PolicyProviderSpecificDetails base class for Provider specific details for policies. +type PolicyProviderSpecificDetails struct { + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicPolicyProviderSpecificDetails(body []byte) (BasicPolicyProviderSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A): + var apd A2APolicyDetails + err := json.Unmarshal(body, &apd) + return apd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure): + var hvrapd HyperVReplicaAzurePolicyDetails + err := json.Unmarshal(body, &hvrapd) + return hvrapd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails): + var hvrbpd HyperVReplicaBasePolicyDetails + err := json.Unmarshal(body, &hvrbpd) + return hvrbpd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2): + var hvrbpd HyperVReplicaBluePolicyDetails + err := json.Unmarshal(body, &hvrbpd) + return hvrbpd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012): + var hvrpd HyperVReplicaPolicyDetails + err := json.Unmarshal(body, &hvrpd) + return hvrpd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2): + var imavpd InMageAzureV2PolicyDetails + err := json.Unmarshal(body, &imavpd) + return imavpd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails): + var imbpd InMageBasePolicyDetails + err := json.Unmarshal(body, &imbpd) + return imbpd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage): + var impd InMagePolicyDetails + err := json.Unmarshal(body, &impd) + return impd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration): + var rampd RcmAzureMigrationPolicyDetails + err := json.Unmarshal(body, &rampd) + return rampd, err + case string(InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt): + var vcpd VmwareCbtPolicyDetails + err := json.Unmarshal(body, &vcpd) + return vcpd, err + default: + var ppsd PolicyProviderSpecificDetails + err := json.Unmarshal(body, &ppsd) + return ppsd, err + } +} +func unmarshalBasicPolicyProviderSpecificDetailsArray(body []byte) ([]BasicPolicyProviderSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ppsdArray := make([]BasicPolicyProviderSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ppsd, err := unmarshalBasicPolicyProviderSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + ppsdArray[index] = ppsd + } + return ppsdArray, nil +} + +// MarshalJSON is the custom marshaler for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) MarshalJSON() ([]byte, error) { + ppsd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails + objectMap := make(map[string]interface{}) + if ppsd.InstanceType != "" { + objectMap["instanceType"] = ppsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return &ppsd, true +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for PolicyProviderSpecificDetails. +func (ppsd PolicyProviderSpecificDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &ppsd, true +} + +// BasicPolicyProviderSpecificInput base class for provider specific input +type BasicPolicyProviderSpecificInput interface { + AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) + AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) + AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) + AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) + AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) + AsInMagePolicyInput() (*InMagePolicyInput, bool) + AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) + AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) +} + +// PolicyProviderSpecificInput base class for provider specific input +type PolicyProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicPolicyProviderSpecificInput(body []byte) (BasicPolicyProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A): + var apci A2APolicyCreationInput + err := json.Unmarshal(body, &apci) + return apci, err + case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure): + var hvrapi HyperVReplicaAzurePolicyInput + err := json.Unmarshal(body, &hvrapi) + return hvrapi, err + case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2): + var hvrbpi HyperVReplicaBluePolicyInput + err := json.Unmarshal(body, &hvrbpi) + return hvrbpi, err + case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012): + var hvrpi HyperVReplicaPolicyInput + err := json.Unmarshal(body, &hvrpi) + return hvrpi, err + case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2): + var imavpi InMageAzureV2PolicyInput + err := json.Unmarshal(body, &imavpi) + return imavpi, err + case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage): + var impi InMagePolicyInput + err := json.Unmarshal(body, &impi) + return impi, err + case string(InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt): + var vmcpci VMwareCbtPolicyCreationInput + err := json.Unmarshal(body, &vmcpci) + return vmcpci, err + default: + var ppsi PolicyProviderSpecificInput + err := json.Unmarshal(body, &ppsi) + return ppsi, err + } +} +func unmarshalBasicPolicyProviderSpecificInputArray(body []byte) ([]BasicPolicyProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ppsiArray := make([]BasicPolicyProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ppsi, err := unmarshalBasicPolicyProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + ppsiArray[index] = ppsi + } + return ppsiArray, nil +} + +// MarshalJSON is the custom marshaler for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) MarshalJSON() ([]byte, error) { + ppsi.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput + objectMap := make(map[string]interface{}) + if ppsi.InstanceType != "" { + objectMap["instanceType"] = ppsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return &ppsi, true +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for PolicyProviderSpecificInput. +func (ppsi PolicyProviderSpecificInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &ppsi, true +} + +// ProcessServer details of the Process Server. +type ProcessServer struct { + // FriendlyName - The Process Server's friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` + // ID - The Process Server Id. + ID *string `json:"id,omitempty"` + // IPAddress - The IP address of the server. + IPAddress *string `json:"ipAddress,omitempty"` + // OsType - The OS type of the server. + OsType *string `json:"osType,omitempty"` + // AgentVersion - The version of the scout component on the server. + AgentVersion *string `json:"agentVersion,omitempty"` + // LastHeartbeat - The last heartbeat received from the server. + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + // VersionStatus - Version status + VersionStatus *string `json:"versionStatus,omitempty"` + // MobilityServiceUpdates - The list of the mobility service updates available on the Process Server. + MobilityServiceUpdates *[]MobilityServiceUpdate `json:"mobilityServiceUpdates,omitempty"` + // HostID - The agent generated Id. + HostID *string `json:"hostId,omitempty"` + // MachineCount - The servers configured with this PS. + MachineCount *string `json:"machineCount,omitempty"` + // ReplicationPairCount - The number of replication pairs configured in this PS. + ReplicationPairCount *string `json:"replicationPairCount,omitempty"` + // SystemLoad - The percentage of the system load. + SystemLoad *string `json:"systemLoad,omitempty"` + // SystemLoadStatus - The system load status. + SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` + // CPULoad - The percentage of the CPU load. + CPULoad *string `json:"cpuLoad,omitempty"` + // CPULoadStatus - The CPU load status. + CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` + // TotalMemoryInBytes - The total memory. + TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` + // AvailableMemoryInBytes - The available memory. + AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` + // MemoryUsageStatus - The memory usage status. + MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` + // TotalSpaceInBytes - The total space. + TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` + // AvailableSpaceInBytes - The available space. + AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` + // SpaceUsageStatus - The space usage status. + SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` + // PsServiceStatus - The PS service status. + PsServiceStatus *string `json:"psServiceStatus,omitempty"` + // SslCertExpiryDate - The PS SSL cert expiry date. + SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` + // SslCertExpiryRemainingDays - CS SSL cert expiry date. + SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` + // OsVersion - OS Version of the process server. Note: This will get populated if user has CS version greater than 9.12.0.0. + OsVersion *string `json:"osVersion,omitempty"` + // HealthErrors - Health errors. + HealthErrors *[]HealthError `json:"healthErrors,omitempty"` + // AgentExpiryDate - Agent expiry date. + AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` + // AgentVersionDetails - The agent version details. + AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` +} + +// ProtectableItem replication protected item +type ProtectableItem struct { + autorest.Response `json:"-"` + // Properties - The custom data. + Properties *ProtectableItemProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// ProtectableItemCollection protectable item collection. +type ProtectableItemCollection struct { + autorest.Response `json:"-"` + // Value - The Protectable item details. + Value *[]ProtectableItem `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectableItemCollectionIterator provides access to a complete listing of ProtectableItem values. +type ProtectableItemCollectionIterator struct { + i int + page ProtectableItemCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectableItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectableItemCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectableItemCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectableItemCollectionIterator) Response() ProtectableItemCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectableItemCollectionIterator) Value() ProtectableItem { + if !iter.page.NotDone() { + return ProtectableItem{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectableItemCollectionIterator type. +func NewProtectableItemCollectionIterator(page ProtectableItemCollectionPage) ProtectableItemCollectionIterator { + return ProtectableItemCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pic ProtectableItemCollection) IsEmpty() bool { + return pic.Value == nil || len(*pic.Value) == 0 +} + +// protectableItemCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pic ProtectableItemCollection) protectableItemCollectionPreparer(ctx context.Context) (*http.Request, error) { + if pic.NextLink == nil || len(to.String(pic.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pic.NextLink))) +} + +// ProtectableItemCollectionPage contains a page of ProtectableItem values. +type ProtectableItemCollectionPage struct { + fn func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error) + pic ProtectableItemCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectableItemCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pic) + if err != nil { + return err + } + page.pic = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectableItemCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectableItemCollectionPage) NotDone() bool { + return !page.pic.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectableItemCollectionPage) Response() ProtectableItemCollection { + return page.pic +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectableItemCollectionPage) Values() []ProtectableItem { + if page.pic.IsEmpty() { + return nil + } + return *page.pic.Value +} + +// Creates a new instance of the ProtectableItemCollectionPage type. +func NewProtectableItemCollectionPage(getNextPage func(context.Context, ProtectableItemCollection) (ProtectableItemCollection, error)) ProtectableItemCollectionPage { + return ProtectableItemCollectionPage{fn: getNextPage} +} + +// ProtectableItemProperties replication protected item custom data details. +type ProtectableItemProperties struct { + // FriendlyName - The name. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionStatus - The protection status. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ReplicationProtectedItemID - The ARM resource of protected items. + ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"` + // RecoveryServicesProviderID - The recovery provider ARM Id. + RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` + // ProtectionReadinessErrors - The Current protection readiness errors. + ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"` + // SupportedReplicationProviders - The list of replication providers supported for the protectable item. + SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"` + // CustomDetails - The Replication provider custom settings. + CustomDetails BasicConfigurationSettings `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProtectableItemProperties struct. +func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "friendlyName": + if v != nil { + var friendlyName string + err = json.Unmarshal(*v, &friendlyName) + if err != nil { + return err + } + pip.FriendlyName = &friendlyName + } + case "protectionStatus": + if v != nil { + var protectionStatus string + err = json.Unmarshal(*v, &protectionStatus) + if err != nil { + return err + } + pip.ProtectionStatus = &protectionStatus + } + case "replicationProtectedItemId": + if v != nil { + var replicationProtectedItemID string + err = json.Unmarshal(*v, &replicationProtectedItemID) + if err != nil { + return err + } + pip.ReplicationProtectedItemID = &replicationProtectedItemID + } + case "recoveryServicesProviderId": + if v != nil { + var recoveryServicesProviderID string + err = json.Unmarshal(*v, &recoveryServicesProviderID) + if err != nil { + return err + } + pip.RecoveryServicesProviderID = &recoveryServicesProviderID + } + case "protectionReadinessErrors": + if v != nil { + var protectionReadinessErrors []string + err = json.Unmarshal(*v, &protectionReadinessErrors) + if err != nil { + return err + } + pip.ProtectionReadinessErrors = &protectionReadinessErrors + } + case "supportedReplicationProviders": + if v != nil { + var supportedReplicationProviders []string + err = json.Unmarshal(*v, &supportedReplicationProviders) + if err != nil { + return err + } + pip.SupportedReplicationProviders = &supportedReplicationProviders + } + case "customDetails": + if v != nil { + customDetails, err := unmarshalBasicConfigurationSettings(*v) + if err != nil { + return err + } + pip.CustomDetails = customDetails + } + } + } + + return nil +} + +// ProtectableItemQueryParameter query parameter to enumerate Protectable items. +type ProtectableItemQueryParameter struct { + // State - State of the Protectable item query filter. + State *string `json:"state,omitempty"` +} + +// ProtectedItemsQueryParameter query parameter to enumerate protected items. +type ProtectedItemsQueryParameter struct { + // SourceFabricName - The source fabric name filter. + SourceFabricName *string `json:"sourceFabricName,omitempty"` + // RecoveryPlanName - The recovery plan filter. + RecoveryPlanName *string `json:"recoveryPlanName,omitempty"` + // VCenterName - The vCenter name filter. + VCenterName *string `json:"vCenterName,omitempty"` + // InstanceType - The replication provider type. + InstanceType *string `json:"instanceType,omitempty"` + // MultiVMGroupCreateOption - Whether Multi VM group is auto created or specified by user. Possible values include: 'AutoCreated', 'UserSpecified' + MultiVMGroupCreateOption MultiVMGroupCreateOption `json:"multiVmGroupCreateOption,omitempty"` +} + +// ProtectionContainer protection container details. +type ProtectionContainer struct { + autorest.Response `json:"-"` + // Properties - The custom data. + Properties *ProtectionContainerProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// ProtectionContainerCollection protection Container collection. +type ProtectionContainerCollection struct { + autorest.Response `json:"-"` + // Value - The Protection Container details. + Value *[]ProtectionContainer `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionContainerCollectionIterator provides access to a complete listing of ProtectionContainer +// values. +type ProtectionContainerCollectionIterator struct { + i int + page ProtectionContainerCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionContainerCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionContainerCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionContainerCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionContainerCollectionIterator) Response() ProtectionContainerCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionContainerCollectionIterator) Value() ProtectionContainer { + if !iter.page.NotDone() { + return ProtectionContainer{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionContainerCollectionIterator type. +func NewProtectionContainerCollectionIterator(page ProtectionContainerCollectionPage) ProtectionContainerCollectionIterator { + return ProtectionContainerCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pcc ProtectionContainerCollection) IsEmpty() bool { + return pcc.Value == nil || len(*pcc.Value) == 0 +} + +// protectionContainerCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pcc ProtectionContainerCollection) protectionContainerCollectionPreparer(ctx context.Context) (*http.Request, error) { + if pcc.NextLink == nil || len(to.String(pcc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pcc.NextLink))) +} + +// ProtectionContainerCollectionPage contains a page of ProtectionContainer values. +type ProtectionContainerCollectionPage struct { + fn func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error) + pcc ProtectionContainerCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionContainerCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pcc) + if err != nil { + return err + } + page.pcc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionContainerCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionContainerCollectionPage) NotDone() bool { + return !page.pcc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionContainerCollectionPage) Response() ProtectionContainerCollection { + return page.pcc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionContainerCollectionPage) Values() []ProtectionContainer { + if page.pcc.IsEmpty() { + return nil + } + return *page.pcc.Value +} + +// Creates a new instance of the ProtectionContainerCollectionPage type. +func NewProtectionContainerCollectionPage(getNextPage func(context.Context, ProtectionContainerCollection) (ProtectionContainerCollection, error)) ProtectionContainerCollectionPage { + return ProtectionContainerCollectionPage{fn: getNextPage} +} + +// ProtectionContainerFabricSpecificDetails base class for fabric specific details of container. +type ProtectionContainerFabricSpecificDetails struct { + // InstanceType - READ-ONLY; Gets the class type. Overridden in derived classes. + InstanceType *string `json:"instanceType,omitempty"` +} + +// ProtectionContainerMapping protection container mapping object. +type ProtectionContainerMapping struct { + autorest.Response `json:"-"` + // Properties - The custom data. + Properties *ProtectionContainerMappingProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// ProtectionContainerMappingCollection protection container mapping collection class. +type ProtectionContainerMappingCollection struct { + autorest.Response `json:"-"` + // Value - List of container mappings. + Value *[]ProtectionContainerMapping `json:"value,omitempty"` + // NextLink - Link to fetch rest of the data. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionContainerMappingCollectionIterator provides access to a complete listing of +// ProtectionContainerMapping values. +type ProtectionContainerMappingCollectionIterator struct { + i int + page ProtectionContainerMappingCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionContainerMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionContainerMappingCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionContainerMappingCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionContainerMappingCollectionIterator) Response() ProtectionContainerMappingCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionContainerMappingCollectionIterator) Value() ProtectionContainerMapping { + if !iter.page.NotDone() { + return ProtectionContainerMapping{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionContainerMappingCollectionIterator type. +func NewProtectionContainerMappingCollectionIterator(page ProtectionContainerMappingCollectionPage) ProtectionContainerMappingCollectionIterator { + return ProtectionContainerMappingCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pcmc ProtectionContainerMappingCollection) IsEmpty() bool { + return pcmc.Value == nil || len(*pcmc.Value) == 0 +} + +// protectionContainerMappingCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pcmc ProtectionContainerMappingCollection) protectionContainerMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { + if pcmc.NextLink == nil || len(to.String(pcmc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pcmc.NextLink))) +} + +// ProtectionContainerMappingCollectionPage contains a page of ProtectionContainerMapping values. +type ProtectionContainerMappingCollectionPage struct { + fn func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error) + pcmc ProtectionContainerMappingCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionContainerMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerMappingCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pcmc) + if err != nil { + return err + } + page.pcmc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionContainerMappingCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionContainerMappingCollectionPage) NotDone() bool { + return !page.pcmc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionContainerMappingCollectionPage) Response() ProtectionContainerMappingCollection { + return page.pcmc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionContainerMappingCollectionPage) Values() []ProtectionContainerMapping { + if page.pcmc.IsEmpty() { + return nil + } + return *page.pcmc.Value +} + +// Creates a new instance of the ProtectionContainerMappingCollectionPage type. +func NewProtectionContainerMappingCollectionPage(getNextPage func(context.Context, ProtectionContainerMappingCollection) (ProtectionContainerMappingCollection, error)) ProtectionContainerMappingCollectionPage { + return ProtectionContainerMappingCollectionPage{fn: getNextPage} +} + +// ProtectionContainerMappingProperties protection container mapping properties. +type ProtectionContainerMappingProperties struct { + // TargetProtectionContainerID - Paired protection container ARM ID. + TargetProtectionContainerID *string `json:"targetProtectionContainerId,omitempty"` + // TargetProtectionContainerFriendlyName - Friendly name of paired container. + TargetProtectionContainerFriendlyName *string `json:"targetProtectionContainerFriendlyName,omitempty"` + // ProviderSpecificDetails - Provider specific provider details. + ProviderSpecificDetails BasicProtectionContainerMappingProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` + // Health - Health of pairing. + Health *string `json:"health,omitempty"` + // HealthErrorDetails - Health error. + HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` + // PolicyID - Policy ARM Id. + PolicyID *string `json:"policyId,omitempty"` + // State - Association Status + State *string `json:"state,omitempty"` + // SourceProtectionContainerFriendlyName - Friendly name of source protection container. + SourceProtectionContainerFriendlyName *string `json:"sourceProtectionContainerFriendlyName,omitempty"` + // SourceFabricFriendlyName - Friendly name of source fabric. + SourceFabricFriendlyName *string `json:"sourceFabricFriendlyName,omitempty"` + // TargetFabricFriendlyName - Friendly name of target fabric. + TargetFabricFriendlyName *string `json:"targetFabricFriendlyName,omitempty"` + // PolicyFriendlyName - Friendly name of replication policy. + PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionContainerMappingProperties struct. +func (pcmp *ProtectionContainerMappingProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "targetProtectionContainerId": + if v != nil { + var targetProtectionContainerID string + err = json.Unmarshal(*v, &targetProtectionContainerID) + if err != nil { + return err + } + pcmp.TargetProtectionContainerID = &targetProtectionContainerID + } + case "targetProtectionContainerFriendlyName": + if v != nil { + var targetProtectionContainerFriendlyName string + err = json.Unmarshal(*v, &targetProtectionContainerFriendlyName) + if err != nil { + return err + } + pcmp.TargetProtectionContainerFriendlyName = &targetProtectionContainerFriendlyName + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*v) + if err != nil { + return err + } + pcmp.ProviderSpecificDetails = providerSpecificDetails + } + case "health": + if v != nil { + var health string + err = json.Unmarshal(*v, &health) + if err != nil { + return err + } + pcmp.Health = &health + } + case "healthErrorDetails": + if v != nil { + var healthErrorDetails []HealthError + err = json.Unmarshal(*v, &healthErrorDetails) + if err != nil { + return err + } + pcmp.HealthErrorDetails = &healthErrorDetails + } + case "policyId": + if v != nil { + var policyID string + err = json.Unmarshal(*v, &policyID) + if err != nil { + return err + } + pcmp.PolicyID = &policyID + } + case "state": + if v != nil { + var state string + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + pcmp.State = &state + } + case "sourceProtectionContainerFriendlyName": + if v != nil { + var sourceProtectionContainerFriendlyName string + err = json.Unmarshal(*v, &sourceProtectionContainerFriendlyName) + if err != nil { + return err + } + pcmp.SourceProtectionContainerFriendlyName = &sourceProtectionContainerFriendlyName + } + case "sourceFabricFriendlyName": + if v != nil { + var sourceFabricFriendlyName string + err = json.Unmarshal(*v, &sourceFabricFriendlyName) + if err != nil { + return err + } + pcmp.SourceFabricFriendlyName = &sourceFabricFriendlyName + } + case "targetFabricFriendlyName": + if v != nil { + var targetFabricFriendlyName string + err = json.Unmarshal(*v, &targetFabricFriendlyName) + if err != nil { + return err + } + pcmp.TargetFabricFriendlyName = &targetFabricFriendlyName + } + case "policyFriendlyName": + if v != nil { + var policyFriendlyName string + err = json.Unmarshal(*v, &policyFriendlyName) + if err != nil { + return err + } + pcmp.PolicyFriendlyName = &policyFriendlyName + } + } + } + + return nil +} + +// BasicProtectionContainerMappingProviderSpecificDetails container mapping provider specific details. +type BasicProtectionContainerMappingProviderSpecificDetails interface { + AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) + AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) + AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) +} + +// ProtectionContainerMappingProviderSpecificDetails container mapping provider specific details. +type ProtectionContainerMappingProviderSpecificDetails struct { + // InstanceType - Possible values include: 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicProtectionContainerMappingProviderSpecificDetails(body []byte) (BasicProtectionContainerMappingProviderSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A): + var apcmd A2AProtectionContainerMappingDetails + err := json.Unmarshal(body, &apcmd) + return apcmd, err + case string(InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt): + var vmcpcmd VMwareCbtProtectionContainerMappingDetails + err := json.Unmarshal(body, &vmcpcmd) + return vmcpcmd, err + default: + var pcmpsd ProtectionContainerMappingProviderSpecificDetails + err := json.Unmarshal(body, &pcmpsd) + return pcmpsd, err + } +} +func unmarshalBasicProtectionContainerMappingProviderSpecificDetailsArray(body []byte) ([]BasicProtectionContainerMappingProviderSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pcmpsdArray := make([]BasicProtectionContainerMappingProviderSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pcmpsd, err := unmarshalBasicProtectionContainerMappingProviderSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + pcmpsdArray[index] = pcmpsd + } + return pcmpsdArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectionContainerMappingProviderSpecificDetails. +func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) MarshalJSON() ([]byte, error) { + pcmpsd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails + objectMap := make(map[string]interface{}) + if pcmpsd.InstanceType != "" { + objectMap["instanceType"] = pcmpsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. +func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) { + return nil, false +} + +// AsVMwareCbtProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. +func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) { + return nil, false +} + +// AsProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. +func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) { + return &pcmpsd, true +} + +// AsBasicProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for ProtectionContainerMappingProviderSpecificDetails. +func (pcmpsd ProtectionContainerMappingProviderSpecificDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) { + return &pcmpsd, true +} + +// ProtectionContainerProperties protection profile custom data details. +type ProtectionContainerProperties struct { + // FabricFriendlyName - Fabric friendly name. + FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` + // FriendlyName - The name. + FriendlyName *string `json:"friendlyName,omitempty"` + // FabricType - The fabric type. + FabricType *string `json:"fabricType,omitempty"` + // ProtectedItemCount - Number of protected PEs + ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` + // PairingStatus - The pairing status of this cloud. + PairingStatus *string `json:"pairingStatus,omitempty"` + // Role - The role of this cloud. + Role *string `json:"role,omitempty"` + // FabricSpecificDetails - Fabric specific details. + FabricSpecificDetails *ProtectionContainerFabricSpecificDetails `json:"fabricSpecificDetails,omitempty"` +} + +// ProviderError this class contains the error details per object. +type ProviderError struct { + // ErrorCode - The Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorMessage - The Error message. + ErrorMessage *string `json:"errorMessage,omitempty"` + // ErrorID - The Provider error Id. + ErrorID *string `json:"errorId,omitempty"` + // PossibleCauses - The possible causes for the error. + PossibleCauses *string `json:"possibleCauses,omitempty"` + // RecommendedAction - The recommended action to resolve the error. + RecommendedAction *string `json:"recommendedAction,omitempty"` +} + +// BasicProviderSpecificFailoverInput provider specific failover input. +type BasicProviderSpecificFailoverInput interface { + AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) + AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) + AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) + AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) + AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) + AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) +} + +// ProviderSpecificFailoverInput provider specific failover input. +type ProviderSpecificFailoverInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicProviderSpecificFailoverInput(body []byte) (BasicProviderSpecificFailoverInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeA2A): + var afpi A2AFailoverProviderInput + err := json.Unmarshal(body, &afpi) + return afpi, err + case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): + var hvrafpi HyperVReplicaAzureFailbackProviderInput + err := json.Unmarshal(body, &hvrafpi) + return hvrafpi, err + case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): + var hvrafpi HyperVReplicaAzureFailoverProviderInput + err := json.Unmarshal(body, &hvrafpi) + return hvrafpi, err + case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMageAzureV2): + var imavfpi InMageAzureV2FailoverProviderInput + err := json.Unmarshal(body, &imavfpi) + return imavfpi, err + case string(InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeInMage): + var imfpi InMageFailoverProviderInput + err := json.Unmarshal(body, &imfpi) + return imfpi, err + default: + var psfi ProviderSpecificFailoverInput + err := json.Unmarshal(body, &psfi) + return psfi, err + } +} +func unmarshalBasicProviderSpecificFailoverInputArray(body []byte) ([]BasicProviderSpecificFailoverInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + psfiArray := make([]BasicProviderSpecificFailoverInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + psfi, err := unmarshalBasicProviderSpecificFailoverInput(*rawMessage) + if err != nil { + return nil, err + } + psfiArray[index] = psfi + } + return psfiArray, nil +} + +// MarshalJSON is the custom marshaler for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { + psfi.InstanceType = InstanceTypeBasicProviderSpecificFailoverInputInstanceTypeProviderSpecificFailoverInput + objectMap := make(map[string]interface{}) + if psfi.InstanceType != "" { + objectMap["instanceType"] = psfi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) AsProviderSpecificFailoverInput() (*ProviderSpecificFailoverInput, bool) { + return &psfi, true +} + +// AsBasicProviderSpecificFailoverInput is the BasicProviderSpecificFailoverInput implementation for ProviderSpecificFailoverInput. +func (psfi ProviderSpecificFailoverInput) AsBasicProviderSpecificFailoverInput() (BasicProviderSpecificFailoverInput, bool) { + return &psfi, true +} + +// BasicProviderSpecificRecoveryPointDetails replication provider specific recovery point details. +type BasicProviderSpecificRecoveryPointDetails interface { + AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) + AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) + AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) +} + +// ProviderSpecificRecoveryPointDetails replication provider specific recovery point details. +type ProviderSpecificRecoveryPointDetails struct { + // InstanceType - Possible values include: 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A', 'InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicProviderSpecificRecoveryPointDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicProviderSpecificRecoveryPointDetails(body []byte) (BasicProviderSpecificRecoveryPointDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeA2A): + var arpd A2ARecoveryPointDetails + err := json.Unmarshal(body, &arpd) + return arpd, err + case string(InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeInMageAzureV2): + var imavrpd InMageAzureV2RecoveryPointDetails + err := json.Unmarshal(body, &imavrpd) + return imavrpd, err + default: + var psrpd ProviderSpecificRecoveryPointDetails + err := json.Unmarshal(body, &psrpd) + return psrpd, err + } +} +func unmarshalBasicProviderSpecificRecoveryPointDetailsArray(body []byte) ([]BasicProviderSpecificRecoveryPointDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + psrpdArray := make([]BasicProviderSpecificRecoveryPointDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + psrpd, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*rawMessage) + if err != nil { + return nil, err + } + psrpdArray[index] = psrpd + } + return psrpdArray, nil +} + +// MarshalJSON is the custom marshaler for ProviderSpecificRecoveryPointDetails. +func (psrpd ProviderSpecificRecoveryPointDetails) MarshalJSON() ([]byte, error) { + psrpd.InstanceType = InstanceTypeBasicProviderSpecificRecoveryPointDetailsInstanceTypeProviderSpecificRecoveryPointDetails + objectMap := make(map[string]interface{}) + if psrpd.InstanceType != "" { + objectMap["instanceType"] = psrpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2ARecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. +func (psrpd ProviderSpecificRecoveryPointDetails) AsA2ARecoveryPointDetails() (*A2ARecoveryPointDetails, bool) { + return nil, false +} + +// AsInMageAzureV2RecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. +func (psrpd ProviderSpecificRecoveryPointDetails) AsInMageAzureV2RecoveryPointDetails() (*InMageAzureV2RecoveryPointDetails, bool) { + return nil, false +} + +// AsProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. +func (psrpd ProviderSpecificRecoveryPointDetails) AsProviderSpecificRecoveryPointDetails() (*ProviderSpecificRecoveryPointDetails, bool) { + return &psrpd, true +} + +// AsBasicProviderSpecificRecoveryPointDetails is the BasicProviderSpecificRecoveryPointDetails implementation for ProviderSpecificRecoveryPointDetails. +func (psrpd ProviderSpecificRecoveryPointDetails) AsBasicProviderSpecificRecoveryPointDetails() (BasicProviderSpecificRecoveryPointDetails, bool) { + return &psrpd, true +} + +// RcmAzureMigrationPolicyDetails RCM based Azure migration specific policy details. +type RcmAzureMigrationPolicyDetails struct { + // RecoveryPointThresholdInMinutes - The recovery point threshold in minutes. + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + // RecoveryPointHistory - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // MultiVMSyncStatus - A value indicating whether multi-VM sync has to be enabled. Possible values include: 'MultiVMSyncStatusEnabled', 'MultiVMSyncStatusDisabled' + MultiVMSyncStatus MultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) MarshalJSON() ([]byte, error) { + rampd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration + objectMap := make(map[string]interface{}) + if rampd.RecoveryPointThresholdInMinutes != nil { + objectMap["recoveryPointThresholdInMinutes"] = rampd.RecoveryPointThresholdInMinutes + } + if rampd.RecoveryPointHistory != nil { + objectMap["recoveryPointHistory"] = rampd.RecoveryPointHistory + } + if rampd.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = rampd.AppConsistentFrequencyInMinutes + } + if rampd.MultiVMSyncStatus != "" { + objectMap["multiVmSyncStatus"] = rampd.MultiVMSyncStatus + } + if rampd.CrashConsistentFrequencyInMinutes != nil { + objectMap["crashConsistentFrequencyInMinutes"] = rampd.CrashConsistentFrequencyInMinutes + } + if rampd.InstanceType != "" { + objectMap["instanceType"] = rampd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return &rampd, true +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &rampd, true +} + +// RecoveryPlan recovery plan details. +type RecoveryPlan struct { + autorest.Response `json:"-"` + // Properties - The custom details. + Properties *RecoveryPlanProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// RecoveryPlanA2AFailoverInput recovery plan A2A failover input. +type RecoveryPlanA2AFailoverInput struct { + // RecoveryPointType - The recovery point type. Possible values include: 'Latest', 'LatestApplicationConsistent', 'LatestCrashConsistent', 'LatestProcessed' + RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"` + // CloudServiceCreationOption - A value indicating whether to use recovery cloud service for TFO or not. + CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` + // MultiVMSyncPointOption - A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. Possible values include: 'UseMultiVMSyncRecoveryPoint', 'UsePerVMRecoveryPoint' + MultiVMSyncPointOption MultiVMSyncPointOption `json:"multiVmSyncPointOption,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { + rpafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A + objectMap := make(map[string]interface{}) + if rpafi.RecoveryPointType != "" { + objectMap["recoveryPointType"] = rpafi.RecoveryPointType + } + if rpafi.CloudServiceCreationOption != nil { + objectMap["cloudServiceCreationOption"] = rpafi.CloudServiceCreationOption + } + if rpafi.MultiVMSyncPointOption != "" { + objectMap["multiVmSyncPointOption"] = rpafi.MultiVMSyncPointOption + } + if rpafi.InstanceType != "" { + objectMap["instanceType"] = rpafi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return &rpafi, true +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { + return &rpafi, true +} + +// RecoveryPlanAction recovery plan action details. +type RecoveryPlanAction struct { + // ActionName - The action name. + ActionName *string `json:"actionName,omitempty"` + // FailoverTypes - The list of failover types. + FailoverTypes *[]ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"` + // FailoverDirections - The list of failover directions. + FailoverDirections *[]PossibleOperationsDirections `json:"failoverDirections,omitempty"` + // CustomDetails - The custom details. + CustomDetails BasicRecoveryPlanActionDetails `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanAction struct. +func (rpa *RecoveryPlanAction) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "actionName": + if v != nil { + var actionName string + err = json.Unmarshal(*v, &actionName) + if err != nil { + return err + } + rpa.ActionName = &actionName + } + case "failoverTypes": + if v != nil { + var failoverTypes []ReplicationProtectedItemOperation + err = json.Unmarshal(*v, &failoverTypes) + if err != nil { + return err + } + rpa.FailoverTypes = &failoverTypes + } + case "failoverDirections": + if v != nil { + var failoverDirections []PossibleOperationsDirections + err = json.Unmarshal(*v, &failoverDirections) + if err != nil { + return err + } + rpa.FailoverDirections = &failoverDirections + } + case "customDetails": + if v != nil { + customDetails, err := unmarshalBasicRecoveryPlanActionDetails(*v) + if err != nil { + return err + } + rpa.CustomDetails = customDetails + } + } + } + + return nil +} + +// BasicRecoveryPlanActionDetails recovery plan action custom details. +type BasicRecoveryPlanActionDetails interface { + AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) + AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) + AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) + AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) +} + +// RecoveryPlanActionDetails recovery plan action custom details. +type RecoveryPlanActionDetails struct { + // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' + InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicRecoveryPlanActionDetails(body []byte) (BasicRecoveryPlanActionDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAutomationRunbookActionDetails): + var rparad RecoveryPlanAutomationRunbookActionDetails + err := json.Unmarshal(body, &rparad) + return rparad, err + case string(InstanceTypeManualActionDetails): + var rpmad RecoveryPlanManualActionDetails + err := json.Unmarshal(body, &rpmad) + return rpmad, err + case string(InstanceTypeScriptActionDetails): + var rpsad RecoveryPlanScriptActionDetails + err := json.Unmarshal(body, &rpsad) + return rpsad, err + default: + var rpad RecoveryPlanActionDetails + err := json.Unmarshal(body, &rpad) + return rpad, err + } +} +func unmarshalBasicRecoveryPlanActionDetailsArray(body []byte) ([]BasicRecoveryPlanActionDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpadArray := make([]BasicRecoveryPlanActionDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpad, err := unmarshalBasicRecoveryPlanActionDetails(*rawMessage) + if err != nil { + return nil, err + } + rpadArray[index] = rpad + } + return rpadArray, nil +} + +// MarshalJSON is the custom marshaler for RecoveryPlanActionDetails. +func (rpad RecoveryPlanActionDetails) MarshalJSON() ([]byte, error) { + rpad.InstanceType = InstanceTypeRecoveryPlanActionDetails + objectMap := make(map[string]interface{}) + if rpad.InstanceType != "" { + objectMap["instanceType"] = rpad.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. +func (rpad RecoveryPlanActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. +func (rpad RecoveryPlanActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. +func (rpad RecoveryPlanActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. +func (rpad RecoveryPlanActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { + return &rpad, true +} + +// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanActionDetails. +func (rpad RecoveryPlanActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { + return &rpad, true +} + +// RecoveryPlanAutomationRunbookActionDetails recovery plan Automation runbook action details. +type RecoveryPlanAutomationRunbookActionDetails struct { + // RunbookID - The runbook ARM Id. + RunbookID *string `json:"runbookId,omitempty"` + // Timeout - The runbook timeout. + Timeout *string `json:"timeout,omitempty"` + // FabricLocation - The fabric location. Possible values include: 'Primary', 'Recovery' + FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' + InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) { + rparad.InstanceType = InstanceTypeAutomationRunbookActionDetails + objectMap := make(map[string]interface{}) + if rparad.RunbookID != nil { + objectMap["runbookId"] = rparad.RunbookID + } + if rparad.Timeout != nil { + objectMap["timeout"] = rparad.Timeout + } + if rparad.FabricLocation != "" { + objectMap["fabricLocation"] = rparad.FabricLocation + } + if rparad.InstanceType != "" { + objectMap["instanceType"] = rparad.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { + return &rparad, true +} + +// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { + return nil, false +} + +// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { + return &rparad, true +} + +// RecoveryPlanCollection recovery plan collection details. +type RecoveryPlanCollection struct { + autorest.Response `json:"-"` + // Value - The list of recovery plans. + Value *[]RecoveryPlan `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// RecoveryPlanCollectionIterator provides access to a complete listing of RecoveryPlan values. +type RecoveryPlanCollectionIterator struct { + i int + page RecoveryPlanCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *RecoveryPlanCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RecoveryPlanCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RecoveryPlanCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter RecoveryPlanCollectionIterator) Response() RecoveryPlanCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter RecoveryPlanCollectionIterator) Value() RecoveryPlan { + if !iter.page.NotDone() { + return RecoveryPlan{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RecoveryPlanCollectionIterator type. +func NewRecoveryPlanCollectionIterator(page RecoveryPlanCollectionPage) RecoveryPlanCollectionIterator { + return RecoveryPlanCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (RPCVar RecoveryPlanCollection) IsEmpty() bool { + return RPCVar.Value == nil || len(*RPCVar.Value) == 0 +} + +// recoveryPlanCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (RPCVar RecoveryPlanCollection) recoveryPlanCollectionPreparer(ctx context.Context) (*http.Request, error) { + if RPCVar.NextLink == nil || len(to.String(RPCVar.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(RPCVar.NextLink))) +} + +// RecoveryPlanCollectionPage contains a page of RecoveryPlan values. +type RecoveryPlanCollectionPage struct { + fn func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error) + RPCVar RecoveryPlanCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *RecoveryPlanCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPlanCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.RPCVar) + if err != nil { + return err + } + page.RPCVar = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RecoveryPlanCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RecoveryPlanCollectionPage) NotDone() bool { + return !page.RPCVar.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RecoveryPlanCollectionPage) Response() RecoveryPlanCollection { + return page.RPCVar +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RecoveryPlanCollectionPage) Values() []RecoveryPlan { + if page.RPCVar.IsEmpty() { + return nil + } + return *page.RPCVar.Value +} + +// Creates a new instance of the RecoveryPlanCollectionPage type. +func NewRecoveryPlanCollectionPage(getNextPage func(context.Context, RecoveryPlanCollection) (RecoveryPlanCollection, error)) RecoveryPlanCollectionPage { + return RecoveryPlanCollectionPage{fn: getNextPage} +} + +// RecoveryPlanGroup recovery plan group details. +type RecoveryPlanGroup struct { + // GroupType - The group type. Possible values include: 'Shutdown', 'Boot', 'Failover' + GroupType RecoveryPlanGroupType `json:"groupType,omitempty"` + // ReplicationProtectedItems - The list of protected items. + ReplicationProtectedItems *[]RecoveryPlanProtectedItem `json:"replicationProtectedItems,omitempty"` + // StartGroupActions - The start group actions. + StartGroupActions *[]RecoveryPlanAction `json:"startGroupActions,omitempty"` + // EndGroupActions - The end group actions. + EndGroupActions *[]RecoveryPlanAction `json:"endGroupActions,omitempty"` +} + +// RecoveryPlanGroupTaskDetails this class represents the recovery plan group task. +type RecoveryPlanGroupTaskDetails struct { + // Name - The name. + Name *string `json:"name,omitempty"` + // GroupID - The group identifier. + GroupID *string `json:"groupId,omitempty"` + // RpGroupType - The group type. + RpGroupType *string `json:"rpGroupType,omitempty"` + // ChildTasks - The child tasks. + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' + InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { + rpgtd.InstanceType = InstanceTypeRecoveryPlanGroupTaskDetails + objectMap := make(map[string]interface{}) + if rpgtd.Name != nil { + objectMap["name"] = rpgtd.Name + } + if rpgtd.GroupID != nil { + objectMap["groupId"] = rpgtd.GroupID + } + if rpgtd.RpGroupType != nil { + objectMap["rpGroupType"] = rpgtd.RpGroupType + } + if rpgtd.ChildTasks != nil { + objectMap["childTasks"] = rpgtd.ChildTasks + } + if rpgtd.InstanceType != "" { + objectMap["instanceType"] = rpgtd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { + return &rpgtd, true +} + +// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { + return nil, false +} + +// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { + return nil, false +} + +// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { + return &rpgtd, true +} + +// RecoveryPlanHyperVReplicaAzureFailbackInput recovery plan HVR Azure failback input. +type RecoveryPlanHyperVReplicaAzureFailbackInput struct { + // DataSyncOption - The data sync option. Possible values include: 'ForDownTime', 'ForSynchronization' + DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"` + // RecoveryVMCreationOption - The ALR option. Possible values include: 'CreateVMIfNotFound', 'NoAction' + RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) { + rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback + objectMap := make(map[string]interface{}) + if rphvrafi.DataSyncOption != "" { + objectMap["dataSyncOption"] = rphvrafi.DataSyncOption + } + if rphvrafi.RecoveryVMCreationOption != "" { + objectMap["recoveryVmCreationOption"] = rphvrafi.RecoveryVMCreationOption + } + if rphvrafi.InstanceType != "" { + objectMap["instanceType"] = rphvrafi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return &rphvrafi, true +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { + return &rphvrafi, true +} + +// RecoveryPlanHyperVReplicaAzureFailoverInput recovery plan HVR Azure failover input. +type RecoveryPlanHyperVReplicaAzureFailoverInput struct { + // VaultLocation - The vault location. + VaultLocation *string `json:"vaultLocation,omitempty"` + // PrimaryKekCertificatePfx - The primary KEK certificate PFX. + PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` + // SecondaryKekCertificatePfx - The secondary KEK certificate PFX. + SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` + // RecoveryPointType - The recovery point type. Possible values include: 'HyperVReplicaAzureRpRecoveryPointTypeLatest', 'HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent', 'HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed' + RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) { + rphvrafi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure + objectMap := make(map[string]interface{}) + if rphvrafi.VaultLocation != nil { + objectMap["vaultLocation"] = rphvrafi.VaultLocation + } + if rphvrafi.PrimaryKekCertificatePfx != nil { + objectMap["primaryKekCertificatePfx"] = rphvrafi.PrimaryKekCertificatePfx + } + if rphvrafi.SecondaryKekCertificatePfx != nil { + objectMap["secondaryKekCertificatePfx"] = rphvrafi.SecondaryKekCertificatePfx + } + if rphvrafi.RecoveryPointType != "" { + objectMap["recoveryPointType"] = rphvrafi.RecoveryPointType + } + if rphvrafi.InstanceType != "" { + objectMap["instanceType"] = rphvrafi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return &rphvrafi, true +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { + return &rphvrafi, true +} + +// RecoveryPlanInMageAzureV2FailoverInput recovery plan InMageAzureV2 failover input. +type RecoveryPlanInMageAzureV2FailoverInput struct { + // VaultLocation - The vault location. + VaultLocation *string `json:"vaultLocation,omitempty"` + // RecoveryPointType - The recovery point type. Possible values include: 'InMageV2RpRecoveryPointTypeLatest', 'InMageV2RpRecoveryPointTypeLatestApplicationConsistent', 'InMageV2RpRecoveryPointTypeLatestCrashConsistent', 'InMageV2RpRecoveryPointTypeLatestProcessed' + RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"` + // UseMultiVMSyncPoint - A value indicating whether multi VM sync enabled VMs should use multi VM sync points for failover. + UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { + rpimavfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 + objectMap := make(map[string]interface{}) + if rpimavfi.VaultLocation != nil { + objectMap["vaultLocation"] = rpimavfi.VaultLocation + } + if rpimavfi.RecoveryPointType != "" { + objectMap["recoveryPointType"] = rpimavfi.RecoveryPointType + } + if rpimavfi.UseMultiVMSyncPoint != nil { + objectMap["useMultiVmSyncPoint"] = rpimavfi.UseMultiVMSyncPoint + } + if rpimavfi.InstanceType != "" { + objectMap["instanceType"] = rpimavfi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return &rpimavfi, true +} + +// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { + return &rpimavfi, true +} + +// RecoveryPlanInMageFailoverInput recovery plan InMage failover input. +type RecoveryPlanInMageFailoverInput struct { + // RecoveryPointType - The recovery point type. Possible values include: 'RpInMageRecoveryPointTypeLatestTime', 'RpInMageRecoveryPointTypeLatestTag', 'RpInMageRecoveryPointTypeCustom' + RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { + rpimfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage + objectMap := make(map[string]interface{}) + if rpimfi.RecoveryPointType != "" { + objectMap["recoveryPointType"] = rpimfi.RecoveryPointType + } + if rpimfi.InstanceType != "" { + objectMap["instanceType"] = rpimfi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return &rpimfi, true +} + +// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { + return nil, false +} + +// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { + return &rpimfi, true +} + +// RecoveryPlanManualActionDetails recovery plan manual action details. +type RecoveryPlanManualActionDetails struct { + // Description - The manual action description. + Description *string `json:"description,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' + InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { + rpmad.InstanceType = InstanceTypeManualActionDetails + objectMap := make(map[string]interface{}) + if rpmad.Description != nil { + objectMap["description"] = rpmad.Description + } + if rpmad.InstanceType != "" { + objectMap["instanceType"] = rpmad.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { + return &rpmad, true +} + +// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { + return nil, false +} + +// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { + return &rpmad, true +} + +// RecoveryPlanPlannedFailoverInput recovery plan planned failover input. +type RecoveryPlanPlannedFailoverInput struct { + // Properties - The recovery plan planned failover input properties. + Properties *RecoveryPlanPlannedFailoverInputProperties `json:"properties,omitempty"` +} + +// RecoveryPlanPlannedFailoverInputProperties recovery plan planned failover input properties. +type RecoveryPlanPlannedFailoverInputProperties struct { + // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` + // ProviderSpecificDetails - The provider specific properties. + ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanPlannedFailoverInputProperties struct. +func (rppfip *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "failoverDirection": + if v != nil { + var failoverDirection PossibleOperationsDirections + err = json.Unmarshal(*v, &failoverDirection) + if err != nil { + return err + } + rppfip.FailoverDirection = failoverDirection + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) + if err != nil { + return err + } + rppfip.ProviderSpecificDetails = &providerSpecificDetails + } + } + } + + return nil +} + +// RecoveryPlanProperties recovery plan custom details. +type RecoveryPlanProperties struct { + // FriendlyName - The friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` + // PrimaryFabricID - The primary fabric Id. + PrimaryFabricID *string `json:"primaryFabricId,omitempty"` + // PrimaryFabricFriendlyName - The primary fabric friendly name. + PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` + // RecoveryFabricID - The recovery fabric Id. + RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` + // RecoveryFabricFriendlyName - The recovery fabric friendly name. + RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` + // FailoverDeploymentModel - The failover deployment model. + FailoverDeploymentModel *string `json:"failoverDeploymentModel,omitempty"` + // ReplicationProviders - The list of replication providers. + ReplicationProviders *[]string `json:"replicationProviders,omitempty"` + // AllowedOperations - The list of allowed operations. + AllowedOperations *[]string `json:"allowedOperations,omitempty"` + // LastPlannedFailoverTime - The start time of the last planned failover. + LastPlannedFailoverTime *date.Time `json:"lastPlannedFailoverTime,omitempty"` + // LastUnplannedFailoverTime - The start time of the last unplanned failover. + LastUnplannedFailoverTime *date.Time `json:"lastUnplannedFailoverTime,omitempty"` + // LastTestFailoverTime - The start time of the last test failover. + LastTestFailoverTime *date.Time `json:"lastTestFailoverTime,omitempty"` + // CurrentScenario - The current scenario details. + CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` + // CurrentScenarioStatus - The recovery plan status. + CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"` + // CurrentScenarioStatusDescription - The recovery plan status description. + CurrentScenarioStatusDescription *string `json:"currentScenarioStatusDescription,omitempty"` + // Groups - The recovery plan groups. + Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` +} + +// RecoveryPlanProtectedItem recovery plan protected item. +type RecoveryPlanProtectedItem struct { + // ID - The ARM Id of the recovery plan protected item. + ID *string `json:"id,omitempty"` + // VirtualMachineID - The virtual machine Id. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` +} + +// BasicRecoveryPlanProviderSpecificFailoverInput recovery plan provider specific failover input base class. +type BasicRecoveryPlanProviderSpecificFailoverInput interface { + AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) + AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) + AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) + AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) + AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) + AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) +} + +// RecoveryPlanProviderSpecificFailoverInput recovery plan provider specific failover input base class. +type RecoveryPlanProviderSpecificFailoverInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage' + InstanceType InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(body []byte) (BasicRecoveryPlanProviderSpecificFailoverInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A): + var rpafi RecoveryPlanA2AFailoverInput + err := json.Unmarshal(body, &rpafi) + return rpafi, err + case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): + var rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput + err := json.Unmarshal(body, &rphvrafi) + return rphvrafi, err + case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): + var rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput + err := json.Unmarshal(body, &rphvrafi) + return rphvrafi, err + case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2): + var rpimavfi RecoveryPlanInMageAzureV2FailoverInput + err := json.Unmarshal(body, &rpimavfi) + return rpimavfi, err + case string(InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage): + var rpimfi RecoveryPlanInMageFailoverInput + err := json.Unmarshal(body, &rpimfi) + return rpimfi, err + default: + var rppsfi RecoveryPlanProviderSpecificFailoverInput + err := json.Unmarshal(body, &rppsfi) + return rppsfi, err + } +} +func unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(body []byte) ([]BasicRecoveryPlanProviderSpecificFailoverInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rppsfiArray := make([]BasicRecoveryPlanProviderSpecificFailoverInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rppsfi, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInput(*rawMessage) + if err != nil { + return nil, err + } + rppsfiArray[index] = rppsfi + } + return rppsfiArray, nil +} + +// MarshalJSON is the custom marshaler for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) MarshalJSON() ([]byte, error) { + rppsfi.InstanceType = InstanceTypeBasicRecoveryPlanProviderSpecificFailoverInputInstanceTypeRecoveryPlanProviderSpecificFailoverInput + objectMap := make(map[string]interface{}) + if rppsfi.InstanceType != "" { + objectMap["instanceType"] = rppsfi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanA2AFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsRecoveryPlanProviderSpecificFailoverInput() (*RecoveryPlanProviderSpecificFailoverInput, bool) { + return &rppsfi, true +} + +// AsBasicRecoveryPlanProviderSpecificFailoverInput is the BasicRecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanProviderSpecificFailoverInput. +func (rppsfi RecoveryPlanProviderSpecificFailoverInput) AsBasicRecoveryPlanProviderSpecificFailoverInput() (BasicRecoveryPlanProviderSpecificFailoverInput, bool) { + return &rppsfi, true +} + +// RecoveryPlanScriptActionDetails recovery plan script action details. +type RecoveryPlanScriptActionDetails struct { + // Path - The script path. + Path *string `json:"path,omitempty"` + // Timeout - The script timeout. + Timeout *string `json:"timeout,omitempty"` + // FabricLocation - The fabric location. Possible values include: 'Primary', 'Recovery' + FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeRecoveryPlanActionDetails', 'InstanceTypeAutomationRunbookActionDetails', 'InstanceTypeManualActionDetails', 'InstanceTypeScriptActionDetails' + InstanceType InstanceTypeBasicRecoveryPlanActionDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { + rpsad.InstanceType = InstanceTypeScriptActionDetails + objectMap := make(map[string]interface{}) + if rpsad.Path != nil { + objectMap["path"] = rpsad.Path + } + if rpsad.Timeout != nil { + objectMap["timeout"] = rpsad.Timeout + } + if rpsad.FabricLocation != "" { + objectMap["fabricLocation"] = rpsad.FabricLocation + } + if rpsad.InstanceType != "" { + objectMap["instanceType"] = rpsad.InstanceType + } + return json.Marshal(objectMap) +} + +// AsRecoveryPlanAutomationRunbookActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanManualActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanScriptActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { + return &rpsad, true +} + +// AsRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanActionDetails() (*RecoveryPlanActionDetails, bool) { + return nil, false +} + +// AsBasicRecoveryPlanActionDetails is the BasicRecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsBasicRecoveryPlanActionDetails() (BasicRecoveryPlanActionDetails, bool) { + return &rpsad, true +} + +// RecoveryPlanShutdownGroupTaskDetails this class represents the recovery plan shutdown group task +// details. +type RecoveryPlanShutdownGroupTaskDetails struct { + // Name - The name. + Name *string `json:"name,omitempty"` + // GroupID - The group identifier. + GroupID *string `json:"groupId,omitempty"` + // RpGroupType - The group type. + RpGroupType *string `json:"rpGroupType,omitempty"` + // ChildTasks - The child tasks. + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeGroupTaskDetails', 'InstanceTypeInlineWorkflowTaskDetails', 'InstanceTypeRecoveryPlanGroupTaskDetails', 'InstanceTypeRecoveryPlanShutdownGroupTaskDetails' + InstanceType InstanceTypeBasicGroupTaskDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { + rpsgtd.InstanceType = InstanceTypeRecoveryPlanShutdownGroupTaskDetails + objectMap := make(map[string]interface{}) + if rpsgtd.Name != nil { + objectMap["name"] = rpsgtd.Name + } + if rpsgtd.GroupID != nil { + objectMap["groupId"] = rpsgtd.GroupID + } + if rpsgtd.RpGroupType != nil { + objectMap["rpGroupType"] = rpsgtd.RpGroupType + } + if rpsgtd.ChildTasks != nil { + objectMap["childTasks"] = rpsgtd.ChildTasks + } + if rpsgtd.InstanceType != "" { + objectMap["instanceType"] = rpsgtd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsInlineWorkflowTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanShutdownGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { + return &rpsgtd, true +} + +// AsGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsGroupTaskDetails() (*GroupTaskDetails, bool) { + return nil, false +} + +// AsBasicGroupTaskDetails is the BasicGroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsBasicGroupTaskDetails() (BasicGroupTaskDetails, bool) { + return &rpsgtd, true +} + +// RecoveryPlanTestFailoverCleanupInput recovery plan test failover cleanup input. +type RecoveryPlanTestFailoverCleanupInput struct { + // Properties - The recovery plan test failover cleanup input properties. + Properties *RecoveryPlanTestFailoverCleanupInputProperties `json:"properties,omitempty"` +} + +// RecoveryPlanTestFailoverCleanupInputProperties recovery plan test failover cleanup input properties. +type RecoveryPlanTestFailoverCleanupInputProperties struct { + // Comments - The test failover cleanup comments. + Comments *string `json:"comments,omitempty"` +} + +// RecoveryPlanTestFailoverInput recovery plan test failover input. +type RecoveryPlanTestFailoverInput struct { + // Properties - The recovery plan test failover input properties. + Properties *RecoveryPlanTestFailoverInputProperties `json:"properties,omitempty"` +} + +// RecoveryPlanTestFailoverInputProperties recovery plan test failover input properties. +type RecoveryPlanTestFailoverInputProperties struct { + // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` + // NetworkType - The network type to be used for test failover. + NetworkType *string `json:"networkType,omitempty"` + // NetworkID - The Id of the network to be used for test failover. + NetworkID *string `json:"networkId,omitempty"` + // SkipTestFailoverCleanup - A value indicating whether the test failover cleanup is to be skipped. + SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` + // ProviderSpecificDetails - The provider specific properties. + ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanTestFailoverInputProperties struct. +func (rptfip *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "failoverDirection": + if v != nil { + var failoverDirection PossibleOperationsDirections + err = json.Unmarshal(*v, &failoverDirection) + if err != nil { + return err + } + rptfip.FailoverDirection = failoverDirection + } + case "networkType": + if v != nil { + var networkType string + err = json.Unmarshal(*v, &networkType) + if err != nil { + return err + } + rptfip.NetworkType = &networkType + } + case "networkId": + if v != nil { + var networkID string + err = json.Unmarshal(*v, &networkID) + if err != nil { + return err + } + rptfip.NetworkID = &networkID + } + case "skipTestFailoverCleanup": + if v != nil { + var skipTestFailoverCleanup string + err = json.Unmarshal(*v, &skipTestFailoverCleanup) + if err != nil { + return err + } + rptfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) + if err != nil { + return err + } + rptfip.ProviderSpecificDetails = &providerSpecificDetails + } + } + } + + return nil +} + +// RecoveryPlanUnplannedFailoverInput recovery plan unplanned failover input. +type RecoveryPlanUnplannedFailoverInput struct { + // Properties - The recovery plan unplanned failover input properties. + Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"` +} + +// RecoveryPlanUnplannedFailoverInputProperties recovery plan unplanned failover input properties. +type RecoveryPlanUnplannedFailoverInputProperties struct { + // FailoverDirection - The failover direction. Possible values include: 'PrimaryToRecovery', 'RecoveryToPrimary' + FailoverDirection PossibleOperationsDirections `json:"failoverDirection,omitempty"` + // SourceSiteOperations - A value indicating whether source site operations are required. Possible values include: 'Required', 'NotRequired' + SourceSiteOperations SourceSiteOperations `json:"sourceSiteOperations,omitempty"` + // ProviderSpecificDetails - The provider specific properties. + ProviderSpecificDetails *[]BasicRecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanUnplannedFailoverInputProperties struct. +func (rpufip *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "failoverDirection": + if v != nil { + var failoverDirection PossibleOperationsDirections + err = json.Unmarshal(*v, &failoverDirection) + if err != nil { + return err + } + rpufip.FailoverDirection = failoverDirection + } + case "sourceSiteOperations": + if v != nil { + var sourceSiteOperations SourceSiteOperations + err = json.Unmarshal(*v, &sourceSiteOperations) + if err != nil { + return err + } + rpufip.SourceSiteOperations = sourceSiteOperations + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicRecoveryPlanProviderSpecificFailoverInputArray(*v) + if err != nil { + return err + } + rpufip.ProviderSpecificDetails = &providerSpecificDetails + } + } + } + + return nil +} + +// RecoveryPoint base class representing a recovery point. +type RecoveryPoint struct { + autorest.Response `json:"-"` + // Properties - Recovery point related data. + Properties *RecoveryPointProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// RecoveryPointCollection collection of recovery point details. +type RecoveryPointCollection struct { + autorest.Response `json:"-"` + // Value - The recovery point details. + Value *[]RecoveryPoint `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// RecoveryPointCollectionIterator provides access to a complete listing of RecoveryPoint values. +type RecoveryPointCollectionIterator struct { + i int + page RecoveryPointCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *RecoveryPointCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RecoveryPointCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RecoveryPointCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter RecoveryPointCollectionIterator) Response() RecoveryPointCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter RecoveryPointCollectionIterator) Value() RecoveryPoint { + if !iter.page.NotDone() { + return RecoveryPoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RecoveryPointCollectionIterator type. +func NewRecoveryPointCollectionIterator(page RecoveryPointCollectionPage) RecoveryPointCollectionIterator { + return RecoveryPointCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (RPCVar RecoveryPointCollection) IsEmpty() bool { + return RPCVar.Value == nil || len(*RPCVar.Value) == 0 +} + +// recoveryPointCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (RPCVar RecoveryPointCollection) recoveryPointCollectionPreparer(ctx context.Context) (*http.Request, error) { + if RPCVar.NextLink == nil || len(to.String(RPCVar.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(RPCVar.NextLink))) +} + +// RecoveryPointCollectionPage contains a page of RecoveryPoint values. +type RecoveryPointCollectionPage struct { + fn func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error) + RPCVar RecoveryPointCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *RecoveryPointCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.RPCVar) + if err != nil { + return err + } + page.RPCVar = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RecoveryPointCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RecoveryPointCollectionPage) NotDone() bool { + return !page.RPCVar.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RecoveryPointCollectionPage) Response() RecoveryPointCollection { + return page.RPCVar +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RecoveryPointCollectionPage) Values() []RecoveryPoint { + if page.RPCVar.IsEmpty() { + return nil + } + return *page.RPCVar.Value +} + +// Creates a new instance of the RecoveryPointCollectionPage type. +func NewRecoveryPointCollectionPage(getNextPage func(context.Context, RecoveryPointCollection) (RecoveryPointCollection, error)) RecoveryPointCollectionPage { + return RecoveryPointCollectionPage{fn: getNextPage} +} + +// RecoveryPointProperties recovery point properties. +type RecoveryPointProperties struct { + // RecoveryPointTime - The recovery point time. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // RecoveryPointType - The recovery point type: ApplicationConsistent, CrashConsistent. + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + // ProviderSpecificDetails - The provider specific details for the recovery point. + ProviderSpecificDetails BasicProviderSpecificRecoveryPointDetails `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPointProperties struct. +func (rpp *RecoveryPointProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "recoveryPointTime": + if v != nil { + var recoveryPointTime date.Time + err = json.Unmarshal(*v, &recoveryPointTime) + if err != nil { + return err + } + rpp.RecoveryPointTime = &recoveryPointTime + } + case "recoveryPointType": + if v != nil { + var recoveryPointType string + err = json.Unmarshal(*v, &recoveryPointType) + if err != nil { + return err + } + rpp.RecoveryPointType = &recoveryPointType + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicProviderSpecificRecoveryPointDetails(*v) + if err != nil { + return err + } + rpp.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// RecoveryServicesProvider provider details. +type RecoveryServicesProvider struct { + autorest.Response `json:"-"` + // Properties - Provider properties. + Properties *RecoveryServicesProviderProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// RecoveryServicesProviderCollection collection of providers. +type RecoveryServicesProviderCollection struct { + autorest.Response `json:"-"` + // Value - The Servers details. + Value *[]RecoveryServicesProvider `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// RecoveryServicesProviderCollectionIterator provides access to a complete listing of +// RecoveryServicesProvider values. +type RecoveryServicesProviderCollectionIterator struct { + i int + page RecoveryServicesProviderCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *RecoveryServicesProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RecoveryServicesProviderCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RecoveryServicesProviderCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter RecoveryServicesProviderCollectionIterator) Response() RecoveryServicesProviderCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter RecoveryServicesProviderCollectionIterator) Value() RecoveryServicesProvider { + if !iter.page.NotDone() { + return RecoveryServicesProvider{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RecoveryServicesProviderCollectionIterator type. +func NewRecoveryServicesProviderCollectionIterator(page RecoveryServicesProviderCollectionPage) RecoveryServicesProviderCollectionIterator { + return RecoveryServicesProviderCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rspc RecoveryServicesProviderCollection) IsEmpty() bool { + return rspc.Value == nil || len(*rspc.Value) == 0 +} + +// recoveryServicesProviderCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rspc RecoveryServicesProviderCollection) recoveryServicesProviderCollectionPreparer(ctx context.Context) (*http.Request, error) { + if rspc.NextLink == nil || len(to.String(rspc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rspc.NextLink))) +} + +// RecoveryServicesProviderCollectionPage contains a page of RecoveryServicesProvider values. +type RecoveryServicesProviderCollectionPage struct { + fn func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error) + rspc RecoveryServicesProviderCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *RecoveryServicesProviderCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryServicesProviderCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rspc) + if err != nil { + return err + } + page.rspc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RecoveryServicesProviderCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RecoveryServicesProviderCollectionPage) NotDone() bool { + return !page.rspc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RecoveryServicesProviderCollectionPage) Response() RecoveryServicesProviderCollection { + return page.rspc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RecoveryServicesProviderCollectionPage) Values() []RecoveryServicesProvider { + if page.rspc.IsEmpty() { + return nil + } + return *page.rspc.Value +} + +// Creates a new instance of the RecoveryServicesProviderCollectionPage type. +func NewRecoveryServicesProviderCollectionPage(getNextPage func(context.Context, RecoveryServicesProviderCollection) (RecoveryServicesProviderCollection, error)) RecoveryServicesProviderCollectionPage { + return RecoveryServicesProviderCollectionPage{fn: getNextPage} +} + +// RecoveryServicesProviderProperties recovery services provider properties. +type RecoveryServicesProviderProperties struct { + // FabricType - Type of the site. + FabricType *string `json:"fabricType,omitempty"` + // FriendlyName - Friendly name of the DRA. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProviderVersion - The provider version. + ProviderVersion *string `json:"providerVersion,omitempty"` + // ServerVersion - The fabric provider. + ServerVersion *string `json:"serverVersion,omitempty"` + // ProviderVersionState - DRA version status. + ProviderVersionState *string `json:"providerVersionState,omitempty"` + // ProviderVersionExpiryDate - Expiry date of the version. + ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"` + // FabricFriendlyName - The fabric friendly name. + FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` + // LastHeartBeat - Time when last heartbeat was sent by the DRA. + LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"` + // ConnectionStatus - A value indicating whether DRA is responsive. + ConnectionStatus *string `json:"connectionStatus,omitempty"` + // ProtectedItemCount - Number of protected VMs currently managed by the DRA. + ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` + // AllowedScenarios - The scenarios allowed on this provider. + AllowedScenarios *[]string `json:"allowedScenarios,omitempty"` + // HealthErrorDetails - The recovery services provider health error details. + HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` + // DraIdentifier - The DRA Id. + DraIdentifier *string `json:"draIdentifier,omitempty"` + // AuthenticationIdentityDetails - The authentication identity details. + AuthenticationIdentityDetails *IdentityProviderDetails `json:"authenticationIdentityDetails,omitempty"` + // ResourceAccessIdentityDetails - The resource access identity details. + ResourceAccessIdentityDetails *IdentityProviderDetails `json:"resourceAccessIdentityDetails,omitempty"` + // ProviderVersionDetails - The provider version details. + ProviderVersionDetails *VersionDetails `json:"providerVersionDetails,omitempty"` +} + +// RemoveDisksInput input for remove disk(s) operation. +type RemoveDisksInput struct { + // Properties - Remove disk input properties. + Properties *RemoveDisksInputProperties `json:"properties,omitempty"` +} + +// RemoveDisksInputProperties remove Disk input properties. +type RemoveDisksInputProperties struct { + // ProviderSpecificDetails - The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. + ProviderSpecificDetails BasicRemoveDisksProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RemoveDisksInputProperties struct. +func (rdip *RemoveDisksInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicRemoveDisksProviderSpecificInput(*v) + if err != nil { + return err + } + rdip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicRemoveDisksProviderSpecificInput remove Disk provider specific input. +type BasicRemoveDisksProviderSpecificInput interface { + AsA2ARemoveDisksInput() (*A2ARemoveDisksInput, bool) + AsRemoveDisksProviderSpecificInput() (*RemoveDisksProviderSpecificInput, bool) +} + +// RemoveDisksProviderSpecificInput remove Disk provider specific input. +type RemoveDisksProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput', 'InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A' + InstanceType InstanceTypeBasicRemoveDisksProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicRemoveDisksProviderSpecificInput(body []byte) (BasicRemoveDisksProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeA2A): + var ardi A2ARemoveDisksInput + err := json.Unmarshal(body, &ardi) + return ardi, err + default: + var rdpsi RemoveDisksProviderSpecificInput + err := json.Unmarshal(body, &rdpsi) + return rdpsi, err + } +} +func unmarshalBasicRemoveDisksProviderSpecificInputArray(body []byte) ([]BasicRemoveDisksProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rdpsiArray := make([]BasicRemoveDisksProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rdpsi, err := unmarshalBasicRemoveDisksProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + rdpsiArray[index] = rdpsi + } + return rdpsiArray, nil +} + +// MarshalJSON is the custom marshaler for RemoveDisksProviderSpecificInput. +func (rdpsi RemoveDisksProviderSpecificInput) MarshalJSON() ([]byte, error) { + rdpsi.InstanceType = InstanceTypeBasicRemoveDisksProviderSpecificInputInstanceTypeRemoveDisksProviderSpecificInput + objectMap := make(map[string]interface{}) + if rdpsi.InstanceType != "" { + objectMap["instanceType"] = rdpsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2ARemoveDisksInput is the BasicRemoveDisksProviderSpecificInput implementation for RemoveDisksProviderSpecificInput. +func (rdpsi RemoveDisksProviderSpecificInput) AsA2ARemoveDisksInput() (*A2ARemoveDisksInput, bool) { + return nil, false +} + +// AsRemoveDisksProviderSpecificInput is the BasicRemoveDisksProviderSpecificInput implementation for RemoveDisksProviderSpecificInput. +func (rdpsi RemoveDisksProviderSpecificInput) AsRemoveDisksProviderSpecificInput() (*RemoveDisksProviderSpecificInput, bool) { + return &rdpsi, true +} + +// AsBasicRemoveDisksProviderSpecificInput is the BasicRemoveDisksProviderSpecificInput implementation for RemoveDisksProviderSpecificInput. +func (rdpsi RemoveDisksProviderSpecificInput) AsBasicRemoveDisksProviderSpecificInput() (BasicRemoveDisksProviderSpecificInput, bool) { + return &rdpsi, true +} + +// RemoveProtectionContainerMappingInput container unpairing input. +type RemoveProtectionContainerMappingInput struct { + // Properties - Configure protection input properties. + Properties *RemoveProtectionContainerMappingInputProperties `json:"properties,omitempty"` +} + +// RemoveProtectionContainerMappingInputProperties unpairing input properties. +type RemoveProtectionContainerMappingInputProperties struct { + // ProviderSpecificInput - Provider specific input for unpairing. + ProviderSpecificInput *ReplicationProviderContainerUnmappingInput `json:"providerSpecificInput,omitempty"` +} + +// RenewCertificateInput certificate renewal input. +type RenewCertificateInput struct { + // Properties - Renew certificate input properties. + Properties *RenewCertificateInputProperties `json:"properties,omitempty"` +} + +// RenewCertificateInputProperties renew Certificate input properties. +type RenewCertificateInputProperties struct { + // RenewCertificateType - Renew certificate type. + RenewCertificateType *string `json:"renewCertificateType,omitempty"` +} + +// ReplicationEligibilityResults replication eligibility results response model. +type ReplicationEligibilityResults struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; Gets the name of this object. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Gets the object type. + Type *string `json:"type,omitempty"` + // ID - READ-ONLY; Gets Unique ARM identifier for this object. + ID *string `json:"id,omitempty"` + // Properties - READ-ONLY; Gets properties model for replication eligibility results API. + Properties *ReplicationEligibilityResultsProperties `json:"properties,omitempty"` +} + +// ReplicationEligibilityResultsCollection replication eligibility results collection response model. +type ReplicationEligibilityResultsCollection struct { + autorest.Response `json:"-"` + // Value - The replication eligibility results details. + Value *[]ReplicationEligibilityResults `json:"value,omitempty"` +} + +// ReplicationEligibilityResultsErrorInfo error model that can be exposed to the user. +type ReplicationEligibilityResultsErrorInfo struct { + // Code - READ-ONLY; The error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; The error message. + Message *string `json:"message,omitempty"` + // PossibleCauses - READ-ONLY; The possible causes. + PossibleCauses *string `json:"possibleCauses,omitempty"` + // RecommendedAction - READ-ONLY; The recommended action. + RecommendedAction *string `json:"recommendedAction,omitempty"` + // Status - READ-ONLY; The error status. + Status *string `json:"status,omitempty"` +} + +// ReplicationEligibilityResultsGetFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationEligibilityResultsGetFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationEligibilityResultsGetFuture) Result(client ReplicationEligibilityResultsClient) (rer ReplicationEligibilityResults, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsGetFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationEligibilityResultsGetFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rer.Response.Response, err = future.GetResult(sender); err == nil && rer.Response.Response.StatusCode != http.StatusNoContent { + rer, err = client.GetResponder(rer.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsGetFuture", "Result", rer.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationEligibilityResultsListFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationEligibilityResultsListFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationEligibilityResultsListFuture) Result(client ReplicationEligibilityResultsClient) (rerc ReplicationEligibilityResultsCollection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsListFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationEligibilityResultsListFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rerc.Response.Response, err = future.GetResult(sender); err == nil && rerc.Response.Response.StatusCode != http.StatusNoContent { + rerc, err = client.ListResponder(rerc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsListFuture", "Result", rerc.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationEligibilityResultsProperties properties model for replication eligibility results API. +type ReplicationEligibilityResultsProperties struct { + // ClientRequestID - READ-ONLY; The client request Id. + ClientRequestID *string `json:"clientRequestId,omitempty"` + // Errors - The error details. + Errors *[]ReplicationEligibilityResultsErrorInfo `json:"errors,omitempty"` +} + +// ReplicationFabricsCheckConsistencyFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationFabricsCheckConsistencyFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationFabricsCheckConsistencyFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCheckConsistencyFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { + f, err = client.CheckConsistencyResponder(f.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCheckConsistencyFuture", "Result", f.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationFabricsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationFabricsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationFabricsCreateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { + f, err = client.CreateResponder(f.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsCreateFuture", "Result", f.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationFabricsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationFabricsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationFabricsDeleteFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationFabricsMigrateToAadFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationFabricsMigrateToAadFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationFabricsMigrateToAadFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsMigrateToAadFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsMigrateToAadFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationFabricsPurgeFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ReplicationFabricsPurgeFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationFabricsPurgeFuture) Result(client ReplicationFabricsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsPurgeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsPurgeFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationFabricsReassociateGatewayFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationFabricsReassociateGatewayFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationFabricsReassociateGatewayFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsReassociateGatewayFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { + f, err = client.ReassociateGatewayResponder(f.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsReassociateGatewayFuture", "Result", f.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationFabricsRenewCertificateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationFabricsRenewCertificateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationFabricsRenewCertificateFuture) Result(client ReplicationFabricsClient) (f Fabric, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationFabricsRenewCertificateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if f.Response.Response, err = future.GetResult(sender); err == nil && f.Response.Response.StatusCode != http.StatusNoContent { + f, err = client.RenewCertificateResponder(f.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsRenewCertificateFuture", "Result", f.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationGroupDetails replication group details. This will be used in case of San and Wvr. +type ReplicationGroupDetails struct { + // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' + InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) MarshalJSON() ([]byte, error) { + rgd.InstanceType = InstanceTypeReplicationGroupDetails + objectMap := make(map[string]interface{}) + if rgd.InstanceType != "" { + objectMap["instanceType"] = rgd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return nil, false +} + +// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return &rgd, true +} + +// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { + return nil, false +} + +// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return nil, false +} + +// AsConfigurationSettings is the BasicConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { + return nil, false +} + +// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { + return &rgd, true +} + +// ReplicationJobsCancelFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ReplicationJobsCancelFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationJobsCancelFuture) Result(client ReplicationJobsClient) (j Job, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsCancelFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { + j, err = client.CancelResponder(j.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsCancelFuture", "Result", j.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationJobsExportFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ReplicationJobsExportFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationJobsExportFuture) Result(client ReplicationJobsClient) (j Job, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsExportFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { + j, err = client.ExportResponder(j.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsExportFuture", "Result", j.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationJobsRestartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ReplicationJobsRestartFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationJobsRestartFuture) Result(client ReplicationJobsClient) (j Job, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsRestartFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { + j, err = client.RestartResponder(j.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsRestartFuture", "Result", j.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationJobsResumeFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ReplicationJobsResumeFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationJobsResumeFuture) Result(client ReplicationJobsClient) (j Job, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationJobsResumeFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if j.Response.Response, err = future.GetResult(sender); err == nil && j.Response.Response.StatusCode != http.StatusNoContent { + j, err = client.ResumeResponder(j.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsResumeFuture", "Result", j.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationMigrationItemsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationMigrationItemsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationMigrationItemsCreateFuture) Result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { + mi, err = client.CreateResponder(mi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsCreateFuture", "Result", mi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationMigrationItemsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationMigrationItemsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationMigrationItemsDeleteFuture) Result(client ReplicationMigrationItemsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationMigrationItemsMigrateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationMigrationItemsMigrateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationMigrationItemsMigrateFuture) Result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsMigrateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { + mi, err = client.MigrateResponder(mi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsMigrateFuture", "Result", mi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationMigrationItemsTestMigrateCleanupFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationMigrationItemsTestMigrateCleanupFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationMigrationItemsTestMigrateCleanupFuture) Result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { + mi, err = client.TestMigrateCleanupResponder(mi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture", "Result", mi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationMigrationItemsTestMigrateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationMigrationItemsTestMigrateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationMigrationItemsTestMigrateFuture) Result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsTestMigrateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { + mi, err = client.TestMigrateResponder(mi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsTestMigrateFuture", "Result", mi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationMigrationItemsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationMigrationItemsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationMigrationItemsUpdateFuture) Result(client ReplicationMigrationItemsClient) (mi MigrationItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationMigrationItemsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if mi.Response.Response, err = future.GetResult(sender); err == nil && mi.Response.Response.StatusCode != http.StatusNoContent { + mi, err = client.UpdateResponder(mi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsUpdateFuture", "Result", mi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationNetworkMappingsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationNetworkMappingsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationNetworkMappingsCreateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent { + nm, err = client.CreateResponder(nm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsCreateFuture", "Result", nm.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationNetworkMappingsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationNetworkMappingsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationNetworkMappingsDeleteFuture) Result(client ReplicationNetworkMappingsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationNetworkMappingsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationNetworkMappingsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationNetworkMappingsUpdateFuture) Result(client ReplicationNetworkMappingsClient) (nm NetworkMapping, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationNetworkMappingsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if nm.Response.Response, err = future.GetResult(sender); err == nil && nm.Response.Response.StatusCode != http.StatusNoContent { + nm, err = client.UpdateResponder(nm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsUpdateFuture", "Result", nm.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationPoliciesCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationPoliciesCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationPoliciesCreateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { + p, err = client.CreateResponder(p.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesCreateFuture", "Result", p.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationPoliciesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationPoliciesDeleteFuture) Result(client ReplicationPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationPoliciesUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationPoliciesUpdateFuture) Result(client ReplicationPoliciesClient) (p Policy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationPoliciesUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if p.Response.Response, err = future.GetResult(sender); err == nil && p.Response.Response.StatusCode != http.StatusNoContent { + p, err = client.UpdateResponder(p.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesUpdateFuture", "Result", p.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItem replication protected item. +type ReplicationProtectedItem struct { + autorest.Response `json:"-"` + // Properties - The custom data. + Properties *ReplicationProtectedItemProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// ReplicationProtectedItemCollection replication protected item collection. +type ReplicationProtectedItemCollection struct { + autorest.Response `json:"-"` + // Value - The Replication protected item details. + Value *[]ReplicationProtectedItem `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// ReplicationProtectedItemCollectionIterator provides access to a complete listing of +// ReplicationProtectedItem values. +type ReplicationProtectedItemCollectionIterator struct { + i int + page ReplicationProtectedItemCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ReplicationProtectedItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ReplicationProtectedItemCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ReplicationProtectedItemCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ReplicationProtectedItemCollectionIterator) Response() ReplicationProtectedItemCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ReplicationProtectedItemCollectionIterator) Value() ReplicationProtectedItem { + if !iter.page.NotDone() { + return ReplicationProtectedItem{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ReplicationProtectedItemCollectionIterator type. +func NewReplicationProtectedItemCollectionIterator(page ReplicationProtectedItemCollectionPage) ReplicationProtectedItemCollectionIterator { + return ReplicationProtectedItemCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rpic ReplicationProtectedItemCollection) IsEmpty() bool { + return rpic.Value == nil || len(*rpic.Value) == 0 +} + +// replicationProtectedItemCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rpic ReplicationProtectedItemCollection) replicationProtectedItemCollectionPreparer(ctx context.Context) (*http.Request, error) { + if rpic.NextLink == nil || len(to.String(rpic.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rpic.NextLink))) +} + +// ReplicationProtectedItemCollectionPage contains a page of ReplicationProtectedItem values. +type ReplicationProtectedItemCollectionPage struct { + fn func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error) + rpic ReplicationProtectedItemCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ReplicationProtectedItemCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rpic) + if err != nil { + return err + } + page.rpic = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ReplicationProtectedItemCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ReplicationProtectedItemCollectionPage) NotDone() bool { + return !page.rpic.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ReplicationProtectedItemCollectionPage) Response() ReplicationProtectedItemCollection { + return page.rpic +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ReplicationProtectedItemCollectionPage) Values() []ReplicationProtectedItem { + if page.rpic.IsEmpty() { + return nil + } + return *page.rpic.Value +} + +// Creates a new instance of the ReplicationProtectedItemCollectionPage type. +func NewReplicationProtectedItemCollectionPage(getNextPage func(context.Context, ReplicationProtectedItemCollection) (ReplicationProtectedItemCollection, error)) ReplicationProtectedItemCollectionPage { + return ReplicationProtectedItemCollectionPage{fn: getNextPage} +} + +// ReplicationProtectedItemProperties replication protected item custom data details. +type ReplicationProtectedItemProperties struct { + // FriendlyName - The name. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectedItemType - The type of protected item type. + ProtectedItemType *string `json:"protectedItemType,omitempty"` + // ProtectableItemID - The protected item ARM Id. + ProtectableItemID *string `json:"protectableItemId,omitempty"` + // RecoveryServicesProviderID - The recovery provider ARM Id. + RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` + // PrimaryFabricFriendlyName - The friendly name of the primary fabric. + PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` + // PrimaryFabricProvider - The fabric provider of the primary fabric. + PrimaryFabricProvider *string `json:"primaryFabricProvider,omitempty"` + // RecoveryFabricFriendlyName - The friendly name of recovery fabric. + RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` + // RecoveryFabricID - The Arm Id of recovery fabric. + RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` + // PrimaryProtectionContainerFriendlyName - The name of primary protection container friendly name. + PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"` + // RecoveryProtectionContainerFriendlyName - The name of recovery container friendly name. + RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"` + // ProtectionState - The protection status. + ProtectionState *string `json:"protectionState,omitempty"` + // ProtectionStateDescription - The protection state description. + ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"` + // ActiveLocation - The Current active location of the PE. + ActiveLocation *string `json:"activeLocation,omitempty"` + // TestFailoverState - The Test failover state. + TestFailoverState *string `json:"testFailoverState,omitempty"` + // TestFailoverStateDescription - The Test failover state description. + TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"` + // AllowedOperations - The allowed operations on the Replication protected item. + AllowedOperations *[]string `json:"allowedOperations,omitempty"` + // ReplicationHealth - The consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated with the VM's replication group into account. This is a string representation of the ProtectionHealth enumeration. + ReplicationHealth *string `json:"replicationHealth,omitempty"` + // FailoverHealth - The consolidated failover health for the VM. + FailoverHealth *string `json:"failoverHealth,omitempty"` + // HealthErrors - List of health errors. + HealthErrors *[]HealthError `json:"healthErrors,omitempty"` + // PolicyID - The ID of Policy governing this PE. + PolicyID *string `json:"policyId,omitempty"` + // PolicyFriendlyName - The name of Policy governing this PE. + PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` + // LastSuccessfulFailoverTime - The Last successful failover time. + LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"` + // LastSuccessfulTestFailoverTime - The Last successful test failover time. + LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"` + // CurrentScenario - The current scenario. + CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` + // FailoverRecoveryPointID - The recovery point ARM Id to which the Vm was failed over. + FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"` + // ProviderSpecificDetails - The Replication provider custom settings. + ProviderSpecificDetails BasicReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` + // RecoveryContainerID - The recovery container Id. + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ReplicationProtectedItemProperties struct. +func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "friendlyName": + if v != nil { + var friendlyName string + err = json.Unmarshal(*v, &friendlyName) + if err != nil { + return err + } + rpip.FriendlyName = &friendlyName + } + case "protectedItemType": + if v != nil { + var protectedItemType string + err = json.Unmarshal(*v, &protectedItemType) + if err != nil { + return err + } + rpip.ProtectedItemType = &protectedItemType + } + case "protectableItemId": + if v != nil { + var protectableItemID string + err = json.Unmarshal(*v, &protectableItemID) + if err != nil { + return err + } + rpip.ProtectableItemID = &protectableItemID + } + case "recoveryServicesProviderId": + if v != nil { + var recoveryServicesProviderID string + err = json.Unmarshal(*v, &recoveryServicesProviderID) + if err != nil { + return err + } + rpip.RecoveryServicesProviderID = &recoveryServicesProviderID + } + case "primaryFabricFriendlyName": + if v != nil { + var primaryFabricFriendlyName string + err = json.Unmarshal(*v, &primaryFabricFriendlyName) + if err != nil { + return err + } + rpip.PrimaryFabricFriendlyName = &primaryFabricFriendlyName + } + case "primaryFabricProvider": + if v != nil { + var primaryFabricProvider string + err = json.Unmarshal(*v, &primaryFabricProvider) + if err != nil { + return err + } + rpip.PrimaryFabricProvider = &primaryFabricProvider + } + case "recoveryFabricFriendlyName": + if v != nil { + var recoveryFabricFriendlyName string + err = json.Unmarshal(*v, &recoveryFabricFriendlyName) + if err != nil { + return err + } + rpip.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName + } + case "recoveryFabricId": + if v != nil { + var recoveryFabricID string + err = json.Unmarshal(*v, &recoveryFabricID) + if err != nil { + return err + } + rpip.RecoveryFabricID = &recoveryFabricID + } + case "primaryProtectionContainerFriendlyName": + if v != nil { + var primaryProtectionContainerFriendlyName string + err = json.Unmarshal(*v, &primaryProtectionContainerFriendlyName) + if err != nil { + return err + } + rpip.PrimaryProtectionContainerFriendlyName = &primaryProtectionContainerFriendlyName + } + case "recoveryProtectionContainerFriendlyName": + if v != nil { + var recoveryProtectionContainerFriendlyName string + err = json.Unmarshal(*v, &recoveryProtectionContainerFriendlyName) + if err != nil { + return err + } + rpip.RecoveryProtectionContainerFriendlyName = &recoveryProtectionContainerFriendlyName + } + case "protectionState": + if v != nil { + var protectionState string + err = json.Unmarshal(*v, &protectionState) + if err != nil { + return err + } + rpip.ProtectionState = &protectionState + } + case "protectionStateDescription": + if v != nil { + var protectionStateDescription string + err = json.Unmarshal(*v, &protectionStateDescription) + if err != nil { + return err + } + rpip.ProtectionStateDescription = &protectionStateDescription + } + case "activeLocation": + if v != nil { + var activeLocation string + err = json.Unmarshal(*v, &activeLocation) + if err != nil { + return err + } + rpip.ActiveLocation = &activeLocation + } + case "testFailoverState": + if v != nil { + var testFailoverState string + err = json.Unmarshal(*v, &testFailoverState) + if err != nil { + return err + } + rpip.TestFailoverState = &testFailoverState + } + case "testFailoverStateDescription": + if v != nil { + var testFailoverStateDescription string + err = json.Unmarshal(*v, &testFailoverStateDescription) + if err != nil { + return err + } + rpip.TestFailoverStateDescription = &testFailoverStateDescription + } + case "allowedOperations": + if v != nil { + var allowedOperations []string + err = json.Unmarshal(*v, &allowedOperations) + if err != nil { + return err + } + rpip.AllowedOperations = &allowedOperations + } + case "replicationHealth": + if v != nil { + var replicationHealth string + err = json.Unmarshal(*v, &replicationHealth) + if err != nil { + return err + } + rpip.ReplicationHealth = &replicationHealth + } + case "failoverHealth": + if v != nil { + var failoverHealth string + err = json.Unmarshal(*v, &failoverHealth) + if err != nil { + return err + } + rpip.FailoverHealth = &failoverHealth + } + case "healthErrors": + if v != nil { + var healthErrors []HealthError + err = json.Unmarshal(*v, &healthErrors) + if err != nil { + return err + } + rpip.HealthErrors = &healthErrors + } + case "policyId": + if v != nil { + var policyID string + err = json.Unmarshal(*v, &policyID) + if err != nil { + return err + } + rpip.PolicyID = &policyID + } + case "policyFriendlyName": + if v != nil { + var policyFriendlyName string + err = json.Unmarshal(*v, &policyFriendlyName) + if err != nil { + return err + } + rpip.PolicyFriendlyName = &policyFriendlyName + } + case "lastSuccessfulFailoverTime": + if v != nil { + var lastSuccessfulFailoverTime date.Time + err = json.Unmarshal(*v, &lastSuccessfulFailoverTime) + if err != nil { + return err + } + rpip.LastSuccessfulFailoverTime = &lastSuccessfulFailoverTime + } + case "lastSuccessfulTestFailoverTime": + if v != nil { + var lastSuccessfulTestFailoverTime date.Time + err = json.Unmarshal(*v, &lastSuccessfulTestFailoverTime) + if err != nil { + return err + } + rpip.LastSuccessfulTestFailoverTime = &lastSuccessfulTestFailoverTime + } + case "currentScenario": + if v != nil { + var currentScenario CurrentScenarioDetails + err = json.Unmarshal(*v, ¤tScenario) + if err != nil { + return err + } + rpip.CurrentScenario = ¤tScenario + } + case "failoverRecoveryPointId": + if v != nil { + var failoverRecoveryPointID string + err = json.Unmarshal(*v, &failoverRecoveryPointID) + if err != nil { + return err + } + rpip.FailoverRecoveryPointID = &failoverRecoveryPointID + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicReplicationProviderSpecificSettings(*v) + if err != nil { + return err + } + rpip.ProviderSpecificDetails = providerSpecificDetails + } + case "recoveryContainerId": + if v != nil { + var recoveryContainerID string + err = json.Unmarshal(*v, &recoveryContainerID) + if err != nil { + return err + } + rpip.RecoveryContainerID = &recoveryContainerID + } + } + } + + return nil +} + +// ReplicationProtectedItemsAddDisksFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationProtectedItemsAddDisksFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsAddDisksFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsAddDisksFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsAddDisksFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.AddDisksResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsAddDisksFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsApplyRecoveryPointFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectedItemsApplyRecoveryPointFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsApplyRecoveryPointFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.ApplyRecoveryPointResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationProtectedItemsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsCreateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.CreateResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsCreateFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationProtectedItemsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsDeleteFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationProtectedItemsFailoverCommitFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ReplicationProtectedItemsFailoverCommitFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsFailoverCommitFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsFailoverCommitFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.FailoverCommitResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsFailoverCommitFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsPlannedFailoverFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ReplicationProtectedItemsPlannedFailoverFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsPlannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPlannedFailoverFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.PlannedFailoverResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPlannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsPurgeFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationProtectedItemsPurgeFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsPurgeFuture) Result(client ReplicationProtectedItemsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsPurgeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsPurgeFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationProtectedItemsRemoveDisksFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationProtectedItemsRemoveDisksFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsRemoveDisksFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRemoveDisksFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRemoveDisksFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.RemoveDisksResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRemoveDisksFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsRepairReplicationFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectedItemsRepairReplicationFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsRepairReplicationFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsRepairReplicationFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.RepairReplicationResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsRepairReplicationFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsReprotectFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationProtectedItemsReprotectFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsReprotectFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsReprotectFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.ReprotectResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsReprotectFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsResolveHealthErrorsFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectedItemsResolveHealthErrorsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsResolveHealthErrorsFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsResolveHealthErrorsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsResolveHealthErrorsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.ResolveHealthErrorsResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsResolveHealthErrorsFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsTestFailoverCleanupFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectedItemsTestFailoverCleanupFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsTestFailoverCleanupFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.TestFailoverCleanupResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsTestFailoverFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ReplicationProtectedItemsTestFailoverFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsTestFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsTestFailoverFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.TestFailoverResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsTestFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsUnplannedFailoverFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectedItemsUnplannedFailoverFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsUnplannedFailoverFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.UnplannedFailoverResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationProtectedItemsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsUpdateFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.UpdateResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectedItemsUpdateMobilityServiceFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectedItemsUpdateMobilityServiceFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectedItemsUpdateMobilityServiceFuture) Result(client ReplicationProtectedItemsClient) (rpi ReplicationProtectedItem, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rpi.Response.Response, err = future.GetResult(sender); err == nil && rpi.Response.Response.StatusCode != http.StatusNoContent { + rpi, err = client.UpdateMobilityServiceResponder(rpi.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture", "Result", rpi.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectionContainerMappingsCreateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectionContainerMappingsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainerMappingsCreateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent { + pcm, err = client.CreateResponder(pcm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsCreateFuture", "Result", pcm.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectionContainerMappingsDeleteFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectionContainerMappingsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainerMappingsDeleteFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationProtectionContainerMappingsPurgeFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectionContainerMappingsPurgeFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainerMappingsPurgeFuture) Result(client ReplicationProtectionContainerMappingsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsPurgeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsPurgeFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationProtectionContainerMappingsUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectionContainerMappingsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainerMappingsUpdateFuture) Result(client ReplicationProtectionContainerMappingsClient) (pcm ProtectionContainerMapping, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainerMappingsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pcm.Response.Response, err = future.GetResult(sender); err == nil && pcm.Response.Response.StatusCode != http.StatusNoContent { + pcm, err = client.UpdateResponder(pcm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsUpdateFuture", "Result", pcm.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectionContainersCreateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ReplicationProtectionContainersCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainersCreateFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { + pc, err = client.CreateResponder(pc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersCreateFuture", "Result", pc.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectionContainersDeleteFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ReplicationProtectionContainersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainersDeleteFuture) Result(client ReplicationProtectionContainersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationProtectionContainersDiscoverProtectableItemFuture an abstraction for monitoring and +// retrieving the results of a long-running operation. +type ReplicationProtectionContainersDiscoverProtectableItemFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainersDiscoverProtectableItemFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { + pc, err = client.DiscoverProtectableItemResponder(pc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture", "Result", pc.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProtectionContainersSwitchProtectionFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationProtectionContainersSwitchProtectionFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationProtectionContainersSwitchProtectionFuture) Result(client ReplicationProtectionContainersClient) (pc ProtectionContainer, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationProtectionContainersSwitchProtectionFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pc.Response.Response, err = future.GetResult(sender); err == nil && pc.Response.Response.StatusCode != http.StatusNoContent { + pc, err = client.SwitchProtectionResponder(pc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersSwitchProtectionFuture", "Result", pc.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationProviderContainerUnmappingInput provider specific input for unpairing operations. +type ReplicationProviderContainerUnmappingInput struct { + // InstanceType - The class type. + InstanceType *string `json:"instanceType,omitempty"` +} + +// BasicReplicationProviderSpecificContainerCreationInput provider specific input for container creation operation. +type BasicReplicationProviderSpecificContainerCreationInput interface { + AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) + AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) + AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) +} + +// ReplicationProviderSpecificContainerCreationInput provider specific input for container creation operation. +type ReplicationProviderSpecificContainerCreationInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero' + InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicReplicationProviderSpecificContainerCreationInput(body []byte) (BasicReplicationProviderSpecificContainerCreationInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A): + var acci A2AContainerCreationInput + err := json.Unmarshal(body, &acci) + return acci, err + case string(InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero): + var vmccci VMwareCbtContainerCreationInput + err := json.Unmarshal(body, &vmccci) + return vmccci, err + default: + var rpscci ReplicationProviderSpecificContainerCreationInput + err := json.Unmarshal(body, &rpscci) + return rpscci, err + } +} +func unmarshalBasicReplicationProviderSpecificContainerCreationInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerCreationInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpscciArray := make([]BasicReplicationProviderSpecificContainerCreationInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpscci, err := unmarshalBasicReplicationProviderSpecificContainerCreationInput(*rawMessage) + if err != nil { + return nil, err + } + rpscciArray[index] = rpscci + } + return rpscciArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicationProviderSpecificContainerCreationInput. +func (rpscci ReplicationProviderSpecificContainerCreationInput) MarshalJSON() ([]byte, error) { + rpscci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput + objectMap := make(map[string]interface{}) + if rpscci.InstanceType != "" { + objectMap["instanceType"] = rpscci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. +func (rpscci ReplicationProviderSpecificContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. +func (rpscci ReplicationProviderSpecificContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) { + return nil, false +} + +// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. +func (rpscci ReplicationProviderSpecificContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { + return &rpscci, true +} + +// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for ReplicationProviderSpecificContainerCreationInput. +func (rpscci ReplicationProviderSpecificContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { + return &rpscci, true +} + +// BasicReplicationProviderSpecificContainerMappingInput provider specific input for pairing operations. +type BasicReplicationProviderSpecificContainerMappingInput interface { + AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) + AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) + AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) +} + +// ReplicationProviderSpecificContainerMappingInput provider specific input for pairing operations. +type ReplicationProviderSpecificContainerMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicReplicationProviderSpecificContainerMappingInput(body []byte) (BasicReplicationProviderSpecificContainerMappingInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A): + var acmi A2AContainerMappingInput + err := json.Unmarshal(body, &acmi) + return acmi, err + case string(InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt): + var vmccmi VMwareCbtContainerMappingInput + err := json.Unmarshal(body, &vmccmi) + return vmccmi, err + default: + var rpscmi ReplicationProviderSpecificContainerMappingInput + err := json.Unmarshal(body, &rpscmi) + return rpscmi, err + } +} +func unmarshalBasicReplicationProviderSpecificContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificContainerMappingInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpscmiArray := make([]BasicReplicationProviderSpecificContainerMappingInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpscmi, err := unmarshalBasicReplicationProviderSpecificContainerMappingInput(*rawMessage) + if err != nil { + return nil, err + } + rpscmiArray[index] = rpscmi + } + return rpscmiArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicationProviderSpecificContainerMappingInput. +func (rpscmi ReplicationProviderSpecificContainerMappingInput) MarshalJSON() ([]byte, error) { + rpscmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput + objectMap := make(map[string]interface{}) + if rpscmi.InstanceType != "" { + objectMap["instanceType"] = rpscmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. +func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) { + return nil, false +} + +// AsVMwareCbtContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. +func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) { + return nil, false +} + +// AsReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. +func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) { + return &rpscmi, true +} + +// AsBasicReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for ReplicationProviderSpecificContainerMappingInput. +func (rpscmi ReplicationProviderSpecificContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) { + return &rpscmi, true +} + +// BasicReplicationProviderSpecificSettings replication provider specific settings. +type BasicReplicationProviderSpecificSettings interface { + AsA2AReplicationDetails() (*A2AReplicationDetails, bool) + AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) + AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) + AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) + AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) + AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) + AsInMageReplicationDetails() (*InMageReplicationDetails, bool) + AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) +} + +// ReplicationProviderSpecificSettings replication provider specific settings. +type ReplicationProviderSpecificSettings struct { + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2', 'InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage' + InstanceType InstanceTypeBasicReplicationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +func unmarshalBasicReplicationProviderSpecificSettings(body []byte) (BasicReplicationProviderSpecificSettings, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeA2A): + var ard A2AReplicationDetails + err := json.Unmarshal(body, &ard) + return ard, err + case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure): + var hvrard HyperVReplicaAzureReplicationDetails + err := json.Unmarshal(body, &hvrard) + return hvrard, err + case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails): + var hvrbrd HyperVReplicaBaseReplicationDetails + err := json.Unmarshal(body, &hvrbrd) + return hvrbrd, err + case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2): + var hvrbrd HyperVReplicaBlueReplicationDetails + err := json.Unmarshal(body, &hvrbrd) + return hvrbrd, err + case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012): + var hvrrd HyperVReplicaReplicationDetails + err := json.Unmarshal(body, &hvrrd) + return hvrrd, err + case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2): + var imavrd InMageAzureV2ReplicationDetails + err := json.Unmarshal(body, &imavrd) + return imavrd, err + case string(InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeInMage): + var imrd InMageReplicationDetails + err := json.Unmarshal(body, &imrd) + return imrd, err + default: + var rpss ReplicationProviderSpecificSettings + err := json.Unmarshal(body, &rpss) + return rpss, err + } +} +func unmarshalBasicReplicationProviderSpecificSettingsArray(body []byte) ([]BasicReplicationProviderSpecificSettings, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpssArray := make([]BasicReplicationProviderSpecificSettings, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpss, err := unmarshalBasicReplicationProviderSpecificSettings(*rawMessage) + if err != nil { + return nil, err + } + rpssArray[index] = rpss + } + return rpssArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) MarshalJSON() ([]byte, error) { + rpss.InstanceType = InstanceTypeBasicReplicationProviderSpecificSettingsInstanceTypeReplicationProviderSpecificSettings + objectMap := make(map[string]interface{}) + if rpss.InstanceType != "" { + objectMap["instanceType"] = rpss.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBaseReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsReplicationProviderSpecificSettings() (*ReplicationProviderSpecificSettings, bool) { + return &rpss, true +} + +// AsBasicReplicationProviderSpecificSettings is the BasicReplicationProviderSpecificSettings implementation for ReplicationProviderSpecificSettings. +func (rpss ReplicationProviderSpecificSettings) AsBasicReplicationProviderSpecificSettings() (BasicReplicationProviderSpecificSettings, bool) { + return &rpss, true +} + +// BasicReplicationProviderSpecificUpdateContainerMappingInput provider specific input for update pairing operations. +type BasicReplicationProviderSpecificUpdateContainerMappingInput interface { + AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) + AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) +} + +// ReplicationProviderSpecificUpdateContainerMappingInput provider specific input for update pairing +// operations. +type ReplicationProviderSpecificUpdateContainerMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A' + InstanceType InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(body []byte) (BasicReplicationProviderSpecificUpdateContainerMappingInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeA2A): + var aucmi A2AUpdateContainerMappingInput + err := json.Unmarshal(body, &aucmi) + return aucmi, err + default: + var rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput + err := json.Unmarshal(body, &rpsucmi) + return rpsucmi, err + } +} +func unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInputArray(body []byte) ([]BasicReplicationProviderSpecificUpdateContainerMappingInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpsucmiArray := make([]BasicReplicationProviderSpecificUpdateContainerMappingInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpsucmi, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*rawMessage) + if err != nil { + return nil, err + } + rpsucmiArray[index] = rpsucmi + } + return rpsucmiArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicationProviderSpecificUpdateContainerMappingInput. +func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) MarshalJSON() ([]byte, error) { + rpsucmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificUpdateContainerMappingInputInstanceTypeReplicationProviderSpecificUpdateContainerMappingInput + objectMap := make(map[string]interface{}) + if rpsucmi.InstanceType != "" { + objectMap["instanceType"] = rpsucmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for ReplicationProviderSpecificUpdateContainerMappingInput. +func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsA2AUpdateContainerMappingInput() (*A2AUpdateContainerMappingInput, bool) { + return nil, false +} + +// AsReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for ReplicationProviderSpecificUpdateContainerMappingInput. +func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsReplicationProviderSpecificUpdateContainerMappingInput() (*ReplicationProviderSpecificUpdateContainerMappingInput, bool) { + return &rpsucmi, true +} + +// AsBasicReplicationProviderSpecificUpdateContainerMappingInput is the BasicReplicationProviderSpecificUpdateContainerMappingInput implementation for ReplicationProviderSpecificUpdateContainerMappingInput. +func (rpsucmi ReplicationProviderSpecificUpdateContainerMappingInput) AsBasicReplicationProviderSpecificUpdateContainerMappingInput() (BasicReplicationProviderSpecificUpdateContainerMappingInput, bool) { + return &rpsucmi, true +} + +// ReplicationRecoveryPlansCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationRecoveryPlansCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansCreateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.CreateResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansCreateFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryPlansDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationRecoveryPlansDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansDeleteFuture) Result(client ReplicationRecoveryPlansClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationRecoveryPlansFailoverCommitFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ReplicationRecoveryPlansFailoverCommitFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansFailoverCommitFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansFailoverCommitFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.FailoverCommitResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansFailoverCommitFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryPlansPlannedFailoverFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ReplicationRecoveryPlansPlannedFailoverFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansPlannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.PlannedFailoverResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryPlansReprotectFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationRecoveryPlansReprotectFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansReprotectFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansReprotectFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.ReprotectResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansReprotectFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryPlansTestFailoverCleanupFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationRecoveryPlansTestFailoverCleanupFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansTestFailoverCleanupFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.TestFailoverCleanupResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryPlansTestFailoverFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationRecoveryPlansTestFailoverFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansTestFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansTestFailoverFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.TestFailoverResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansTestFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryPlansUnplannedFailoverFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ReplicationRecoveryPlansUnplannedFailoverFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansUnplannedFailoverFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.UnplannedFailoverResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryPlansUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationRecoveryPlansUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryPlansUpdateFuture) Result(client ReplicationRecoveryPlansClient) (rp RecoveryPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryPlansUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent { + rp, err = client.UpdateResponder(rp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansUpdateFuture", "Result", rp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryServicesProvidersCreateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationRecoveryServicesProvidersCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryServicesProvidersCreateFuture) Result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent { + rsp, err = client.CreateResponder(rsp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersCreateFuture", "Result", rsp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationRecoveryServicesProvidersDeleteFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationRecoveryServicesProvidersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryServicesProvidersDeleteFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationRecoveryServicesProvidersPurgeFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ReplicationRecoveryServicesProvidersPurgeFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryServicesProvidersPurgeFuture) Result(client ReplicationRecoveryServicesProvidersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationRecoveryServicesProvidersRefreshProviderFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type ReplicationRecoveryServicesProvidersRefreshProviderFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationRecoveryServicesProvidersRefreshProviderFuture) Result(client ReplicationRecoveryServicesProvidersClient) (rsp RecoveryServicesProvider, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if rsp.Response.Response, err = future.GetResult(sender); err == nil && rsp.Response.Response.StatusCode != http.StatusNoContent { + rsp, err = client.RefreshProviderResponder(rsp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture", "Result", rsp.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationStorageClassificationMappingsCreateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationStorageClassificationMappingsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationStorageClassificationMappingsCreateFuture) Result(client ReplicationStorageClassificationMappingsClient) (scm StorageClassificationMapping, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if scm.Response.Response, err = future.GetResult(sender); err == nil && scm.Response.Response.StatusCode != http.StatusNoContent { + scm, err = client.CreateResponder(scm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsCreateFuture", "Result", scm.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationStorageClassificationMappingsDeleteFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ReplicationStorageClassificationMappingsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationStorageClassificationMappingsDeleteFuture) Result(client ReplicationStorageClassificationMappingsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationStorageClassificationMappingsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationVaultHealthRefreshFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationVaultHealthRefreshFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationVaultHealthRefreshFuture) Result(client ReplicationVaultHealthClient) (vhd VaultHealthDetails, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationVaultHealthRefreshFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vhd.Response.Response, err = future.GetResult(sender); err == nil && vhd.Response.Response.StatusCode != http.StatusNoContent { + vhd, err = client.RefreshResponder(vhd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthRefreshFuture", "Result", vhd.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationvCentersCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationvCentersCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationvCentersCreateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { + vc, err = client.CreateResponder(vc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersCreateFuture", "Result", vc.Response.Response, "Failure responding to request") + } + } + return +} + +// ReplicationvCentersDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationvCentersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationvCentersDeleteFuture) Result(client ReplicationvCentersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ReplicationvCentersUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ReplicationvCentersUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ReplicationvCentersUpdateFuture) Result(client ReplicationvCentersClient) (vc VCenter, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("siterecovery.ReplicationvCentersUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent { + vc, err = client.UpdateResponder(vc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersUpdateFuture", "Result", vc.Response.Response, "Failure responding to request") + } + } + return +} + +// ResolveHealthError resolve health errors input properties. +type ResolveHealthError struct { + // HealthErrorID - Health error id. + HealthErrorID *string `json:"healthErrorId,omitempty"` +} + +// ResolveHealthInput resolve health input. +type ResolveHealthInput struct { + // Properties - Disable resolve health input properties. + Properties *ResolveHealthInputProperties `json:"properties,omitempty"` +} + +// ResolveHealthInputProperties resolve health input properties. +type ResolveHealthInputProperties struct { + // HealthErrors - Health errors. + HealthErrors *[]ResolveHealthError `json:"healthErrors,omitempty"` +} + +// Resource azure resource. +type Resource struct { + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// ResourceHealthSummary base class to define the health summary of the resources contained under an Arm +// resource. +type ResourceHealthSummary struct { + // ResourceCount - The count of total resources under the container. + ResourceCount *int32 `json:"resourceCount,omitempty"` + // Issues - The list of summary of health errors across the resources under the container. + Issues *[]HealthErrorSummary `json:"issues,omitempty"` +} + +// ResumeJobParams resume job params. +type ResumeJobParams struct { + // Properties - Resume job properties. + Properties *ResumeJobParamsProperties `json:"properties,omitempty"` +} + +// ResumeJobParamsProperties resume job properties. +type ResumeJobParamsProperties struct { + // Comments - Resume job comments. + Comments *string `json:"comments,omitempty"` +} + +// RetentionVolume the retention details of the MT. +type RetentionVolume struct { + // VolumeName - The volume name. + VolumeName *string `json:"volumeName,omitempty"` + // CapacityInBytes - The volume capacity. + CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` + // FreeSpaceInBytes - The free space available in this volume. + FreeSpaceInBytes *int64 `json:"freeSpaceInBytes,omitempty"` + // ThresholdPercentage - The threshold percentage. + ThresholdPercentage *int32 `json:"thresholdPercentage,omitempty"` +} + +// ReverseReplicationInput reverse replication input. +type ReverseReplicationInput struct { + // Properties - Reverse replication properties + Properties *ReverseReplicationInputProperties `json:"properties,omitempty"` +} + +// ReverseReplicationInputProperties reverse replication input properties. +type ReverseReplicationInputProperties struct { + // FailoverDirection - Failover direction. + FailoverDirection *string `json:"failoverDirection,omitempty"` + // ProviderSpecificDetails - Provider specific reverse replication input. + ProviderSpecificDetails BasicReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ReverseReplicationInputProperties struct. +func (rrip *ReverseReplicationInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "failoverDirection": + if v != nil { + var failoverDirection string + err = json.Unmarshal(*v, &failoverDirection) + if err != nil { + return err + } + rrip.FailoverDirection = &failoverDirection + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicReverseReplicationProviderSpecificInput(*v) + if err != nil { + return err + } + rrip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicReverseReplicationProviderSpecificInput provider specific reverse replication input. +type BasicReverseReplicationProviderSpecificInput interface { + AsA2AReprotectInput() (*A2AReprotectInput, bool) + AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) + AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) + AsInMageReprotectInput() (*InMageReprotectInput, bool) + AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) +} + +// ReverseReplicationProviderSpecificInput provider specific reverse replication input. +type ReverseReplicationProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage' + InstanceType InstanceTypeBasicReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicReverseReplicationProviderSpecificInput(body []byte) (BasicReverseReplicationProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeA2A): + var ari A2AReprotectInput + err := json.Unmarshal(body, &ari) + return ari, err + case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure): + var hvrari HyperVReplicaAzureReprotectInput + err := json.Unmarshal(body, &hvrari) + return hvrari, err + case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2): + var imavri InMageAzureV2ReprotectInput + err := json.Unmarshal(body, &imavri) + return imavri, err + case string(InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeInMage): + var imri InMageReprotectInput + err := json.Unmarshal(body, &imri) + return imri, err + default: + var rrpsi ReverseReplicationProviderSpecificInput + err := json.Unmarshal(body, &rrpsi) + return rrpsi, err + } +} +func unmarshalBasicReverseReplicationProviderSpecificInputArray(body []byte) ([]BasicReverseReplicationProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rrpsiArray := make([]BasicReverseReplicationProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rrpsi, err := unmarshalBasicReverseReplicationProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + rrpsiArray[index] = rrpsi + } + return rrpsiArray, nil +} + +// MarshalJSON is the custom marshaler for ReverseReplicationProviderSpecificInput. +func (rrpsi ReverseReplicationProviderSpecificInput) MarshalJSON() ([]byte, error) { + rrpsi.InstanceType = InstanceTypeBasicReverseReplicationProviderSpecificInputInstanceTypeReverseReplicationProviderSpecificInput + objectMap := make(map[string]interface{}) + if rrpsi.InstanceType != "" { + objectMap["instanceType"] = rrpsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. +func (rrpsi ReverseReplicationProviderSpecificInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. +func (rrpsi ReverseReplicationProviderSpecificInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return nil, false +} + +// AsInMageAzureV2ReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. +func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return nil, false +} + +// AsInMageReprotectInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. +func (rrpsi ReverseReplicationProviderSpecificInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return nil, false +} + +// AsReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. +func (rrpsi ReverseReplicationProviderSpecificInput) AsReverseReplicationProviderSpecificInput() (*ReverseReplicationProviderSpecificInput, bool) { + return &rrpsi, true +} + +// AsBasicReverseReplicationProviderSpecificInput is the BasicReverseReplicationProviderSpecificInput implementation for ReverseReplicationProviderSpecificInput. +func (rrpsi ReverseReplicationProviderSpecificInput) AsBasicReverseReplicationProviderSpecificInput() (BasicReverseReplicationProviderSpecificInput, bool) { + return &rrpsi, true +} + +// RoleAssignment azure role assignment details. +type RoleAssignment struct { + // ID - The ARM Id of the role assignment. + ID *string `json:"id,omitempty"` + // Name - The name of the role assignment. + Name *string `json:"name,omitempty"` + // Scope - Role assignment scope. + Scope *string `json:"scope,omitempty"` + // PrincipalID - Principal Id. + PrincipalID *string `json:"principalId,omitempty"` + // RoleDefinitionID - Role definition id. + RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` +} + +// RunAsAccount CS Accounts Details. +type RunAsAccount struct { + // AccountID - The CS RunAs account Id. + AccountID *string `json:"accountId,omitempty"` + // AccountName - The CS RunAs account name. + AccountName *string `json:"accountName,omitempty"` +} + +// SanEnableProtectionInput san enable protection provider specific input. +type SanEnableProtectionInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeEnableProtectionProviderSpecificInput', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan' + InstanceType InstanceTypeBasicEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) MarshalJSON() ([]byte, error) { + sepi.InstanceType = InstanceTypeBasicEnableProtectionProviderSpecificInputInstanceTypeSan + objectMap := make(map[string]interface{}) + if sepi.InstanceType != "" { + objectMap["instanceType"] = sepi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return &sepi, true +} + +// AsEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsEnableProtectionProviderSpecificInput() (*EnableProtectionProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicEnableProtectionProviderSpecificInput is the BasicEnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsBasicEnableProtectionProviderSpecificInput() (BasicEnableProtectionProviderSpecificInput, bool) { + return &sepi, true +} + +// ScriptActionTaskDetails this class represents the script action task details. +type ScriptActionTaskDetails struct { + // Name - The name. + Name *string `json:"name,omitempty"` + // Path - The path. + Path *string `json:"path,omitempty"` + // Output - The output. + Output *string `json:"output,omitempty"` + // IsPrimarySideScript - A value indicating whether it is a primary side script or not. + IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { + satd.InstanceType = InstanceTypeScriptActionTaskDetails + objectMap := make(map[string]interface{}) + if satd.Name != nil { + objectMap["name"] = satd.Name + } + if satd.Path != nil { + objectMap["path"] = satd.Path + } + if satd.Output != nil { + objectMap["output"] = satd.Output + } + if satd.IsPrimarySideScript != nil { + objectMap["isPrimarySideScript"] = satd.IsPrimarySideScript + } + if satd.InstanceType != "" { + objectMap["instanceType"] = satd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return &satd, true +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &satd, true +} + +// ServiceError ASR error model +type ServiceError struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - Error message. + Message *string `json:"message,omitempty"` + // PossibleCauses - Possible causes of error. + PossibleCauses *string `json:"possibleCauses,omitempty"` + // RecommendedAction - Recommended action to resolve error. + RecommendedAction *string `json:"recommendedAction,omitempty"` + // ActivityID - Activity Id. + ActivityID *string `json:"activityId,omitempty"` +} + +// StorageClassification storage object definition. +type StorageClassification struct { + autorest.Response `json:"-"` + // Properties - Properties of the storage object. + Properties *StorageClassificationProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// StorageClassificationCollection collection of storage details. +type StorageClassificationCollection struct { + autorest.Response `json:"-"` + // Value - The storage details. + Value *[]StorageClassification `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// StorageClassificationCollectionIterator provides access to a complete listing of StorageClassification +// values. +type StorageClassificationCollectionIterator struct { + i int + page StorageClassificationCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *StorageClassificationCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *StorageClassificationCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter StorageClassificationCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter StorageClassificationCollectionIterator) Response() StorageClassificationCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter StorageClassificationCollectionIterator) Value() StorageClassification { + if !iter.page.NotDone() { + return StorageClassification{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the StorageClassificationCollectionIterator type. +func NewStorageClassificationCollectionIterator(page StorageClassificationCollectionPage) StorageClassificationCollectionIterator { + return StorageClassificationCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (scc StorageClassificationCollection) IsEmpty() bool { + return scc.Value == nil || len(*scc.Value) == 0 +} + +// storageClassificationCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (scc StorageClassificationCollection) storageClassificationCollectionPreparer(ctx context.Context) (*http.Request, error) { + if scc.NextLink == nil || len(to.String(scc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(scc.NextLink))) +} + +// StorageClassificationCollectionPage contains a page of StorageClassification values. +type StorageClassificationCollectionPage struct { + fn func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error) + scc StorageClassificationCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *StorageClassificationCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.scc) + if err != nil { + return err + } + page.scc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *StorageClassificationCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page StorageClassificationCollectionPage) NotDone() bool { + return !page.scc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page StorageClassificationCollectionPage) Response() StorageClassificationCollection { + return page.scc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page StorageClassificationCollectionPage) Values() []StorageClassification { + if page.scc.IsEmpty() { + return nil + } + return *page.scc.Value +} + +// Creates a new instance of the StorageClassificationCollectionPage type. +func NewStorageClassificationCollectionPage(getNextPage func(context.Context, StorageClassificationCollection) (StorageClassificationCollection, error)) StorageClassificationCollectionPage { + return StorageClassificationCollectionPage{fn: getNextPage} +} + +// StorageClassificationMapping storage mapping object. +type StorageClassificationMapping struct { + autorest.Response `json:"-"` + // Properties - Properties of the storage mapping object. + Properties *StorageClassificationMappingProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// StorageClassificationMappingCollection collection of storage mapping details. +type StorageClassificationMappingCollection struct { + autorest.Response `json:"-"` + // Value - The storage details. + Value *[]StorageClassificationMapping `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// StorageClassificationMappingCollectionIterator provides access to a complete listing of +// StorageClassificationMapping values. +type StorageClassificationMappingCollectionIterator struct { + i int + page StorageClassificationMappingCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *StorageClassificationMappingCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *StorageClassificationMappingCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter StorageClassificationMappingCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter StorageClassificationMappingCollectionIterator) Response() StorageClassificationMappingCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter StorageClassificationMappingCollectionIterator) Value() StorageClassificationMapping { + if !iter.page.NotDone() { + return StorageClassificationMapping{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the StorageClassificationMappingCollectionIterator type. +func NewStorageClassificationMappingCollectionIterator(page StorageClassificationMappingCollectionPage) StorageClassificationMappingCollectionIterator { + return StorageClassificationMappingCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (scmc StorageClassificationMappingCollection) IsEmpty() bool { + return scmc.Value == nil || len(*scmc.Value) == 0 +} + +// storageClassificationMappingCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (scmc StorageClassificationMappingCollection) storageClassificationMappingCollectionPreparer(ctx context.Context) (*http.Request, error) { + if scmc.NextLink == nil || len(to.String(scmc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(scmc.NextLink))) +} + +// StorageClassificationMappingCollectionPage contains a page of StorageClassificationMapping values. +type StorageClassificationMappingCollectionPage struct { + fn func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error) + scmc StorageClassificationMappingCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *StorageClassificationMappingCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StorageClassificationMappingCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.scmc) + if err != nil { + return err + } + page.scmc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *StorageClassificationMappingCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page StorageClassificationMappingCollectionPage) NotDone() bool { + return !page.scmc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page StorageClassificationMappingCollectionPage) Response() StorageClassificationMappingCollection { + return page.scmc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page StorageClassificationMappingCollectionPage) Values() []StorageClassificationMapping { + if page.scmc.IsEmpty() { + return nil + } + return *page.scmc.Value +} + +// Creates a new instance of the StorageClassificationMappingCollectionPage type. +func NewStorageClassificationMappingCollectionPage(getNextPage func(context.Context, StorageClassificationMappingCollection) (StorageClassificationMappingCollection, error)) StorageClassificationMappingCollectionPage { + return StorageClassificationMappingCollectionPage{fn: getNextPage} +} + +// StorageClassificationMappingInput storage mapping input. +type StorageClassificationMappingInput struct { + // Properties - Storage mapping input properties. + Properties *StorageMappingInputProperties `json:"properties,omitempty"` +} + +// StorageClassificationMappingProperties storage mapping properties. +type StorageClassificationMappingProperties struct { + // TargetStorageClassificationID - Target storage object Id. + TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` +} + +// StorageClassificationProperties storage object properties. +type StorageClassificationProperties struct { + // FriendlyName - Friendly name of the Storage classification. + FriendlyName *string `json:"friendlyName,omitempty"` +} + +// StorageMappingInputProperties storage mapping input properties. +type StorageMappingInputProperties struct { + // TargetStorageClassificationID - The ID of the storage object. + TargetStorageClassificationID *string `json:"targetStorageClassificationId,omitempty"` +} + +// Subnet subnets of the network. +type Subnet struct { + // Name - The subnet name. + Name *string `json:"name,omitempty"` + // FriendlyName - The subnet friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` + // AddressList - The list of addresses for the subnet. + AddressList *[]string `json:"addressList,omitempty"` +} + +// SupportedOperatingSystems response object for supported operating systems API. +type SupportedOperatingSystems struct { + autorest.Response `json:"-"` + // Properties - Properties model for supported OS API. + Properties *SupportedOSProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// SupportedOSDetails supported Operating system details. +type SupportedOSDetails struct { + // OsName - The name. + OsName *string `json:"osName,omitempty"` + // OsType - The type. + OsType *string `json:"osType,omitempty"` + // OsVersions - List of version for OS. + OsVersions *[]OSVersionWrapper `json:"osVersions,omitempty"` +} + +// SupportedOSProperties properties model for supported OS API. +type SupportedOSProperties struct { + // SupportedOsList - The supported OS List. + SupportedOsList *[]SupportedOSProperty `json:"supportedOsList,omitempty"` +} + +// SupportedOSProperty property object for supported OS api. +type SupportedOSProperty struct { + // InstanceType - READ-ONLY; Gets the replication provider type. + InstanceType *string `json:"instanceType,omitempty"` + // SupportedOs - List of supported OS. + SupportedOs *[]SupportedOSDetails `json:"supportedOs,omitempty"` +} + +// SwitchProtectionInput switch protection input. +type SwitchProtectionInput struct { + // Properties - Switch protection properties + Properties *SwitchProtectionInputProperties `json:"properties,omitempty"` +} + +// SwitchProtectionInputProperties switch protection input properties. +type SwitchProtectionInputProperties struct { + // ReplicationProtectedItemName - The unique replication protected item name. + ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"` + // ProviderSpecificDetails - Provider specific switch protection input. + ProviderSpecificDetails BasicSwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SwitchProtectionInputProperties struct. +func (spip *SwitchProtectionInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "replicationProtectedItemName": + if v != nil { + var replicationProtectedItemName string + err = json.Unmarshal(*v, &replicationProtectedItemName) + if err != nil { + return err + } + spip.ReplicationProtectedItemName = &replicationProtectedItemName + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*v) + if err != nil { + return err + } + spip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// SwitchProtectionJobDetails this class represents details for switch protection job. +type SwitchProtectionJobDetails struct { + // NewReplicationProtectedItemID - ARM Id of the new replication protected item. + NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"` + // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` + // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' + InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { + spjd.InstanceType = InstanceTypeSwitchProtectionJobDetails + objectMap := make(map[string]interface{}) + if spjd.NewReplicationProtectedItemID != nil { + objectMap["newReplicationProtectedItemId"] = spjd.NewReplicationProtectedItemID + } + if spjd.AffectedObjectDetails != nil { + objectMap["affectedObjectDetails"] = spjd.AffectedObjectDetails + } + if spjd.InstanceType != "" { + objectMap["instanceType"] = spjd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAsrJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return &spjd, true +} + +// AsTestFailoverJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsJobDetails() (*JobDetails, bool) { + return nil, false +} + +// AsBasicJobDetails is the BasicJobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { + return &spjd, true +} + +// BasicSwitchProtectionProviderSpecificInput provider specific switch protection input. +type BasicSwitchProtectionProviderSpecificInput interface { + AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) + AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) +} + +// SwitchProtectionProviderSpecificInput provider specific switch protection input. +type SwitchProtectionProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput', 'InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A' + InstanceType InstanceTypeBasicSwitchProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicSwitchProtectionProviderSpecificInput(body []byte) (BasicSwitchProtectionProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeA2A): + var aspi A2ASwitchProtectionInput + err := json.Unmarshal(body, &aspi) + return aspi, err + default: + var sppsi SwitchProtectionProviderSpecificInput + err := json.Unmarshal(body, &sppsi) + return sppsi, err + } +} +func unmarshalBasicSwitchProtectionProviderSpecificInputArray(body []byte) ([]BasicSwitchProtectionProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sppsiArray := make([]BasicSwitchProtectionProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sppsi, err := unmarshalBasicSwitchProtectionProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + sppsiArray[index] = sppsi + } + return sppsiArray, nil +} + +// MarshalJSON is the custom marshaler for SwitchProtectionProviderSpecificInput. +func (sppsi SwitchProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + sppsi.InstanceType = InstanceTypeBasicSwitchProtectionProviderSpecificInputInstanceTypeSwitchProtectionProviderSpecificInput + objectMap := make(map[string]interface{}) + if sppsi.InstanceType != "" { + objectMap["instanceType"] = sppsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2ASwitchProtectionInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. +func (sppsi SwitchProtectionProviderSpecificInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) { + return nil, false +} + +// AsSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. +func (sppsi SwitchProtectionProviderSpecificInput) AsSwitchProtectionProviderSpecificInput() (*SwitchProtectionProviderSpecificInput, bool) { + return &sppsi, true +} + +// AsBasicSwitchProtectionProviderSpecificInput is the BasicSwitchProtectionProviderSpecificInput implementation for SwitchProtectionProviderSpecificInput. +func (sppsi SwitchProtectionProviderSpecificInput) AsBasicSwitchProtectionProviderSpecificInput() (BasicSwitchProtectionProviderSpecificInput, bool) { + return &sppsi, true +} + +// TargetComputeSize represents applicable recovery vm sizes. +type TargetComputeSize struct { + // ID - The Id. + ID *string `json:"id,omitempty"` + // Name - The name. + Name *string `json:"name,omitempty"` + // Type - The Type of the object. + Type *string `json:"type,omitempty"` + // Properties - The custom data. + Properties *TargetComputeSizeProperties `json:"properties,omitempty"` +} + +// TargetComputeSizeCollection target compute size collection. +type TargetComputeSizeCollection struct { + autorest.Response `json:"-"` + // Value - The list of target compute sizes. + Value *[]TargetComputeSize `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// TargetComputeSizeCollectionIterator provides access to a complete listing of TargetComputeSize values. +type TargetComputeSizeCollectionIterator struct { + i int + page TargetComputeSizeCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *TargetComputeSizeCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *TargetComputeSizeCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter TargetComputeSizeCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter TargetComputeSizeCollectionIterator) Response() TargetComputeSizeCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter TargetComputeSizeCollectionIterator) Value() TargetComputeSize { + if !iter.page.NotDone() { + return TargetComputeSize{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the TargetComputeSizeCollectionIterator type. +func NewTargetComputeSizeCollectionIterator(page TargetComputeSizeCollectionPage) TargetComputeSizeCollectionIterator { + return TargetComputeSizeCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (tcsc TargetComputeSizeCollection) IsEmpty() bool { + return tcsc.Value == nil || len(*tcsc.Value) == 0 +} + +// targetComputeSizeCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (tcsc TargetComputeSizeCollection) targetComputeSizeCollectionPreparer(ctx context.Context) (*http.Request, error) { + if tcsc.NextLink == nil || len(to.String(tcsc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(tcsc.NextLink))) +} + +// TargetComputeSizeCollectionPage contains a page of TargetComputeSize values. +type TargetComputeSizeCollectionPage struct { + fn func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error) + tcsc TargetComputeSizeCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *TargetComputeSizeCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizeCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.tcsc) + if err != nil { + return err + } + page.tcsc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *TargetComputeSizeCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page TargetComputeSizeCollectionPage) NotDone() bool { + return !page.tcsc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page TargetComputeSizeCollectionPage) Response() TargetComputeSizeCollection { + return page.tcsc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page TargetComputeSizeCollectionPage) Values() []TargetComputeSize { + if page.tcsc.IsEmpty() { + return nil + } + return *page.tcsc.Value +} + +// Creates a new instance of the TargetComputeSizeCollectionPage type. +func NewTargetComputeSizeCollectionPage(getNextPage func(context.Context, TargetComputeSizeCollection) (TargetComputeSizeCollection, error)) TargetComputeSizeCollectionPage { + return TargetComputeSizeCollectionPage{fn: getNextPage} +} + +// TargetComputeSizeProperties represents applicable recovery vm sizes properties. +type TargetComputeSizeProperties struct { + // Name - Target compute size name. + Name *string `json:"name,omitempty"` + // FriendlyName - Target compute size display name. + FriendlyName *string `json:"friendlyName,omitempty"` + // CPUCoresCount - The maximum cpu cores count supported by target compute size. + CPUCoresCount *int32 `json:"cpuCoresCount,omitempty"` + // MemoryInGB - The maximum memory in GB supported by target compute size. + MemoryInGB *float64 `json:"memoryInGB,omitempty"` + // MaxDataDiskCount - The maximum data disks count supported by target compute size. + MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"` + // MaxNicsCount - The maximum Nics count supported by target compute size. + MaxNicsCount *int32 `json:"maxNicsCount,omitempty"` + // Errors - The reasons why the target compute size is not applicable for the protected item. + Errors *[]ComputeSizeErrorDetails `json:"errors,omitempty"` + // HighIopsSupported - The value indicating whether the target compute size supports high Iops. + HighIopsSupported *string `json:"highIopsSupported,omitempty"` +} + +// BasicTaskTypeDetails task details based on specific task type. +type BasicTaskTypeDetails interface { + AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) + AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) + AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) + AsJobTaskDetails() (*JobTaskDetails, bool) + AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) + AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) + AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) + AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) + AsTaskTypeDetails() (*TaskTypeDetails, bool) +} + +// TaskTypeDetails task details based on specific task type. +type TaskTypeDetails struct { + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +func unmarshalBasicTaskTypeDetails(body []byte) (BasicTaskTypeDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAutomationRunbookTaskDetails): + var artd AutomationRunbookTaskDetails + err := json.Unmarshal(body, &artd) + return artd, err + case string(InstanceTypeConsistencyCheckTaskDetails): + var cctd ConsistencyCheckTaskDetails + err := json.Unmarshal(body, &cctd) + return cctd, err + case string(InstanceTypeFabricReplicationGroupTaskDetails): + var frgtd FabricReplicationGroupTaskDetails + err := json.Unmarshal(body, &frgtd) + return frgtd, err + case string(InstanceTypeJobTaskDetails): + var jtd JobTaskDetails + err := json.Unmarshal(body, &jtd) + return jtd, err + case string(InstanceTypeManualActionTaskDetails): + var matd ManualActionTaskDetails + err := json.Unmarshal(body, &matd) + return matd, err + case string(InstanceTypeScriptActionTaskDetails): + var satd ScriptActionTaskDetails + err := json.Unmarshal(body, &satd) + return satd, err + case string(InstanceTypeVirtualMachineTaskDetails): + var vmtd VirtualMachineTaskDetails + err := json.Unmarshal(body, &vmtd) + return vmtd, err + case string(InstanceTypeVMNicUpdatesTaskDetails): + var vnutd VMNicUpdatesTaskDetails + err := json.Unmarshal(body, &vnutd) + return vnutd, err + default: + var ttd TaskTypeDetails + err := json.Unmarshal(body, &ttd) + return ttd, err + } +} +func unmarshalBasicTaskTypeDetailsArray(body []byte) ([]BasicTaskTypeDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ttdArray := make([]BasicTaskTypeDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ttd, err := unmarshalBasicTaskTypeDetails(*rawMessage) + if err != nil { + return nil, err + } + ttdArray[index] = ttd + } + return ttdArray, nil +} + +// MarshalJSON is the custom marshaler for TaskTypeDetails. +func (ttd TaskTypeDetails) MarshalJSON() ([]byte, error) { + ttd.InstanceType = InstanceTypeTaskTypeDetails + objectMap := make(map[string]interface{}) + if ttd.InstanceType != "" { + objectMap["instanceType"] = ttd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return &ttd, true +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for TaskTypeDetails. +func (ttd TaskTypeDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &ttd, true +} + +// TestFailoverCleanupInput input definition for test failover cleanup. +type TestFailoverCleanupInput struct { + // Properties - Test failover cleanup input properties. + Properties *TestFailoverCleanupInputProperties `json:"properties,omitempty"` +} + +// TestFailoverCleanupInputProperties input definition for test failover cleanup input properties. +type TestFailoverCleanupInputProperties struct { + // Comments - Test failover cleanup comments. + Comments *string `json:"comments,omitempty"` +} + +// TestFailoverInput input definition for planned failover. +type TestFailoverInput struct { + // Properties - Planned failover input properties + Properties *TestFailoverInputProperties `json:"properties,omitempty"` +} + +// TestFailoverInputProperties input definition for planned failover input properties. +type TestFailoverInputProperties struct { + // FailoverDirection - Failover direction. + FailoverDirection *string `json:"failoverDirection,omitempty"` + // NetworkType - Network type to be used for test failover. + NetworkType *string `json:"networkType,omitempty"` + // NetworkID - The id of the network to be used for test failover + NetworkID *string `json:"networkId,omitempty"` + // SkipTestFailoverCleanup - A value indicating whether the test failover cleanup is to be skipped. + SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` + // ProviderSpecificDetails - Provider specific settings + ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for TestFailoverInputProperties struct. +func (tfip *TestFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "failoverDirection": + if v != nil { + var failoverDirection string + err = json.Unmarshal(*v, &failoverDirection) + if err != nil { + return err + } + tfip.FailoverDirection = &failoverDirection + } + case "networkType": + if v != nil { + var networkType string + err = json.Unmarshal(*v, &networkType) + if err != nil { + return err + } + tfip.NetworkType = &networkType + } + case "networkId": + if v != nil { + var networkID string + err = json.Unmarshal(*v, &networkID) + if err != nil { + return err + } + tfip.NetworkID = &networkID + } + case "skipTestFailoverCleanup": + if v != nil { + var skipTestFailoverCleanup string + err = json.Unmarshal(*v, &skipTestFailoverCleanup) + if err != nil { + return err + } + tfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) + if err != nil { + return err + } + tfip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// TestFailoverJobDetails this class represents the details for a test failover job. +type TestFailoverJobDetails struct { + // TestFailoverStatus - The test failover status. + TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` + // Comments - The test failover comments. + Comments *string `json:"comments,omitempty"` + // NetworkName - The test network name. + NetworkName *string `json:"networkName,omitempty"` + // NetworkFriendlyName - The test network friendly name. + NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` + // NetworkType - The test network type (see TestFailoverInput enum for possible values). + NetworkType *string `json:"networkType,omitempty"` + // ProtectedItemDetails - The test VM details. + ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` + // AffectedObjectDetails - The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. + AffectedObjectDetails map[string]*string `json:"affectedObjectDetails"` + // InstanceType - Possible values include: 'InstanceTypeJobDetails', 'InstanceTypeAsrJobDetails', 'InstanceTypeExportJobDetails', 'InstanceTypeFailoverJobDetails', 'InstanceTypeSwitchProtectionJobDetails', 'InstanceTypeTestFailoverJobDetails' + InstanceType InstanceTypeBasicJobDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) MarshalJSON() ([]byte, error) { + tfjd.InstanceType = InstanceTypeTestFailoverJobDetails + objectMap := make(map[string]interface{}) + if tfjd.TestFailoverStatus != nil { + objectMap["testFailoverStatus"] = tfjd.TestFailoverStatus + } + if tfjd.Comments != nil { + objectMap["comments"] = tfjd.Comments + } + if tfjd.NetworkName != nil { + objectMap["networkName"] = tfjd.NetworkName + } + if tfjd.NetworkFriendlyName != nil { + objectMap["networkFriendlyName"] = tfjd.NetworkFriendlyName + } + if tfjd.NetworkType != nil { + objectMap["networkType"] = tfjd.NetworkType + } + if tfjd.ProtectedItemDetails != nil { + objectMap["protectedItemDetails"] = tfjd.ProtectedItemDetails + } + if tfjd.AffectedObjectDetails != nil { + objectMap["affectedObjectDetails"] = tfjd.AffectedObjectDetails + } + if tfjd.InstanceType != "" { + objectMap["instanceType"] = tfjd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAsrJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return &tfjd, true +} + +// AsJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsJobDetails() (*JobDetails, bool) { + return nil, false +} + +// AsBasicJobDetails is the BasicJobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsBasicJobDetails() (BasicJobDetails, bool) { + return &tfjd, true +} + +// TestMigrateCleanupInput input for test migrate cleanup. +type TestMigrateCleanupInput struct { + // Properties - Test migrate cleanup input properties. + Properties *TestMigrateCleanupInputProperties `json:"properties,omitempty"` +} + +// TestMigrateCleanupInputProperties test migrate cleanup input properties. +type TestMigrateCleanupInputProperties struct { + // Comments - Test migrate cleanup comments. + Comments *string `json:"comments,omitempty"` +} + +// TestMigrateInput input for test migrate. +type TestMigrateInput struct { + // Properties - Test migrate input properties. + Properties *TestMigrateInputProperties `json:"properties,omitempty"` +} + +// TestMigrateInputProperties test migrate input properties. +type TestMigrateInputProperties struct { + // ProviderSpecificDetails - The provider specific details. + ProviderSpecificDetails BasicTestMigrateProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for TestMigrateInputProperties struct. +func (tmip *TestMigrateInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicTestMigrateProviderSpecificInput(*v) + if err != nil { + return err + } + tmip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicTestMigrateProviderSpecificInput test migrate provider specific input. +type BasicTestMigrateProviderSpecificInput interface { + AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) + AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) +} + +// TestMigrateProviderSpecificInput test migrate provider specific input. +type TestMigrateProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput', 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicTestMigrateProviderSpecificInput(body []byte) (BasicTestMigrateProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt): + var vmctmi VMwareCbtTestMigrateInput + err := json.Unmarshal(body, &vmctmi) + return vmctmi, err + default: + var tmpsi TestMigrateProviderSpecificInput + err := json.Unmarshal(body, &tmpsi) + return tmpsi, err + } +} +func unmarshalBasicTestMigrateProviderSpecificInputArray(body []byte) ([]BasicTestMigrateProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + tmpsiArray := make([]BasicTestMigrateProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + tmpsi, err := unmarshalBasicTestMigrateProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + tmpsiArray[index] = tmpsi + } + return tmpsiArray, nil +} + +// MarshalJSON is the custom marshaler for TestMigrateProviderSpecificInput. +func (tmpsi TestMigrateProviderSpecificInput) MarshalJSON() ([]byte, error) { + tmpsi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput + objectMap := make(map[string]interface{}) + if tmpsi.InstanceType != "" { + objectMap["instanceType"] = tmpsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtTestMigrateInput is the BasicTestMigrateProviderSpecificInput implementation for TestMigrateProviderSpecificInput. +func (tmpsi TestMigrateProviderSpecificInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) { + return nil, false +} + +// AsTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for TestMigrateProviderSpecificInput. +func (tmpsi TestMigrateProviderSpecificInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) { + return &tmpsi, true +} + +// AsBasicTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for TestMigrateProviderSpecificInput. +func (tmpsi TestMigrateProviderSpecificInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) { + return &tmpsi, true +} + +// UnplannedFailoverInput input definition for planned failover. +type UnplannedFailoverInput struct { + // Properties - Planned failover input properties + Properties *UnplannedFailoverInputProperties `json:"properties,omitempty"` +} + +// UnplannedFailoverInputProperties input definition for planned failover input properties. +type UnplannedFailoverInputProperties struct { + // FailoverDirection - Failover direction. + FailoverDirection *string `json:"failoverDirection,omitempty"` + // SourceSiteOperations - Source site operations status + SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"` + // ProviderSpecificDetails - Provider specific settings + ProviderSpecificDetails BasicProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UnplannedFailoverInputProperties struct. +func (ufip *UnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "failoverDirection": + if v != nil { + var failoverDirection string + err = json.Unmarshal(*v, &failoverDirection) + if err != nil { + return err + } + ufip.FailoverDirection = &failoverDirection + } + case "sourceSiteOperations": + if v != nil { + var sourceSiteOperations string + err = json.Unmarshal(*v, &sourceSiteOperations) + if err != nil { + return err + } + ufip.SourceSiteOperations = &sourceSiteOperations + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicProviderSpecificFailoverInput(*v) + if err != nil { + return err + } + ufip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// UpdateMigrationItemInput update migration item input. +type UpdateMigrationItemInput struct { + // Properties - Update migration item input properties. + Properties *UpdateMigrationItemInputProperties `json:"properties,omitempty"` +} + +// UpdateMigrationItemInputProperties update migration item input properties. +type UpdateMigrationItemInputProperties struct { + // ProviderSpecificDetails - The provider specific input to update migration item. + ProviderSpecificDetails BasicUpdateMigrationItemProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdateMigrationItemInputProperties struct. +func (umiip *UpdateMigrationItemInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*v) + if err != nil { + return err + } + umiip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicUpdateMigrationItemProviderSpecificInput update migration item provider specific input. +type BasicUpdateMigrationItemProviderSpecificInput interface { + AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) + AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) +} + +// UpdateMigrationItemProviderSpecificInput update migration item provider specific input. +type UpdateMigrationItemProviderSpecificInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput', 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicUpdateMigrationItemProviderSpecificInput(body []byte) (BasicUpdateMigrationItemProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt): + var vmcumii VMwareCbtUpdateMigrationItemInput + err := json.Unmarshal(body, &vmcumii) + return vmcumii, err + default: + var umipsi UpdateMigrationItemProviderSpecificInput + err := json.Unmarshal(body, &umipsi) + return umipsi, err + } +} +func unmarshalBasicUpdateMigrationItemProviderSpecificInputArray(body []byte) ([]BasicUpdateMigrationItemProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + umipsiArray := make([]BasicUpdateMigrationItemProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + umipsi, err := unmarshalBasicUpdateMigrationItemProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + umipsiArray[index] = umipsi + } + return umipsiArray, nil +} + +// MarshalJSON is the custom marshaler for UpdateMigrationItemProviderSpecificInput. +func (umipsi UpdateMigrationItemProviderSpecificInput) MarshalJSON() ([]byte, error) { + umipsi.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput + objectMap := make(map[string]interface{}) + if umipsi.InstanceType != "" { + objectMap["instanceType"] = umipsi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtUpdateMigrationItemInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for UpdateMigrationItemProviderSpecificInput. +func (umipsi UpdateMigrationItemProviderSpecificInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) { + return nil, false +} + +// AsUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for UpdateMigrationItemProviderSpecificInput. +func (umipsi UpdateMigrationItemProviderSpecificInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) { + return &umipsi, true +} + +// AsBasicUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for UpdateMigrationItemProviderSpecificInput. +func (umipsi UpdateMigrationItemProviderSpecificInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) { + return &umipsi, true +} + +// UpdateMobilityServiceRequest request to update the mobility service on a protected item. +type UpdateMobilityServiceRequest struct { + // Properties - The properties of the update mobility service request. + Properties *UpdateMobilityServiceRequestProperties `json:"properties,omitempty"` +} + +// UpdateMobilityServiceRequestProperties the properties of an update mobility service request. +type UpdateMobilityServiceRequestProperties struct { + // RunAsAccountID - The CS run as account Id. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` +} + +// UpdateNetworkMappingInput update network mapping input. +type UpdateNetworkMappingInput struct { + // Properties - The input properties needed to update network mapping. + Properties *UpdateNetworkMappingInputProperties `json:"properties,omitempty"` +} + +// UpdateNetworkMappingInputProperties common input details for network mapping operation. +type UpdateNetworkMappingInputProperties struct { + // RecoveryFabricName - Recovery fabric name. + RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` + // RecoveryNetworkID - Recovery network Id. + RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` + // FabricSpecificDetails - Fabrics specific input network Id. + FabricSpecificDetails BasicFabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdateNetworkMappingInputProperties struct. +func (unmip *UpdateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "recoveryFabricName": + if v != nil { + var recoveryFabricName string + err = json.Unmarshal(*v, &recoveryFabricName) + if err != nil { + return err + } + unmip.RecoveryFabricName = &recoveryFabricName + } + case "recoveryNetworkId": + if v != nil { + var recoveryNetworkID string + err = json.Unmarshal(*v, &recoveryNetworkID) + if err != nil { + return err + } + unmip.RecoveryNetworkID = &recoveryNetworkID + } + case "fabricSpecificDetails": + if v != nil { + fabricSpecificDetails, err := unmarshalBasicFabricSpecificUpdateNetworkMappingInput(*v) + if err != nil { + return err + } + unmip.FabricSpecificDetails = fabricSpecificDetails + } + } + } + + return nil +} + +// UpdatePolicyInput update policy input. +type UpdatePolicyInput struct { + // Properties - The ReplicationProviderSettings. + Properties *UpdatePolicyInputProperties `json:"properties,omitempty"` +} + +// UpdatePolicyInputProperties policy update properties. +type UpdatePolicyInputProperties struct { + // ReplicationProviderSettings - The ReplicationProviderSettings. + ReplicationProviderSettings BasicPolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdatePolicyInputProperties struct. +func (upip *UpdatePolicyInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "replicationProviderSettings": + if v != nil { + replicationProviderSettings, err := unmarshalBasicPolicyProviderSpecificInput(*v) + if err != nil { + return err + } + upip.ReplicationProviderSettings = replicationProviderSettings + } + } + } + + return nil +} + +// UpdateProtectionContainerMappingInput container pairing update input. +type UpdateProtectionContainerMappingInput struct { + // Properties - Update protection container mapping input properties. + Properties *UpdateProtectionContainerMappingInputProperties `json:"properties,omitempty"` +} + +// UpdateProtectionContainerMappingInputProperties container pairing update input. +type UpdateProtectionContainerMappingInputProperties struct { + // ProviderSpecificInput - Provider specific input for updating protection container mapping. + ProviderSpecificInput BasicReplicationProviderSpecificUpdateContainerMappingInput `json:"providerSpecificInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdateProtectionContainerMappingInputProperties struct. +func (upcmip *UpdateProtectionContainerMappingInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "providerSpecificInput": + if v != nil { + providerSpecificInput, err := unmarshalBasicReplicationProviderSpecificUpdateContainerMappingInput(*v) + if err != nil { + return err + } + upcmip.ProviderSpecificInput = providerSpecificInput + } + } + } + + return nil +} + +// UpdateRecoveryPlanInput update recovery plan input class. +type UpdateRecoveryPlanInput struct { + // Properties - Recovery plan update properties. + Properties *UpdateRecoveryPlanInputProperties `json:"properties,omitempty"` +} + +// UpdateRecoveryPlanInputProperties recovery plan update properties. +type UpdateRecoveryPlanInputProperties struct { + // Groups - The recovery plan groups. + Groups *[]RecoveryPlanGroup `json:"groups,omitempty"` +} + +// UpdateReplicationProtectedItemInput update replication protected item input. +type UpdateReplicationProtectedItemInput struct { + // Properties - Update replication protected item properties. + Properties *UpdateReplicationProtectedItemInputProperties `json:"properties,omitempty"` +} + +// UpdateReplicationProtectedItemInputProperties update protected item input properties. +type UpdateReplicationProtectedItemInputProperties struct { + // RecoveryAzureVMName - Target azure VM name given by the user. + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + // RecoveryAzureVMSize - Target Azure Vm size. + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + // SelectedRecoveryAzureNetworkID - Target Azure Network Id. + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + // SelectedSourceNicID - The selected source nic Id which will be used as the primary nic during failover. + SelectedSourceNicID *string `json:"selectedSourceNicId,omitempty"` + // EnableRdpOnTargetOption - The selected option to enable RDP\SSH on target vm after failover. String value of {SrsDataContract.EnableRDPOnTargetOption} enum. + EnableRdpOnTargetOption *string `json:"enableRdpOnTargetOption,omitempty"` + // VMNics - The list of vm nic details. + VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"` + // LicenseType - License type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' + LicenseType LicenseType `json:"licenseType,omitempty"` + // RecoveryAvailabilitySetID - The target availability set id. + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + // ProviderSpecificDetails - The provider specific input to update replication protected item. + ProviderSpecificDetails BasicUpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdateReplicationProtectedItemInputProperties struct. +func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "recoveryAzureVMName": + if v != nil { + var recoveryAzureVMName string + err = json.Unmarshal(*v, &recoveryAzureVMName) + if err != nil { + return err + } + urpiip.RecoveryAzureVMName = &recoveryAzureVMName + } + case "recoveryAzureVMSize": + if v != nil { + var recoveryAzureVMSize string + err = json.Unmarshal(*v, &recoveryAzureVMSize) + if err != nil { + return err + } + urpiip.RecoveryAzureVMSize = &recoveryAzureVMSize + } + case "selectedRecoveryAzureNetworkId": + if v != nil { + var selectedRecoveryAzureNetworkID string + err = json.Unmarshal(*v, &selectedRecoveryAzureNetworkID) + if err != nil { + return err + } + urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID + } + case "selectedSourceNicId": + if v != nil { + var selectedSourceNicID string + err = json.Unmarshal(*v, &selectedSourceNicID) + if err != nil { + return err + } + urpiip.SelectedSourceNicID = &selectedSourceNicID + } + case "enableRdpOnTargetOption": + if v != nil { + var enableRdpOnTargetOption string + err = json.Unmarshal(*v, &enableRdpOnTargetOption) + if err != nil { + return err + } + urpiip.EnableRdpOnTargetOption = &enableRdpOnTargetOption + } + case "vmNics": + if v != nil { + var VMNics []VMNicInputDetails + err = json.Unmarshal(*v, &VMNics) + if err != nil { + return err + } + urpiip.VMNics = &VMNics + } + case "licenseType": + if v != nil { + var licenseType LicenseType + err = json.Unmarshal(*v, &licenseType) + if err != nil { + return err + } + urpiip.LicenseType = licenseType + } + case "recoveryAvailabilitySetId": + if v != nil { + var recoveryAvailabilitySetID string + err = json.Unmarshal(*v, &recoveryAvailabilitySetID) + if err != nil { + return err + } + urpiip.RecoveryAvailabilitySetID = &recoveryAvailabilitySetID + } + case "providerSpecificDetails": + if v != nil { + providerSpecificDetails, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*v) + if err != nil { + return err + } + urpiip.ProviderSpecificDetails = providerSpecificDetails + } + } + } + + return nil +} + +// BasicUpdateReplicationProtectedItemProviderInput update replication protected item provider specific input. +type BasicUpdateReplicationProtectedItemProviderInput interface { + AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) + AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) + AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) + AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) +} + +// UpdateReplicationProtectedItemProviderInput update replication protected item provider specific input. +type UpdateReplicationProtectedItemProviderInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2' + InstanceType InstanceTypeBasicUpdateReplicationProtectedItemProviderInput `json:"instanceType,omitempty"` +} + +func unmarshalBasicUpdateReplicationProtectedItemProviderInput(body []byte) (BasicUpdateReplicationProtectedItemProviderInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeA2A): + var aurpii A2AUpdateReplicationProtectedItemInput + err := json.Unmarshal(body, &aurpii) + return aurpii, err + case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeHyperVReplicaAzure): + var hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput + err := json.Unmarshal(body, &hvraurpii) + return hvraurpii, err + case string(InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeInMageAzureV2): + var imavurpii InMageAzureV2UpdateReplicationProtectedItemInput + err := json.Unmarshal(body, &imavurpii) + return imavurpii, err + default: + var urpipi UpdateReplicationProtectedItemProviderInput + err := json.Unmarshal(body, &urpipi) + return urpipi, err + } +} +func unmarshalBasicUpdateReplicationProtectedItemProviderInputArray(body []byte) ([]BasicUpdateReplicationProtectedItemProviderInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + urpipiArray := make([]BasicUpdateReplicationProtectedItemProviderInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + urpipi, err := unmarshalBasicUpdateReplicationProtectedItemProviderInput(*rawMessage) + if err != nil { + return nil, err + } + urpipiArray[index] = urpipi + } + return urpipiArray, nil +} + +// MarshalJSON is the custom marshaler for UpdateReplicationProtectedItemProviderInput. +func (urpipi UpdateReplicationProtectedItemProviderInput) MarshalJSON() ([]byte, error) { + urpipi.InstanceType = InstanceTypeBasicUpdateReplicationProtectedItemProviderInputInstanceTypeUpdateReplicationProtectedItemProviderInput + objectMap := make(map[string]interface{}) + if urpipi.InstanceType != "" { + objectMap["instanceType"] = urpipi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. +func (urpipi UpdateReplicationProtectedItemProviderInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. +func (urpipi UpdateReplicationProtectedItemProviderInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsInMageAzureV2UpdateReplicationProtectedItemInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. +func (urpipi UpdateReplicationProtectedItemProviderInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. +func (urpipi UpdateReplicationProtectedItemProviderInput) AsUpdateReplicationProtectedItemProviderInput() (*UpdateReplicationProtectedItemProviderInput, bool) { + return &urpipi, true +} + +// AsBasicUpdateReplicationProtectedItemProviderInput is the BasicUpdateReplicationProtectedItemProviderInput implementation for UpdateReplicationProtectedItemProviderInput. +func (urpipi UpdateReplicationProtectedItemProviderInput) AsBasicUpdateReplicationProtectedItemProviderInput() (BasicUpdateReplicationProtectedItemProviderInput, bool) { + return &urpipi, true +} + +// UpdateVCenterRequest input required to update vCenter. +type UpdateVCenterRequest struct { + // Properties - The update VCenter Request Properties. + Properties *UpdateVCenterRequestProperties `json:"properties,omitempty"` +} + +// UpdateVCenterRequestProperties the properties of an update vCenter request. +type UpdateVCenterRequestProperties struct { + // FriendlyName - The friendly name of the vCenter. + FriendlyName *string `json:"friendlyName,omitempty"` + // IPAddress - The IP address of the vCenter to be discovered. + IPAddress *string `json:"ipAddress,omitempty"` + // ProcessServerID - The process server Id from where the update can be orchestrated. + ProcessServerID *string `json:"processServerId,omitempty"` + // Port - The port number for discovery. + Port *string `json:"port,omitempty"` + // RunAsAccountID - The CS account Id which has privileges to update the vCenter. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` +} + +// VaultHealthDetails vault health details definition. +type VaultHealthDetails struct { + autorest.Response `json:"-"` + // Properties - The vault health related data. + Properties *VaultHealthProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// VaultHealthProperties class to define the health summary of the Vault. +type VaultHealthProperties struct { + // VaultErrors - The list of errors on the vault. + VaultErrors *[]HealthError `json:"vaultErrors,omitempty"` + // ProtectedItemsHealth - The list of the health detail of the protected items in the vault. + ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"` + // FabricsHealth - The list of the health detail of the fabrics in the vault. + FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"` + // ContainersHealth - The list of the health detail of the containers in the vault. + ContainersHealth *ResourceHealthSummary `json:"containersHealth,omitempty"` +} + +// VaultSetting vault setting. +type VaultSetting struct { + autorest.Response `json:"-"` + // Properties - The vault setting properties. + Properties *VaultSettingProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// VaultSettingCollection vault setting collection. +type VaultSettingCollection struct { + autorest.Response `json:"-"` + // Value - The list of vault setting. + Value *[]VaultSetting `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// VaultSettingCollectionIterator provides access to a complete listing of VaultSetting values. +type VaultSettingCollectionIterator struct { + i int + page VaultSettingCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *VaultSettingCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VaultSettingCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *VaultSettingCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VaultSettingCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter VaultSettingCollectionIterator) Response() VaultSettingCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter VaultSettingCollectionIterator) Value() VaultSetting { + if !iter.page.NotDone() { + return VaultSetting{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VaultSettingCollectionIterator type. +func NewVaultSettingCollectionIterator(page VaultSettingCollectionPage) VaultSettingCollectionIterator { + return VaultSettingCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vsc VaultSettingCollection) IsEmpty() bool { + return vsc.Value == nil || len(*vsc.Value) == 0 +} + +// vaultSettingCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vsc VaultSettingCollection) vaultSettingCollectionPreparer(ctx context.Context) (*http.Request, error) { + if vsc.NextLink == nil || len(to.String(vsc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vsc.NextLink))) +} + +// VaultSettingCollectionPage contains a page of VaultSetting values. +type VaultSettingCollectionPage struct { + fn func(context.Context, VaultSettingCollection) (VaultSettingCollection, error) + vsc VaultSettingCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *VaultSettingCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VaultSettingCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.vsc) + if err != nil { + return err + } + page.vsc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *VaultSettingCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VaultSettingCollectionPage) NotDone() bool { + return !page.vsc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VaultSettingCollectionPage) Response() VaultSettingCollection { + return page.vsc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VaultSettingCollectionPage) Values() []VaultSetting { + if page.vsc.IsEmpty() { + return nil + } + return *page.vsc.Value +} + +// Creates a new instance of the VaultSettingCollectionPage type. +func NewVaultSettingCollectionPage(getNextPage func(context.Context, VaultSettingCollection) (VaultSettingCollection, error)) VaultSettingCollectionPage { + return VaultSettingCollectionPage{fn: getNextPage} +} + +// VaultSettingCreationInput input to create vault setting. +type VaultSettingCreationInput struct { + // Properties - Vault setting creation input properties. + Properties *VaultSettingCreationInputProperties `json:"properties,omitempty"` +} + +// VaultSettingCreationInputProperties input to create vault setting. +type VaultSettingCreationInputProperties struct { + // MigrationSolutionID - The migration solution Id. + MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` +} + +// VaultSettingProperties vault setting properties. +type VaultSettingProperties struct { + // MigrationSolutionID - The migration solution ARM Id. + MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` +} + +// VCenter vCenter definition. +type VCenter struct { + autorest.Response `json:"-"` + // Properties - VCenter related data. + Properties *VCenterProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource Name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource Type + Type *string `json:"type,omitempty"` + // Location - Resource Location + Location *string `json:"location,omitempty"` +} + +// VCenterCollection collection of vCenter details. +type VCenterCollection struct { + autorest.Response `json:"-"` + // Value - The vCenter details. + Value *[]VCenter `json:"value,omitempty"` + // NextLink - The value of next link. + NextLink *string `json:"nextLink,omitempty"` +} + +// VCenterCollectionIterator provides access to a complete listing of VCenter values. +type VCenterCollectionIterator struct { + i int + page VCenterCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *VCenterCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *VCenterCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter VCenterCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter VCenterCollectionIterator) Response() VCenterCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter VCenterCollectionIterator) Value() VCenter { + if !iter.page.NotDone() { + return VCenter{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the VCenterCollectionIterator type. +func NewVCenterCollectionIterator(page VCenterCollectionPage) VCenterCollectionIterator { + return VCenterCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (vcc VCenterCollection) IsEmpty() bool { + return vcc.Value == nil || len(*vcc.Value) == 0 +} + +// vCenterCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (vcc VCenterCollection) vCenterCollectionPreparer(ctx context.Context) (*http.Request, error) { + if vcc.NextLink == nil || len(to.String(vcc.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(vcc.NextLink))) +} + +// VCenterCollectionPage contains a page of VCenter values. +type VCenterCollectionPage struct { + fn func(context.Context, VCenterCollection) (VCenterCollection, error) + vcc VCenterCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *VCenterCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VCenterCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.vcc) + if err != nil { + return err + } + page.vcc = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *VCenterCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page VCenterCollectionPage) NotDone() bool { + return !page.vcc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page VCenterCollectionPage) Response() VCenterCollection { + return page.vcc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page VCenterCollectionPage) Values() []VCenter { + if page.vcc.IsEmpty() { + return nil + } + return *page.vcc.Value +} + +// Creates a new instance of the VCenterCollectionPage type. +func NewVCenterCollectionPage(getNextPage func(context.Context, VCenterCollection) (VCenterCollection, error)) VCenterCollectionPage { + return VCenterCollectionPage{fn: getNextPage} +} + +// VCenterProperties vCenter properties. +type VCenterProperties struct { + // FriendlyName - Friendly name of the vCenter. + FriendlyName *string `json:"friendlyName,omitempty"` + // InternalID - VCenter internal ID. + InternalID *string `json:"internalId,omitempty"` + // LastHeartbeat - The time when the last heartbeat was received by vCenter. + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + // DiscoveryStatus - The VCenter discovery status. + DiscoveryStatus *string `json:"discoveryStatus,omitempty"` + // ProcessServerID - The process server Id. + ProcessServerID *string `json:"processServerId,omitempty"` + // IPAddress - The IP address of the vCenter. + IPAddress *string `json:"ipAddress,omitempty"` + // InfrastructureID - The infrastructure Id of vCenter. + InfrastructureID *string `json:"infrastructureId,omitempty"` + // Port - The port number for discovery. + Port *string `json:"port,omitempty"` + // RunAsAccountID - The account Id which has privileges to discover the vCenter. + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + // FabricArmResourceName - The ARM resource name of the fabric containing this VCenter. + FabricArmResourceName *string `json:"fabricArmResourceName,omitempty"` + // HealthErrors - The health errors for this VCenter. + HealthErrors *[]HealthError `json:"healthErrors,omitempty"` +} + +// VersionDetails version related details. +type VersionDetails struct { + // Version - The agent version. + Version *string `json:"version,omitempty"` + // ExpiryDate - Version expiry date. + ExpiryDate *date.Time `json:"expiryDate,omitempty"` + // Status - A value indicating whether security update required. Possible values include: 'Supported', 'NotSupported', 'Deprecated', 'UpdateRequired', 'SecurityUpdateRequired' + Status AgentVersionStatus `json:"status,omitempty"` +} + +// VirtualMachineTaskDetails this class represents the virtual machine task details. +type VirtualMachineTaskDetails struct { + // SkippedReason - The skipped reason. + SkippedReason *string `json:"skippedReason,omitempty"` + // SkippedReasonString - The skipped reason string. + SkippedReasonString *string `json:"skippedReasonString,omitempty"` + // JobTask - The job entity. + JobTask *JobEntity `json:"jobTask,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { + vmtd.InstanceType = InstanceTypeVirtualMachineTaskDetails + objectMap := make(map[string]interface{}) + if vmtd.SkippedReason != nil { + objectMap["skippedReason"] = vmtd.SkippedReason + } + if vmtd.SkippedReasonString != nil { + objectMap["skippedReasonString"] = vmtd.SkippedReasonString + } + if vmtd.JobTask != nil { + objectMap["jobTask"] = vmtd.JobTask + } + if vmtd.InstanceType != "" { + objectMap["instanceType"] = vmtd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return &vmtd, true +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &vmtd, true +} + +// VmmDetails VMM fabric specific details. +type VmmDetails struct { + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmDetails. +func (vd VmmDetails) MarshalJSON() ([]byte, error) { + vd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM + objectMap := make(map[string]interface{}) + if vd.InstanceType != "" { + objectMap["instanceType"] = vd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVmmDetails is the BasicFabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsVmmDetails() (*VmmDetails, bool) { + return &vd, true +} + +// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false +} + +// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { + return nil, false +} + +// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { + return &vd, true +} + +// VmmToAzureCreateNetworkMappingInput create network mappings input properties/behavior specific to Vmm to +// Azure Network mapping. +type VmmToAzureCreateNetworkMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtacnmi.InstanceType = InstanceTypeVmmToAzure + objectMap := make(map[string]interface{}) + if vtacnmi.InstanceType != "" { + objectMap["instanceType"] = vtacnmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { + return &vtacnmi, true +} + +// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { + return &vtacnmi, true +} + +// VmmToAzureNetworkMappingSettings e2A Network Mapping fabric specific settings. +type VmmToAzureNetworkMappingSettings struct { + // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { + vtanms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure + objectMap := make(map[string]interface{}) + if vtanms.InstanceType != "" { + objectMap["instanceType"] = vtanms.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { + return &vtanms, true +} + +// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { + return nil, false +} + +// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { + return nil, false +} + +// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { + return &vtanms, true +} + +// VmmToAzureUpdateNetworkMappingInput update network mappings input properties/behavior specific to vmm to +// azure. +type VmmToAzureUpdateNetworkMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtaunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure + objectMap := make(map[string]interface{}) + if vtaunmi.InstanceType != "" { + objectMap["instanceType"] = vtaunmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { + return &vtaunmi, true +} + +// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { + return &vtaunmi, true +} + +// VmmToVmmCreateNetworkMappingInput create network mappings input properties/behavior specific to vmm to +// vmm Network mapping. +type VmmToVmmCreateNetworkMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreateNetworkMappingInput', 'InstanceTypeAzureToAzure', 'InstanceTypeVmmToAzure', 'InstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtvcnmi.InstanceType = InstanceTypeVmmToVmm + objectMap := make(map[string]interface{}) + if vtvcnmi.InstanceType != "" { + objectMap["instanceType"] = vtvcnmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { + return &vtvcnmi, true +} + +// AsFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsFabricSpecificCreateNetworkMappingInput() (*FabricSpecificCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificCreateNetworkMappingInput is the BasicFabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsBasicFabricSpecificCreateNetworkMappingInput() (BasicFabricSpecificCreateNetworkMappingInput, bool) { + return &vtvcnmi, true +} + +// VmmToVmmNetworkMappingSettings e2E Network Mapping fabric specific settings. +type VmmToVmmNetworkMappingSettings struct { + // InstanceType - Possible values include: 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeNetworkMappingFabricSpecificSettings', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure', 'InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) { + vtvnms.InstanceType = InstanceTypeBasicNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm + objectMap := make(map[string]interface{}) + if vtvnms.InstanceType != "" { + objectMap["instanceType"] = vtvnms.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToAzureNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToVmmNetworkMappingSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { + return &vtvnms, true +} + +// AsNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsNetworkMappingFabricSpecificSettings() (*NetworkMappingFabricSpecificSettings, bool) { + return nil, false +} + +// AsBasicNetworkMappingFabricSpecificSettings is the BasicNetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsBasicNetworkMappingFabricSpecificSettings() (BasicNetworkMappingFabricSpecificSettings, bool) { + return &vtvnms, true +} + +// VmmToVmmUpdateNetworkMappingInput update network mappings input properties/behavior specific to vmm to +// vmm. +type VmmToVmmUpdateNetworkMappingInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeFabricSpecificUpdateNetworkMappingInput', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure', 'InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm' + InstanceType InstanceTypeBasicFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtvunmi.InstanceType = InstanceTypeBasicFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm + objectMap := make(map[string]interface{}) + if vtvunmi.InstanceType != "" { + objectMap["instanceType"] = vtvunmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { + return &vtvunmi, true +} + +// AsFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsFabricSpecificUpdateNetworkMappingInput() (*FabricSpecificUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificUpdateNetworkMappingInput is the BasicFabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsBasicFabricSpecificUpdateNetworkMappingInput() (BasicFabricSpecificUpdateNetworkMappingInput, bool) { + return &vtvunmi, true +} + +// VmmVirtualMachineDetails VMM fabric provider specific VM settings. +type VmmVirtualMachineDetails struct { + // SourceItemID - The source id of the object. + SourceItemID *string `json:"sourceItemId,omitempty"` + // Generation - The id of the object in fabric. + Generation *string `json:"generation,omitempty"` + // OsDetails - The Last replication time. + OsDetails *OSDetails `json:"osDetails,omitempty"` + // DiskDetails - The Last successful failover time. + DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` + // HasPhysicalDisk - A value indicating whether the VM has a physical disk attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' + HasPhysicalDisk PresenceStatus `json:"hasPhysicalDisk,omitempty"` + // HasFibreChannelAdapter - A value indicating whether the VM has a fibre channel adapter attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' + HasFibreChannelAdapter PresenceStatus `json:"hasFibreChannelAdapter,omitempty"` + // HasSharedVhd - A value indicating whether the VM has a shared VHD attached. String value of {SrsDataContract.PresenceStatus} enum. Possible values include: 'Unknown', 'Present', 'NotPresent' + HasSharedVhd PresenceStatus `json:"hasSharedVhd,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' + InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmVirtualMachineDetails. +func (vvmd VmmVirtualMachineDetails) MarshalJSON() ([]byte, error) { + vvmd.InstanceType = InstanceTypeVmmVirtualMachine + objectMap := make(map[string]interface{}) + if vvmd.SourceItemID != nil { + objectMap["sourceItemId"] = vvmd.SourceItemID + } + if vvmd.Generation != nil { + objectMap["generation"] = vvmd.Generation + } + if vvmd.OsDetails != nil { + objectMap["osDetails"] = vvmd.OsDetails + } + if vvmd.DiskDetails != nil { + objectMap["diskDetails"] = vvmd.DiskDetails + } + if vvmd.HasPhysicalDisk != "" { + objectMap["hasPhysicalDisk"] = vvmd.HasPhysicalDisk + } + if vvmd.HasFibreChannelAdapter != "" { + objectMap["hasFibreChannelAdapter"] = vvmd.HasFibreChannelAdapter + } + if vvmd.HasSharedVhd != "" { + objectMap["hasSharedVhd"] = vvmd.HasSharedVhd + } + if vvmd.InstanceType != "" { + objectMap["instanceType"] = vvmd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. +func (vvmd VmmVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return nil, false +} + +// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. +func (vvmd VmmVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return nil, false +} + +// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. +func (vvmd VmmVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { + return &vvmd, true +} + +// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. +func (vvmd VmmVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return nil, false +} + +// AsConfigurationSettings is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. +func (vvmd VmmVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { + return nil, false +} + +// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for VmmVirtualMachineDetails. +func (vvmd VmmVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { + return &vvmd, true +} + +// VMNicDetails hyper V VM network details. +type VMNicDetails struct { + // NicID - The nic Id. + NicID *string `json:"nicId,omitempty"` + // ReplicaNicID - The replica nic Id. + ReplicaNicID *string `json:"replicaNicId,omitempty"` + // SourceNicArmID - The source nic ARM Id. + SourceNicArmID *string `json:"sourceNicArmId,omitempty"` + // VMSubnetName - VM subnet name. + VMSubnetName *string `json:"vMSubnetName,omitempty"` + // VMNetworkName - VM network name. + VMNetworkName *string `json:"vMNetworkName,omitempty"` + // RecoveryVMNetworkID - Recovery VM network Id. + RecoveryVMNetworkID *string `json:"recoveryVMNetworkId,omitempty"` + // RecoveryVMSubnetName - Recovery VM subnet name. + RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"` + // IPAddressType - Ip address type. + IPAddressType *string `json:"ipAddressType,omitempty"` + // PrimaryNicStaticIPAddress - Primary nic static IP address. + PrimaryNicStaticIPAddress *string `json:"primaryNicStaticIPAddress,omitempty"` + // ReplicaNicStaticIPAddress - Replica nic static IP address. + ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"` + // SelectionType - Selection type for failover. + SelectionType *string `json:"selectionType,omitempty"` + // RecoveryNicIPAddressType - IP allocation type for recovery VM. + RecoveryNicIPAddressType *string `json:"recoveryNicIpAddressType,omitempty"` + // RecoveryPublicIPAddressID - The id of the public IP address resource associated with the NIC. + RecoveryPublicIPAddressID *string `json:"recoveryPublicIpAddressId,omitempty"` + // RecoveryNetworkSecurityGroupID - The id of the NSG associated with the NIC. + RecoveryNetworkSecurityGroupID *string `json:"recoveryNetworkSecurityGroupId,omitempty"` + // RecoveryLBBackendAddressPoolIds - The target backend address pools for the NIC. + RecoveryLBBackendAddressPoolIds *[]string `json:"recoveryLBBackendAddressPoolIds,omitempty"` + // EnableAcceleratedNetworkingOnRecovery - A value indicating whether the NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` +} + +// VMNicInputDetails hyper V VM network input details. +type VMNicInputDetails struct { + // NicID - The nic Id. + NicID *string `json:"nicId,omitempty"` + // RecoveryVMSubnetName - Recovery VM subnet name. + RecoveryVMSubnetName *string `json:"recoveryVMSubnetName,omitempty"` + // ReplicaNicStaticIPAddress - Replica nic static IP address. + ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"` + // SelectionType - Selection type for failover. + SelectionType *string `json:"selectionType,omitempty"` + // RecoveryPublicIPAddressID - The id of the public IP address resource associated with the NIC. + RecoveryPublicIPAddressID *string `json:"recoveryPublicIpAddressId,omitempty"` + // RecoveryNetworkSecurityGroupID - The id of the NSG associated with the NIC. + RecoveryNetworkSecurityGroupID *string `json:"recoveryNetworkSecurityGroupId,omitempty"` + // RecoveryLBBackendAddressPoolIds - The target backend address pools for the NIC. + RecoveryLBBackendAddressPoolIds *[]string `json:"recoveryLBBackendAddressPoolIds,omitempty"` + // EnableAcceleratedNetworkingOnRecovery - Whether the NIC has accelerated networking enabled. + EnableAcceleratedNetworkingOnRecovery *bool `json:"enableAcceleratedNetworkingOnRecovery,omitempty"` +} + +// VMNicUpdatesTaskDetails this class represents the vm NicUpdates task details. +type VMNicUpdatesTaskDetails struct { + // VMID - Virtual machine Id. + VMID *string `json:"vmId,omitempty"` + // NicID - Nic Id. + NicID *string `json:"nicId,omitempty"` + // Name - Name of the Nic. + Name *string `json:"name,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeTaskTypeDetails', 'InstanceTypeAutomationRunbookTaskDetails', 'InstanceTypeConsistencyCheckTaskDetails', 'InstanceTypeFabricReplicationGroupTaskDetails', 'InstanceTypeJobTaskDetails', 'InstanceTypeManualActionTaskDetails', 'InstanceTypeScriptActionTaskDetails', 'InstanceTypeVirtualMachineTaskDetails', 'InstanceTypeVMNicUpdatesTaskDetails' + InstanceType InstanceTypeBasicTaskTypeDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { + vnutd.InstanceType = InstanceTypeVMNicUpdatesTaskDetails + objectMap := make(map[string]interface{}) + if vnutd.VMID != nil { + objectMap["vmId"] = vnutd.VMID + } + if vnutd.NicID != nil { + objectMap["nicId"] = vnutd.NicID + } + if vnutd.Name != nil { + objectMap["name"] = vnutd.Name + } + if vnutd.InstanceType != "" { + objectMap["instanceType"] = vnutd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAutomationRunbookTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsJobTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return &vnutd, true +} + +// AsTaskTypeDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsTaskTypeDetails() (*TaskTypeDetails, bool) { + return nil, false +} + +// AsBasicTaskTypeDetails is the BasicTaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsBasicTaskTypeDetails() (BasicTaskTypeDetails, bool) { + return &vnutd, true +} + +// VMwareCbtContainerCreationInput vMwareCbt container creation input. +type VMwareCbtContainerCreationInput struct { + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeReplicationProviderSpecificContainerCreationInput', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero' + InstanceType InstanceTypeBasicReplicationProviderSpecificContainerCreationInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtContainerCreationInput. +func (vmccci VMwareCbtContainerCreationInput) MarshalJSON() ([]byte, error) { + vmccci.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerCreationInputInstanceTypeSixcSevendaFourFiveFiveFiveZeroSixfFourThreeffAOneSixaEightebOneZeroOneaebbSevenZero + objectMap := make(map[string]interface{}) + if vmccci.InstanceType != "" { + objectMap["instanceType"] = vmccci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. +func (vmccci VMwareCbtContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. +func (vmccci VMwareCbtContainerCreationInput) AsVMwareCbtContainerCreationInput() (*VMwareCbtContainerCreationInput, bool) { + return &vmccci, true +} + +// AsReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. +func (vmccci VMwareCbtContainerCreationInput) AsReplicationProviderSpecificContainerCreationInput() (*ReplicationProviderSpecificContainerCreationInput, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificContainerCreationInput is the BasicReplicationProviderSpecificContainerCreationInput implementation for VMwareCbtContainerCreationInput. +func (vmccci VMwareCbtContainerCreationInput) AsBasicReplicationProviderSpecificContainerCreationInput() (BasicReplicationProviderSpecificContainerCreationInput, bool) { + return &vmccci, true +} + +// VMwareCbtContainerMappingInput vMwareCbt container mapping input. +type VMwareCbtContainerMappingInput struct { + // KeyVaultID - The target key vault ARM Id. + KeyVaultID *string `json:"keyVaultId,omitempty"` + // KeyVaultURI - The target key vault URL. + KeyVaultURI *string `json:"keyVaultUri,omitempty"` + // StorageAccountID - The storage account ARM Id. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // StorageAccountSasSecretName - The secret name of the storage account. + StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"` + // ServiceBusConnectionStringSecretName - The secret name of the service bus connection string. + ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"` + // TargetLocation - The target location. + TargetLocation *string `json:"targetLocation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeReplicationProviderSpecificContainerMappingInput', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeA2A', 'InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicReplicationProviderSpecificContainerMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtContainerMappingInput. +func (vmccmi VMwareCbtContainerMappingInput) MarshalJSON() ([]byte, error) { + vmccmi.InstanceType = InstanceTypeBasicReplicationProviderSpecificContainerMappingInputInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmccmi.KeyVaultID != nil { + objectMap["keyVaultId"] = vmccmi.KeyVaultID + } + if vmccmi.KeyVaultURI != nil { + objectMap["keyVaultUri"] = vmccmi.KeyVaultURI + } + if vmccmi.StorageAccountID != nil { + objectMap["storageAccountId"] = vmccmi.StorageAccountID + } + if vmccmi.StorageAccountSasSecretName != nil { + objectMap["storageAccountSasSecretName"] = vmccmi.StorageAccountSasSecretName + } + if vmccmi.ServiceBusConnectionStringSecretName != nil { + objectMap["serviceBusConnectionStringSecretName"] = vmccmi.ServiceBusConnectionStringSecretName + } + if vmccmi.TargetLocation != nil { + objectMap["targetLocation"] = vmccmi.TargetLocation + } + if vmccmi.InstanceType != "" { + objectMap["instanceType"] = vmccmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. +func (vmccmi VMwareCbtContainerMappingInput) AsA2AContainerMappingInput() (*A2AContainerMappingInput, bool) { + return nil, false +} + +// AsVMwareCbtContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. +func (vmccmi VMwareCbtContainerMappingInput) AsVMwareCbtContainerMappingInput() (*VMwareCbtContainerMappingInput, bool) { + return &vmccmi, true +} + +// AsReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. +func (vmccmi VMwareCbtContainerMappingInput) AsReplicationProviderSpecificContainerMappingInput() (*ReplicationProviderSpecificContainerMappingInput, bool) { + return nil, false +} + +// AsBasicReplicationProviderSpecificContainerMappingInput is the BasicReplicationProviderSpecificContainerMappingInput implementation for VMwareCbtContainerMappingInput. +func (vmccmi VMwareCbtContainerMappingInput) AsBasicReplicationProviderSpecificContainerMappingInput() (BasicReplicationProviderSpecificContainerMappingInput, bool) { + return &vmccmi, true +} + +// VMwareCbtDiskInput vMwareCbt disk input. +type VMwareCbtDiskInput struct { + // DiskID - The disk Id. + DiskID *string `json:"diskId,omitempty"` + // IsOSDisk - A value indicating whether the disk is the OS disk. + IsOSDisk *string `json:"isOSDisk,omitempty"` + // LogStorageAccountID - The log storage account ARM Id. + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + // LogStorageAccountSasSecretName - The key vault secret name of the log storage account. + LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"` + // DiskType - The disk type. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS' + DiskType DiskAccountType `json:"diskType,omitempty"` +} + +// VMwareCbtEnableMigrationInput vMwareCbt specific enable migration input. +type VMwareCbtEnableMigrationInput struct { + // VmwareMachineID - The ARM Id of the VM discovered in VMware. + VmwareMachineID *string `json:"vmwareMachineId,omitempty"` + // DisksToInclude - The disks to include list. + DisksToInclude *[]VMwareCbtDiskInput `json:"disksToInclude,omitempty"` + // LicenseType - License type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' + LicenseType LicenseType `json:"licenseType,omitempty"` + // DataMoverRunAsAccountID - The data mover RunAs account Id. + DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"` + // SnapshotRunAsAccountID - The snapshot RunAs account Id. + SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"` + // TargetVMName - The target VM name. + TargetVMName *string `json:"targetVmName,omitempty"` + // TargetVMSize - The target VM size. + TargetVMSize *string `json:"targetVmSize,omitempty"` + // TargetResourceGroupID - The target resource group ARM Id. + TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` + // TargetNetworkID - The target network ARM Id. + TargetNetworkID *string `json:"targetNetworkId,omitempty"` + // TargetSubnetName - The target subnet name. + TargetSubnetName *string `json:"targetSubnetName,omitempty"` + // TargetAvailabilitySetID - The target availability set ARM Id. + TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` + // TargetBootDiagnosticsStorageAccountID - The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeEnableMigrationProviderSpecificInput', 'InstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicEnableMigrationProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtEnableMigrationInput. +func (vmcemi VMwareCbtEnableMigrationInput) MarshalJSON() ([]byte, error) { + vmcemi.InstanceType = InstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmcemi.VmwareMachineID != nil { + objectMap["vmwareMachineId"] = vmcemi.VmwareMachineID + } + if vmcemi.DisksToInclude != nil { + objectMap["disksToInclude"] = vmcemi.DisksToInclude + } + if vmcemi.LicenseType != "" { + objectMap["licenseType"] = vmcemi.LicenseType + } + if vmcemi.DataMoverRunAsAccountID != nil { + objectMap["dataMoverRunAsAccountId"] = vmcemi.DataMoverRunAsAccountID + } + if vmcemi.SnapshotRunAsAccountID != nil { + objectMap["snapshotRunAsAccountId"] = vmcemi.SnapshotRunAsAccountID + } + if vmcemi.TargetVMName != nil { + objectMap["targetVmName"] = vmcemi.TargetVMName + } + if vmcemi.TargetVMSize != nil { + objectMap["targetVmSize"] = vmcemi.TargetVMSize + } + if vmcemi.TargetResourceGroupID != nil { + objectMap["targetResourceGroupId"] = vmcemi.TargetResourceGroupID + } + if vmcemi.TargetNetworkID != nil { + objectMap["targetNetworkId"] = vmcemi.TargetNetworkID + } + if vmcemi.TargetSubnetName != nil { + objectMap["targetSubnetName"] = vmcemi.TargetSubnetName + } + if vmcemi.TargetAvailabilitySetID != nil { + objectMap["targetAvailabilitySetId"] = vmcemi.TargetAvailabilitySetID + } + if vmcemi.TargetBootDiagnosticsStorageAccountID != nil { + objectMap["targetBootDiagnosticsStorageAccountId"] = vmcemi.TargetBootDiagnosticsStorageAccountID + } + if vmcemi.InstanceType != "" { + objectMap["instanceType"] = vmcemi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtEnableMigrationInput is the BasicEnableMigrationProviderSpecificInput implementation for VMwareCbtEnableMigrationInput. +func (vmcemi VMwareCbtEnableMigrationInput) AsVMwareCbtEnableMigrationInput() (*VMwareCbtEnableMigrationInput, bool) { + return &vmcemi, true +} + +// AsEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for VMwareCbtEnableMigrationInput. +func (vmcemi VMwareCbtEnableMigrationInput) AsEnableMigrationProviderSpecificInput() (*EnableMigrationProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicEnableMigrationProviderSpecificInput is the BasicEnableMigrationProviderSpecificInput implementation for VMwareCbtEnableMigrationInput. +func (vmcemi VMwareCbtEnableMigrationInput) AsBasicEnableMigrationProviderSpecificInput() (BasicEnableMigrationProviderSpecificInput, bool) { + return &vmcemi, true +} + +// VMwareCbtMigrateInput vMwareCbt specific migrate input. +type VMwareCbtMigrateInput struct { + // PerformShutdown - A value indicating whether VM is to be shutdown. + PerformShutdown *string `json:"performShutdown,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeMigrateProviderSpecificInput', 'InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicMigrateProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtMigrateInput. +func (vmcmi VMwareCbtMigrateInput) MarshalJSON() ([]byte, error) { + vmcmi.InstanceType = InstanceTypeBasicMigrateProviderSpecificInputInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmcmi.PerformShutdown != nil { + objectMap["performShutdown"] = vmcmi.PerformShutdown + } + if vmcmi.InstanceType != "" { + objectMap["instanceType"] = vmcmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtMigrateInput is the BasicMigrateProviderSpecificInput implementation for VMwareCbtMigrateInput. +func (vmcmi VMwareCbtMigrateInput) AsVMwareCbtMigrateInput() (*VMwareCbtMigrateInput, bool) { + return &vmcmi, true +} + +// AsMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for VMwareCbtMigrateInput. +func (vmcmi VMwareCbtMigrateInput) AsMigrateProviderSpecificInput() (*MigrateProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicMigrateProviderSpecificInput is the BasicMigrateProviderSpecificInput implementation for VMwareCbtMigrateInput. +func (vmcmi VMwareCbtMigrateInput) AsBasicMigrateProviderSpecificInput() (BasicMigrateProviderSpecificInput, bool) { + return &vmcmi, true +} + +// VMwareCbtMigrationDetails vMwareCbt provider specific settings +type VMwareCbtMigrationDetails struct { + // VmwareMachineID - READ-ONLY; The ARM Id of the VM discovered in VMware. + VmwareMachineID *string `json:"vmwareMachineId,omitempty"` + // OsType - READ-ONLY; The type of the OS on the VM. + OsType *string `json:"osType,omitempty"` + // LicenseType - License Type of the VM to be used. + LicenseType *string `json:"licenseType,omitempty"` + // DataMoverRunAsAccountID - READ-ONLY; The data mover RunAs account Id. + DataMoverRunAsAccountID *string `json:"dataMoverRunAsAccountId,omitempty"` + // SnapshotRunAsAccountID - READ-ONLY; The snapshot RunAs account Id. + SnapshotRunAsAccountID *string `json:"snapshotRunAsAccountId,omitempty"` + // TargetVMName - Target VM name. + TargetVMName *string `json:"targetVmName,omitempty"` + // TargetVMSize - The target VM size. + TargetVMSize *string `json:"targetVmSize,omitempty"` + // TargetLocation - READ-ONLY; The target location. + TargetLocation *string `json:"targetLocation,omitempty"` + // TargetResourceGroupID - The target resource group Id. + TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` + // TargetAvailabilitySetID - The target availability set Id. + TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` + // TargetBootDiagnosticsStorageAccountID - The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` + // ProtectedDisks - The list of protected disks. + ProtectedDisks *[]VMwareCbtProtectedDiskDetails `json:"protectedDisks,omitempty"` + // TargetNetworkID - The target network Id. + TargetNetworkID *string `json:"targetNetworkId,omitempty"` + // VMNics - The network details. + VMNics *[]VMwareCbtNicDetails `json:"vmNics,omitempty"` + // MigrationRecoveryPointID - READ-ONLY; The recovery point Id to which the VM was migrated. + MigrationRecoveryPointID *string `json:"migrationRecoveryPointId,omitempty"` + // LastRecoveryPointReceived - READ-ONLY; The last recovery point received time. + LastRecoveryPointReceived *date.Time `json:"lastRecoveryPointReceived,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeMigrationProviderSpecificSettings', 'InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicMigrationProviderSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtMigrationDetails. +func (vmcmd VMwareCbtMigrationDetails) MarshalJSON() ([]byte, error) { + vmcmd.InstanceType = InstanceTypeBasicMigrationProviderSpecificSettingsInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmcmd.LicenseType != nil { + objectMap["licenseType"] = vmcmd.LicenseType + } + if vmcmd.TargetVMName != nil { + objectMap["targetVmName"] = vmcmd.TargetVMName + } + if vmcmd.TargetVMSize != nil { + objectMap["targetVmSize"] = vmcmd.TargetVMSize + } + if vmcmd.TargetResourceGroupID != nil { + objectMap["targetResourceGroupId"] = vmcmd.TargetResourceGroupID + } + if vmcmd.TargetAvailabilitySetID != nil { + objectMap["targetAvailabilitySetId"] = vmcmd.TargetAvailabilitySetID + } + if vmcmd.TargetBootDiagnosticsStorageAccountID != nil { + objectMap["targetBootDiagnosticsStorageAccountId"] = vmcmd.TargetBootDiagnosticsStorageAccountID + } + if vmcmd.ProtectedDisks != nil { + objectMap["protectedDisks"] = vmcmd.ProtectedDisks + } + if vmcmd.TargetNetworkID != nil { + objectMap["targetNetworkId"] = vmcmd.TargetNetworkID + } + if vmcmd.VMNics != nil { + objectMap["vmNics"] = vmcmd.VMNics + } + if vmcmd.InstanceType != "" { + objectMap["instanceType"] = vmcmd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtMigrationDetails is the BasicMigrationProviderSpecificSettings implementation for VMwareCbtMigrationDetails. +func (vmcmd VMwareCbtMigrationDetails) AsVMwareCbtMigrationDetails() (*VMwareCbtMigrationDetails, bool) { + return &vmcmd, true +} + +// AsMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for VMwareCbtMigrationDetails. +func (vmcmd VMwareCbtMigrationDetails) AsMigrationProviderSpecificSettings() (*MigrationProviderSpecificSettings, bool) { + return nil, false +} + +// AsBasicMigrationProviderSpecificSettings is the BasicMigrationProviderSpecificSettings implementation for VMwareCbtMigrationDetails. +func (vmcmd VMwareCbtMigrationDetails) AsBasicMigrationProviderSpecificSettings() (BasicMigrationProviderSpecificSettings, bool) { + return &vmcmd, true +} + +// VMwareCbtNicDetails vMwareCbt NIC details. +type VMwareCbtNicDetails struct { + // NicID - READ-ONLY; The NIC Id. + NicID *string `json:"nicId,omitempty"` + // IsPrimaryNic - A value indicating whether this is the primary NIC. + IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` + // SourceIPAddress - READ-ONLY; The source IP address. + SourceIPAddress *string `json:"sourceIPAddress,omitempty"` + // SourceIPAddressType - READ-ONLY; The source IP address type. Possible values include: 'Dynamic', 'Static' + SourceIPAddressType EthernetAddressType `json:"sourceIPAddressType,omitempty"` + // SourceNetworkID - READ-ONLY; Source network Id. + SourceNetworkID *string `json:"sourceNetworkId,omitempty"` + // TargetIPAddress - The target IP address. + TargetIPAddress *string `json:"targetIPAddress,omitempty"` + // TargetIPAddressType - The target IP address type. Possible values include: 'Dynamic', 'Static' + TargetIPAddressType EthernetAddressType `json:"targetIPAddressType,omitempty"` + // TargetSubnetName - Target subnet name. + TargetSubnetName *string `json:"targetSubnetName,omitempty"` + // IsSelectedForMigration - A value indicating whether this NIC is selected for migration. + IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"` +} + +// VMwareCbtNicInput vMwareCbt NIC input. +type VMwareCbtNicInput struct { + // NicID - The NIC Id. + NicID *string `json:"nicId,omitempty"` + // IsPrimaryNic - A value indicating whether this is the primary NIC. + IsPrimaryNic *string `json:"isPrimaryNic,omitempty"` + // TargetSubnetName - Target subnet name. + TargetSubnetName *string `json:"targetSubnetName,omitempty"` + // TargetStaticIPAddress - The static IP address. + TargetStaticIPAddress *string `json:"targetStaticIPAddress,omitempty"` + // IsSelectedForMigration - A value indicating whether this NIC is selected for migration. + IsSelectedForMigration *string `json:"isSelectedForMigration,omitempty"` +} + +// VMwareCbtPolicyCreationInput vMware Cbt policy creation input. +type VMwareCbtPolicyCreationInput struct { + // RecoveryPointHistoryInMinutes - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` + // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency (in minutes). + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency (in minutes). + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypePolicyProviderSpecificInput', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { + vmcpci.InstanceType = InstanceTypeBasicPolicyProviderSpecificInputInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmcpci.RecoveryPointHistoryInMinutes != nil { + objectMap["recoveryPointHistoryInMinutes"] = vmcpci.RecoveryPointHistoryInMinutes + } + if vmcpci.CrashConsistentFrequencyInMinutes != nil { + objectMap["crashConsistentFrequencyInMinutes"] = vmcpci.CrashConsistentFrequencyInMinutes + } + if vmcpci.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = vmcpci.AppConsistentFrequencyInMinutes + } + if vmcpci.InstanceType != "" { + objectMap["instanceType"] = vmcpci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return &vmcpci, true +} + +// AsPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsPolicyProviderSpecificInput() (*PolicyProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificInput is the BasicPolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsBasicPolicyProviderSpecificInput() (BasicPolicyProviderSpecificInput, bool) { + return &vmcpci, true +} + +// VmwareCbtPolicyDetails vMware Cbt specific policy details. +type VmwareCbtPolicyDetails struct { + // RecoveryPointHistoryInMinutes - The duration in minutes until which the recovery points need to be stored. + RecoveryPointHistoryInMinutes *int32 `json:"recoveryPointHistoryInMinutes,omitempty"` + // AppConsistentFrequencyInMinutes - The app consistent snapshot frequency in minutes. + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + // CrashConsistentFrequencyInMinutes - The crash consistent snapshot frequency in minutes. + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypePolicyProviderSpecificDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageAzureV2', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeInMage', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration', 'InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicPolicyProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { + vcpd.InstanceType = InstanceTypeBasicPolicyProviderSpecificDetailsInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vcpd.RecoveryPointHistoryInMinutes != nil { + objectMap["recoveryPointHistoryInMinutes"] = vcpd.RecoveryPointHistoryInMinutes + } + if vcpd.AppConsistentFrequencyInMinutes != nil { + objectMap["appConsistentFrequencyInMinutes"] = vcpd.AppConsistentFrequencyInMinutes + } + if vcpd.CrashConsistentFrequencyInMinutes != nil { + objectMap["crashConsistentFrequencyInMinutes"] = vcpd.CrashConsistentFrequencyInMinutes + } + if vcpd.InstanceType != "" { + objectMap["instanceType"] = vcpd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2APolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzurePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return &vcpd, true +} + +// AsPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsPolicyProviderSpecificDetails() (*PolicyProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicPolicyProviderSpecificDetails is the BasicPolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsBasicPolicyProviderSpecificDetails() (BasicPolicyProviderSpecificDetails, bool) { + return &vcpd, true +} + +// VMwareCbtProtectedDiskDetails vMwareCbt protected disk details. +type VMwareCbtProtectedDiskDetails struct { + // DiskID - READ-ONLY; The disk id. + DiskID *string `json:"diskId,omitempty"` + // DiskName - READ-ONLY; The disk name. + DiskName *string `json:"diskName,omitempty"` + // DiskPath - READ-ONLY; The disk path. + DiskPath *string `json:"diskPath,omitempty"` + // IsOSDisk - READ-ONLY; A value indicating whether the disk is the OS disk. + IsOSDisk *string `json:"isOSDisk,omitempty"` + // CapacityInBytes - READ-ONLY; The disk capacity in bytes. + CapacityInBytes *int64 `json:"capacityInBytes,omitempty"` + // LogStorageAccountID - READ-ONLY; The log storage account ARM Id. + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + // LogStorageAccountSasSecretName - READ-ONLY; The key vault secret name of the log storage account. + LogStorageAccountSasSecretName *string `json:"logStorageAccountSasSecretName,omitempty"` + // SeedManagedDiskID - READ-ONLY; The ARM Id of the seed managed disk. + SeedManagedDiskID *string `json:"seedManagedDiskId,omitempty"` + // TargetManagedDiskID - READ-ONLY; The ARM Id of the target managed disk. + TargetManagedDiskID *string `json:"targetManagedDiskId,omitempty"` + // DiskType - The disk type. Possible values include: 'DiskTypeStandardLRS', 'DiskTypePremiumLRS', 'DiskTypeStandardSSDLRS' + DiskType DiskType `json:"diskType,omitempty"` +} + +// VMwareCbtProtectionContainerMappingDetails vMwareCbt provider specific container mapping details. +type VMwareCbtProtectionContainerMappingDetails struct { + // KeyVaultID - READ-ONLY; The target key vault ARM Id. + KeyVaultID *string `json:"keyVaultId,omitempty"` + // KeyVaultURI - READ-ONLY; The target key vault URI. + KeyVaultURI *string `json:"keyVaultUri,omitempty"` + // StorageAccountID - READ-ONLY; The storage account ARM Id. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // StorageAccountSasSecretName - READ-ONLY; The secret name of the storage account. + StorageAccountSasSecretName *string `json:"storageAccountSasSecretName,omitempty"` + // ServiceBusConnectionStringSecretName - READ-ONLY; The secret name of the service bus connection string. + ServiceBusConnectionStringSecretName *string `json:"serviceBusConnectionStringSecretName,omitempty"` + // TargetLocation - READ-ONLY; The target location. + TargetLocation *string `json:"targetLocation,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeProtectionContainerMappingProviderSpecificDetails', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeA2A', 'InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicProtectionContainerMappingProviderSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtProtectionContainerMappingDetails. +func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) MarshalJSON() ([]byte, error) { + vmcpcmd.InstanceType = InstanceTypeBasicProtectionContainerMappingProviderSpecificDetailsInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmcpcmd.InstanceType != "" { + objectMap["instanceType"] = vmcpcmd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsA2AProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. +func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsA2AProtectionContainerMappingDetails() (*A2AProtectionContainerMappingDetails, bool) { + return nil, false +} + +// AsVMwareCbtProtectionContainerMappingDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. +func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsVMwareCbtProtectionContainerMappingDetails() (*VMwareCbtProtectionContainerMappingDetails, bool) { + return &vmcpcmd, true +} + +// AsProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. +func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsProtectionContainerMappingProviderSpecificDetails() (*ProtectionContainerMappingProviderSpecificDetails, bool) { + return nil, false +} + +// AsBasicProtectionContainerMappingProviderSpecificDetails is the BasicProtectionContainerMappingProviderSpecificDetails implementation for VMwareCbtProtectionContainerMappingDetails. +func (vmcpcmd VMwareCbtProtectionContainerMappingDetails) AsBasicProtectionContainerMappingProviderSpecificDetails() (BasicProtectionContainerMappingProviderSpecificDetails, bool) { + return &vmcpcmd, true +} + +// VMwareCbtTestMigrateInput vMwareCbt specific test migrate input. +type VMwareCbtTestMigrateInput struct { + // RecoveryPointID - The recovery point Id. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // NetworkID - The test network Id. + NetworkID *string `json:"networkId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeTestMigrateProviderSpecificInput', 'InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicTestMigrateProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtTestMigrateInput. +func (vmctmi VMwareCbtTestMigrateInput) MarshalJSON() ([]byte, error) { + vmctmi.InstanceType = InstanceTypeBasicTestMigrateProviderSpecificInputInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmctmi.RecoveryPointID != nil { + objectMap["recoveryPointId"] = vmctmi.RecoveryPointID + } + if vmctmi.NetworkID != nil { + objectMap["networkId"] = vmctmi.NetworkID + } + if vmctmi.InstanceType != "" { + objectMap["instanceType"] = vmctmi.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtTestMigrateInput is the BasicTestMigrateProviderSpecificInput implementation for VMwareCbtTestMigrateInput. +func (vmctmi VMwareCbtTestMigrateInput) AsVMwareCbtTestMigrateInput() (*VMwareCbtTestMigrateInput, bool) { + return &vmctmi, true +} + +// AsTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for VMwareCbtTestMigrateInput. +func (vmctmi VMwareCbtTestMigrateInput) AsTestMigrateProviderSpecificInput() (*TestMigrateProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicTestMigrateProviderSpecificInput is the BasicTestMigrateProviderSpecificInput implementation for VMwareCbtTestMigrateInput. +func (vmctmi VMwareCbtTestMigrateInput) AsBasicTestMigrateProviderSpecificInput() (BasicTestMigrateProviderSpecificInput, bool) { + return &vmctmi, true +} + +// VMwareCbtUpdateMigrationItemInput vMwareCbt specific update migration item input. +type VMwareCbtUpdateMigrationItemInput struct { + // TargetVMName - The target VM name. + TargetVMName *string `json:"targetVmName,omitempty"` + // TargetVMSize - The target VM size. + TargetVMSize *string `json:"targetVmSize,omitempty"` + // TargetResourceGroupID - The target resource group ARM Id. + TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` + // TargetAvailabilitySetID - The target availability set ARM Id. + TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` + // TargetBootDiagnosticsStorageAccountID - The target boot diagnostics storage account ARM Id. + TargetBootDiagnosticsStorageAccountID *string `json:"targetBootDiagnosticsStorageAccountId,omitempty"` + // TargetNetworkID - The target network ARM Id. + TargetNetworkID *string `json:"targetNetworkId,omitempty"` + // VMNics - The list of NIC details. + VMNics *[]VMwareCbtNicInput `json:"vmNics,omitempty"` + // LicenseType - The license type. Possible values include: 'LicenseTypeNotSpecified', 'LicenseTypeNoLicenseType', 'LicenseTypeWindowsServer' + LicenseType LicenseType `json:"licenseType,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeUpdateMigrationItemProviderSpecificInput', 'InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt' + InstanceType InstanceTypeBasicUpdateMigrationItemProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtUpdateMigrationItemInput. +func (vmcumii VMwareCbtUpdateMigrationItemInput) MarshalJSON() ([]byte, error) { + vmcumii.InstanceType = InstanceTypeBasicUpdateMigrationItemProviderSpecificInputInstanceTypeVMwareCbt + objectMap := make(map[string]interface{}) + if vmcumii.TargetVMName != nil { + objectMap["targetVmName"] = vmcumii.TargetVMName + } + if vmcumii.TargetVMSize != nil { + objectMap["targetVmSize"] = vmcumii.TargetVMSize + } + if vmcumii.TargetResourceGroupID != nil { + objectMap["targetResourceGroupId"] = vmcumii.TargetResourceGroupID + } + if vmcumii.TargetAvailabilitySetID != nil { + objectMap["targetAvailabilitySetId"] = vmcumii.TargetAvailabilitySetID + } + if vmcumii.TargetBootDiagnosticsStorageAccountID != nil { + objectMap["targetBootDiagnosticsStorageAccountId"] = vmcumii.TargetBootDiagnosticsStorageAccountID + } + if vmcumii.TargetNetworkID != nil { + objectMap["targetNetworkId"] = vmcumii.TargetNetworkID + } + if vmcumii.VMNics != nil { + objectMap["vmNics"] = vmcumii.VMNics + } + if vmcumii.LicenseType != "" { + objectMap["licenseType"] = vmcumii.LicenseType + } + if vmcumii.InstanceType != "" { + objectMap["instanceType"] = vmcumii.InstanceType + } + return json.Marshal(objectMap) +} + +// AsVMwareCbtUpdateMigrationItemInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for VMwareCbtUpdateMigrationItemInput. +func (vmcumii VMwareCbtUpdateMigrationItemInput) AsVMwareCbtUpdateMigrationItemInput() (*VMwareCbtUpdateMigrationItemInput, bool) { + return &vmcumii, true +} + +// AsUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for VMwareCbtUpdateMigrationItemInput. +func (vmcumii VMwareCbtUpdateMigrationItemInput) AsUpdateMigrationItemProviderSpecificInput() (*UpdateMigrationItemProviderSpecificInput, bool) { + return nil, false +} + +// AsBasicUpdateMigrationItemProviderSpecificInput is the BasicUpdateMigrationItemProviderSpecificInput implementation for VMwareCbtUpdateMigrationItemInput. +func (vmcumii VMwareCbtUpdateMigrationItemInput) AsBasicUpdateMigrationItemProviderSpecificInput() (BasicUpdateMigrationItemProviderSpecificInput, bool) { + return &vmcumii, true +} + +// VMwareDetails store the fabric details specific to the VMware fabric. +type VMwareDetails struct { + // ProcessServers - The list of Process Servers associated with the fabric. + ProcessServers *[]ProcessServer `json:"processServers,omitempty"` + // MasterTargetServers - The list of Master Target servers associated with the fabric. + MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"` + // RunAsAccounts - The list of run as accounts created on the server. + RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"` + // ReplicationPairCount - The number of replication pairs configured in this CS. + ReplicationPairCount *string `json:"replicationPairCount,omitempty"` + // ProcessServerCount - The number of process servers. + ProcessServerCount *string `json:"processServerCount,omitempty"` + // AgentCount - The number of source and target servers configured to talk to this CS. + AgentCount *string `json:"agentCount,omitempty"` + // ProtectedServers - The number of protected servers. + ProtectedServers *string `json:"protectedServers,omitempty"` + // SystemLoad - The percentage of the system load. + SystemLoad *string `json:"systemLoad,omitempty"` + // SystemLoadStatus - The system load status. + SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` + // CPULoad - The percentage of the CPU load. + CPULoad *string `json:"cpuLoad,omitempty"` + // CPULoadStatus - The CPU load status. + CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` + // TotalMemoryInBytes - The total memory. + TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` + // AvailableMemoryInBytes - The available memory. + AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` + // MemoryUsageStatus - The memory usage status. + MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` + // TotalSpaceInBytes - The total space. + TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` + // AvailableSpaceInBytes - The available space. + AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` + // SpaceUsageStatus - The space usage status. + SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` + // WebLoad - The web load. + WebLoad *string `json:"webLoad,omitempty"` + // WebLoadStatus - The web load status. + WebLoadStatus *string `json:"webLoadStatus,omitempty"` + // DatabaseServerLoad - The database server load. + DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"` + // DatabaseServerLoadStatus - The database server load status. + DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"` + // CsServiceStatus - The CS service status. + CsServiceStatus *string `json:"csServiceStatus,omitempty"` + // IPAddress - The IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // AgentVersion - The agent Version. + AgentVersion *string `json:"agentVersion,omitempty"` + // HostName - The host name. + HostName *string `json:"hostName,omitempty"` + // LastHeartbeat - The last heartbeat received from CS server. + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + // VersionStatus - Version status + VersionStatus *string `json:"versionStatus,omitempty"` + // SslCertExpiryDate - CS SSL cert expiry date. + SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` + // SslCertExpiryRemainingDays - CS SSL cert expiry date. + SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` + // PsTemplateVersion - PS template version. + PsTemplateVersion *string `json:"psTemplateVersion,omitempty"` + // AgentExpiryDate - Agent expiry date. + AgentExpiryDate *date.Time `json:"agentExpiryDate,omitempty"` + // AgentVersionDetails - The agent version details. + AgentVersionDetails *VersionDetails `json:"agentVersionDetails,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareDetails. +func (vmd VMwareDetails) MarshalJSON() ([]byte, error) { + vmd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware + objectMap := make(map[string]interface{}) + if vmd.ProcessServers != nil { + objectMap["processServers"] = vmd.ProcessServers + } + if vmd.MasterTargetServers != nil { + objectMap["masterTargetServers"] = vmd.MasterTargetServers + } + if vmd.RunAsAccounts != nil { + objectMap["runAsAccounts"] = vmd.RunAsAccounts + } + if vmd.ReplicationPairCount != nil { + objectMap["replicationPairCount"] = vmd.ReplicationPairCount + } + if vmd.ProcessServerCount != nil { + objectMap["processServerCount"] = vmd.ProcessServerCount + } + if vmd.AgentCount != nil { + objectMap["agentCount"] = vmd.AgentCount + } + if vmd.ProtectedServers != nil { + objectMap["protectedServers"] = vmd.ProtectedServers + } + if vmd.SystemLoad != nil { + objectMap["systemLoad"] = vmd.SystemLoad + } + if vmd.SystemLoadStatus != nil { + objectMap["systemLoadStatus"] = vmd.SystemLoadStatus + } + if vmd.CPULoad != nil { + objectMap["cpuLoad"] = vmd.CPULoad + } + if vmd.CPULoadStatus != nil { + objectMap["cpuLoadStatus"] = vmd.CPULoadStatus + } + if vmd.TotalMemoryInBytes != nil { + objectMap["totalMemoryInBytes"] = vmd.TotalMemoryInBytes + } + if vmd.AvailableMemoryInBytes != nil { + objectMap["availableMemoryInBytes"] = vmd.AvailableMemoryInBytes + } + if vmd.MemoryUsageStatus != nil { + objectMap["memoryUsageStatus"] = vmd.MemoryUsageStatus + } + if vmd.TotalSpaceInBytes != nil { + objectMap["totalSpaceInBytes"] = vmd.TotalSpaceInBytes + } + if vmd.AvailableSpaceInBytes != nil { + objectMap["availableSpaceInBytes"] = vmd.AvailableSpaceInBytes + } + if vmd.SpaceUsageStatus != nil { + objectMap["spaceUsageStatus"] = vmd.SpaceUsageStatus + } + if vmd.WebLoad != nil { + objectMap["webLoad"] = vmd.WebLoad + } + if vmd.WebLoadStatus != nil { + objectMap["webLoadStatus"] = vmd.WebLoadStatus + } + if vmd.DatabaseServerLoad != nil { + objectMap["databaseServerLoad"] = vmd.DatabaseServerLoad + } + if vmd.DatabaseServerLoadStatus != nil { + objectMap["databaseServerLoadStatus"] = vmd.DatabaseServerLoadStatus + } + if vmd.CsServiceStatus != nil { + objectMap["csServiceStatus"] = vmd.CsServiceStatus + } + if vmd.IPAddress != nil { + objectMap["ipAddress"] = vmd.IPAddress + } + if vmd.AgentVersion != nil { + objectMap["agentVersion"] = vmd.AgentVersion + } + if vmd.HostName != nil { + objectMap["hostName"] = vmd.HostName + } + if vmd.LastHeartbeat != nil { + objectMap["lastHeartbeat"] = vmd.LastHeartbeat + } + if vmd.VersionStatus != nil { + objectMap["versionStatus"] = vmd.VersionStatus + } + if vmd.SslCertExpiryDate != nil { + objectMap["sslCertExpiryDate"] = vmd.SslCertExpiryDate + } + if vmd.SslCertExpiryRemainingDays != nil { + objectMap["sslCertExpiryRemainingDays"] = vmd.SslCertExpiryRemainingDays + } + if vmd.PsTemplateVersion != nil { + objectMap["psTemplateVersion"] = vmd.PsTemplateVersion + } + if vmd.AgentExpiryDate != nil { + objectMap["agentExpiryDate"] = vmd.AgentExpiryDate + } + if vmd.AgentVersionDetails != nil { + objectMap["agentVersionDetails"] = vmd.AgentVersionDetails + } + if vmd.InstanceType != "" { + objectMap["instanceType"] = vmd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVmmDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return &vmd, true +} + +// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false +} + +// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { + return nil, false +} + +// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { + return &vmd, true +} + +// VMwareV2FabricCreationInput vMwareV2 fabric provider specific settings. +type VMwareV2FabricCreationInput struct { + // VmwareSiteID - The ARM Id of the VMware site. + VmwareSiteID *string `json:"vmwareSiteId,omitempty"` + // MigrationSolutionID - The ARM Id of the migration solution. + MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeFabricSpecificCreationInput', 'InstanceTypeAzure', 'InstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificCreationInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { + vmvfci.InstanceType = InstanceTypeVMwareV2 + objectMap := make(map[string]interface{}) + if vmvfci.VmwareSiteID != nil { + objectMap["vmwareSiteId"] = vmvfci.VmwareSiteID + } + if vmvfci.MigrationSolutionID != nil { + objectMap["migrationSolutionId"] = vmvfci.MigrationSolutionID + } + if vmvfci.InstanceType != "" { + objectMap["instanceType"] = vmvfci.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { + return nil, false +} + +// AsVMwareV2FabricCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { + return &vmvfci, true +} + +// AsFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) AsFabricSpecificCreationInput() (*FabricSpecificCreationInput, bool) { + return nil, false +} + +// AsBasicFabricSpecificCreationInput is the BasicFabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) AsBasicFabricSpecificCreationInput() (BasicFabricSpecificCreationInput, bool) { + return &vmvfci, true +} + +// VMwareV2FabricSpecificDetails vMwareV2 fabric specific details. +type VMwareV2FabricSpecificDetails struct { + // VmwareSiteID - READ-ONLY; The ARM Id of the VMware site. + VmwareSiteID *string `json:"vmwareSiteId,omitempty"` + // MigrationSolutionID - READ-ONLY; The Migration solution ARM Id. + MigrationSolutionID *string `json:"migrationSolutionId,omitempty"` + // ServiceEndpoint - READ-ONLY; The service endpoint. + ServiceEndpoint *string `json:"serviceEndpoint,omitempty"` + // ServiceResourceID - READ-ONLY; The service resource Id. + ServiceResourceID *string `json:"serviceResourceId,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeFabricSpecificDetails', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeAzure', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeHyperVSite', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMM', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMware', 'InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2' + InstanceType InstanceTypeBasicFabricSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { + vmvfsd.InstanceType = InstanceTypeBasicFabricSpecificDetailsInstanceTypeVMwareV2 + objectMap := make(map[string]interface{}) + if vmvfsd.InstanceType != "" { + objectMap["instanceType"] = vmvfsd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsAzureFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVmmDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return &vmvfsd, true +} + +// AsFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsFabricSpecificDetails() (*FabricSpecificDetails, bool) { + return nil, false +} + +// AsBasicFabricSpecificDetails is the BasicFabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsBasicFabricSpecificDetails() (BasicFabricSpecificDetails, bool) { + return &vmvfsd, true +} + +// VMwareVirtualMachineDetails vMware provider specific settings +type VMwareVirtualMachineDetails struct { + // AgentGeneratedID - The ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. + AgentGeneratedID *string `json:"agentGeneratedId,omitempty"` + // AgentInstalled - The value indicating if InMage scout agent is installed on guest. + AgentInstalled *string `json:"agentInstalled,omitempty"` + // OsType - The OsType installed on VM. + OsType *string `json:"osType,omitempty"` + // AgentVersion - The agent version. + AgentVersion *string `json:"agentVersion,omitempty"` + // IPAddress - The IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // PoweredOn - The value indicating whether VM is powered on. + PoweredOn *string `json:"poweredOn,omitempty"` + // VCenterInfrastructureID - The VCenter infrastructure Id. + VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` + // DiscoveryType - A value indicating the discovery type of the machine. Value can be vCenter or physical. + DiscoveryType *string `json:"discoveryType,omitempty"` + // DiskDetails - The disk details. + DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"` + // ValidationErrors - The validation errors. + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + // InstanceType - Possible values include: 'InstanceTypeConfigurationSettings', 'InstanceTypeHyperVVirtualMachine', 'InstanceTypeReplicationGroupDetails', 'InstanceTypeVmmVirtualMachine', 'InstanceTypeVMwareVirtualMachine' + InstanceType InstanceTypeBasicConfigurationSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { + vmvmd.InstanceType = InstanceTypeVMwareVirtualMachine + objectMap := make(map[string]interface{}) + if vmvmd.AgentGeneratedID != nil { + objectMap["agentGeneratedId"] = vmvmd.AgentGeneratedID + } + if vmvmd.AgentInstalled != nil { + objectMap["agentInstalled"] = vmvmd.AgentInstalled + } + if vmvmd.OsType != nil { + objectMap["osType"] = vmvmd.OsType + } + if vmvmd.AgentVersion != nil { + objectMap["agentVersion"] = vmvmd.AgentVersion + } + if vmvmd.IPAddress != nil { + objectMap["ipAddress"] = vmvmd.IPAddress + } + if vmvmd.PoweredOn != nil { + objectMap["poweredOn"] = vmvmd.PoweredOn + } + if vmvmd.VCenterInfrastructureID != nil { + objectMap["vCenterInfrastructureId"] = vmvmd.VCenterInfrastructureID + } + if vmvmd.DiscoveryType != nil { + objectMap["discoveryType"] = vmvmd.DiscoveryType + } + if vmvmd.DiskDetails != nil { + objectMap["diskDetails"] = vmvmd.DiskDetails + } + if vmvmd.ValidationErrors != nil { + objectMap["validationErrors"] = vmvmd.ValidationErrors + } + if vmvmd.InstanceType != "" { + objectMap["instanceType"] = vmvmd.InstanceType + } + return json.Marshal(objectMap) +} + +// AsHyperVVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return nil, false +} + +// AsReplicationGroupDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return nil, false +} + +// AsVmmVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsVmmVirtualMachineDetails() (*VmmVirtualMachineDetails, bool) { + return nil, false +} + +// AsVMwareVirtualMachineDetails is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return &vmvmd, true +} + +// AsConfigurationSettings is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsConfigurationSettings() (*ConfigurationSettings, bool) { + return nil, false +} + +// AsBasicConfigurationSettings is the BasicConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsBasicConfigurationSettings() (BasicConfigurationSettings, bool) { + return &vmvmd, true +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go new file mode 100644 index 000000000000..87ad407044ef --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/operations.go @@ -0,0 +1,152 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the client for the Operations methods of the Siterecovery service. +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string, resourceGroupName string, resourceName string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// List operation to return the list of available operations. +func (client OperationsClient) List(ctx context.Context) (result OperationsDiscoveryCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.odc.Response.Response != nil { + sc = result.odc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.odc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.odc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsDiscoveryCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationsDiscoveryCollection) (result OperationsDiscoveryCollection, err error) { + req, err := lastResults.operationsDiscoveryCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result OperationsDiscoveryCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go new file mode 100644 index 000000000000..e089be8a8766 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/recoverypoints.go @@ -0,0 +1,243 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RecoveryPointsClient is the client for the RecoveryPoints methods of the Siterecovery service. +type RecoveryPointsClient struct { + BaseClient +} + +// NewRecoveryPointsClient creates an instance of the RecoveryPointsClient client. +func NewRecoveryPointsClient(subscriptionID string, resourceGroupName string, resourceName string) RecoveryPointsClient { + return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client. +func NewRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) RecoveryPointsClient { + return RecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get get the details of specified recovery point. +// Parameters: +// fabricName - the fabric name. +// protectionContainerName - the protection container name. +// replicatedProtectedItemName - the replication protected item's name. +// recoveryPointName - the recovery point name. +func (client RecoveryPointsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string) (result RecoveryPoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, recoveryPointName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RecoveryPointsClient) GetPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "recoveryPointName": autorest.Encode("path", recoveryPointName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints/{recoveryPointName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RecoveryPointsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RecoveryPointsClient) GetResponder(resp *http.Response) (result RecoveryPoint, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByReplicationProtectedItems lists the available recovery points for a replication protected item. +// Parameters: +// fabricName - the fabric name. +// protectionContainerName - the protection container name. +// replicatedProtectedItemName - the replication protected item's name. +func (client RecoveryPointsClient) ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result RecoveryPointCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointsClient.ListByReplicationProtectedItems") + defer func() { + sc := -1 + if result.RPCVar.Response.Response != nil { + sc = result.RPCVar.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationProtectedItemsNextResults + req, err := client.ListByReplicationProtectedItemsPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "ListByReplicationProtectedItems", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationProtectedItemsSender(req) + if err != nil { + result.RPCVar.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "ListByReplicationProtectedItems", resp, "Failure sending request") + return + } + + result.RPCVar, err = client.ListByReplicationProtectedItemsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "ListByReplicationProtectedItems", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationProtectedItemsPreparer prepares the ListByReplicationProtectedItems request. +func (client RecoveryPointsClient) ListByReplicationProtectedItemsPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/recoveryPoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationProtectedItemsSender sends the ListByReplicationProtectedItems request. The method will close the +// http.Response Body if it receives an error. +func (client RecoveryPointsClient) ListByReplicationProtectedItemsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationProtectedItemsResponder handles the response to the ListByReplicationProtectedItems request. The method always +// closes the http.Response Body. +func (client RecoveryPointsClient) ListByReplicationProtectedItemsResponder(resp *http.Response) (result RecoveryPointCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationProtectedItemsNextResults retrieves the next set of results, if any. +func (client RecoveryPointsClient) listByReplicationProtectedItemsNextResults(ctx context.Context, lastResults RecoveryPointCollection) (result RecoveryPointCollection, err error) { + req, err := lastResults.recoveryPointCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "listByReplicationProtectedItemsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationProtectedItemsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "listByReplicationProtectedItemsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationProtectedItemsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.RecoveryPointsClient", "listByReplicationProtectedItemsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationProtectedItemsComplete enumerates all values, automatically crossing page boundaries as required. +func (client RecoveryPointsClient) ListByReplicationProtectedItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result RecoveryPointCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointsClient.ListByReplicationProtectedItems") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationProtectedItems(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go new file mode 100644 index 000000000000..c6ff50d269e7 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationalertsettings.go @@ -0,0 +1,310 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationAlertSettingsClient is the client for the ReplicationAlertSettings methods of the Siterecovery service. +type ReplicationAlertSettingsClient struct { + BaseClient +} + +// NewReplicationAlertSettingsClient creates an instance of the ReplicationAlertSettingsClient client. +func NewReplicationAlertSettingsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationAlertSettingsClient { + return NewReplicationAlertSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationAlertSettingsClientWithBaseURI creates an instance of the ReplicationAlertSettingsClient client. +func NewReplicationAlertSettingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationAlertSettingsClient { + return ReplicationAlertSettingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create create or update an email notification(alert) configuration. +// Parameters: +// alertSettingName - the name of the email notification(alert) configuration. +// request - the input to configure the email notification(alert). +func (client ReplicationAlertSettingsClient) Create(ctx context.Context, alertSettingName string, request ConfigureAlertRequest) (result Alert, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationAlertSettingsClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, alertSettingName, request) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationAlertSettingsClient) CreatePreparer(ctx context.Context, alertSettingName string, request ConfigureAlertRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertSettingName": autorest.Encode("path", alertSettingName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationAlertSettingsClient) CreateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationAlertSettingsClient) CreateResponder(resp *http.Response) (result Alert, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the details of the specified email notification(alert) configuration. +// Parameters: +// alertSettingName - the name of the email notification configuration. +func (client ReplicationAlertSettingsClient) Get(ctx context.Context, alertSettingName string) (result Alert, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationAlertSettingsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, alertSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationAlertSettingsClient) GetPreparer(ctx context.Context, alertSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "alertSettingName": autorest.Encode("path", alertSettingName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings/{alertSettingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationAlertSettingsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationAlertSettingsClient) GetResponder(resp *http.Response) (result Alert, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of email notification(alert) configurations for the vault. +func (client ReplicationAlertSettingsClient) List(ctx context.Context) (result AlertCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationAlertSettingsClient.List") + defer func() { + sc := -1 + if result.ac.Response.Response != nil { + sc = result.ac.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ac.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "List", resp, "Failure sending request") + return + } + + result.ac, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationAlertSettingsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationAlertSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationAlertSettingsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationAlertSettingsClient) ListResponder(resp *http.Response) (result AlertCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationAlertSettingsClient) listNextResults(ctx context.Context, lastResults AlertCollection) (result AlertCollection, err error) { + req, err := lastResults.alertCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationAlertSettingsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationAlertSettingsClient) ListComplete(ctx context.Context) (result AlertCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationAlertSettingsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go new file mode 100644 index 000000000000..f2f0ad2092af --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationeligibilityresults.go @@ -0,0 +1,195 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationEligibilityResultsClient is the client for the ReplicationEligibilityResults methods of the Siterecovery +// service. +type ReplicationEligibilityResultsClient struct { + BaseClient +} + +// NewReplicationEligibilityResultsClient creates an instance of the ReplicationEligibilityResultsClient client. +func NewReplicationEligibilityResultsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationEligibilityResultsClient { + return NewReplicationEligibilityResultsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationEligibilityResultsClientWithBaseURI creates an instance of the ReplicationEligibilityResultsClient +// client. +func NewReplicationEligibilityResultsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEligibilityResultsClient { + return ReplicationEligibilityResultsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get validates whether a given VM can be protected or not in which case returns list of errors. +// Parameters: +// virtualMachineName - virtual Machine name. +func (client ReplicationEligibilityResultsClient) Get(ctx context.Context, virtualMachineName string) (result ReplicationEligibilityResultsGetFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationEligibilityResultsClient.Get") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, virtualMachineName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "Get", nil, "Failure preparing request") + return + } + + result, err = client.GetSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "Get", result.Response(), "Failure sending request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationEligibilityResultsClient) GetPreparer(ctx context.Context, virtualMachineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualMachineName": autorest.Encode("path", virtualMachineName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationEligibilityResultsClient) GetSender(req *http.Request) (future ReplicationEligibilityResultsGetFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationEligibilityResultsClient) GetResponder(resp *http.Response) (result ReplicationEligibilityResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List validates whether a given VM can be protected or not in which case returns list of errors. +// Parameters: +// virtualMachineName - virtual Machine name. +func (client ReplicationEligibilityResultsClient) List(ctx context.Context, virtualMachineName string) (result ReplicationEligibilityResultsListFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationEligibilityResultsClient.List") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, virtualMachineName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "List", nil, "Failure preparing request") + return + } + + result, err = client.ListSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEligibilityResultsClient", "List", result.Response(), "Failure sending request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationEligibilityResultsClient) ListPreparer(ctx context.Context, virtualMachineName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualMachineName": autorest.Encode("path", virtualMachineName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationEligibilityResultsClient) ListSender(req *http.Request) (future ReplicationEligibilityResultsListFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationEligibilityResultsClient) ListResponder(resp *http.Response) (result ReplicationEligibilityResultsCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go new file mode 100644 index 000000000000..faf6bb6601f7 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationevents.go @@ -0,0 +1,235 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationEventsClient is the client for the ReplicationEvents methods of the Siterecovery service. +type ReplicationEventsClient struct { + BaseClient +} + +// NewReplicationEventsClient creates an instance of the ReplicationEventsClient client. +func NewReplicationEventsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationEventsClient { + return NewReplicationEventsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationEventsClientWithBaseURI creates an instance of the ReplicationEventsClient client. +func NewReplicationEventsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationEventsClient { + return ReplicationEventsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get the operation to get the details of an Azure Site recovery event. +// Parameters: +// eventName - the name of the Azure Site Recovery event. +func (client ReplicationEventsClient) Get(ctx context.Context, eventName string) (result Event, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationEventsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, eventName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationEventsClient) GetPreparer(ctx context.Context, eventName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "eventName": autorest.Encode("path", eventName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents/{eventName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationEventsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationEventsClient) GetResponder(resp *http.Response) (result Event, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of Azure Site Recovery events for the vault. +// Parameters: +// filter - oData filter options. +func (client ReplicationEventsClient) List(ctx context.Context, filter string) (result EventCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationEventsClient.List") + defer func() { + sc := -1 + if result.ec.Response.Response != nil { + sc = result.ec.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ec.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "List", resp, "Failure sending request") + return + } + + result.ec, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationEventsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationEvents", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationEventsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationEventsClient) ListResponder(resp *http.Response) (result EventCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationEventsClient) listNextResults(ctx context.Context, lastResults EventCollection) (result EventCollection, err error) { + req, err := lastResults.eventCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationEventsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationEventsClient) ListComplete(ctx context.Context, filter string) (result EventCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationEventsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, filter) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go new file mode 100644 index 000000000000..020d3ed80864 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationfabrics.go @@ -0,0 +1,775 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationFabricsClient is the client for the ReplicationFabrics methods of the Siterecovery service. +type ReplicationFabricsClient struct { + BaseClient +} + +// NewReplicationFabricsClient creates an instance of the ReplicationFabricsClient client. +func NewReplicationFabricsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationFabricsClient { + return NewReplicationFabricsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationFabricsClientWithBaseURI creates an instance of the ReplicationFabricsClient client. +func NewReplicationFabricsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationFabricsClient { + return ReplicationFabricsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// CheckConsistency the operation to perform a consistency check on the fabric. +// Parameters: +// fabricName - fabric name. +func (client ReplicationFabricsClient) CheckConsistency(ctx context.Context, fabricName string) (result ReplicationFabricsCheckConsistencyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.CheckConsistency") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckConsistencyPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "CheckConsistency", nil, "Failure preparing request") + return + } + + result, err = client.CheckConsistencySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "CheckConsistency", result.Response(), "Failure sending request") + return + } + + return +} + +// CheckConsistencyPreparer prepares the CheckConsistency request. +func (client ReplicationFabricsClient) CheckConsistencyPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/checkConsistency", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckConsistencySender sends the CheckConsistency request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) CheckConsistencySender(req *http.Request) (future ReplicationFabricsCheckConsistencyFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CheckConsistencyResponder handles the response to the CheckConsistency request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) CheckConsistencyResponder(resp *http.Response) (result Fabric, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Create the operation to create an Azure Site Recovery fabric (for e.g. Hyper-V site) +// Parameters: +// fabricName - name of the ASR fabric. +// input - fabric creation input. +func (client ReplicationFabricsClient) Create(ctx context.Context, fabricName string, input FabricCreationInput) (result ReplicationFabricsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, fabricName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationFabricsClient) CreatePreparer(ctx context.Context, fabricName string, input FabricCreationInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) CreateSender(req *http.Request) (future ReplicationFabricsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) CreateResponder(resp *http.Response) (result Fabric, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete or remove an Azure Site Recovery fabric. +// Parameters: +// fabricName - ASR fabric to delete +func (client ReplicationFabricsClient) Delete(ctx context.Context, fabricName string) (result ReplicationFabricsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationFabricsClient) DeletePreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/remove", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) DeleteSender(req *http.Request) (future ReplicationFabricsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of an Azure Site Recovery fabric. +// Parameters: +// fabricName - fabric name. +func (client ReplicationFabricsClient) Get(ctx context.Context, fabricName string) (result Fabric, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationFabricsClient) GetPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) GetResponder(resp *http.Response) (result Fabric, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of the Azure Site Recovery fabrics in the vault. +func (client ReplicationFabricsClient) List(ctx context.Context) (result FabricCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.List") + defer func() { + sc := -1 + if result.fc.Response.Response != nil { + sc = result.fc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.fc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "List", resp, "Failure sending request") + return + } + + result.fc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationFabricsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) ListResponder(resp *http.Response) (result FabricCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationFabricsClient) listNextResults(ctx context.Context, lastResults FabricCollection) (result FabricCollection, err error) { + req, err := lastResults.fabricCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationFabricsClient) ListComplete(ctx context.Context) (result FabricCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// MigrateToAad the operation to migrate an Azure Site Recovery fabric to AAD. +// Parameters: +// fabricName - ASR fabric to migrate. +func (client ReplicationFabricsClient) MigrateToAad(ctx context.Context, fabricName string) (result ReplicationFabricsMigrateToAadFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.MigrateToAad") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.MigrateToAadPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "MigrateToAad", nil, "Failure preparing request") + return + } + + result, err = client.MigrateToAadSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "MigrateToAad", result.Response(), "Failure sending request") + return + } + + return +} + +// MigrateToAadPreparer prepares the MigrateToAad request. +func (client ReplicationFabricsClient) MigrateToAadPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// MigrateToAadSender sends the MigrateToAad request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) MigrateToAadSender(req *http.Request) (future ReplicationFabricsMigrateToAadFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// MigrateToAadResponder handles the response to the MigrateToAad request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) MigrateToAadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Purge the operation to purge(force delete) an Azure Site Recovery fabric. +// Parameters: +// fabricName - ASR fabric to purge. +func (client ReplicationFabricsClient) Purge(ctx context.Context, fabricName string) (result ReplicationFabricsPurgeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.Purge") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PurgePreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Purge", nil, "Failure preparing request") + return + } + + result, err = client.PurgeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "Purge", result.Response(), "Failure sending request") + return + } + + return +} + +// PurgePreparer prepares the Purge request. +func (client ReplicationFabricsClient) PurgePreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PurgeSender sends the Purge request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) PurgeSender(req *http.Request) (future ReplicationFabricsPurgeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PurgeResponder handles the response to the Purge request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) PurgeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReassociateGateway the operation to move replications from a process server to another process server. +// Parameters: +// fabricName - the name of the fabric containing the process server. +// failoverProcessServerRequest - the input to the failover process server operation. +func (client ReplicationFabricsClient) ReassociateGateway(ctx context.Context, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest) (result ReplicationFabricsReassociateGatewayFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.ReassociateGateway") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReassociateGatewayPreparer(ctx, fabricName, failoverProcessServerRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "ReassociateGateway", nil, "Failure preparing request") + return + } + + result, err = client.ReassociateGatewaySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "ReassociateGateway", result.Response(), "Failure sending request") + return + } + + return +} + +// ReassociateGatewayPreparer prepares the ReassociateGateway request. +func (client ReplicationFabricsClient) ReassociateGatewayPreparer(ctx context.Context, fabricName string, failoverProcessServerRequest FailoverProcessServerRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/reassociateGateway", pathParameters), + autorest.WithJSON(failoverProcessServerRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReassociateGatewaySender sends the ReassociateGateway request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) ReassociateGatewaySender(req *http.Request) (future ReplicationFabricsReassociateGatewayFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ReassociateGatewayResponder handles the response to the ReassociateGateway request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) ReassociateGatewayResponder(resp *http.Response) (result Fabric, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RenewCertificate renews the connection certificate for the ASR replication fabric. +// Parameters: +// fabricName - fabric name to renew certs for. +// renewCertificate - renew certificate input. +func (client ReplicationFabricsClient) RenewCertificate(ctx context.Context, fabricName string, renewCertificate RenewCertificateInput) (result ReplicationFabricsRenewCertificateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationFabricsClient.RenewCertificate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RenewCertificatePreparer(ctx, fabricName, renewCertificate) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "RenewCertificate", nil, "Failure preparing request") + return + } + + result, err = client.RenewCertificateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationFabricsClient", "RenewCertificate", result.Response(), "Failure sending request") + return + } + + return +} + +// RenewCertificatePreparer prepares the RenewCertificate request. +func (client ReplicationFabricsClient) RenewCertificatePreparer(ctx context.Context, fabricName string, renewCertificate RenewCertificateInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/renewCertificate", pathParameters), + autorest.WithJSON(renewCertificate), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RenewCertificateSender sends the RenewCertificate request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) RenewCertificateSender(req *http.Request) (future ReplicationFabricsRenewCertificateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RenewCertificateResponder handles the response to the RenewCertificate request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) RenewCertificateResponder(resp *http.Response) (result Fabric, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go new file mode 100644 index 000000000000..6c5d6e0a3230 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationjobs.go @@ -0,0 +1,547 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationJobsClient is the client for the ReplicationJobs methods of the Siterecovery service. +type ReplicationJobsClient struct { + BaseClient +} + +// NewReplicationJobsClient creates an instance of the ReplicationJobsClient client. +func NewReplicationJobsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationJobsClient { + return NewReplicationJobsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationJobsClientWithBaseURI creates an instance of the ReplicationJobsClient client. +func NewReplicationJobsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationJobsClient { + return ReplicationJobsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Cancel the operation to cancel an Azure Site Recovery job. +// Parameters: +// jobName - job identifier. +func (client ReplicationJobsClient) Cancel(ctx context.Context, jobName string) (result ReplicationJobsCancelFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationJobsClient.Cancel") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CancelPreparer(ctx, jobName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Cancel", nil, "Failure preparing request") + return + } + + result, err = client.CancelSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Cancel", result.Response(), "Failure sending request") + return + } + + return +} + +// CancelPreparer prepares the Cancel request. +func (client ReplicationJobsClient) CancelPreparer(ctx context.Context, jobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobName": autorest.Encode("path", jobName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/cancel", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CancelSender sends the Cancel request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationJobsClient) CancelSender(req *http.Request) (future ReplicationJobsCancelFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CancelResponder handles the response to the Cancel request. The method always +// closes the http.Response Body. +func (client ReplicationJobsClient) CancelResponder(resp *http.Response) (result Job, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Export the operation to export the details of the Azure Site Recovery jobs of the vault. +// Parameters: +// jobQueryParameter - job query filter. +func (client ReplicationJobsClient) Export(ctx context.Context, jobQueryParameter JobQueryParameter) (result ReplicationJobsExportFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationJobsClient.Export") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ExportPreparer(ctx, jobQueryParameter) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Export", nil, "Failure preparing request") + return + } + + result, err = client.ExportSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Export", result.Response(), "Failure sending request") + return + } + + return +} + +// ExportPreparer prepares the Export request. +func (client ReplicationJobsClient) ExportPreparer(ctx context.Context, jobQueryParameter JobQueryParameter) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/export", pathParameters), + autorest.WithJSON(jobQueryParameter), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ExportSender sends the Export request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationJobsClient) ExportSender(req *http.Request) (future ReplicationJobsExportFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ExportResponder handles the response to the Export request. The method always +// closes the http.Response Body. +func (client ReplicationJobsClient) ExportResponder(resp *http.Response) (result Job, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get the details of an Azure Site Recovery job. +// Parameters: +// jobName - job identifier +func (client ReplicationJobsClient) Get(ctx context.Context, jobName string) (result Job, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationJobsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, jobName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationJobsClient) GetPreparer(ctx context.Context, jobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobName": autorest.Encode("path", jobName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationJobsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationJobsClient) GetResponder(resp *http.Response) (result Job, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of Azure Site Recovery Jobs for the vault. +// Parameters: +// filter - oData filter options. +func (client ReplicationJobsClient) List(ctx context.Context, filter string) (result JobCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationJobsClient.List") + defer func() { + sc := -1 + if result.jc.Response.Response != nil { + sc = result.jc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.jc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "List", resp, "Failure sending request") + return + } + + result.jc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationJobsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationJobsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationJobsClient) ListResponder(resp *http.Response) (result JobCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationJobsClient) listNextResults(ctx context.Context, lastResults JobCollection) (result JobCollection, err error) { + req, err := lastResults.jobCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationJobsClient) ListComplete(ctx context.Context, filter string) (result JobCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationJobsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, filter) + return +} + +// Restart the operation to restart an Azure Site Recovery job. +// Parameters: +// jobName - job identifier. +func (client ReplicationJobsClient) Restart(ctx context.Context, jobName string) (result ReplicationJobsRestartFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationJobsClient.Restart") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RestartPreparer(ctx, jobName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Restart", nil, "Failure preparing request") + return + } + + result, err = client.RestartSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Restart", result.Response(), "Failure sending request") + return + } + + return +} + +// RestartPreparer prepares the Restart request. +func (client ReplicationJobsClient) RestartPreparer(ctx context.Context, jobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobName": autorest.Encode("path", jobName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/restart", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestartSender sends the Restart request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationJobsClient) RestartSender(req *http.Request) (future ReplicationJobsRestartFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RestartResponder handles the response to the Restart request. The method always +// closes the http.Response Body. +func (client ReplicationJobsClient) RestartResponder(resp *http.Response) (result Job, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Resume the operation to resume an Azure Site Recovery job +// Parameters: +// jobName - job identifier. +// resumeJobParams - resume rob comments. +func (client ReplicationJobsClient) Resume(ctx context.Context, jobName string, resumeJobParams ResumeJobParams) (result ReplicationJobsResumeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationJobsClient.Resume") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResumePreparer(ctx, jobName, resumeJobParams) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Resume", nil, "Failure preparing request") + return + } + + result, err = client.ResumeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationJobsClient", "Resume", result.Response(), "Failure sending request") + return + } + + return +} + +// ResumePreparer prepares the Resume request. +func (client ReplicationJobsClient) ResumePreparer(ctx context.Context, jobName string, resumeJobParams ResumeJobParams) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jobName": autorest.Encode("path", jobName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}/resume", pathParameters), + autorest.WithJSON(resumeJobParams), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResumeSender sends the Resume request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationJobsClient) ResumeSender(req *http.Request) (future ReplicationJobsResumeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResumeResponder handles the response to the Resume request. The method always +// closes the http.Response Body. +func (client ReplicationJobsClient) ResumeResponder(resp *http.Response) (result Job, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go new file mode 100644 index 000000000000..578f34ed6781 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationlogicalnetworks.go @@ -0,0 +1,236 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationLogicalNetworksClient is the client for the ReplicationLogicalNetworks methods of the Siterecovery +// service. +type ReplicationLogicalNetworksClient struct { + BaseClient +} + +// NewReplicationLogicalNetworksClient creates an instance of the ReplicationLogicalNetworksClient client. +func NewReplicationLogicalNetworksClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationLogicalNetworksClient { + return NewReplicationLogicalNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationLogicalNetworksClientWithBaseURI creates an instance of the ReplicationLogicalNetworksClient client. +func NewReplicationLogicalNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationLogicalNetworksClient { + return ReplicationLogicalNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get gets the details of a logical network. +// Parameters: +// fabricName - server Id. +// logicalNetworkName - logical network name. +func (client ReplicationLogicalNetworksClient) Get(ctx context.Context, fabricName string, logicalNetworkName string) (result LogicalNetwork, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLogicalNetworksClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, logicalNetworkName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationLogicalNetworksClient) GetPreparer(ctx context.Context, fabricName string, logicalNetworkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "logicalNetworkName": autorest.Encode("path", logicalNetworkName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks/{logicalNetworkName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLogicalNetworksClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationLogicalNetworksClient) GetResponder(resp *http.Response) (result LogicalNetwork, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByReplicationFabrics lists all the logical networks of the Azure Site Recovery fabric +// Parameters: +// fabricName - server Id. +func (client ReplicationLogicalNetworksClient) ListByReplicationFabrics(ctx context.Context, fabricName string) (result LogicalNetworkCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLogicalNetworksClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.lnc.Response.Response != nil { + sc = result.lnc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationFabricsNextResults + req, err := client.ListByReplicationFabricsPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "ListByReplicationFabrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.lnc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "ListByReplicationFabrics", resp, "Failure sending request") + return + } + + result.lnc, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "ListByReplicationFabrics", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationFabricsPreparer prepares the ListByReplicationFabrics request. +func (client ReplicationLogicalNetworksClient) ListByReplicationFabricsPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationLogicalNetworks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationFabricsSender sends the ListByReplicationFabrics request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLogicalNetworksClient) ListByReplicationFabricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationFabricsResponder handles the response to the ListByReplicationFabrics request. The method always +// closes the http.Response Body. +func (client ReplicationLogicalNetworksClient) ListByReplicationFabricsResponder(resp *http.Response) (result LogicalNetworkCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationFabricsNextResults retrieves the next set of results, if any. +func (client ReplicationLogicalNetworksClient) listByReplicationFabricsNextResults(ctx context.Context, lastResults LogicalNetworkCollection) (result LogicalNetworkCollection, err error) { + req, err := lastResults.logicalNetworkCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "listByReplicationFabricsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "listByReplicationFabricsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationLogicalNetworksClient", "listByReplicationFabricsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationFabricsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationLogicalNetworksClient) ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result LogicalNetworkCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationLogicalNetworksClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationFabrics(ctx, fabricName) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go new file mode 100644 index 000000000000..7e2ac5f0f606 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationmigrationitems.go @@ -0,0 +1,894 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationMigrationItemsClient is the client for the ReplicationMigrationItems methods of the Siterecovery service. +type ReplicationMigrationItemsClient struct { + BaseClient +} + +// NewReplicationMigrationItemsClient creates an instance of the ReplicationMigrationItemsClient client. +func NewReplicationMigrationItemsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationMigrationItemsClient { + return NewReplicationMigrationItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationMigrationItemsClientWithBaseURI creates an instance of the ReplicationMigrationItemsClient client. +func NewReplicationMigrationItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationMigrationItemsClient { + return ReplicationMigrationItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to create an ASR migration item (enable migration). +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// input - enable migration input. +func (client ReplicationMigrationItemsClient) Create(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput) (result ReplicationMigrationItemsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "input.Properties.PolicyID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "input.Properties.ProviderSpecificDetails", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationMigrationItemsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, fabricName, protectionContainerName, migrationItemName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationMigrationItemsClient) CreatePreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input EnableMigrationInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) CreateSender(req *http.Request) (future ReplicationMigrationItemsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) CreateResponder(resp *http.Response) (result MigrationItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete an ASR migration item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// deleteOption - the delete option. +func (client ReplicationMigrationItemsClient) Delete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, deleteOption string) (result ReplicationMigrationItemsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, protectionContainerName, migrationItemName, deleteOption) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationMigrationItemsClient) DeletePreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, deleteOption string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(deleteOption) > 0 { + queryParameters["deleteOption"] = autorest.Encode("query", deleteOption) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) DeleteSender(req *http.Request) (future ReplicationMigrationItemsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get sends the get request. +// Parameters: +// fabricName - fabric unique name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +func (client ReplicationMigrationItemsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result MigrationItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, protectionContainerName, migrationItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationMigrationItemsClient) GetPreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) GetResponder(resp *http.Response) (result MigrationItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List sends the list request. +// Parameters: +// skipToken - the pagination token. +// filter - oData filter options. +func (client ReplicationMigrationItemsClient) List(ctx context.Context, skipToken string, filter string) (result MigrationItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.List") + defer func() { + sc := -1 + if result.mic.Response.Response != nil { + sc = result.mic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, skipToken, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.mic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "List", resp, "Failure sending request") + return + } + + result.mic, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationMigrationItemsClient) ListPreparer(ctx context.Context, skipToken string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(skipToken) > 0 { + queryParameters["skipToken"] = autorest.Encode("query", skipToken) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationMigrationItems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) ListResponder(resp *http.Response) (result MigrationItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationMigrationItemsClient) listNextResults(ctx context.Context, lastResults MigrationItemCollection) (result MigrationItemCollection, err error) { + req, err := lastResults.migrationItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationMigrationItemsClient) ListComplete(ctx context.Context, skipToken string, filter string) (result MigrationItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, skipToken, filter) + return +} + +// ListByReplicationProtectionContainers gets the list of ASR migration items in the protection container. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +func (client ReplicationMigrationItemsClient) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result MigrationItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.mic.Response.Response != nil { + sc = result.mic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationProtectionContainersNextResults + req, err := client.ListByReplicationProtectionContainersPreparer(ctx, fabricName, protectionContainerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "ListByReplicationProtectionContainers", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.mic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "ListByReplicationProtectionContainers", resp, "Failure sending request") + return + } + + result.mic, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "ListByReplicationProtectionContainers", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationProtectionContainersPreparer prepares the ListByReplicationProtectionContainers request. +func (client ReplicationMigrationItemsClient) ListByReplicationProtectionContainersPreparer(ctx context.Context, fabricName string, protectionContainerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationProtectionContainersSender sends the ListByReplicationProtectionContainers request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) ListByReplicationProtectionContainersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationProtectionContainersResponder handles the response to the ListByReplicationProtectionContainers request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) ListByReplicationProtectionContainersResponder(resp *http.Response) (result MigrationItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationProtectionContainersNextResults retrieves the next set of results, if any. +func (client ReplicationMigrationItemsClient) listByReplicationProtectionContainersNextResults(ctx context.Context, lastResults MigrationItemCollection) (result MigrationItemCollection, err error) { + req, err := lastResults.migrationItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "listByReplicationProtectionContainersNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationProtectionContainersComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationMigrationItemsClient) ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result MigrationItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationProtectionContainers(ctx, fabricName, protectionContainerName) + return +} + +// Migrate the operation to initiate migration of the item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// migrateInput - migrate input. +func (client ReplicationMigrationItemsClient) Migrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput) (result ReplicationMigrationItemsMigrateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.Migrate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: migrateInput, + Constraints: []validation.Constraint{{Target: "migrateInput.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "migrateInput.Properties.ProviderSpecificDetails", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationMigrationItemsClient", "Migrate", err.Error()) + } + + req, err := client.MigratePreparer(ctx, fabricName, protectionContainerName, migrationItemName, migrateInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Migrate", nil, "Failure preparing request") + return + } + + result, err = client.MigrateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Migrate", result.Response(), "Failure sending request") + return + } + + return +} + +// MigratePreparer prepares the Migrate request. +func (client ReplicationMigrationItemsClient) MigratePreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput MigrateInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/migrate", pathParameters), + autorest.WithJSON(migrateInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// MigrateSender sends the Migrate request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) MigrateSender(req *http.Request) (future ReplicationMigrationItemsMigrateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// MigrateResponder handles the response to the Migrate request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) MigrateResponder(resp *http.Response) (result MigrationItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// TestMigrate the operation to initiate test migration of the item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// testMigrateInput - test migrate input. +func (client ReplicationMigrationItemsClient) TestMigrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput) (result ReplicationMigrationItemsTestMigrateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.TestMigrate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: testMigrateInput, + Constraints: []validation.Constraint{{Target: "testMigrateInput.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "testMigrateInput.Properties.ProviderSpecificDetails", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationMigrationItemsClient", "TestMigrate", err.Error()) + } + + req, err := client.TestMigratePreparer(ctx, fabricName, protectionContainerName, migrationItemName, testMigrateInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "TestMigrate", nil, "Failure preparing request") + return + } + + result, err = client.TestMigrateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "TestMigrate", result.Response(), "Failure sending request") + return + } + + return +} + +// TestMigratePreparer prepares the TestMigrate request. +func (client ReplicationMigrationItemsClient) TestMigratePreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput TestMigrateInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrate", pathParameters), + autorest.WithJSON(testMigrateInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TestMigrateSender sends the TestMigrate request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) TestMigrateSender(req *http.Request) (future ReplicationMigrationItemsTestMigrateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// TestMigrateResponder handles the response to the TestMigrate request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) TestMigrateResponder(resp *http.Response) (result MigrationItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// TestMigrateCleanup the operation to initiate test migrate cleanup. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// testMigrateCleanupInput - test migrate cleanup input. +func (client ReplicationMigrationItemsClient) TestMigrateCleanup(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput) (result ReplicationMigrationItemsTestMigrateCleanupFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.TestMigrateCleanup") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: testMigrateCleanupInput, + Constraints: []validation.Constraint{{Target: "testMigrateCleanupInput.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationMigrationItemsClient", "TestMigrateCleanup", err.Error()) + } + + req, err := client.TestMigrateCleanupPreparer(ctx, fabricName, protectionContainerName, migrationItemName, testMigrateCleanupInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "TestMigrateCleanup", nil, "Failure preparing request") + return + } + + result, err = client.TestMigrateCleanupSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "TestMigrateCleanup", result.Response(), "Failure sending request") + return + } + + return +} + +// TestMigrateCleanupPreparer prepares the TestMigrateCleanup request. +func (client ReplicationMigrationItemsClient) TestMigrateCleanupPreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput TestMigrateCleanupInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/testMigrateCleanup", pathParameters), + autorest.WithJSON(testMigrateCleanupInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TestMigrateCleanupSender sends the TestMigrateCleanup request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) TestMigrateCleanupSender(req *http.Request) (future ReplicationMigrationItemsTestMigrateCleanupFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// TestMigrateCleanupResponder handles the response to the TestMigrateCleanup request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) TestMigrateCleanupResponder(resp *http.Response) (result MigrationItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update the operation to update the recovery settings of an ASR migration item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// migrationItemName - migration item name. +// input - update migration item input. +func (client ReplicationMigrationItemsClient) Update(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput) (result ReplicationMigrationItemsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationMigrationItemsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, fabricName, protectionContainerName, migrationItemName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationMigrationItemsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationMigrationItemsClient) UpdatePreparer(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input UpdateMigrationItemInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "migrationItemName": autorest.Encode("path", migrationItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationMigrationItemsClient) UpdateSender(req *http.Request) (future ReplicationMigrationItemsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationMigrationItemsClient) UpdateResponder(resp *http.Response) (result MigrationItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go new file mode 100644 index 000000000000..6006c965ad18 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworkmappings.go @@ -0,0 +1,600 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationNetworkMappingsClient is the client for the ReplicationNetworkMappings methods of the Siterecovery +// service. +type ReplicationNetworkMappingsClient struct { + BaseClient +} + +// NewReplicationNetworkMappingsClient creates an instance of the ReplicationNetworkMappingsClient client. +func NewReplicationNetworkMappingsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworkMappingsClient { + return NewReplicationNetworkMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationNetworkMappingsClientWithBaseURI creates an instance of the ReplicationNetworkMappingsClient client. +func NewReplicationNetworkMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworkMappingsClient { + return ReplicationNetworkMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to create an ASR network mapping. +// Parameters: +// fabricName - primary fabric name. +// networkName - primary network name. +// networkMappingName - network mapping name. +// input - create network mapping input. +func (client ReplicationNetworkMappingsClient) Create(ctx context.Context, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput) (result ReplicationNetworkMappingsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, fabricName, networkName, networkMappingName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationNetworkMappingsClient) CreatePreparer(ctx context.Context, fabricName string, networkName string, networkMappingName string, input CreateNetworkMappingInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "networkMappingName": autorest.Encode("path", networkMappingName), + "networkName": autorest.Encode("path", networkName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworkMappingsClient) CreateSender(req *http.Request) (future ReplicationNetworkMappingsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationNetworkMappingsClient) CreateResponder(resp *http.Response) (result NetworkMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete a network mapping. +// Parameters: +// fabricName - primary fabric name. +// networkName - primary network name. +// networkMappingName - ARM Resource Name for network mapping. +func (client ReplicationNetworkMappingsClient) Delete(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result ReplicationNetworkMappingsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, networkName, networkMappingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationNetworkMappingsClient) DeletePreparer(ctx context.Context, fabricName string, networkName string, networkMappingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "networkMappingName": autorest.Encode("path", networkMappingName), + "networkName": autorest.Encode("path", networkName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworkMappingsClient) DeleteSender(req *http.Request) (future ReplicationNetworkMappingsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationNetworkMappingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of an ASR network mapping +// Parameters: +// fabricName - primary fabric name. +// networkName - primary network name. +// networkMappingName - network mapping name. +func (client ReplicationNetworkMappingsClient) Get(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result NetworkMapping, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, networkName, networkMappingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationNetworkMappingsClient) GetPreparer(ctx context.Context, fabricName string, networkName string, networkMappingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "networkMappingName": autorest.Encode("path", networkMappingName), + "networkName": autorest.Encode("path", networkName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworkMappingsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationNetworkMappingsClient) GetResponder(resp *http.Response) (result NetworkMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all ASR network mappings in the vault. +func (client ReplicationNetworkMappingsClient) List(ctx context.Context) (result NetworkMappingCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.List") + defer func() { + sc := -1 + if result.nmc.Response.Response != nil { + sc = result.nmc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.nmc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "List", resp, "Failure sending request") + return + } + + result.nmc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationNetworkMappingsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworkMappings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworkMappingsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationNetworkMappingsClient) ListResponder(resp *http.Response) (result NetworkMappingCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationNetworkMappingsClient) listNextResults(ctx context.Context, lastResults NetworkMappingCollection) (result NetworkMappingCollection, err error) { + req, err := lastResults.networkMappingCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationNetworkMappingsClient) ListComplete(ctx context.Context) (result NetworkMappingCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationNetworks lists all ASR network mappings for the specified network. +// Parameters: +// fabricName - primary fabric name. +// networkName - primary network name. +func (client ReplicationNetworkMappingsClient) ListByReplicationNetworks(ctx context.Context, fabricName string, networkName string) (result NetworkMappingCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.ListByReplicationNetworks") + defer func() { + sc := -1 + if result.nmc.Response.Response != nil { + sc = result.nmc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationNetworksNextResults + req, err := client.ListByReplicationNetworksPreparer(ctx, fabricName, networkName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "ListByReplicationNetworks", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationNetworksSender(req) + if err != nil { + result.nmc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "ListByReplicationNetworks", resp, "Failure sending request") + return + } + + result.nmc, err = client.ListByReplicationNetworksResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "ListByReplicationNetworks", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationNetworksPreparer prepares the ListByReplicationNetworks request. +func (client ReplicationNetworkMappingsClient) ListByReplicationNetworksPreparer(ctx context.Context, fabricName string, networkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "networkName": autorest.Encode("path", networkName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationNetworksSender sends the ListByReplicationNetworks request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworkMappingsClient) ListByReplicationNetworksSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationNetworksResponder handles the response to the ListByReplicationNetworks request. The method always +// closes the http.Response Body. +func (client ReplicationNetworkMappingsClient) ListByReplicationNetworksResponder(resp *http.Response) (result NetworkMappingCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationNetworksNextResults retrieves the next set of results, if any. +func (client ReplicationNetworkMappingsClient) listByReplicationNetworksNextResults(ctx context.Context, lastResults NetworkMappingCollection) (result NetworkMappingCollection, err error) { + req, err := lastResults.networkMappingCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "listByReplicationNetworksNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationNetworksSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "listByReplicationNetworksNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationNetworksResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "listByReplicationNetworksNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationNetworksComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationNetworkMappingsClient) ListByReplicationNetworksComplete(ctx context.Context, fabricName string, networkName string) (result NetworkMappingCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.ListByReplicationNetworks") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationNetworks(ctx, fabricName, networkName) + return +} + +// Update the operation to update an ASR network mapping. +// Parameters: +// fabricName - primary fabric name. +// networkName - primary network name. +// networkMappingName - network mapping name. +// input - update network mapping input. +func (client ReplicationNetworkMappingsClient) Update(ctx context.Context, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput) (result ReplicationNetworkMappingsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworkMappingsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, fabricName, networkName, networkMappingName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworkMappingsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationNetworkMappingsClient) UpdatePreparer(ctx context.Context, fabricName string, networkName string, networkMappingName string, input UpdateNetworkMappingInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "networkMappingName": autorest.Encode("path", networkMappingName), + "networkName": autorest.Encode("path", networkName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}/replicationNetworkMappings/{networkMappingName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworkMappingsClient) UpdateSender(req *http.Request) (future ReplicationNetworkMappingsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationNetworkMappingsClient) UpdateResponder(resp *http.Response) (result NetworkMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go new file mode 100644 index 000000000000..e1a739ab3c89 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationnetworks.go @@ -0,0 +1,347 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationNetworksClient is the client for the ReplicationNetworks methods of the Siterecovery service. +type ReplicationNetworksClient struct { + BaseClient +} + +// NewReplicationNetworksClient creates an instance of the ReplicationNetworksClient client. +func NewReplicationNetworksClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworksClient { + return NewReplicationNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationNetworksClientWithBaseURI creates an instance of the ReplicationNetworksClient client. +func NewReplicationNetworksClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationNetworksClient { + return ReplicationNetworksClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get gets the details of a network. +// Parameters: +// fabricName - server Id. +// networkName - primary network name. +func (client ReplicationNetworksClient) Get(ctx context.Context, fabricName string, networkName string) (result Network, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworksClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, networkName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationNetworksClient) GetPreparer(ctx context.Context, fabricName string, networkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "networkName": autorest.Encode("path", networkName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks/{networkName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworksClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationNetworksClient) GetResponder(resp *http.Response) (result Network, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the networks available in a vault +func (client ReplicationNetworksClient) List(ctx context.Context) (result NetworkCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworksClient.List") + defer func() { + sc := -1 + if result.nc.Response.Response != nil { + sc = result.nc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.nc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "List", resp, "Failure sending request") + return + } + + result.nc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationNetworksClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationNetworks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworksClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationNetworksClient) ListResponder(resp *http.Response) (result NetworkCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationNetworksClient) listNextResults(ctx context.Context, lastResults NetworkCollection) (result NetworkCollection, err error) { + req, err := lastResults.networkCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationNetworksClient) ListComplete(ctx context.Context) (result NetworkCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworksClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationFabrics lists the networks available for a fabric. +// Parameters: +// fabricName - fabric name +func (client ReplicationNetworksClient) ListByReplicationFabrics(ctx context.Context, fabricName string) (result NetworkCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworksClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.nc.Response.Response != nil { + sc = result.nc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationFabricsNextResults + req, err := client.ListByReplicationFabricsPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "ListByReplicationFabrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.nc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "ListByReplicationFabrics", resp, "Failure sending request") + return + } + + result.nc, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "ListByReplicationFabrics", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationFabricsPreparer prepares the ListByReplicationFabrics request. +func (client ReplicationNetworksClient) ListByReplicationFabricsPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationNetworks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationFabricsSender sends the ListByReplicationFabrics request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationNetworksClient) ListByReplicationFabricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationFabricsResponder handles the response to the ListByReplicationFabrics request. The method always +// closes the http.Response Body. +func (client ReplicationNetworksClient) ListByReplicationFabricsResponder(resp *http.Response) (result NetworkCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationFabricsNextResults retrieves the next set of results, if any. +func (client ReplicationNetworksClient) listByReplicationFabricsNextResults(ctx context.Context, lastResults NetworkCollection) (result NetworkCollection, err error) { + req, err := lastResults.networkCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "listByReplicationFabricsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "listByReplicationFabricsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationNetworksClient", "listByReplicationFabricsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationFabricsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationNetworksClient) ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result NetworkCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationNetworksClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationFabrics(ctx, fabricName) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go new file mode 100644 index 000000000000..bb919f16d6cf --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationpolicies.go @@ -0,0 +1,466 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationPoliciesClient is the client for the ReplicationPolicies methods of the Siterecovery service. +type ReplicationPoliciesClient struct { + BaseClient +} + +// NewReplicationPoliciesClient creates an instance of the ReplicationPoliciesClient client. +func NewReplicationPoliciesClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationPoliciesClient { + return NewReplicationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationPoliciesClientWithBaseURI creates an instance of the ReplicationPoliciesClient client. +func NewReplicationPoliciesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationPoliciesClient { + return ReplicationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to create a replication policy +// Parameters: +// policyName - replication policy name +// input - create policy input +func (client ReplicationPoliciesClient) Create(ctx context.Context, policyName string, input CreatePolicyInput) (result ReplicationPoliciesCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationPoliciesClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, policyName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationPoliciesClient) CreatePreparer(ctx context.Context, policyName string, input CreatePolicyInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationPoliciesClient) CreateSender(req *http.Request) (future ReplicationPoliciesCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationPoliciesClient) CreateResponder(resp *http.Response) (result Policy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete a replication policy. +// Parameters: +// policyName - replication policy name. +func (client ReplicationPoliciesClient) Delete(ctx context.Context, policyName string) (result ReplicationPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationPoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationPoliciesClient) DeletePreparer(ctx context.Context, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationPoliciesClient) DeleteSender(req *http.Request) (future ReplicationPoliciesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of a replication policy. +// Parameters: +// policyName - replication policy name. +func (client ReplicationPoliciesClient) Get(ctx context.Context, policyName string) (result Policy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationPoliciesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationPoliciesClient) GetPreparer(ctx context.Context, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationPoliciesClient) GetResponder(resp *http.Response) (result Policy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the replication policies for a vault. +func (client ReplicationPoliciesClient) List(ctx context.Context) (result PolicyCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationPoliciesClient.List") + defer func() { + sc := -1 + if result.pc.Response.Response != nil { + sc = result.pc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "List", resp, "Failure sending request") + return + } + + result.pc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationPoliciesClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationPoliciesClient) ListResponder(resp *http.Response) (result PolicyCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationPoliciesClient) listNextResults(ctx context.Context, lastResults PolicyCollection) (result PolicyCollection, err error) { + req, err := lastResults.policyCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationPoliciesClient) ListComplete(ctx context.Context) (result PolicyCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationPoliciesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// Update the operation to update a replication policy. +// Parameters: +// policyName - policy Id. +// input - update Policy Input +func (client ReplicationPoliciesClient) Update(ctx context.Context, policyName string, input UpdatePolicyInput) (result ReplicationPoliciesUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationPoliciesClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, policyName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationPoliciesClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationPoliciesClient) UpdatePreparer(ctx context.Context, policyName string, input UpdatePolicyInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationPolicies/{policyName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationPoliciesClient) UpdateSender(req *http.Request) (future ReplicationPoliciesUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationPoliciesClient) UpdateResponder(resp *http.Response) (result Policy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go new file mode 100644 index 000000000000..c2a47513bbb6 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectableitems.go @@ -0,0 +1,244 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationProtectableItemsClient is the client for the ReplicationProtectableItems methods of the Siterecovery +// service. +type ReplicationProtectableItemsClient struct { + BaseClient +} + +// NewReplicationProtectableItemsClient creates an instance of the ReplicationProtectableItemsClient client. +func NewReplicationProtectableItemsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectableItemsClient { + return NewReplicationProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationProtectableItemsClientWithBaseURI creates an instance of the ReplicationProtectableItemsClient client. +func NewReplicationProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectableItemsClient { + return ReplicationProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get the operation to get the details of a protectable item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// protectableItemName - protectable item name. +func (client ReplicationProtectableItemsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string) (result ProtectableItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectableItemsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, protectionContainerName, protectableItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationProtectableItemsClient) GetPreparer(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectableItemName": autorest.Encode("path", protectableItemName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems/{protectableItemName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectableItemsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationProtectableItemsClient) GetResponder(resp *http.Response) (result ProtectableItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByReplicationProtectionContainers lists the protectable items in a protection container. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// filter - oData filter options. +func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result ProtectableItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectableItemsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.pic.Response.Response != nil { + sc = result.pic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationProtectionContainersNextResults + req, err := client.ListByReplicationProtectionContainersPreparer(ctx, fabricName, protectionContainerName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "ListByReplicationProtectionContainers", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.pic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "ListByReplicationProtectionContainers", resp, "Failure sending request") + return + } + + result.pic, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "ListByReplicationProtectionContainers", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationProtectionContainersPreparer prepares the ListByReplicationProtectionContainers request. +func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersPreparer(ctx context.Context, fabricName string, protectionContainerName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectableItems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationProtectionContainersSender sends the ListByReplicationProtectionContainers request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationProtectionContainersResponder handles the response to the ListByReplicationProtectionContainers request. The method always +// closes the http.Response Body. +func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersResponder(resp *http.Response) (result ProtectableItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationProtectionContainersNextResults retrieves the next set of results, if any. +func (client ReplicationProtectableItemsClient) listByReplicationProtectionContainersNextResults(ctx context.Context, lastResults ProtectableItemCollection) (result ProtectableItemCollection, err error) { + req, err := lastResults.protectableItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "listByReplicationProtectionContainersNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectableItemsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationProtectionContainersComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationProtectableItemsClient) ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result ProtectableItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectableItemsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationProtectionContainers(ctx, fabricName, protectionContainerName, filter) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go new file mode 100644 index 000000000000..244d153ec9bd --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotecteditems.go @@ -0,0 +1,1704 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationProtectedItemsClient is the client for the ReplicationProtectedItems methods of the Siterecovery service. +type ReplicationProtectedItemsClient struct { + BaseClient +} + +// NewReplicationProtectedItemsClient creates an instance of the ReplicationProtectedItemsClient client. +func NewReplicationProtectedItemsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectedItemsClient { + return NewReplicationProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationProtectedItemsClientWithBaseURI creates an instance of the ReplicationProtectedItemsClient client. +func NewReplicationProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectedItemsClient { + return ReplicationProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// AddDisks operation to add disks(s) to the replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// addDisksInput - add disks input. +func (client ReplicationProtectedItemsClient) AddDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput) (result ReplicationProtectedItemsAddDisksFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.AddDisks") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.AddDisksPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, addDisksInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "AddDisks", nil, "Failure preparing request") + return + } + + result, err = client.AddDisksSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "AddDisks", result.Response(), "Failure sending request") + return + } + + return +} + +// AddDisksPreparer prepares the AddDisks request. +func (client ReplicationProtectedItemsClient) AddDisksPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput AddDisksInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/addDisks", pathParameters), + autorest.WithJSON(addDisksInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AddDisksSender sends the AddDisks request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) AddDisksSender(req *http.Request) (future ReplicationProtectedItemsAddDisksFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// AddDisksResponder handles the response to the AddDisks request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) AddDisksResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ApplyRecoveryPoint the operation to change the recovery point of a failed over replication protected item. +// Parameters: +// fabricName - the ARM fabric name. +// protectionContainerName - the protection container name. +// replicatedProtectedItemName - the replicated protected item's name. +// applyRecoveryPointInput - the ApplyRecoveryPointInput. +func (client ReplicationProtectedItemsClient) ApplyRecoveryPoint(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput) (result ReplicationProtectedItemsApplyRecoveryPointFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.ApplyRecoveryPoint") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ApplyRecoveryPointPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, applyRecoveryPointInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "ApplyRecoveryPoint", nil, "Failure preparing request") + return + } + + result, err = client.ApplyRecoveryPointSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "ApplyRecoveryPoint", result.Response(), "Failure sending request") + return + } + + return +} + +// ApplyRecoveryPointPreparer prepares the ApplyRecoveryPoint request. +func (client ReplicationProtectedItemsClient) ApplyRecoveryPointPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput ApplyRecoveryPointInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/applyRecoveryPoint", pathParameters), + autorest.WithJSON(applyRecoveryPointInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ApplyRecoveryPointSender sends the ApplyRecoveryPoint request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) ApplyRecoveryPointSender(req *http.Request) (future ReplicationProtectedItemsApplyRecoveryPointFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ApplyRecoveryPointResponder handles the response to the ApplyRecoveryPoint request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) ApplyRecoveryPointResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Create the operation to create an ASR replication protected item (Enable replication). +// Parameters: +// fabricName - name of the fabric. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - a name for the replication protected item. +// input - enable Protection Input. +func (client ReplicationProtectedItemsClient) Create(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput) (result ReplicationProtectedItemsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationProtectedItemsClient) CreatePreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input EnableProtectionInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) CreateSender(req *http.Request) (future ReplicationProtectedItemsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) CreateResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to disable replication on a replication protected item. This will also remove the item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// disableProtectionInput - disable protection input. +func (client ReplicationProtectedItemsClient) Delete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput) (result ReplicationProtectedItemsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, disableProtectionInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationProtectedItemsClient) DeletePreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput DisableProtectionInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/remove", pathParameters), + autorest.WithJSON(disableProtectionInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) DeleteSender(req *http.Request) (future ReplicationProtectedItemsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// FailoverCommit operation to commit the failover of the replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +func (client ReplicationProtectedItemsClient) FailoverCommit(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result ReplicationProtectedItemsFailoverCommitFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.FailoverCommit") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.FailoverCommitPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "FailoverCommit", nil, "Failure preparing request") + return + } + + result, err = client.FailoverCommitSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "FailoverCommit", result.Response(), "Failure sending request") + return + } + + return +} + +// FailoverCommitPreparer prepares the FailoverCommit request. +func (client ReplicationProtectedItemsClient) FailoverCommitPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/failoverCommit", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// FailoverCommitSender sends the FailoverCommit request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) FailoverCommitSender(req *http.Request) (future ReplicationProtectedItemsFailoverCommitFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// FailoverCommitResponder handles the response to the FailoverCommit request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) FailoverCommitResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the details of an ASR replication protected item. +// Parameters: +// fabricName - fabric unique name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +func (client ReplicationProtectedItemsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result ReplicationProtectedItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationProtectedItemsClient) GetPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) GetResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of ASR replication protected items in the vault. +// Parameters: +// skipToken - the pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null +// filter - oData filter options. +func (client ReplicationProtectedItemsClient) List(ctx context.Context, skipToken string, filter string) (result ReplicationProtectedItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.List") + defer func() { + sc := -1 + if result.rpic.Response.Response != nil { + sc = result.rpic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, skipToken, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rpic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "List", resp, "Failure sending request") + return + } + + result.rpic, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationProtectedItemsClient) ListPreparer(ctx context.Context, skipToken string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(skipToken) > 0 { + queryParameters["skipToken"] = autorest.Encode("query", skipToken) + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectedItems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) ListResponder(resp *http.Response) (result ReplicationProtectedItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationProtectedItemsClient) listNextResults(ctx context.Context, lastResults ReplicationProtectedItemCollection) (result ReplicationProtectedItemCollection, err error) { + req, err := lastResults.replicationProtectedItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationProtectedItemsClient) ListComplete(ctx context.Context, skipToken string, filter string) (result ReplicationProtectedItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, skipToken, filter) + return +} + +// ListByReplicationProtectionContainers gets the list of ASR replication protected items in the protection container. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +func (client ReplicationProtectedItemsClient) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result ReplicationProtectedItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.rpic.Response.Response != nil { + sc = result.rpic.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationProtectionContainersNextResults + req, err := client.ListByReplicationProtectionContainersPreparer(ctx, fabricName, protectionContainerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "ListByReplicationProtectionContainers", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.rpic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "ListByReplicationProtectionContainers", resp, "Failure sending request") + return + } + + result.rpic, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "ListByReplicationProtectionContainers", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationProtectionContainersPreparer prepares the ListByReplicationProtectionContainers request. +func (client ReplicationProtectedItemsClient) ListByReplicationProtectionContainersPreparer(ctx context.Context, fabricName string, protectionContainerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationProtectionContainersSender sends the ListByReplicationProtectionContainers request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) ListByReplicationProtectionContainersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationProtectionContainersResponder handles the response to the ListByReplicationProtectionContainers request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) ListByReplicationProtectionContainersResponder(resp *http.Response) (result ReplicationProtectedItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationProtectionContainersNextResults retrieves the next set of results, if any. +func (client ReplicationProtectedItemsClient) listByReplicationProtectionContainersNextResults(ctx context.Context, lastResults ReplicationProtectedItemCollection) (result ReplicationProtectedItemCollection, err error) { + req, err := lastResults.replicationProtectedItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "listByReplicationProtectionContainersNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationProtectionContainersComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationProtectedItemsClient) ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result ReplicationProtectedItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationProtectionContainers(ctx, fabricName, protectionContainerName) + return +} + +// PlannedFailover operation to initiate a planned failover of the replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// failoverInput - disable protection input. +func (client ReplicationProtectedItemsClient) PlannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput) (result ReplicationProtectedItemsPlannedFailoverFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.PlannedFailover") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PlannedFailoverPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "PlannedFailover", nil, "Failure preparing request") + return + } + + result, err = client.PlannedFailoverSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "PlannedFailover", result.Response(), "Failure sending request") + return + } + + return +} + +// PlannedFailoverPreparer prepares the PlannedFailover request. +func (client ReplicationProtectedItemsClient) PlannedFailoverPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput PlannedFailoverInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/plannedFailover", pathParameters), + autorest.WithJSON(failoverInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PlannedFailoverSender sends the PlannedFailover request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) PlannedFailoverSender(req *http.Request) (future ReplicationProtectedItemsPlannedFailoverFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PlannedFailoverResponder handles the response to the PlannedFailover request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) PlannedFailoverResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Purge the operation to delete or purge a replication protected item. This operation will force delete the +// replication protected item. Use the remove operation on replication protected item to perform a clean disable +// replication for the item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +func (client ReplicationProtectedItemsClient) Purge(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result ReplicationProtectedItemsPurgeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.Purge") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PurgePreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Purge", nil, "Failure preparing request") + return + } + + result, err = client.PurgeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Purge", result.Response(), "Failure sending request") + return + } + + return +} + +// PurgePreparer prepares the Purge request. +func (client ReplicationProtectedItemsClient) PurgePreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PurgeSender sends the Purge request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) PurgeSender(req *http.Request) (future ReplicationProtectedItemsPurgeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PurgeResponder handles the response to the Purge request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) PurgeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// RemoveDisks operation to remove disk(s) from the replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// removeDisksInput - remove disks input. +func (client ReplicationProtectedItemsClient) RemoveDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput) (result ReplicationProtectedItemsRemoveDisksFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.RemoveDisks") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RemoveDisksPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, removeDisksInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "RemoveDisks", nil, "Failure preparing request") + return + } + + result, err = client.RemoveDisksSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "RemoveDisks", result.Response(), "Failure sending request") + return + } + + return +} + +// RemoveDisksPreparer prepares the RemoveDisks request. +func (client ReplicationProtectedItemsClient) RemoveDisksPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput RemoveDisksInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/removeDisks", pathParameters), + autorest.WithJSON(removeDisksInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RemoveDisksSender sends the RemoveDisks request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) RemoveDisksSender(req *http.Request) (future ReplicationProtectedItemsRemoveDisksFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RemoveDisksResponder handles the response to the RemoveDisks request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) RemoveDisksResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RepairReplication the operation to start resynchronize/repair replication for a replication protected item requiring +// resynchronization. +// Parameters: +// fabricName - the name of the fabric. +// protectionContainerName - the name of the container. +// replicatedProtectedItemName - the name of the replication protected item. +func (client ReplicationProtectedItemsClient) RepairReplication(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result ReplicationProtectedItemsRepairReplicationFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.RepairReplication") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RepairReplicationPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "RepairReplication", nil, "Failure preparing request") + return + } + + result, err = client.RepairReplicationSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "RepairReplication", result.Response(), "Failure sending request") + return + } + + return +} + +// RepairReplicationPreparer prepares the RepairReplication request. +func (client ReplicationProtectedItemsClient) RepairReplicationPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/repairReplication", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RepairReplicationSender sends the RepairReplication request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) RepairReplicationSender(req *http.Request) (future ReplicationProtectedItemsRepairReplicationFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RepairReplicationResponder handles the response to the RepairReplication request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) RepairReplicationResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Reprotect operation to reprotect or reverse replicate a failed over replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// rrInput - disable protection input. +func (client ReplicationProtectedItemsClient) Reprotect(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, rrInput ReverseReplicationInput) (result ReplicationProtectedItemsReprotectFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.Reprotect") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReprotectPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, rrInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Reprotect", nil, "Failure preparing request") + return + } + + result, err = client.ReprotectSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Reprotect", result.Response(), "Failure sending request") + return + } + + return +} + +// ReprotectPreparer prepares the Reprotect request. +func (client ReplicationProtectedItemsClient) ReprotectPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, rrInput ReverseReplicationInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/reProtect", pathParameters), + autorest.WithJSON(rrInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReprotectSender sends the Reprotect request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) ReprotectSender(req *http.Request) (future ReplicationProtectedItemsReprotectFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ReprotectResponder handles the response to the Reprotect request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) ReprotectResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ResolveHealthErrors operation to resolve health issues of the replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// resolveHealthInput - health issue input object. +func (client ReplicationProtectedItemsClient) ResolveHealthErrors(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput) (result ReplicationProtectedItemsResolveHealthErrorsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.ResolveHealthErrors") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResolveHealthErrorsPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, resolveHealthInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "ResolveHealthErrors", nil, "Failure preparing request") + return + } + + result, err = client.ResolveHealthErrorsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "ResolveHealthErrors", result.Response(), "Failure sending request") + return + } + + return +} + +// ResolveHealthErrorsPreparer prepares the ResolveHealthErrors request. +func (client ReplicationProtectedItemsClient) ResolveHealthErrorsPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput ResolveHealthInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/ResolveHealthErrors", pathParameters), + autorest.WithJSON(resolveHealthInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResolveHealthErrorsSender sends the ResolveHealthErrors request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) ResolveHealthErrorsSender(req *http.Request) (future ReplicationProtectedItemsResolveHealthErrorsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResolveHealthErrorsResponder handles the response to the ResolveHealthErrors request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) ResolveHealthErrorsResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// TestFailover operation to perform a test failover of the replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// failoverInput - test failover input. +func (client ReplicationProtectedItemsClient) TestFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput TestFailoverInput) (result ReplicationProtectedItemsTestFailoverFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.TestFailover") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.TestFailoverPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "TestFailover", nil, "Failure preparing request") + return + } + + result, err = client.TestFailoverSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "TestFailover", result.Response(), "Failure sending request") + return + } + + return +} + +// TestFailoverPreparer prepares the TestFailover request. +func (client ReplicationProtectedItemsClient) TestFailoverPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput TestFailoverInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailover", pathParameters), + autorest.WithJSON(failoverInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TestFailoverSender sends the TestFailover request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) TestFailoverSender(req *http.Request) (future ReplicationProtectedItemsTestFailoverFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// TestFailoverResponder handles the response to the TestFailover request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) TestFailoverResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// TestFailoverCleanup operation to clean up the test failover of a replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// cleanupInput - test failover cleanup input. +func (client ReplicationProtectedItemsClient) TestFailoverCleanup(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput) (result ReplicationProtectedItemsTestFailoverCleanupFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.TestFailoverCleanup") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: cleanupInput, + Constraints: []validation.Constraint{{Target: "cleanupInput.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationProtectedItemsClient", "TestFailoverCleanup", err.Error()) + } + + req, err := client.TestFailoverCleanupPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, cleanupInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "TestFailoverCleanup", nil, "Failure preparing request") + return + } + + result, err = client.TestFailoverCleanupSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "TestFailoverCleanup", result.Response(), "Failure sending request") + return + } + + return +} + +// TestFailoverCleanupPreparer prepares the TestFailoverCleanup request. +func (client ReplicationProtectedItemsClient) TestFailoverCleanupPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput TestFailoverCleanupInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/testFailoverCleanup", pathParameters), + autorest.WithJSON(cleanupInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TestFailoverCleanupSender sends the TestFailoverCleanup request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) TestFailoverCleanupSender(req *http.Request) (future ReplicationProtectedItemsTestFailoverCleanupFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// TestFailoverCleanupResponder handles the response to the TestFailoverCleanup request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) TestFailoverCleanupResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UnplannedFailover operation to initiate a failover of the replication protected item. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// failoverInput - disable protection input. +func (client ReplicationProtectedItemsClient) UnplannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput) (result ReplicationProtectedItemsUnplannedFailoverFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.UnplannedFailover") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UnplannedFailoverPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, failoverInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "UnplannedFailover", nil, "Failure preparing request") + return + } + + result, err = client.UnplannedFailoverSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "UnplannedFailover", result.Response(), "Failure sending request") + return + } + + return +} + +// UnplannedFailoverPreparer prepares the UnplannedFailover request. +func (client ReplicationProtectedItemsClient) UnplannedFailoverPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput UnplannedFailoverInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover", pathParameters), + autorest.WithJSON(failoverInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnplannedFailoverSender sends the UnplannedFailover request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) UnplannedFailoverSender(req *http.Request) (future ReplicationProtectedItemsUnplannedFailoverFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UnplannedFailoverResponder handles the response to the UnplannedFailover request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) UnplannedFailoverResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update the operation to update the recovery settings of an ASR replication protected item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +// updateProtectionInput - update protection input. +func (client ReplicationProtectedItemsClient) Update(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput) (result ReplicationProtectedItemsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName, updateProtectionInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationProtectedItemsClient) UpdatePreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput UpdateReplicationProtectedItemInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}", pathParameters), + autorest.WithJSON(updateProtectionInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) UpdateSender(req *http.Request) (future ReplicationProtectedItemsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) UpdateResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateMobilityService the operation to update(push update) the installed mobility service software on a replication +// protected item to the latest available version. +// Parameters: +// fabricName - the name of the fabric containing the protected item. +// protectionContainerName - the name of the container containing the protected item. +// replicationProtectedItemName - the name of the protected item on which the agent is to be updated. +// updateMobilityServiceRequest - request to update the mobility service on the protected item. +func (client ReplicationProtectedItemsClient) UpdateMobilityService(ctx context.Context, fabricName string, protectionContainerName string, replicationProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest) (result ReplicationProtectedItemsUpdateMobilityServiceFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectedItemsClient.UpdateMobilityService") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateMobilityServicePreparer(ctx, fabricName, protectionContainerName, replicationProtectedItemName, updateMobilityServiceRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "UpdateMobilityService", nil, "Failure preparing request") + return + } + + result, err = client.UpdateMobilityServiceSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectedItemsClient", "UpdateMobilityService", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateMobilityServicePreparer prepares the UpdateMobilityService request. +func (client ReplicationProtectedItemsClient) UpdateMobilityServicePreparer(ctx context.Context, fabricName string, protectionContainerName string, replicationProtectedItemName string, updateMobilityServiceRequest UpdateMobilityServiceRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicationProtectedItemName": autorest.Encode("path", replicationProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicationProtectedItemName}/updateMobilityService", pathParameters), + autorest.WithJSON(updateMobilityServiceRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateMobilityServiceSender sends the UpdateMobilityService request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectedItemsClient) UpdateMobilityServiceSender(req *http.Request) (future ReplicationProtectedItemsUpdateMobilityServiceFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateMobilityServiceResponder handles the response to the UpdateMobilityService request. The method always +// closes the http.Response Body. +func (client ReplicationProtectedItemsClient) UpdateMobilityServiceResponder(resp *http.Response) (result ReplicationProtectedItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go new file mode 100644 index 000000000000..e96266a6479f --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainermappings.go @@ -0,0 +1,685 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationProtectionContainerMappingsClient is the client for the ReplicationProtectionContainerMappings methods of +// the Siterecovery service. +type ReplicationProtectionContainerMappingsClient struct { + BaseClient +} + +// NewReplicationProtectionContainerMappingsClient creates an instance of the +// ReplicationProtectionContainerMappingsClient client. +func NewReplicationProtectionContainerMappingsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainerMappingsClient { + return NewReplicationProtectionContainerMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationProtectionContainerMappingsClientWithBaseURI creates an instance of the +// ReplicationProtectionContainerMappingsClient client. +func NewReplicationProtectionContainerMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainerMappingsClient { + return ReplicationProtectionContainerMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to create a protection container mapping. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// mappingName - protection container mapping name. +// creationInput - mapping creation input. +func (client ReplicationProtectionContainerMappingsClient) Create(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput) (result ReplicationProtectionContainerMappingsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, fabricName, protectionContainerName, mappingName, creationInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationProtectionContainerMappingsClient) CreatePreparer(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, creationInput CreateProtectionContainerMappingInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "mappingName": autorest.Encode("path", mappingName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}", pathParameters), + autorest.WithJSON(creationInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainerMappingsClient) CreateSender(req *http.Request) (future ReplicationProtectionContainerMappingsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainerMappingsClient) CreateResponder(resp *http.Response) (result ProtectionContainerMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete or remove a protection container mapping. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// mappingName - protection container mapping name. +// removalInput - removal input. +func (client ReplicationProtectionContainerMappingsClient) Delete(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput) (result ReplicationProtectionContainerMappingsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, protectionContainerName, mappingName, removalInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationProtectionContainerMappingsClient) DeletePreparer(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput RemoveProtectionContainerMappingInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "mappingName": autorest.Encode("path", mappingName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove", pathParameters), + autorest.WithJSON(removalInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainerMappingsClient) DeleteSender(req *http.Request) (future ReplicationProtectionContainerMappingsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainerMappingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of a protection container mapping. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// mappingName - protection Container mapping name. +func (client ReplicationProtectionContainerMappingsClient) Get(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result ProtectionContainerMapping, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, protectionContainerName, mappingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationProtectionContainerMappingsClient) GetPreparer(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "mappingName": autorest.Encode("path", mappingName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainerMappingsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainerMappingsClient) GetResponder(resp *http.Response) (result ProtectionContainerMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the protection container mappings in the vault. +func (client ReplicationProtectionContainerMappingsClient) List(ctx context.Context) (result ProtectionContainerMappingCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.List") + defer func() { + sc := -1 + if result.pcmc.Response.Response != nil { + sc = result.pcmc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pcmc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "List", resp, "Failure sending request") + return + } + + result.pcmc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationProtectionContainerMappingsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainerMappingsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainerMappingsClient) ListResponder(resp *http.Response) (result ProtectionContainerMappingCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationProtectionContainerMappingsClient) listNextResults(ctx context.Context, lastResults ProtectionContainerMappingCollection) (result ProtectionContainerMappingCollection, err error) { + req, err := lastResults.protectionContainerMappingCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationProtectionContainerMappingsClient) ListComplete(ctx context.Context) (result ProtectionContainerMappingCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationProtectionContainers lists the protection container mappings for a protection container. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +func (client ReplicationProtectionContainerMappingsClient) ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result ProtectionContainerMappingCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.pcmc.Response.Response != nil { + sc = result.pcmc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationProtectionContainersNextResults + req, err := client.ListByReplicationProtectionContainersPreparer(ctx, fabricName, protectionContainerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "ListByReplicationProtectionContainers", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.pcmc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "ListByReplicationProtectionContainers", resp, "Failure sending request") + return + } + + result.pcmc, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "ListByReplicationProtectionContainers", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationProtectionContainersPreparer prepares the ListByReplicationProtectionContainers request. +func (client ReplicationProtectionContainerMappingsClient) ListByReplicationProtectionContainersPreparer(ctx context.Context, fabricName string, protectionContainerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationProtectionContainersSender sends the ListByReplicationProtectionContainers request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainerMappingsClient) ListByReplicationProtectionContainersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationProtectionContainersResponder handles the response to the ListByReplicationProtectionContainers request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainerMappingsClient) ListByReplicationProtectionContainersResponder(resp *http.Response) (result ProtectionContainerMappingCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationProtectionContainersNextResults retrieves the next set of results, if any. +func (client ReplicationProtectionContainerMappingsClient) listByReplicationProtectionContainersNextResults(ctx context.Context, lastResults ProtectionContainerMappingCollection) (result ProtectionContainerMappingCollection, err error) { + req, err := lastResults.protectionContainerMappingCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "listByReplicationProtectionContainersNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationProtectionContainersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationProtectionContainersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "listByReplicationProtectionContainersNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationProtectionContainersComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationProtectionContainerMappingsClient) ListByReplicationProtectionContainersComplete(ctx context.Context, fabricName string, protectionContainerName string) (result ProtectionContainerMappingCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.ListByReplicationProtectionContainers") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationProtectionContainers(ctx, fabricName, protectionContainerName) + return +} + +// Purge the operation to purge(force delete) a protection container mapping +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// mappingName - protection container mapping name. +func (client ReplicationProtectionContainerMappingsClient) Purge(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result ReplicationProtectionContainerMappingsPurgeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.Purge") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PurgePreparer(ctx, fabricName, protectionContainerName, mappingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Purge", nil, "Failure preparing request") + return + } + + result, err = client.PurgeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Purge", result.Response(), "Failure sending request") + return + } + + return +} + +// PurgePreparer prepares the Purge request. +func (client ReplicationProtectionContainerMappingsClient) PurgePreparer(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "mappingName": autorest.Encode("path", mappingName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PurgeSender sends the Purge request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainerMappingsClient) PurgeSender(req *http.Request) (future ReplicationProtectionContainerMappingsPurgeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PurgeResponder handles the response to the Purge request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainerMappingsClient) PurgeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update the operation to update protection container mapping. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// mappingName - protection container mapping name. +// updateInput - mapping update input. +func (client ReplicationProtectionContainerMappingsClient) Update(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput) (result ReplicationProtectionContainerMappingsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainerMappingsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, fabricName, protectionContainerName, mappingName, updateInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainerMappingsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationProtectionContainerMappingsClient) UpdatePreparer(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput UpdateProtectionContainerMappingInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "mappingName": autorest.Encode("path", mappingName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}", pathParameters), + autorest.WithJSON(updateInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainerMappingsClient) UpdateSender(req *http.Request) (future ReplicationProtectionContainerMappingsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainerMappingsClient) UpdateResponder(resp *http.Response) (result ProtectionContainerMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go new file mode 100644 index 000000000000..19139fa5d748 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationprotectioncontainers.go @@ -0,0 +1,674 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationProtectionContainersClient is the client for the ReplicationProtectionContainers methods of the +// Siterecovery service. +type ReplicationProtectionContainersClient struct { + BaseClient +} + +// NewReplicationProtectionContainersClient creates an instance of the ReplicationProtectionContainersClient client. +func NewReplicationProtectionContainersClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainersClient { + return NewReplicationProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationProtectionContainersClientWithBaseURI creates an instance of the ReplicationProtectionContainersClient +// client. +func NewReplicationProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationProtectionContainersClient { + return ReplicationProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create operation to create a protection container. +// Parameters: +// fabricName - unique fabric ARM name. +// protectionContainerName - unique protection container ARM name. +// creationInput - creation input. +func (client ReplicationProtectionContainersClient) Create(ctx context.Context, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput) (result ReplicationProtectionContainersCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, fabricName, protectionContainerName, creationInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationProtectionContainersClient) CreatePreparer(ctx context.Context, fabricName string, protectionContainerName string, creationInput CreateProtectionContainerInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}", pathParameters), + autorest.WithJSON(creationInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainersClient) CreateSender(req *http.Request) (future ReplicationProtectionContainersCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainersClient) CreateResponder(resp *http.Response) (result ProtectionContainer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete operation to remove a protection container. +// Parameters: +// fabricName - unique fabric ARM name. +// protectionContainerName - unique protection container ARM name. +func (client ReplicationProtectionContainersClient) Delete(ctx context.Context, fabricName string, protectionContainerName string) (result ReplicationProtectionContainersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, protectionContainerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationProtectionContainersClient) DeletePreparer(ctx context.Context, fabricName string, protectionContainerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainersClient) DeleteSender(req *http.Request) (future ReplicationProtectionContainersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DiscoverProtectableItem the operation to a add a protectable item to a protection container(Add physical server.) +// Parameters: +// fabricName - the name of the fabric. +// protectionContainerName - the name of the protection container. +// discoverProtectableItemRequest - the request object to add a protectable item. +func (client ReplicationProtectionContainersClient) DiscoverProtectableItem(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest) (result ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.DiscoverProtectableItem") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DiscoverProtectableItemPreparer(ctx, fabricName, protectionContainerName, discoverProtectableItemRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "DiscoverProtectableItem", nil, "Failure preparing request") + return + } + + result, err = client.DiscoverProtectableItemSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "DiscoverProtectableItem", result.Response(), "Failure sending request") + return + } + + return +} + +// DiscoverProtectableItemPreparer prepares the DiscoverProtectableItem request. +func (client ReplicationProtectionContainersClient) DiscoverProtectableItemPreparer(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest DiscoverProtectableItemRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/discoverProtectableItem", pathParameters), + autorest.WithJSON(discoverProtectableItemRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DiscoverProtectableItemSender sends the DiscoverProtectableItem request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainersClient) DiscoverProtectableItemSender(req *http.Request) (future ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DiscoverProtectableItemResponder handles the response to the DiscoverProtectableItem request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainersClient) DiscoverProtectableItemResponder(resp *http.Response) (result ProtectionContainer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the details of a protection container. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +func (client ReplicationProtectionContainersClient) Get(ctx context.Context, fabricName string, protectionContainerName string) (result ProtectionContainer, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, protectionContainerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationProtectionContainersClient) GetPreparer(ctx context.Context, fabricName string, protectionContainerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainersClient) GetResponder(resp *http.Response) (result ProtectionContainer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the protection containers in a vault. +func (client ReplicationProtectionContainersClient) List(ctx context.Context) (result ProtectionContainerCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.List") + defer func() { + sc := -1 + if result.pcc.Response.Response != nil { + sc = result.pcc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "List", resp, "Failure sending request") + return + } + + result.pcc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationProtectionContainersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainersClient) ListResponder(resp *http.Response) (result ProtectionContainerCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationProtectionContainersClient) listNextResults(ctx context.Context, lastResults ProtectionContainerCollection) (result ProtectionContainerCollection, err error) { + req, err := lastResults.protectionContainerCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationProtectionContainersClient) ListComplete(ctx context.Context) (result ProtectionContainerCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationFabrics lists the protection containers in the specified fabric. +// Parameters: +// fabricName - fabric name. +func (client ReplicationProtectionContainersClient) ListByReplicationFabrics(ctx context.Context, fabricName string) (result ProtectionContainerCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.pcc.Response.Response != nil { + sc = result.pcc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationFabricsNextResults + req, err := client.ListByReplicationFabricsPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "ListByReplicationFabrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.pcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "ListByReplicationFabrics", resp, "Failure sending request") + return + } + + result.pcc, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "ListByReplicationFabrics", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationFabricsPreparer prepares the ListByReplicationFabrics request. +func (client ReplicationProtectionContainersClient) ListByReplicationFabricsPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationFabricsSender sends the ListByReplicationFabrics request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainersClient) ListByReplicationFabricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationFabricsResponder handles the response to the ListByReplicationFabrics request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainersClient) ListByReplicationFabricsResponder(resp *http.Response) (result ProtectionContainerCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationFabricsNextResults retrieves the next set of results, if any. +func (client ReplicationProtectionContainersClient) listByReplicationFabricsNextResults(ctx context.Context, lastResults ProtectionContainerCollection) (result ProtectionContainerCollection, err error) { + req, err := lastResults.protectionContainerCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "listByReplicationFabricsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "listByReplicationFabricsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "listByReplicationFabricsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationFabricsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationProtectionContainersClient) ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result ProtectionContainerCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationFabrics(ctx, fabricName) + return +} + +// SwitchProtection operation to switch protection from one container to another or one replication provider to +// another. +// Parameters: +// fabricName - unique fabric name. +// protectionContainerName - protection container name. +// switchInput - switch protection input. +func (client ReplicationProtectionContainersClient) SwitchProtection(ctx context.Context, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput) (result ReplicationProtectionContainersSwitchProtectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationProtectionContainersClient.SwitchProtection") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SwitchProtectionPreparer(ctx, fabricName, protectionContainerName, switchInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "SwitchProtection", nil, "Failure preparing request") + return + } + + result, err = client.SwitchProtectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationProtectionContainersClient", "SwitchProtection", result.Response(), "Failure sending request") + return + } + + return +} + +// SwitchProtectionPreparer prepares the SwitchProtection request. +func (client ReplicationProtectionContainersClient) SwitchProtectionPreparer(ctx context.Context, fabricName string, protectionContainerName string, switchInput SwitchProtectionInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection", pathParameters), + autorest.WithJSON(switchInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SwitchProtectionSender sends the SwitchProtection request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationProtectionContainersClient) SwitchProtectionSender(req *http.Request) (future ReplicationProtectionContainersSwitchProtectionFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// SwitchProtectionResponder handles the response to the SwitchProtection request. The method always +// closes the http.Response Body. +func (client ReplicationProtectionContainersClient) SwitchProtectionResponder(resp *http.Response) (result ProtectionContainer, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go new file mode 100644 index 000000000000..71f447905bfc --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryplans.go @@ -0,0 +1,976 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationRecoveryPlansClient is the client for the ReplicationRecoveryPlans methods of the Siterecovery service. +type ReplicationRecoveryPlansClient struct { + BaseClient +} + +// NewReplicationRecoveryPlansClient creates an instance of the ReplicationRecoveryPlansClient client. +func NewReplicationRecoveryPlansClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryPlansClient { + return NewReplicationRecoveryPlansClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationRecoveryPlansClientWithBaseURI creates an instance of the ReplicationRecoveryPlansClient client. +func NewReplicationRecoveryPlansClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryPlansClient { + return ReplicationRecoveryPlansClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to create a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +// input - recovery Plan creation input. +func (client ReplicationRecoveryPlansClient) Create(ctx context.Context, recoveryPlanName string, input CreateRecoveryPlanInput) (result ReplicationRecoveryPlansCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "input.Properties.PrimaryFabricID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "input.Properties.RecoveryFabricID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "input.Properties.Groups", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationRecoveryPlansClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, recoveryPlanName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationRecoveryPlansClient) CreatePreparer(ctx context.Context, recoveryPlanName string, input CreateRecoveryPlanInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) CreateSender(req *http.Request) (future ReplicationRecoveryPlansCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) CreateResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +func (client ReplicationRecoveryPlansClient) Delete(ctx context.Context, recoveryPlanName string) (result ReplicationRecoveryPlansDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, recoveryPlanName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationRecoveryPlansClient) DeletePreparer(ctx context.Context, recoveryPlanName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) DeleteSender(req *http.Request) (future ReplicationRecoveryPlansDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// FailoverCommit the operation to commit the fail over of a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +func (client ReplicationRecoveryPlansClient) FailoverCommit(ctx context.Context, recoveryPlanName string) (result ReplicationRecoveryPlansFailoverCommitFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.FailoverCommit") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.FailoverCommitPreparer(ctx, recoveryPlanName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "FailoverCommit", nil, "Failure preparing request") + return + } + + result, err = client.FailoverCommitSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "FailoverCommit", result.Response(), "Failure sending request") + return + } + + return +} + +// FailoverCommitPreparer prepares the FailoverCommit request. +func (client ReplicationRecoveryPlansClient) FailoverCommitPreparer(ctx context.Context, recoveryPlanName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/failoverCommit", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// FailoverCommitSender sends the FailoverCommit request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) FailoverCommitSender(req *http.Request) (future ReplicationRecoveryPlansFailoverCommitFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// FailoverCommitResponder handles the response to the FailoverCommit request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) FailoverCommitResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the details of the recovery plan. +// Parameters: +// recoveryPlanName - name of the recovery plan. +func (client ReplicationRecoveryPlansClient) Get(ctx context.Context, recoveryPlanName string) (result RecoveryPlan, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, recoveryPlanName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationRecoveryPlansClient) GetPreparer(ctx context.Context, recoveryPlanName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) GetResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the recovery plans in the vault. +func (client ReplicationRecoveryPlansClient) List(ctx context.Context) (result RecoveryPlanCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.List") + defer func() { + sc := -1 + if result.RPCVar.Response.Response != nil { + sc = result.RPCVar.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.RPCVar.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "List", resp, "Failure sending request") + return + } + + result.RPCVar, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationRecoveryPlansClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) ListResponder(resp *http.Response) (result RecoveryPlanCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationRecoveryPlansClient) listNextResults(ctx context.Context, lastResults RecoveryPlanCollection) (result RecoveryPlanCollection, err error) { + req, err := lastResults.recoveryPlanCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationRecoveryPlansClient) ListComplete(ctx context.Context) (result RecoveryPlanCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// PlannedFailover the operation to start the planned failover of a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +// input - failover input. +func (client ReplicationRecoveryPlansClient) PlannedFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput) (result ReplicationRecoveryPlansPlannedFailoverFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.PlannedFailover") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationRecoveryPlansClient", "PlannedFailover", err.Error()) + } + + req, err := client.PlannedFailoverPreparer(ctx, recoveryPlanName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "PlannedFailover", nil, "Failure preparing request") + return + } + + result, err = client.PlannedFailoverSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "PlannedFailover", result.Response(), "Failure sending request") + return + } + + return +} + +// PlannedFailoverPreparer prepares the PlannedFailover request. +func (client ReplicationRecoveryPlansClient) PlannedFailoverPreparer(ctx context.Context, recoveryPlanName string, input RecoveryPlanPlannedFailoverInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/plannedFailover", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PlannedFailoverSender sends the PlannedFailover request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) PlannedFailoverSender(req *http.Request) (future ReplicationRecoveryPlansPlannedFailoverFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PlannedFailoverResponder handles the response to the PlannedFailover request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) PlannedFailoverResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Reprotect the operation to reprotect(reverse replicate) a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +func (client ReplicationRecoveryPlansClient) Reprotect(ctx context.Context, recoveryPlanName string) (result ReplicationRecoveryPlansReprotectFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.Reprotect") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ReprotectPreparer(ctx, recoveryPlanName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Reprotect", nil, "Failure preparing request") + return + } + + result, err = client.ReprotectSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Reprotect", result.Response(), "Failure sending request") + return + } + + return +} + +// ReprotectPreparer prepares the Reprotect request. +func (client ReplicationRecoveryPlansClient) ReprotectPreparer(ctx context.Context, recoveryPlanName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/reProtect", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReprotectSender sends the Reprotect request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) ReprotectSender(req *http.Request) (future ReplicationRecoveryPlansReprotectFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ReprotectResponder handles the response to the Reprotect request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) ReprotectResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// TestFailover the operation to start the test failover of a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +// input - failover input. +func (client ReplicationRecoveryPlansClient) TestFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverInput) (result ReplicationRecoveryPlansTestFailoverFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.TestFailover") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "input.Properties.NetworkType", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationRecoveryPlansClient", "TestFailover", err.Error()) + } + + req, err := client.TestFailoverPreparer(ctx, recoveryPlanName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "TestFailover", nil, "Failure preparing request") + return + } + + result, err = client.TestFailoverSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "TestFailover", result.Response(), "Failure sending request") + return + } + + return +} + +// TestFailoverPreparer prepares the TestFailover request. +func (client ReplicationRecoveryPlansClient) TestFailoverPreparer(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailover", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TestFailoverSender sends the TestFailover request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) TestFailoverSender(req *http.Request) (future ReplicationRecoveryPlansTestFailoverFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// TestFailoverResponder handles the response to the TestFailover request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) TestFailoverResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// TestFailoverCleanup the operation to cleanup test failover of a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +// input - test failover cleanup input. +func (client ReplicationRecoveryPlansClient) TestFailoverCleanup(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput) (result ReplicationRecoveryPlansTestFailoverCleanupFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.TestFailoverCleanup") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationRecoveryPlansClient", "TestFailoverCleanup", err.Error()) + } + + req, err := client.TestFailoverCleanupPreparer(ctx, recoveryPlanName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "TestFailoverCleanup", nil, "Failure preparing request") + return + } + + result, err = client.TestFailoverCleanupSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "TestFailoverCleanup", result.Response(), "Failure sending request") + return + } + + return +} + +// TestFailoverCleanupPreparer prepares the TestFailoverCleanup request. +func (client ReplicationRecoveryPlansClient) TestFailoverCleanupPreparer(ctx context.Context, recoveryPlanName string, input RecoveryPlanTestFailoverCleanupInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/testFailoverCleanup", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TestFailoverCleanupSender sends the TestFailoverCleanup request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) TestFailoverCleanupSender(req *http.Request) (future ReplicationRecoveryPlansTestFailoverCleanupFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// TestFailoverCleanupResponder handles the response to the TestFailoverCleanup request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) TestFailoverCleanupResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UnplannedFailover the operation to start the failover of a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +// input - failover input. +func (client ReplicationRecoveryPlansClient) UnplannedFailover(ctx context.Context, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput) (result ReplicationRecoveryPlansUnplannedFailoverFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.UnplannedFailover") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationRecoveryPlansClient", "UnplannedFailover", err.Error()) + } + + req, err := client.UnplannedFailoverPreparer(ctx, recoveryPlanName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "UnplannedFailover", nil, "Failure preparing request") + return + } + + result, err = client.UnplannedFailoverSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "UnplannedFailover", result.Response(), "Failure sending request") + return + } + + return +} + +// UnplannedFailoverPreparer prepares the UnplannedFailover request. +func (client ReplicationRecoveryPlansClient) UnplannedFailoverPreparer(ctx context.Context, recoveryPlanName string, input RecoveryPlanUnplannedFailoverInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}/unplannedFailover", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnplannedFailoverSender sends the UnplannedFailover request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) UnplannedFailoverSender(req *http.Request) (future ReplicationRecoveryPlansUnplannedFailoverFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UnplannedFailoverResponder handles the response to the UnplannedFailover request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) UnplannedFailoverResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update the operation to update a recovery plan. +// Parameters: +// recoveryPlanName - recovery plan name. +// input - update recovery plan input +func (client ReplicationRecoveryPlansClient) Update(ctx context.Context, recoveryPlanName string, input UpdateRecoveryPlanInput) (result ReplicationRecoveryPlansUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryPlansClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, recoveryPlanName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryPlansClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationRecoveryPlansClient) UpdatePreparer(ctx context.Context, recoveryPlanName string, input UpdateRecoveryPlanInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recoveryPlanName": autorest.Encode("path", recoveryPlanName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryPlansClient) UpdateSender(req *http.Request) (future ReplicationRecoveryPlansUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryPlansClient) UpdateResponder(resp *http.Response) (result RecoveryPlan, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go new file mode 100644 index 000000000000..d8574f3bb9f6 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationrecoveryservicesproviders.go @@ -0,0 +1,690 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationRecoveryServicesProvidersClient is the client for the ReplicationRecoveryServicesProviders methods of the +// Siterecovery service. +type ReplicationRecoveryServicesProvidersClient struct { + BaseClient +} + +// NewReplicationRecoveryServicesProvidersClient creates an instance of the ReplicationRecoveryServicesProvidersClient +// client. +func NewReplicationRecoveryServicesProvidersClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryServicesProvidersClient { + return NewReplicationRecoveryServicesProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationRecoveryServicesProvidersClientWithBaseURI creates an instance of the +// ReplicationRecoveryServicesProvidersClient client. +func NewReplicationRecoveryServicesProvidersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationRecoveryServicesProvidersClient { + return ReplicationRecoveryServicesProvidersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to add a recovery services provider. +// Parameters: +// fabricName - fabric name. +// providerName - recovery services provider name. +// addProviderInput - add provider input. +func (client ReplicationRecoveryServicesProvidersClient) Create(ctx context.Context, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput) (result ReplicationRecoveryServicesProvidersCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: addProviderInput, + Constraints: []validation.Constraint{{Target: "addProviderInput.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "addProviderInput.Properties.MachineName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.AuthenticationIdentityInput", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "addProviderInput.Properties.AuthenticationIdentityInput.TenantID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.AuthenticationIdentityInput.ApplicationID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.AuthenticationIdentityInput.ObjectID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.AuthenticationIdentityInput.Audience", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.AuthenticationIdentityInput.AadAuthority", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "addProviderInput.Properties.ResourceAccessIdentityInput", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "addProviderInput.Properties.ResourceAccessIdentityInput.TenantID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.ResourceAccessIdentityInput.ApplicationID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.ResourceAccessIdentityInput.ObjectID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.ResourceAccessIdentityInput.Audience", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "addProviderInput.Properties.ResourceAccessIdentityInput.AadAuthority", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationRecoveryServicesProvidersClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, fabricName, providerName, addProviderInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationRecoveryServicesProvidersClient) CreatePreparer(ctx context.Context, fabricName string, providerName string, addProviderInput AddRecoveryServicesProviderInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}", pathParameters), + autorest.WithJSON(addProviderInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryServicesProvidersClient) CreateSender(req *http.Request) (future ReplicationRecoveryServicesProvidersCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryServicesProvidersClient) CreateResponder(resp *http.Response) (result RecoveryServicesProvider, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to removes/delete(unregister) a recovery services provider from the vault +// Parameters: +// fabricName - fabric name. +// providerName - recovery services provider name. +func (client ReplicationRecoveryServicesProvidersClient) Delete(ctx context.Context, fabricName string, providerName string) (result ReplicationRecoveryServicesProvidersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, providerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationRecoveryServicesProvidersClient) DeletePreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryServicesProvidersClient) DeleteSender(req *http.Request) (future ReplicationRecoveryServicesProvidersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryServicesProvidersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of registered recovery services provider. +// Parameters: +// fabricName - fabric name. +// providerName - recovery services provider name +func (client ReplicationRecoveryServicesProvidersClient) Get(ctx context.Context, fabricName string, providerName string) (result RecoveryServicesProvider, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, providerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationRecoveryServicesProvidersClient) GetPreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryServicesProvidersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryServicesProvidersClient) GetResponder(resp *http.Response) (result RecoveryServicesProvider, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the registered recovery services providers in the vault +func (client ReplicationRecoveryServicesProvidersClient) List(ctx context.Context) (result RecoveryServicesProviderCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.List") + defer func() { + sc := -1 + if result.rspc.Response.Response != nil { + sc = result.rspc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.rspc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "List", resp, "Failure sending request") + return + } + + result.rspc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationRecoveryServicesProvidersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryServicesProvidersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryServicesProvidersClient) ListResponder(resp *http.Response) (result RecoveryServicesProviderCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationRecoveryServicesProvidersClient) listNextResults(ctx context.Context, lastResults RecoveryServicesProviderCollection) (result RecoveryServicesProviderCollection, err error) { + req, err := lastResults.recoveryServicesProviderCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationRecoveryServicesProvidersClient) ListComplete(ctx context.Context) (result RecoveryServicesProviderCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationFabrics lists the registered recovery services providers for the specified fabric. +// Parameters: +// fabricName - fabric name +func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabrics(ctx context.Context, fabricName string) (result RecoveryServicesProviderCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.rspc.Response.Response != nil { + sc = result.rspc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationFabricsNextResults + req, err := client.ListByReplicationFabricsPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "ListByReplicationFabrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.rspc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "ListByReplicationFabrics", resp, "Failure sending request") + return + } + + result.rspc, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "ListByReplicationFabrics", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationFabricsPreparer prepares the ListByReplicationFabrics request. +func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationFabricsSender sends the ListByReplicationFabrics request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationFabricsResponder handles the response to the ListByReplicationFabrics request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsResponder(resp *http.Response) (result RecoveryServicesProviderCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationFabricsNextResults retrieves the next set of results, if any. +func (client ReplicationRecoveryServicesProvidersClient) listByReplicationFabricsNextResults(ctx context.Context, lastResults RecoveryServicesProviderCollection) (result RecoveryServicesProviderCollection, err error) { + req, err := lastResults.recoveryServicesProviderCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listByReplicationFabricsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listByReplicationFabricsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "listByReplicationFabricsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationFabricsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationRecoveryServicesProvidersClient) ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result RecoveryServicesProviderCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationFabrics(ctx, fabricName) + return +} + +// Purge the operation to purge(force delete) a recovery services provider from the vault. +// Parameters: +// fabricName - fabric name. +// providerName - recovery services provider name. +func (client ReplicationRecoveryServicesProvidersClient) Purge(ctx context.Context, fabricName string, providerName string) (result ReplicationRecoveryServicesProvidersPurgeFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.Purge") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PurgePreparer(ctx, fabricName, providerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Purge", nil, "Failure preparing request") + return + } + + result, err = client.PurgeSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "Purge", result.Response(), "Failure sending request") + return + } + + return +} + +// PurgePreparer prepares the Purge request. +func (client ReplicationRecoveryServicesProvidersClient) PurgePreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PurgeSender sends the Purge request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryServicesProvidersClient) PurgeSender(req *http.Request) (future ReplicationRecoveryServicesProvidersPurgeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PurgeResponder handles the response to the Purge request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryServicesProvidersClient) PurgeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// RefreshProvider the operation to refresh the information from the recovery services provider. +// Parameters: +// fabricName - fabric name. +// providerName - recovery services provider name. +func (client ReplicationRecoveryServicesProvidersClient) RefreshProvider(ctx context.Context, fabricName string, providerName string) (result ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationRecoveryServicesProvidersClient.RefreshProvider") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RefreshProviderPreparer(ctx, fabricName, providerName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "RefreshProvider", nil, "Failure preparing request") + return + } + + result, err = client.RefreshProviderSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationRecoveryServicesProvidersClient", "RefreshProvider", result.Response(), "Failure sending request") + return + } + + return +} + +// RefreshProviderPreparer prepares the RefreshProvider request. +func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderPreparer(ctx context.Context, fabricName string, providerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RefreshProviderSender sends the RefreshProvider request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderSender(req *http.Request) (future ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RefreshProviderResponder handles the response to the RefreshProvider request. The method always +// closes the http.Response Body. +func (client ReplicationRecoveryServicesProvidersClient) RefreshProviderResponder(resp *http.Response) (result RecoveryServicesProvider, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go new file mode 100644 index 000000000000..d4fb88886468 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassificationmappings.go @@ -0,0 +1,518 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationStorageClassificationMappingsClient is the client for the ReplicationStorageClassificationMappings +// methods of the Siterecovery service. +type ReplicationStorageClassificationMappingsClient struct { + BaseClient +} + +// NewReplicationStorageClassificationMappingsClient creates an instance of the +// ReplicationStorageClassificationMappingsClient client. +func NewReplicationStorageClassificationMappingsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationMappingsClient { + return NewReplicationStorageClassificationMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationStorageClassificationMappingsClientWithBaseURI creates an instance of the +// ReplicationStorageClassificationMappingsClient client. +func NewReplicationStorageClassificationMappingsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationMappingsClient { + return ReplicationStorageClassificationMappingsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to create a storage classification mapping. +// Parameters: +// fabricName - fabric name. +// storageClassificationName - storage classification name. +// storageClassificationMappingName - storage classification mapping name. +// pairingInput - pairing input. +func (client ReplicationStorageClassificationMappingsClient) Create(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput) (result ReplicationStorageClassificationMappingsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationMappingsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, fabricName, storageClassificationName, storageClassificationMappingName, pairingInput) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationStorageClassificationMappingsClient) CreatePreparer(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput StorageClassificationMappingInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "storageClassificationMappingName": autorest.Encode("path", storageClassificationMappingName), + "storageClassificationName": autorest.Encode("path", storageClassificationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}", pathParameters), + autorest.WithJSON(pairingInput), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationMappingsClient) CreateSender(req *http.Request) (future ReplicationStorageClassificationMappingsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationMappingsClient) CreateResponder(resp *http.Response) (result StorageClassificationMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete a storage classification mapping. +// Parameters: +// fabricName - fabric name. +// storageClassificationName - storage classification name. +// storageClassificationMappingName - storage classification mapping name. +func (client ReplicationStorageClassificationMappingsClient) Delete(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result ReplicationStorageClassificationMappingsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationMappingsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, storageClassificationName, storageClassificationMappingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationStorageClassificationMappingsClient) DeletePreparer(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "storageClassificationMappingName": autorest.Encode("path", storageClassificationMappingName), + "storageClassificationName": autorest.Encode("path", storageClassificationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationMappingsClient) DeleteSender(req *http.Request) (future ReplicationStorageClassificationMappingsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationMappingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of the specified storage classification mapping. +// Parameters: +// fabricName - fabric name. +// storageClassificationName - storage classification name. +// storageClassificationMappingName - storage classification mapping name. +func (client ReplicationStorageClassificationMappingsClient) Get(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result StorageClassificationMapping, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationMappingsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, storageClassificationName, storageClassificationMappingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationStorageClassificationMappingsClient) GetPreparer(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "storageClassificationMappingName": autorest.Encode("path", storageClassificationMappingName), + "storageClassificationName": autorest.Encode("path", storageClassificationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings/{storageClassificationMappingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationMappingsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationMappingsClient) GetResponder(resp *http.Response) (result StorageClassificationMapping, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the storage classification mappings in the vault. +func (client ReplicationStorageClassificationMappingsClient) List(ctx context.Context) (result StorageClassificationMappingCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationMappingsClient.List") + defer func() { + sc := -1 + if result.scmc.Response.Response != nil { + sc = result.scmc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.scmc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "List", resp, "Failure sending request") + return + } + + result.scmc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationStorageClassificationMappingsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassificationMappings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationMappingsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationMappingsClient) ListResponder(resp *http.Response) (result StorageClassificationMappingCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationStorageClassificationMappingsClient) listNextResults(ctx context.Context, lastResults StorageClassificationMappingCollection) (result StorageClassificationMappingCollection, err error) { + req, err := lastResults.storageClassificationMappingCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationStorageClassificationMappingsClient) ListComplete(ctx context.Context) (result StorageClassificationMappingCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationMappingsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationStorageClassifications lists the storage classification mappings for the fabric. +// Parameters: +// fabricName - fabric name. +// storageClassificationName - storage classification name. +func (client ReplicationStorageClassificationMappingsClient) ListByReplicationStorageClassifications(ctx context.Context, fabricName string, storageClassificationName string) (result StorageClassificationMappingCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationMappingsClient.ListByReplicationStorageClassifications") + defer func() { + sc := -1 + if result.scmc.Response.Response != nil { + sc = result.scmc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationStorageClassificationsNextResults + req, err := client.ListByReplicationStorageClassificationsPreparer(ctx, fabricName, storageClassificationName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "ListByReplicationStorageClassifications", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationStorageClassificationsSender(req) + if err != nil { + result.scmc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "ListByReplicationStorageClassifications", resp, "Failure sending request") + return + } + + result.scmc, err = client.ListByReplicationStorageClassificationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "ListByReplicationStorageClassifications", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationStorageClassificationsPreparer prepares the ListByReplicationStorageClassifications request. +func (client ReplicationStorageClassificationMappingsClient) ListByReplicationStorageClassificationsPreparer(ctx context.Context, fabricName string, storageClassificationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "storageClassificationName": autorest.Encode("path", storageClassificationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}/replicationStorageClassificationMappings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationStorageClassificationsSender sends the ListByReplicationStorageClassifications request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationMappingsClient) ListByReplicationStorageClassificationsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationStorageClassificationsResponder handles the response to the ListByReplicationStorageClassifications request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationMappingsClient) ListByReplicationStorageClassificationsResponder(resp *http.Response) (result StorageClassificationMappingCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationStorageClassificationsNextResults retrieves the next set of results, if any. +func (client ReplicationStorageClassificationMappingsClient) listByReplicationStorageClassificationsNextResults(ctx context.Context, lastResults StorageClassificationMappingCollection) (result StorageClassificationMappingCollection, err error) { + req, err := lastResults.storageClassificationMappingCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "listByReplicationStorageClassificationsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationStorageClassificationsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "listByReplicationStorageClassificationsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationStorageClassificationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationMappingsClient", "listByReplicationStorageClassificationsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationStorageClassificationsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationStorageClassificationMappingsClient) ListByReplicationStorageClassificationsComplete(ctx context.Context, fabricName string, storageClassificationName string) (result StorageClassificationMappingCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationMappingsClient.ListByReplicationStorageClassifications") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationStorageClassifications(ctx, fabricName, storageClassificationName) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go new file mode 100644 index 000000000000..9175d990885d --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationstorageclassifications.go @@ -0,0 +1,350 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationStorageClassificationsClient is the client for the ReplicationStorageClassifications methods of the +// Siterecovery service. +type ReplicationStorageClassificationsClient struct { + BaseClient +} + +// NewReplicationStorageClassificationsClient creates an instance of the ReplicationStorageClassificationsClient +// client. +func NewReplicationStorageClassificationsClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationsClient { + return NewReplicationStorageClassificationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationStorageClassificationsClientWithBaseURI creates an instance of the +// ReplicationStorageClassificationsClient client. +func NewReplicationStorageClassificationsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationStorageClassificationsClient { + return ReplicationStorageClassificationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get gets the details of the specified storage classification. +// Parameters: +// fabricName - fabric name. +// storageClassificationName - storage classification name. +func (client ReplicationStorageClassificationsClient) Get(ctx context.Context, fabricName string, storageClassificationName string) (result StorageClassification, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, storageClassificationName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationStorageClassificationsClient) GetPreparer(ctx context.Context, fabricName string, storageClassificationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "storageClassificationName": autorest.Encode("path", storageClassificationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications/{storageClassificationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationsClient) GetResponder(resp *http.Response) (result StorageClassification, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the storage classifications in the vault. +func (client ReplicationStorageClassificationsClient) List(ctx context.Context) (result StorageClassificationCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationsClient.List") + defer func() { + sc := -1 + if result.scc.Response.Response != nil { + sc = result.scc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.scc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "List", resp, "Failure sending request") + return + } + + result.scc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationStorageClassificationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationStorageClassifications", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationsClient) ListResponder(resp *http.Response) (result StorageClassificationCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationStorageClassificationsClient) listNextResults(ctx context.Context, lastResults StorageClassificationCollection) (result StorageClassificationCollection, err error) { + req, err := lastResults.storageClassificationCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationStorageClassificationsClient) ListComplete(ctx context.Context) (result StorageClassificationCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationFabrics lists the storage classifications available in the specified fabric. +// Parameters: +// fabricName - site name of interest. +func (client ReplicationStorageClassificationsClient) ListByReplicationFabrics(ctx context.Context, fabricName string) (result StorageClassificationCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationsClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.scc.Response.Response != nil { + sc = result.scc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationFabricsNextResults + req, err := client.ListByReplicationFabricsPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "ListByReplicationFabrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.scc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "ListByReplicationFabrics", resp, "Failure sending request") + return + } + + result.scc, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "ListByReplicationFabrics", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationFabricsPreparer prepares the ListByReplicationFabrics request. +func (client ReplicationStorageClassificationsClient) ListByReplicationFabricsPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationStorageClassifications", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationFabricsSender sends the ListByReplicationFabrics request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationStorageClassificationsClient) ListByReplicationFabricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationFabricsResponder handles the response to the ListByReplicationFabrics request. The method always +// closes the http.Response Body. +func (client ReplicationStorageClassificationsClient) ListByReplicationFabricsResponder(resp *http.Response) (result StorageClassificationCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationFabricsNextResults retrieves the next set of results, if any. +func (client ReplicationStorageClassificationsClient) listByReplicationFabricsNextResults(ctx context.Context, lastResults StorageClassificationCollection) (result StorageClassificationCollection, err error) { + req, err := lastResults.storageClassificationCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "listByReplicationFabricsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "listByReplicationFabricsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationStorageClassificationsClient", "listByReplicationFabricsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationFabricsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationStorageClassificationsClient) ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result StorageClassificationCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationStorageClassificationsClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationFabrics(ctx, fabricName) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go new file mode 100644 index 000000000000..ab293a08e6e9 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaulthealth.go @@ -0,0 +1,189 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationVaultHealthClient is the client for the ReplicationVaultHealth methods of the Siterecovery service. +type ReplicationVaultHealthClient struct { + BaseClient +} + +// NewReplicationVaultHealthClient creates an instance of the ReplicationVaultHealthClient client. +func NewReplicationVaultHealthClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { + return NewReplicationVaultHealthClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client. +func NewReplicationVaultHealthClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { + return ReplicationVaultHealthClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get gets the health details of the vault. +func (client ReplicationVaultHealthClient) Get(ctx context.Context) (result VaultHealthDetails, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationVaultHealthClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationVaultHealthClient) GetPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationVaultHealthClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationVaultHealthClient) GetResponder(resp *http.Response) (result VaultHealthDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Refresh sends the refresh request. +func (client ReplicationVaultHealthClient) Refresh(ctx context.Context) (result ReplicationVaultHealthRefreshFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationVaultHealthClient.Refresh") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RefreshPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthClient", "Refresh", nil, "Failure preparing request") + return + } + + result, err = client.RefreshSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultHealthClient", "Refresh", result.Response(), "Failure sending request") + return + } + + return +} + +// RefreshPreparer prepares the Refresh request. +func (client ReplicationVaultHealthClient) RefreshPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth/default/refresh", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RefreshSender sends the Refresh request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationVaultHealthClient) RefreshSender(req *http.Request) (future ReplicationVaultHealthRefreshFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RefreshResponder handles the response to the Refresh request. The method always +// closes the http.Response Body. +func (client ReplicationVaultHealthClient) RefreshResponder(resp *http.Response) (result VaultHealthDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go new file mode 100644 index 000000000000..82270c31fff8 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvaultsetting.go @@ -0,0 +1,318 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationVaultSettingClient is the client for the ReplicationVaultSetting methods of the Siterecovery service. +type ReplicationVaultSettingClient struct { + BaseClient +} + +// NewReplicationVaultSettingClient creates an instance of the ReplicationVaultSettingClient client. +func NewReplicationVaultSettingClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultSettingClient { + return NewReplicationVaultSettingClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationVaultSettingClientWithBaseURI creates an instance of the ReplicationVaultSettingClient client. +func NewReplicationVaultSettingClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultSettingClient { + return ReplicationVaultSettingClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to configure vault setting. +// Parameters: +// vaultSettingName - vault setting name. +// input - vault setting creation input. +func (client ReplicationVaultSettingClient) Create(ctx context.Context, vaultSettingName string, input VaultSettingCreationInput) (result VaultSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationVaultSettingClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: input, + Constraints: []validation.Constraint{{Target: "input.Properties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "input.Properties.MigrationSolutionID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("siterecovery.ReplicationVaultSettingClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, vaultSettingName, input) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationVaultSettingClient) CreatePreparer(ctx context.Context, vaultSettingName string, input VaultSettingCreationInput) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultSettingName": autorest.Encode("path", vaultSettingName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}", pathParameters), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationVaultSettingClient) CreateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationVaultSettingClient) CreateResponder(resp *http.Response) (result VaultSetting, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the vault setting. This includes the Migration Hub connection settings. +// Parameters: +// vaultSettingName - vault setting name. +func (client ReplicationVaultSettingClient) Get(ctx context.Context, vaultSettingName string) (result VaultSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationVaultSettingClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultSettingName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationVaultSettingClient) GetPreparer(ctx context.Context, vaultSettingName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultSettingName": autorest.Encode("path", vaultSettingName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings/{vaultSettingName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationVaultSettingClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationVaultSettingClient) GetResponder(resp *http.Response) (result VaultSetting, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the list of vault setting. This includes the Migration Hub connection settings. +func (client ReplicationVaultSettingClient) List(ctx context.Context) (result VaultSettingCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationVaultSettingClient.List") + defer func() { + sc := -1 + if result.vsc.Response.Response != nil { + sc = result.vsc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vsc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "List", resp, "Failure sending request") + return + } + + result.vsc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationVaultSettingClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationVaultSettingClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationVaultSettingClient) ListResponder(resp *http.Response) (result VaultSettingCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationVaultSettingClient) listNextResults(ctx context.Context, lastResults VaultSettingCollection) (result VaultSettingCollection, err error) { + req, err := lastResults.vaultSettingCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationVaultSettingClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationVaultSettingClient) ListComplete(ctx context.Context) (result VaultSettingCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationVaultSettingClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go new file mode 100644 index 000000000000..3e18b158e980 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/replicationvcenters.go @@ -0,0 +1,589 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ReplicationvCentersClient is the client for the ReplicationvCenters methods of the Siterecovery service. +type ReplicationvCentersClient struct { + BaseClient +} + +// NewReplicationvCentersClient creates an instance of the ReplicationvCentersClient client. +func NewReplicationvCentersClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationvCentersClient { + return NewReplicationvCentersClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationvCentersClientWithBaseURI creates an instance of the ReplicationvCentersClient client. +func NewReplicationvCentersClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationvCentersClient { + return ReplicationvCentersClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Create the operation to create a vCenter object.. +// Parameters: +// fabricName - fabric name. +// vCenterName - vCenter name. +// addVCenterRequest - the input to the add vCenter operation. +func (client ReplicationvCentersClient) Create(ctx context.Context, fabricName string, vCenterName string, addVCenterRequest AddVCenterRequest) (result ReplicationvCentersCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreatePreparer(ctx, fabricName, vCenterName, addVCenterRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ReplicationvCentersClient) CreatePreparer(ctx context.Context, fabricName string, vCenterName string, addVCenterRequest AddVCenterRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vCenterName": autorest.Encode("path", vCenterName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}", pathParameters), + autorest.WithJSON(addVCenterRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationvCentersClient) CreateSender(req *http.Request) (future ReplicationvCentersCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationvCentersClient) CreateResponder(resp *http.Response) (result VCenter, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to remove(unregister) a registered vCenter server from the vault. +// Parameters: +// fabricName - fabric name. +// vCenterName - vCenter name. +func (client ReplicationvCentersClient) Delete(ctx context.Context, fabricName string, vCenterName string) (result ReplicationvCentersDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, fabricName, vCenterName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationvCentersClient) DeletePreparer(ctx context.Context, fabricName string, vCenterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vCenterName": autorest.Encode("path", vCenterName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationvCentersClient) DeleteSender(req *http.Request) (future ReplicationvCentersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationvCentersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of a registered vCenter server(Add vCenter server.) +// Parameters: +// fabricName - fabric name. +// vCenterName - vCenter name. +func (client ReplicationvCentersClient) Get(ctx context.Context, fabricName string, vCenterName string) (result VCenter, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, fabricName, vCenterName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationvCentersClient) GetPreparer(ctx context.Context, fabricName string, vCenterName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vCenterName": autorest.Encode("path", vCenterName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationvCentersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationvCentersClient) GetResponder(resp *http.Response) (result VCenter, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the vCenter servers registered in the vault. +func (client ReplicationvCentersClient) List(ctx context.Context) (result VCenterCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.List") + defer func() { + sc := -1 + if result.vcc.Response.Response != nil { + sc = result.vcc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.vcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "List", resp, "Failure sending request") + return + } + + result.vcc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationvCentersClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationvCenters", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationvCentersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationvCentersClient) ListResponder(resp *http.Response) (result VCenterCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ReplicationvCentersClient) listNextResults(ctx context.Context, lastResults VCenterCollection) (result VCenterCollection, err error) { + req, err := lastResults.vCenterCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationvCentersClient) ListComplete(ctx context.Context) (result VCenterCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByReplicationFabrics lists the vCenter servers registered in a fabric. +// Parameters: +// fabricName - fabric name. +func (client ReplicationvCentersClient) ListByReplicationFabrics(ctx context.Context, fabricName string) (result VCenterCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.vcc.Response.Response != nil { + sc = result.vcc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationFabricsNextResults + req, err := client.ListByReplicationFabricsPreparer(ctx, fabricName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "ListByReplicationFabrics", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.vcc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "ListByReplicationFabrics", resp, "Failure sending request") + return + } + + result.vcc, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "ListByReplicationFabrics", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationFabricsPreparer prepares the ListByReplicationFabrics request. +func (client ReplicationvCentersClient) ListByReplicationFabricsPreparer(ctx context.Context, fabricName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationFabricsSender sends the ListByReplicationFabrics request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationvCentersClient) ListByReplicationFabricsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationFabricsResponder handles the response to the ListByReplicationFabrics request. The method always +// closes the http.Response Body. +func (client ReplicationvCentersClient) ListByReplicationFabricsResponder(resp *http.Response) (result VCenterCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationFabricsNextResults retrieves the next set of results, if any. +func (client ReplicationvCentersClient) listByReplicationFabricsNextResults(ctx context.Context, lastResults VCenterCollection) (result VCenterCollection, err error) { + req, err := lastResults.vCenterCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "listByReplicationFabricsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationFabricsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "listByReplicationFabricsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationFabricsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "listByReplicationFabricsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationFabricsComplete enumerates all values, automatically crossing page boundaries as required. +func (client ReplicationvCentersClient) ListByReplicationFabricsComplete(ctx context.Context, fabricName string) (result VCenterCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.ListByReplicationFabrics") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationFabrics(ctx, fabricName) + return +} + +// Update the operation to update a registered vCenter. +// Parameters: +// fabricName - fabric name. +// vCenterName - vCenter name +// updateVCenterRequest - the input to the update vCenter operation. +func (client ReplicationvCentersClient) Update(ctx context.Context, fabricName string, vCenterName string, updateVCenterRequest UpdateVCenterRequest) (result ReplicationvCentersUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationvCentersClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, fabricName, vCenterName, updateVCenterRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.ReplicationvCentersClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationvCentersClient) UpdatePreparer(ctx context.Context, fabricName string, vCenterName string, updateVCenterRequest UpdateVCenterRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vCenterName": autorest.Encode("path", vCenterName), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationvCenters/{vCenterName}", pathParameters), + autorest.WithJSON(updateVCenterRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationvCentersClient) UpdateSender(req *http.Request) (future ReplicationvCentersUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationvCentersClient) UpdateResponder(resp *http.Response) (result VCenter, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go new file mode 100644 index 000000000000..6f2f7aa445f3 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/siterecoveryapi/interfaces.go @@ -0,0 +1,305 @@ +package siterecoveryapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2018-07-10/siterecovery" +) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result siterecovery.OperationsDiscoveryCollectionPage, err error) +} + +var _ OperationsClientAPI = (*siterecovery.OperationsClient)(nil) + +// ReplicationAlertSettingsClientAPI contains the set of methods on the ReplicationAlertSettingsClient type. +type ReplicationAlertSettingsClientAPI interface { + Create(ctx context.Context, alertSettingName string, request siterecovery.ConfigureAlertRequest) (result siterecovery.Alert, err error) + Get(ctx context.Context, alertSettingName string) (result siterecovery.Alert, err error) + List(ctx context.Context) (result siterecovery.AlertCollectionPage, err error) +} + +var _ ReplicationAlertSettingsClientAPI = (*siterecovery.ReplicationAlertSettingsClient)(nil) + +// ReplicationEligibilityResultsClientAPI contains the set of methods on the ReplicationEligibilityResultsClient type. +type ReplicationEligibilityResultsClientAPI interface { + Get(ctx context.Context, virtualMachineName string) (result siterecovery.ReplicationEligibilityResultsGetFuture, err error) + List(ctx context.Context, virtualMachineName string) (result siterecovery.ReplicationEligibilityResultsListFuture, err error) +} + +var _ ReplicationEligibilityResultsClientAPI = (*siterecovery.ReplicationEligibilityResultsClient)(nil) + +// ReplicationEventsClientAPI contains the set of methods on the ReplicationEventsClient type. +type ReplicationEventsClientAPI interface { + Get(ctx context.Context, eventName string) (result siterecovery.Event, err error) + List(ctx context.Context, filter string) (result siterecovery.EventCollectionPage, err error) +} + +var _ ReplicationEventsClientAPI = (*siterecovery.ReplicationEventsClient)(nil) + +// ReplicationFabricsClientAPI contains the set of methods on the ReplicationFabricsClient type. +type ReplicationFabricsClientAPI interface { + CheckConsistency(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsCheckConsistencyFuture, err error) + Create(ctx context.Context, fabricName string, input siterecovery.FabricCreationInput) (result siterecovery.ReplicationFabricsCreateFuture, err error) + Delete(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsDeleteFuture, err error) + Get(ctx context.Context, fabricName string) (result siterecovery.Fabric, err error) + List(ctx context.Context) (result siterecovery.FabricCollectionPage, err error) + MigrateToAad(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsMigrateToAadFuture, err error) + Purge(ctx context.Context, fabricName string) (result siterecovery.ReplicationFabricsPurgeFuture, err error) + ReassociateGateway(ctx context.Context, fabricName string, failoverProcessServerRequest siterecovery.FailoverProcessServerRequest) (result siterecovery.ReplicationFabricsReassociateGatewayFuture, err error) + RenewCertificate(ctx context.Context, fabricName string, renewCertificate siterecovery.RenewCertificateInput) (result siterecovery.ReplicationFabricsRenewCertificateFuture, err error) +} + +var _ ReplicationFabricsClientAPI = (*siterecovery.ReplicationFabricsClient)(nil) + +// ReplicationLogicalNetworksClientAPI contains the set of methods on the ReplicationLogicalNetworksClient type. +type ReplicationLogicalNetworksClientAPI interface { + Get(ctx context.Context, fabricName string, logicalNetworkName string) (result siterecovery.LogicalNetwork, err error) + ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.LogicalNetworkCollectionPage, err error) +} + +var _ ReplicationLogicalNetworksClientAPI = (*siterecovery.ReplicationLogicalNetworksClient)(nil) + +// ReplicationNetworksClientAPI contains the set of methods on the ReplicationNetworksClient type. +type ReplicationNetworksClientAPI interface { + Get(ctx context.Context, fabricName string, networkName string) (result siterecovery.Network, err error) + List(ctx context.Context) (result siterecovery.NetworkCollectionPage, err error) + ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.NetworkCollectionPage, err error) +} + +var _ ReplicationNetworksClientAPI = (*siterecovery.ReplicationNetworksClient)(nil) + +// ReplicationNetworkMappingsClientAPI contains the set of methods on the ReplicationNetworkMappingsClient type. +type ReplicationNetworkMappingsClientAPI interface { + Create(ctx context.Context, fabricName string, networkName string, networkMappingName string, input siterecovery.CreateNetworkMappingInput) (result siterecovery.ReplicationNetworkMappingsCreateFuture, err error) + Delete(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.ReplicationNetworkMappingsDeleteFuture, err error) + Get(ctx context.Context, fabricName string, networkName string, networkMappingName string) (result siterecovery.NetworkMapping, err error) + List(ctx context.Context) (result siterecovery.NetworkMappingCollectionPage, err error) + ListByReplicationNetworks(ctx context.Context, fabricName string, networkName string) (result siterecovery.NetworkMappingCollectionPage, err error) + Update(ctx context.Context, fabricName string, networkName string, networkMappingName string, input siterecovery.UpdateNetworkMappingInput) (result siterecovery.ReplicationNetworkMappingsUpdateFuture, err error) +} + +var _ ReplicationNetworkMappingsClientAPI = (*siterecovery.ReplicationNetworkMappingsClient)(nil) + +// ReplicationProtectionContainersClientAPI contains the set of methods on the ReplicationProtectionContainersClient type. +type ReplicationProtectionContainersClientAPI interface { + Create(ctx context.Context, fabricName string, protectionContainerName string, creationInput siterecovery.CreateProtectionContainerInput) (result siterecovery.ReplicationProtectionContainersCreateFuture, err error) + Delete(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectionContainersDeleteFuture, err error) + DiscoverProtectableItem(ctx context.Context, fabricName string, protectionContainerName string, discoverProtectableItemRequest siterecovery.DiscoverProtectableItemRequest) (result siterecovery.ReplicationProtectionContainersDiscoverProtectableItemFuture, err error) + Get(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainer, err error) + List(ctx context.Context) (result siterecovery.ProtectionContainerCollectionPage, err error) + ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.ProtectionContainerCollectionPage, err error) + SwitchProtection(ctx context.Context, fabricName string, protectionContainerName string, switchInput siterecovery.SwitchProtectionInput) (result siterecovery.ReplicationProtectionContainersSwitchProtectionFuture, err error) +} + +var _ ReplicationProtectionContainersClientAPI = (*siterecovery.ReplicationProtectionContainersClient)(nil) + +// ReplicationMigrationItemsClientAPI contains the set of methods on the ReplicationMigrationItemsClient type. +type ReplicationMigrationItemsClientAPI interface { + Create(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input siterecovery.EnableMigrationInput) (result siterecovery.ReplicationMigrationItemsCreateFuture, err error) + Delete(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, deleteOption string) (result siterecovery.ReplicationMigrationItemsDeleteFuture, err error) + Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationItem, err error) + List(ctx context.Context, skipToken string, filter string) (result siterecovery.MigrationItemCollectionPage, err error) + ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.MigrationItemCollectionPage, err error) + Migrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrateInput siterecovery.MigrateInput) (result siterecovery.ReplicationMigrationItemsMigrateFuture, err error) + TestMigrate(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateInput siterecovery.TestMigrateInput) (result siterecovery.ReplicationMigrationItemsTestMigrateFuture, err error) + TestMigrateCleanup(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, testMigrateCleanupInput siterecovery.TestMigrateCleanupInput) (result siterecovery.ReplicationMigrationItemsTestMigrateCleanupFuture, err error) + Update(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, input siterecovery.UpdateMigrationItemInput) (result siterecovery.ReplicationMigrationItemsUpdateFuture, err error) +} + +var _ ReplicationMigrationItemsClientAPI = (*siterecovery.ReplicationMigrationItemsClient)(nil) + +// MigrationRecoveryPointsClientAPI contains the set of methods on the MigrationRecoveryPointsClient type. +type MigrationRecoveryPointsClientAPI interface { + Get(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string, migrationRecoveryPointName string) (result siterecovery.MigrationRecoveryPoint, err error) + ListByReplicationMigrationItems(ctx context.Context, fabricName string, protectionContainerName string, migrationItemName string) (result siterecovery.MigrationRecoveryPointCollectionPage, err error) +} + +var _ MigrationRecoveryPointsClientAPI = (*siterecovery.MigrationRecoveryPointsClient)(nil) + +// ReplicationProtectableItemsClientAPI contains the set of methods on the ReplicationProtectableItemsClient type. +type ReplicationProtectableItemsClientAPI interface { + Get(ctx context.Context, fabricName string, protectionContainerName string, protectableItemName string) (result siterecovery.ProtectableItem, err error) + ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string, filter string) (result siterecovery.ProtectableItemCollectionPage, err error) +} + +var _ ReplicationProtectableItemsClientAPI = (*siterecovery.ReplicationProtectableItemsClient)(nil) + +// ReplicationProtectedItemsClientAPI contains the set of methods on the ReplicationProtectedItemsClient type. +type ReplicationProtectedItemsClientAPI interface { + AddDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, addDisksInput siterecovery.AddDisksInput) (result siterecovery.ReplicationProtectedItemsAddDisksFuture, err error) + ApplyRecoveryPoint(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, applyRecoveryPointInput siterecovery.ApplyRecoveryPointInput) (result siterecovery.ReplicationProtectedItemsApplyRecoveryPointFuture, err error) + Create(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, input siterecovery.EnableProtectionInput) (result siterecovery.ReplicationProtectedItemsCreateFuture, err error) + Delete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, disableProtectionInput siterecovery.DisableProtectionInput) (result siterecovery.ReplicationProtectedItemsDeleteFuture, err error) + FailoverCommit(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsFailoverCommitFuture, err error) + Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItem, err error) + List(ctx context.Context, skipToken string, filter string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ReplicationProtectedItemCollectionPage, err error) + PlannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput siterecovery.PlannedFailoverInput) (result siterecovery.ReplicationProtectedItemsPlannedFailoverFuture, err error) + Purge(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsPurgeFuture, err error) + RemoveDisks(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, removeDisksInput siterecovery.RemoveDisksInput) (result siterecovery.ReplicationProtectedItemsRemoveDisksFuture, err error) + RepairReplication(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.ReplicationProtectedItemsRepairReplicationFuture, err error) + Reprotect(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, rrInput siterecovery.ReverseReplicationInput) (result siterecovery.ReplicationProtectedItemsReprotectFuture, err error) + ResolveHealthErrors(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, resolveHealthInput siterecovery.ResolveHealthInput) (result siterecovery.ReplicationProtectedItemsResolveHealthErrorsFuture, err error) + TestFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput siterecovery.TestFailoverInput) (result siterecovery.ReplicationProtectedItemsTestFailoverFuture, err error) + TestFailoverCleanup(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, cleanupInput siterecovery.TestFailoverCleanupInput) (result siterecovery.ReplicationProtectedItemsTestFailoverCleanupFuture, err error) + UnplannedFailover(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, failoverInput siterecovery.UnplannedFailoverInput) (result siterecovery.ReplicationProtectedItemsUnplannedFailoverFuture, err error) + Update(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, updateProtectionInput siterecovery.UpdateReplicationProtectedItemInput) (result siterecovery.ReplicationProtectedItemsUpdateFuture, err error) + UpdateMobilityService(ctx context.Context, fabricName string, protectionContainerName string, replicationProtectedItemName string, updateMobilityServiceRequest siterecovery.UpdateMobilityServiceRequest) (result siterecovery.ReplicationProtectedItemsUpdateMobilityServiceFuture, err error) +} + +var _ ReplicationProtectedItemsClientAPI = (*siterecovery.ReplicationProtectedItemsClient)(nil) + +// RecoveryPointsClientAPI contains the set of methods on the RecoveryPointsClient type. +type RecoveryPointsClientAPI interface { + Get(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string, recoveryPointName string) (result siterecovery.RecoveryPoint, err error) + ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.RecoveryPointCollectionPage, err error) +} + +var _ RecoveryPointsClientAPI = (*siterecovery.RecoveryPointsClient)(nil) + +// TargetComputeSizesClientAPI contains the set of methods on the TargetComputeSizesClient type. +type TargetComputeSizesClientAPI interface { + ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result siterecovery.TargetComputeSizeCollectionPage, err error) +} + +var _ TargetComputeSizesClientAPI = (*siterecovery.TargetComputeSizesClient)(nil) + +// ReplicationProtectionContainerMappingsClientAPI contains the set of methods on the ReplicationProtectionContainerMappingsClient type. +type ReplicationProtectionContainerMappingsClientAPI interface { + Create(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, creationInput siterecovery.CreateProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsCreateFuture, err error) + Delete(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, removalInput siterecovery.RemoveProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsDeleteFuture, err error) + Get(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ProtectionContainerMapping, err error) + List(ctx context.Context) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + ListByReplicationProtectionContainers(ctx context.Context, fabricName string, protectionContainerName string) (result siterecovery.ProtectionContainerMappingCollectionPage, err error) + Purge(ctx context.Context, fabricName string, protectionContainerName string, mappingName string) (result siterecovery.ReplicationProtectionContainerMappingsPurgeFuture, err error) + Update(ctx context.Context, fabricName string, protectionContainerName string, mappingName string, updateInput siterecovery.UpdateProtectionContainerMappingInput) (result siterecovery.ReplicationProtectionContainerMappingsUpdateFuture, err error) +} + +var _ ReplicationProtectionContainerMappingsClientAPI = (*siterecovery.ReplicationProtectionContainerMappingsClient)(nil) + +// ReplicationRecoveryServicesProvidersClientAPI contains the set of methods on the ReplicationRecoveryServicesProvidersClient type. +type ReplicationRecoveryServicesProvidersClientAPI interface { + Create(ctx context.Context, fabricName string, providerName string, addProviderInput siterecovery.AddRecoveryServicesProviderInput) (result siterecovery.ReplicationRecoveryServicesProvidersCreateFuture, err error) + Delete(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersDeleteFuture, err error) + Get(ctx context.Context, fabricName string, providerName string) (result siterecovery.RecoveryServicesProvider, err error) + List(ctx context.Context) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.RecoveryServicesProviderCollectionPage, err error) + Purge(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersPurgeFuture, err error) + RefreshProvider(ctx context.Context, fabricName string, providerName string) (result siterecovery.ReplicationRecoveryServicesProvidersRefreshProviderFuture, err error) +} + +var _ ReplicationRecoveryServicesProvidersClientAPI = (*siterecovery.ReplicationRecoveryServicesProvidersClient)(nil) + +// ReplicationStorageClassificationsClientAPI contains the set of methods on the ReplicationStorageClassificationsClient type. +type ReplicationStorageClassificationsClientAPI interface { + Get(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassification, err error) + List(ctx context.Context) (result siterecovery.StorageClassificationCollectionPage, err error) + ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.StorageClassificationCollectionPage, err error) +} + +var _ ReplicationStorageClassificationsClientAPI = (*siterecovery.ReplicationStorageClassificationsClient)(nil) + +// ReplicationStorageClassificationMappingsClientAPI contains the set of methods on the ReplicationStorageClassificationMappingsClient type. +type ReplicationStorageClassificationMappingsClientAPI interface { + Create(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string, pairingInput siterecovery.StorageClassificationMappingInput) (result siterecovery.ReplicationStorageClassificationMappingsCreateFuture, err error) + Delete(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.ReplicationStorageClassificationMappingsDeleteFuture, err error) + Get(ctx context.Context, fabricName string, storageClassificationName string, storageClassificationMappingName string) (result siterecovery.StorageClassificationMapping, err error) + List(ctx context.Context) (result siterecovery.StorageClassificationMappingCollectionPage, err error) + ListByReplicationStorageClassifications(ctx context.Context, fabricName string, storageClassificationName string) (result siterecovery.StorageClassificationMappingCollectionPage, err error) +} + +var _ ReplicationStorageClassificationMappingsClientAPI = (*siterecovery.ReplicationStorageClassificationMappingsClient)(nil) + +// ReplicationvCentersClientAPI contains the set of methods on the ReplicationvCentersClient type. +type ReplicationvCentersClientAPI interface { + Create(ctx context.Context, fabricName string, vCenterName string, addVCenterRequest siterecovery.AddVCenterRequest) (result siterecovery.ReplicationvCentersCreateFuture, err error) + Delete(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.ReplicationvCentersDeleteFuture, err error) + Get(ctx context.Context, fabricName string, vCenterName string) (result siterecovery.VCenter, err error) + List(ctx context.Context) (result siterecovery.VCenterCollectionPage, err error) + ListByReplicationFabrics(ctx context.Context, fabricName string) (result siterecovery.VCenterCollectionPage, err error) + Update(ctx context.Context, fabricName string, vCenterName string, updateVCenterRequest siterecovery.UpdateVCenterRequest) (result siterecovery.ReplicationvCentersUpdateFuture, err error) +} + +var _ ReplicationvCentersClientAPI = (*siterecovery.ReplicationvCentersClient)(nil) + +// ReplicationJobsClientAPI contains the set of methods on the ReplicationJobsClient type. +type ReplicationJobsClientAPI interface { + Cancel(ctx context.Context, jobName string) (result siterecovery.ReplicationJobsCancelFuture, err error) + Export(ctx context.Context, jobQueryParameter siterecovery.JobQueryParameter) (result siterecovery.ReplicationJobsExportFuture, err error) + Get(ctx context.Context, jobName string) (result siterecovery.Job, err error) + List(ctx context.Context, filter string) (result siterecovery.JobCollectionPage, err error) + Restart(ctx context.Context, jobName string) (result siterecovery.ReplicationJobsRestartFuture, err error) + Resume(ctx context.Context, jobName string, resumeJobParams siterecovery.ResumeJobParams) (result siterecovery.ReplicationJobsResumeFuture, err error) +} + +var _ ReplicationJobsClientAPI = (*siterecovery.ReplicationJobsClient)(nil) + +// ReplicationPoliciesClientAPI contains the set of methods on the ReplicationPoliciesClient type. +type ReplicationPoliciesClientAPI interface { + Create(ctx context.Context, policyName string, input siterecovery.CreatePolicyInput) (result siterecovery.ReplicationPoliciesCreateFuture, err error) + Delete(ctx context.Context, policyName string) (result siterecovery.ReplicationPoliciesDeleteFuture, err error) + Get(ctx context.Context, policyName string) (result siterecovery.Policy, err error) + List(ctx context.Context) (result siterecovery.PolicyCollectionPage, err error) + Update(ctx context.Context, policyName string, input siterecovery.UpdatePolicyInput) (result siterecovery.ReplicationPoliciesUpdateFuture, err error) +} + +var _ ReplicationPoliciesClientAPI = (*siterecovery.ReplicationPoliciesClient)(nil) + +// ReplicationRecoveryPlansClientAPI contains the set of methods on the ReplicationRecoveryPlansClient type. +type ReplicationRecoveryPlansClientAPI interface { + Create(ctx context.Context, recoveryPlanName string, input siterecovery.CreateRecoveryPlanInput) (result siterecovery.ReplicationRecoveryPlansCreateFuture, err error) + Delete(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansDeleteFuture, err error) + FailoverCommit(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansFailoverCommitFuture, err error) + Get(ctx context.Context, recoveryPlanName string) (result siterecovery.RecoveryPlan, err error) + List(ctx context.Context) (result siterecovery.RecoveryPlanCollectionPage, err error) + PlannedFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanPlannedFailoverInput) (result siterecovery.ReplicationRecoveryPlansPlannedFailoverFuture, err error) + Reprotect(ctx context.Context, recoveryPlanName string) (result siterecovery.ReplicationRecoveryPlansReprotectFuture, err error) + TestFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanTestFailoverInput) (result siterecovery.ReplicationRecoveryPlansTestFailoverFuture, err error) + TestFailoverCleanup(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanTestFailoverCleanupInput) (result siterecovery.ReplicationRecoveryPlansTestFailoverCleanupFuture, err error) + UnplannedFailover(ctx context.Context, recoveryPlanName string, input siterecovery.RecoveryPlanUnplannedFailoverInput) (result siterecovery.ReplicationRecoveryPlansUnplannedFailoverFuture, err error) + Update(ctx context.Context, recoveryPlanName string, input siterecovery.UpdateRecoveryPlanInput) (result siterecovery.ReplicationRecoveryPlansUpdateFuture, err error) +} + +var _ ReplicationRecoveryPlansClientAPI = (*siterecovery.ReplicationRecoveryPlansClient)(nil) + +// SupportedOperatingSystemsClientAPI contains the set of methods on the SupportedOperatingSystemsClient type. +type SupportedOperatingSystemsClientAPI interface { + Get(ctx context.Context) (result siterecovery.SupportedOperatingSystems, err error) +} + +var _ SupportedOperatingSystemsClientAPI = (*siterecovery.SupportedOperatingSystemsClient)(nil) + +// ReplicationVaultHealthClientAPI contains the set of methods on the ReplicationVaultHealthClient type. +type ReplicationVaultHealthClientAPI interface { + Get(ctx context.Context) (result siterecovery.VaultHealthDetails, err error) + Refresh(ctx context.Context) (result siterecovery.ReplicationVaultHealthRefreshFuture, err error) +} + +var _ ReplicationVaultHealthClientAPI = (*siterecovery.ReplicationVaultHealthClient)(nil) + +// ReplicationVaultSettingClientAPI contains the set of methods on the ReplicationVaultSettingClient type. +type ReplicationVaultSettingClientAPI interface { + Create(ctx context.Context, vaultSettingName string, input siterecovery.VaultSettingCreationInput) (result siterecovery.VaultSetting, err error) + Get(ctx context.Context, vaultSettingName string) (result siterecovery.VaultSetting, err error) + List(ctx context.Context) (result siterecovery.VaultSettingCollectionPage, err error) +} + +var _ ReplicationVaultSettingClientAPI = (*siterecovery.ReplicationVaultSettingClient)(nil) diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go new file mode 100644 index 000000000000..b040cea555fd --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/supportedoperatingsystems.go @@ -0,0 +1,115 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SupportedOperatingSystemsClient is the client for the SupportedOperatingSystems methods of the Siterecovery service. +type SupportedOperatingSystemsClient struct { + BaseClient +} + +// NewSupportedOperatingSystemsClient creates an instance of the SupportedOperatingSystemsClient client. +func NewSupportedOperatingSystemsClient(subscriptionID string, resourceGroupName string, resourceName string) SupportedOperatingSystemsClient { + return NewSupportedOperatingSystemsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewSupportedOperatingSystemsClientWithBaseURI creates an instance of the SupportedOperatingSystemsClient client. +func NewSupportedOperatingSystemsClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) SupportedOperatingSystemsClient { + return SupportedOperatingSystemsClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get sends the get request. +func (client SupportedOperatingSystemsClient) Get(ctx context.Context) (result SupportedOperatingSystems, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SupportedOperatingSystemsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.SupportedOperatingSystemsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.SupportedOperatingSystemsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.SupportedOperatingSystemsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SupportedOperatingSystemsClient) GetPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationSupportedOperatingSystems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SupportedOperatingSystemsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SupportedOperatingSystemsClient) GetResponder(resp *http.Response) (result SupportedOperatingSystems, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go new file mode 100644 index 000000000000..cff329f97ac1 --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/targetcomputesizes.go @@ -0,0 +1,160 @@ +package siterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// TargetComputeSizesClient is the client for the TargetComputeSizes methods of the Siterecovery service. +type TargetComputeSizesClient struct { + BaseClient +} + +// NewTargetComputeSizesClient creates an instance of the TargetComputeSizesClient client. +func NewTargetComputeSizesClient(subscriptionID string, resourceGroupName string, resourceName string) TargetComputeSizesClient { + return NewTargetComputeSizesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewTargetComputeSizesClientWithBaseURI creates an instance of the TargetComputeSizesClient client. +func NewTargetComputeSizesClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) TargetComputeSizesClient { + return TargetComputeSizesClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// ListByReplicationProtectedItems lists the available target compute sizes for a replication protected item. +// Parameters: +// fabricName - fabric name. +// protectionContainerName - protection container name. +// replicatedProtectedItemName - replication protected item name. +func (client TargetComputeSizesClient) ListByReplicationProtectedItems(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result TargetComputeSizeCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizesClient.ListByReplicationProtectedItems") + defer func() { + sc := -1 + if result.tcsc.Response.Response != nil { + sc = result.tcsc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByReplicationProtectedItemsNextResults + req, err := client.ListByReplicationProtectedItemsPreparer(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.TargetComputeSizesClient", "ListByReplicationProtectedItems", nil, "Failure preparing request") + return + } + + resp, err := client.ListByReplicationProtectedItemsSender(req) + if err != nil { + result.tcsc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "siterecovery.TargetComputeSizesClient", "ListByReplicationProtectedItems", resp, "Failure sending request") + return + } + + result.tcsc, err = client.ListByReplicationProtectedItemsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.TargetComputeSizesClient", "ListByReplicationProtectedItems", resp, "Failure responding to request") + } + + return +} + +// ListByReplicationProtectedItemsPreparer prepares the ListByReplicationProtectedItems request. +func (client TargetComputeSizesClient) ListByReplicationProtectedItemsPreparer(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "protectionContainerName": autorest.Encode("path", protectionContainerName), + "replicatedProtectedItemName": autorest.Encode("path", replicatedProtectedItemName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/targetComputeSizes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByReplicationProtectedItemsSender sends the ListByReplicationProtectedItems request. The method will close the +// http.Response Body if it receives an error. +func (client TargetComputeSizesClient) ListByReplicationProtectedItemsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByReplicationProtectedItemsResponder handles the response to the ListByReplicationProtectedItems request. The method always +// closes the http.Response Body. +func (client TargetComputeSizesClient) ListByReplicationProtectedItemsResponder(resp *http.Response) (result TargetComputeSizeCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByReplicationProtectedItemsNextResults retrieves the next set of results, if any. +func (client TargetComputeSizesClient) listByReplicationProtectedItemsNextResults(ctx context.Context, lastResults TargetComputeSizeCollection) (result TargetComputeSizeCollection, err error) { + req, err := lastResults.targetComputeSizeCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "siterecovery.TargetComputeSizesClient", "listByReplicationProtectedItemsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByReplicationProtectedItemsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "siterecovery.TargetComputeSizesClient", "listByReplicationProtectedItemsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByReplicationProtectedItemsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "siterecovery.TargetComputeSizesClient", "listByReplicationProtectedItemsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByReplicationProtectedItemsComplete enumerates all values, automatically crossing page boundaries as required. +func (client TargetComputeSizesClient) ListByReplicationProtectedItemsComplete(ctx context.Context, fabricName string, protectionContainerName string, replicatedProtectedItemName string) (result TargetComputeSizeCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/TargetComputeSizesClient.ListByReplicationProtectedItems") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByReplicationProtectedItems(ctx, fabricName, protectionContainerName, replicatedProtectedItemName) + return +} diff --git a/services/recoveryservices/mgmt/2018-07-10/siterecovery/version.go b/services/recoveryservices/mgmt/2018-07-10/siterecovery/version.go new file mode 100644 index 000000000000..ac1057f7299e --- /dev/null +++ b/services/recoveryservices/mgmt/2018-07-10/siterecovery/version.go @@ -0,0 +1,30 @@ +package siterecovery + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " siterecovery/2018-07-10" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go b/services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go new file mode 100644 index 000000000000..4ee451609fcf --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/backupapi/interfaces.go @@ -0,0 +1,307 @@ +package backupapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup" + "github.com/Azure/go-autorest/autorest" +) + +// ResourceVaultConfigsClientAPI contains the set of methods on the ResourceVaultConfigsClient type. +type ResourceVaultConfigsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string) (result backup.ResourceVaultConfigResource, err error) + Update(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.ResourceVaultConfigResource) (result backup.ResourceVaultConfigResource, err error) +} + +var _ ResourceVaultConfigsClientAPI = (*backup.ResourceVaultConfigsClient)(nil) + +// ProtectedItemsClientAPI contains the set of methods on the ProtectedItemsClient type. +type ProtectedItemsClientAPI interface { + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters backup.ProtectedItemResource) (result backup.ProtectedItemResource, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.ProtectedItemResource, err error) +} + +var _ ProtectedItemsClientAPI = (*backup.ProtectedItemsClient)(nil) + +// ProtectedItemOperationResultsClientAPI contains the set of methods on the ProtectedItemOperationResultsClient type. +type ProtectedItemOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result backup.ProtectedItemResource, err error) +} + +var _ ProtectedItemOperationResultsClientAPI = (*backup.ProtectedItemOperationResultsClient)(nil) + +// RecoveryPointsClientAPI contains the set of methods on the RecoveryPointsClient type. +type RecoveryPointsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result backup.RecoveryPointResource, err error) + List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result backup.RecoveryPointResourceListPage, err error) +} + +var _ RecoveryPointsClientAPI = (*backup.RecoveryPointsClient)(nil) + +// RestoresClientAPI contains the set of methods on the RestoresClient type. +type RestoresClientAPI interface { + Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters backup.RestoreRequestResource) (result autorest.Response, err error) +} + +var _ RestoresClientAPI = (*backup.RestoresClient)(nil) + +// PoliciesClientAPI contains the set of methods on the PoliciesClient type. +type PoliciesClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionPolicyResourceListPage, err error) +} + +var _ PoliciesClientAPI = (*backup.PoliciesClient)(nil) + +// ProtectionPoliciesClientAPI contains the set of methods on the ProtectionPoliciesClient type. +type ProtectionPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters backup.ProtectionPolicyResource) (result backup.ProtectionPolicyResource, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result backup.ProtectionPolicyResource, err error) +} + +var _ ProtectionPoliciesClientAPI = (*backup.ProtectionPoliciesClient)(nil) + +// ProtectionPolicyOperationResultsClientAPI contains the set of methods on the ProtectionPolicyOperationResultsClient type. +type ProtectionPolicyOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result backup.ProtectionPolicyResource, err error) +} + +var _ ProtectionPolicyOperationResultsClientAPI = (*backup.ProtectionPolicyOperationResultsClient)(nil) + +// JobsClientAPI contains the set of methods on the JobsClient type. +type JobsClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.JobResourceListPage, err error) +} + +var _ JobsClientAPI = (*backup.JobsClient)(nil) + +// JobDetailsClientAPI contains the set of methods on the JobDetailsClient type. +type JobDetailsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result backup.JobResource, err error) +} + +var _ JobDetailsClientAPI = (*backup.JobDetailsClient)(nil) + +// JobCancellationsClientAPI contains the set of methods on the JobCancellationsClient type. +type JobCancellationsClientAPI interface { + Trigger(ctx context.Context, vaultName string, resourceGroupName string, jobName string) (result autorest.Response, err error) +} + +var _ JobCancellationsClientAPI = (*backup.JobCancellationsClient)(nil) + +// JobOperationResultsClientAPI contains the set of methods on the JobOperationResultsClient type. +type JobOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, jobName string, operationID string) (result autorest.Response, err error) +} + +var _ JobOperationResultsClientAPI = (*backup.JobOperationResultsClient)(nil) + +// ExportJobsOperationResultsClientAPI contains the set of methods on the ExportJobsOperationResultsClient type. +type ExportJobsOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result backup.OperationResultInfoBaseResource, err error) +} + +var _ ExportJobsOperationResultsClientAPI = (*backup.ExportJobsOperationResultsClient)(nil) + +// JobsGroupClientAPI contains the set of methods on the JobsGroupClient type. +type JobsGroupClientAPI interface { + Export(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result autorest.Response, err error) +} + +var _ JobsGroupClientAPI = (*backup.JobsGroupClient)(nil) + +// ProtectedItemsGroupClientAPI contains the set of methods on the ProtectedItemsGroupClient type. +type ProtectedItemsGroupClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectedItemResourceListPage, err error) +} + +var _ ProtectedItemsGroupClientAPI = (*backup.ProtectedItemsGroupClient)(nil) + +// OperationClientAPI contains the set of methods on the OperationClient type. +type OperationClientAPI interface { + Validate(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.BasicValidateOperationRequest) (result backup.ValidateOperationsResponse, err error) +} + +var _ OperationClientAPI = (*backup.OperationClient)(nil) + +// ProtectionIntentClientAPI contains the set of methods on the ProtectionIntentClient type. +type ProtectionIntentClientAPI interface { + CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters backup.ProtectionIntentResource) (result backup.ProtectionIntentResource, err error) + Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result autorest.Response, err error) + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result backup.ProtectionIntentResource, err error) + Validate(ctx context.Context, azureRegion string, parameters backup.PreValidateEnableBackupRequest) (result backup.PreValidateEnableBackupResponse, err error) +} + +var _ ProtectionIntentClientAPI = (*backup.ProtectionIntentClient)(nil) + +// StatusClientAPI contains the set of methods on the StatusClient type. +type StatusClientAPI interface { + Get(ctx context.Context, azureRegion string, parameters backup.StatusRequest) (result backup.StatusResponse, err error) +} + +var _ StatusClientAPI = (*backup.StatusClient)(nil) + +// FeatureSupportClientAPI contains the set of methods on the FeatureSupportClient type. +type FeatureSupportClientAPI interface { + Validate(ctx context.Context, azureRegion string, parameters backup.BasicFeatureSupportRequest) (result backup.AzureVMResourceFeatureSupportResponse, err error) +} + +var _ FeatureSupportClientAPI = (*backup.FeatureSupportClient)(nil) + +// ProtectionIntentGroupClientAPI contains the set of methods on the ProtectionIntentGroupClient type. +type ProtectionIntentGroupClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ProtectionIntentResourceListPage, err error) +} + +var _ ProtectionIntentGroupClientAPI = (*backup.ProtectionIntentGroupClient)(nil) + +// UsageSummariesClientAPI contains the set of methods on the UsageSummariesClient type. +type UsageSummariesClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.ManagementUsageList, err error) +} + +var _ UsageSummariesClientAPI = (*backup.UsageSummariesClient)(nil) + +// EnginesClientAPI contains the set of methods on the EnginesClient type. +type EnginesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result backup.EngineBaseResource, err error) + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.EngineBaseResourceListPage, err error) +} + +var _ EnginesClientAPI = (*backup.EnginesClient)(nil) + +// ProtectionContainerRefreshOperationResultsClientAPI contains the set of methods on the ProtectionContainerRefreshOperationResultsClient type. +type ProtectionContainerRefreshOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string) (result autorest.Response, err error) +} + +var _ ProtectionContainerRefreshOperationResultsClientAPI = (*backup.ProtectionContainerRefreshOperationResultsClient)(nil) + +// ProtectableContainersClientAPI contains the set of methods on the ProtectableContainersClient type. +type ProtectableContainersClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result backup.ProtectableContainerResourceListPage, err error) +} + +var _ ProtectableContainersClientAPI = (*backup.ProtectableContainersClient)(nil) + +// ProtectionContainersClientAPI contains the set of methods on the ProtectionContainersClient type. +type ProtectionContainersClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result backup.ProtectionContainerResource, err error) + Inquire(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string) (result autorest.Response, err error) + Refresh(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result autorest.Response, err error) + Register(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters backup.ProtectionContainerResource) (result backup.ProtectionContainerResource, err error) + Unregister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result autorest.Response, err error) +} + +var _ ProtectionContainersClientAPI = (*backup.ProtectionContainersClient)(nil) + +// WorkloadItemsClientAPI contains the set of methods on the WorkloadItemsClient type. +type WorkloadItemsClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result backup.WorkloadItemResourceListPage, err error) +} + +var _ WorkloadItemsClientAPI = (*backup.WorkloadItemsClient)(nil) + +// ProtectionContainerOperationResultsClientAPI contains the set of methods on the ProtectionContainerOperationResultsClient type. +type ProtectionContainerOperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (result backup.ProtectionContainerResource, err error) +} + +var _ ProtectionContainerOperationResultsClientAPI = (*backup.ProtectionContainerOperationResultsClient)(nil) + +// BackupsClientAPI contains the set of methods on the BackupsClient type. +type BackupsClientAPI interface { + Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters backup.RequestResource) (result autorest.Response, err error) +} + +var _ BackupsClientAPI = (*backup.BackupsClient)(nil) + +// ProtectedItemOperationStatusesClientAPI contains the set of methods on the ProtectedItemOperationStatusesClient type. +type ProtectedItemOperationStatusesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result backup.OperationStatus, err error) +} + +var _ ProtectedItemOperationStatusesClientAPI = (*backup.ProtectedItemOperationStatusesClient)(nil) + +// ItemLevelRecoveryConnectionsClientAPI contains the set of methods on the ItemLevelRecoveryConnectionsClient type. +type ItemLevelRecoveryConnectionsClientAPI interface { + Provision(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters backup.ILRRequestResource) (result autorest.Response, err error) + Revoke(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result autorest.Response, err error) +} + +var _ ItemLevelRecoveryConnectionsClientAPI = (*backup.ItemLevelRecoveryConnectionsClient)(nil) + +// OperationResultsClientAPI contains the set of methods on the OperationResultsClient type. +type OperationResultsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result autorest.Response, err error) +} + +var _ OperationResultsClientAPI = (*backup.OperationResultsClient)(nil) + +// OperationStatusesClientAPI contains the set of methods on the OperationStatusesClient type. +type OperationStatusesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result backup.OperationStatus, err error) +} + +var _ OperationStatusesClientAPI = (*backup.OperationStatusesClient)(nil) + +// ProtectionPolicyOperationStatusesClientAPI contains the set of methods on the ProtectionPolicyOperationStatusesClient type. +type ProtectionPolicyOperationStatusesClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result backup.OperationStatus, err error) +} + +var _ ProtectionPolicyOperationStatusesClientAPI = (*backup.ProtectionPolicyOperationStatusesClient)(nil) + +// ProtectableItemsClientAPI contains the set of methods on the ProtectableItemsClient type. +type ProtectableItemsClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result backup.WorkloadProtectableItemResourceListPage, err error) +} + +var _ ProtectableItemsClientAPI = (*backup.ProtectableItemsClient)(nil) + +// ProtectionContainersGroupClientAPI contains the set of methods on the ProtectionContainersGroupClient type. +type ProtectionContainersGroupClientAPI interface { + List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result backup.ProtectionContainerResourceListPage, err error) +} + +var _ ProtectionContainersGroupClientAPI = (*backup.ProtectionContainersGroupClient)(nil) + +// SecurityPINsClientAPI contains the set of methods on the SecurityPINsClient type. +type SecurityPINsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string) (result backup.TokenInformation, err error) +} + +var _ SecurityPINsClientAPI = (*backup.SecurityPINsClient)(nil) + +// ResourceStorageConfigsClientAPI contains the set of methods on the ResourceStorageConfigsClient type. +type ResourceStorageConfigsClientAPI interface { + Get(ctx context.Context, vaultName string, resourceGroupName string) (result backup.ResourceConfigResource, err error) + Patch(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.ResourceConfigResource) (result autorest.Response, err error) + Update(ctx context.Context, vaultName string, resourceGroupName string, parameters backup.ResourceConfigResource) (result backup.ResourceConfigResource, err error) +} + +var _ ResourceStorageConfigsClientAPI = (*backup.ResourceStorageConfigsClient)(nil) + +// OperationsClientAPI contains the set of methods on the OperationsClient type. +type OperationsClientAPI interface { + List(ctx context.Context) (result backup.ClientDiscoveryResponsePage, err error) +} + +var _ OperationsClientAPI = (*backup.OperationsClient)(nil) diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/backups.go b/services/recoveryservices/mgmt/2019-05-13/backup/backups.go new file mode 100644 index 000000000000..a8efbd3c56ba --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/backups.go @@ -0,0 +1,127 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// BackupsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type BackupsClient struct { + BaseClient +} + +// NewBackupsClient creates an instance of the BackupsClient client. +func NewBackupsClient(subscriptionID string) BackupsClient { + return NewBackupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupsClientWithBaseURI creates an instance of the BackupsClient client. +func NewBackupsClientWithBaseURI(baseURI string, subscriptionID string) BackupsClient { + return BackupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Trigger triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the +// operation, call GetProtectedItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// containerName - container name associated with the backup item. +// protectedItemName - backup item for which backup needs to be triggered. +// parameters - resource backup request +func (client BackupsClient) Trigger(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters RequestResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BackupsClient.Trigger") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.TriggerPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.BackupsClient", "Trigger", nil, "Failure preparing request") + return + } + + resp, err := client.TriggerSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.BackupsClient", "Trigger", resp, "Failure sending request") + return + } + + result, err = client.TriggerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.BackupsClient", "Trigger", resp, "Failure responding to request") + } + + return +} + +// TriggerPreparer prepares the Trigger request. +func (client BackupsClient) TriggerPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters RequestResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// TriggerSender sends the Trigger request. The method will close the +// http.Response Body if it receives an error. +func (client BackupsClient) TriggerSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// TriggerResponder handles the response to the Trigger request. The method always +// closes the http.Response Body. +func (client BackupsClient) TriggerResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/client.go b/services/recoveryservices/mgmt/2019-05-13/backup/client.go new file mode 100644 index 000000000000..46ea059ebaf8 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/client.go @@ -0,0 +1,51 @@ +// Package backup implements the Azure ARM Backup service API version . +// +// Open API 2.0 Specs for Azure RecoveryServices Backup service +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Backup + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Backup. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/engines.go b/services/recoveryservices/mgmt/2019-05-13/backup/engines.go new file mode 100644 index 000000000000..b12a52d19b6c --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/engines.go @@ -0,0 +1,251 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// EnginesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type EnginesClient struct { + BaseClient +} + +// NewEnginesClient creates an instance of the EnginesClient client. +func NewEnginesClient(subscriptionID string) EnginesClient { + return NewEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEnginesClientWithBaseURI creates an instance of the EnginesClient client. +func NewEnginesClientWithBaseURI(baseURI string, subscriptionID string) EnginesClient { + return EnginesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get returns backup management server registered to Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// backupEngineName - name of the backup management server. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client EnginesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result EngineBaseResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnginesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, backupEngineName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client EnginesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupEngineName": autorest.Encode("path", backupEngineName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EnginesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EnginesClient) GetResponder(resp *http.Response) (result EngineBaseResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client EnginesClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result EngineBaseResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnginesClient.List") + defer func() { + sc := -1 + if result.ebrl.Response.Response != nil { + sc = result.ebrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ebrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "List", resp, "Failure sending request") + return + } + + result.ebrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client EnginesClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client EnginesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client EnginesClient) ListResponder(resp *http.Response) (result EngineBaseResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client EnginesClient) listNextResults(ctx context.Context, lastResults EngineBaseResourceList) (result EngineBaseResourceList, err error) { + req, err := lastResults.engineBaseResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.EnginesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.EnginesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.EnginesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client EnginesClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result EngineBaseResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnginesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/exportjobsoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/exportjobsoperationresults.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/exportjobsoperationresults.go rename to services/recoveryservices/mgmt/2019-05-13/backup/exportjobsoperationresults.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go b/services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go new file mode 100644 index 000000000000..6f7d732b6e93 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/featuresupport.go @@ -0,0 +1,119 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FeatureSupportClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type FeatureSupportClient struct { + BaseClient +} + +// NewFeatureSupportClient creates an instance of the FeatureSupportClient client. +func NewFeatureSupportClient(subscriptionID string) FeatureSupportClient { + return NewFeatureSupportClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFeatureSupportClientWithBaseURI creates an instance of the FeatureSupportClient client. +func NewFeatureSupportClientWithBaseURI(baseURI string, subscriptionID string) FeatureSupportClient { + return FeatureSupportClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Validate sends the validate request. +// Parameters: +// azureRegion - azure region to hit Api +// parameters - feature support request object +func (client FeatureSupportClient) Validate(ctx context.Context, azureRegion string, parameters BasicFeatureSupportRequest) (result AzureVMResourceFeatureSupportResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FeatureSupportClient.Validate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ValidatePreparer(ctx, azureRegion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.FeatureSupportClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.FeatureSupportClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.FeatureSupportClient", "Validate", resp, "Failure responding to request") + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client FeatureSupportClient) ValidatePreparer(ctx context.Context, azureRegion string, parameters BasicFeatureSupportRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureRegion": autorest.Encode("path", azureRegion), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client FeatureSupportClient) ValidateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client FeatureSupportClient) ValidateResponder(resp *http.Response) (result AzureVMResourceFeatureSupportResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go b/services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go new file mode 100644 index 000000000000..bfde3e76ee52 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/itemlevelrecoveryconnections.go @@ -0,0 +1,220 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ItemLevelRecoveryConnectionsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ItemLevelRecoveryConnectionsClient struct { + BaseClient +} + +// NewItemLevelRecoveryConnectionsClient creates an instance of the ItemLevelRecoveryConnectionsClient client. +func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecoveryConnectionsClient { + return NewItemLevelRecoveryConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient +// client. +func NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient { + return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Provision provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a +// file +// explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status of +// provisioning, call GetProtectedItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up items. +// containerName - container name associated with the backed up items. +// protectedItemName - backed up item name whose files/folders are to be restored. +// recoveryPointID - recovery point ID which represents backed up data. iSCSI connection will be provisioned +// for this backed up data. +// parameters - resource ILR request +func (client ItemLevelRecoveryConnectionsClient) Provision(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ItemLevelRecoveryConnectionsClient.Provision") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ProvisionPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Provision", nil, "Failure preparing request") + return + } + + resp, err := client.ProvisionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Provision", resp, "Failure sending request") + return + } + + result, err = client.ProvisionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Provision", resp, "Failure responding to request") + } + + return +} + +// ProvisionPreparer prepares the Provision request. +func (client ItemLevelRecoveryConnectionsClient) ProvisionPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "recoveryPointId": autorest.Encode("path", recoveryPointID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ProvisionSender sends the Provision request. The method will close the +// http.Response Body if it receives an error. +func (client ItemLevelRecoveryConnectionsClient) ProvisionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ProvisionResponder handles the response to the Provision request. The method always +// closes the http.Response Body. +func (client ItemLevelRecoveryConnectionsClient) ProvisionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Revoke revokes an iSCSI connection which can be used to download a script. Executing this script opens a file +// explorer +// displaying all recoverable files and folders. This is an asynchronous operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up items. +// containerName - container name associated with the backed up items. +// protectedItemName - backed up item name whose files/folders are to be restored. +// recoveryPointID - recovery point ID which represents backed up data. iSCSI connection will be revoked for +// this backed up data. +func (client ItemLevelRecoveryConnectionsClient) Revoke(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ItemLevelRecoveryConnectionsClient.Revoke") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RevokePreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Revoke", nil, "Failure preparing request") + return + } + + resp, err := client.RevokeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Revoke", resp, "Failure sending request") + return + } + + result, err = client.RevokeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ItemLevelRecoveryConnectionsClient", "Revoke", resp, "Failure responding to request") + } + + return +} + +// RevokePreparer prepares the Revoke request. +func (client ItemLevelRecoveryConnectionsClient) RevokePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "protectedItemName": autorest.Encode("path", protectedItemName), + "recoveryPointId": autorest.Encode("path", recoveryPointID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevokeSender sends the Revoke request. The method will close the +// http.Response Body if it receives an error. +func (client ItemLevelRecoveryConnectionsClient) RevokeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RevokeResponder handles the response to the Revoke request. The method always +// closes the http.Response Body. +func (client ItemLevelRecoveryConnectionsClient) RevokeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/jobcancellations.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobcancellations.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/jobcancellations.go rename to services/recoveryservices/mgmt/2019-05-13/backup/jobcancellations.go diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/jobdetails.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobdetails.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/jobdetails.go rename to services/recoveryservices/mgmt/2019-05-13/backup/jobdetails.go diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/joboperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/joboperationresults.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/joboperationresults.go rename to services/recoveryservices/mgmt/2019-05-13/backup/joboperationresults.go diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/jobs.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobs.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/jobs.go rename to services/recoveryservices/mgmt/2019-05-13/backup/jobs.go diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/jobsgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/jobsgroup.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/jobsgroup.go rename to services/recoveryservices/mgmt/2019-05-13/backup/jobsgroup.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/models.go b/services/recoveryservices/mgmt/2019-05-13/backup/models.go new file mode 100644 index 000000000000..05ec4e02f401 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/models.go @@ -0,0 +1,20986 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2019-05-13/backup" + +// AzureFileShareType enumerates the values for azure file share type. +type AzureFileShareType string + +const ( + // Invalid ... + Invalid AzureFileShareType = "Invalid" + // XSMB ... + XSMB AzureFileShareType = "XSMB" + // XSync ... + XSync AzureFileShareType = "XSync" +) + +// PossibleAzureFileShareTypeValues returns an array of possible values for the AzureFileShareType const type. +func PossibleAzureFileShareTypeValues() []AzureFileShareType { + return []AzureFileShareType{Invalid, XSMB, XSync} +} + +// ContainerType enumerates the values for container type. +type ContainerType string + +const ( + // ContainerTypeAzureBackupServerContainer ... + ContainerTypeAzureBackupServerContainer ContainerType = "AzureBackupServerContainer" + // ContainerTypeAzureSQLContainer ... + ContainerTypeAzureSQLContainer ContainerType = "AzureSqlContainer" + // ContainerTypeCluster ... + ContainerTypeCluster ContainerType = "Cluster" + // ContainerTypeDPMContainer ... + ContainerTypeDPMContainer ContainerType = "DPMContainer" + // ContainerTypeGenericContainer ... + ContainerTypeGenericContainer ContainerType = "GenericContainer" + // ContainerTypeIaasVMContainer ... + ContainerTypeIaasVMContainer ContainerType = "IaasVMContainer" + // ContainerTypeIaasVMServiceContainer ... + ContainerTypeIaasVMServiceContainer ContainerType = "IaasVMServiceContainer" + // ContainerTypeInvalid ... + ContainerTypeInvalid ContainerType = "Invalid" + // ContainerTypeMABContainer ... + ContainerTypeMABContainer ContainerType = "MABContainer" + // ContainerTypeSQLAGWorkLoadContainer ... + ContainerTypeSQLAGWorkLoadContainer ContainerType = "SQLAGWorkLoadContainer" + // ContainerTypeStorageContainer ... + ContainerTypeStorageContainer ContainerType = "StorageContainer" + // ContainerTypeUnknown ... + ContainerTypeUnknown ContainerType = "Unknown" + // ContainerTypeVCenter ... + ContainerTypeVCenter ContainerType = "VCenter" + // ContainerTypeVMAppContainer ... + ContainerTypeVMAppContainer ContainerType = "VMAppContainer" + // ContainerTypeWindows ... + ContainerTypeWindows ContainerType = "Windows" +) + +// PossibleContainerTypeValues returns an array of possible values for the ContainerType const type. +func PossibleContainerTypeValues() []ContainerType { + return []ContainerType{ContainerTypeAzureBackupServerContainer, ContainerTypeAzureSQLContainer, ContainerTypeCluster, ContainerTypeDPMContainer, ContainerTypeGenericContainer, ContainerTypeIaasVMContainer, ContainerTypeIaasVMServiceContainer, ContainerTypeInvalid, ContainerTypeMABContainer, ContainerTypeSQLAGWorkLoadContainer, ContainerTypeStorageContainer, ContainerTypeUnknown, ContainerTypeVCenter, ContainerTypeVMAppContainer, ContainerTypeWindows} +} + +// ContainerTypeBasicProtectionContainer enumerates the values for container type basic protection container. +type ContainerTypeBasicProtectionContainer string + +const ( + // ContainerTypeAzureBackupServerContainer1 ... + ContainerTypeAzureBackupServerContainer1 ContainerTypeBasicProtectionContainer = "AzureBackupServerContainer" + // ContainerTypeAzureSQLContainer1 ... + ContainerTypeAzureSQLContainer1 ContainerTypeBasicProtectionContainer = "AzureSqlContainer" + // ContainerTypeAzureWorkloadContainer ... + ContainerTypeAzureWorkloadContainer ContainerTypeBasicProtectionContainer = "AzureWorkloadContainer" + // ContainerTypeDPMContainer1 ... + ContainerTypeDPMContainer1 ContainerTypeBasicProtectionContainer = "DPMContainer" + // ContainerTypeGenericContainer1 ... + ContainerTypeGenericContainer1 ContainerTypeBasicProtectionContainer = "GenericContainer" + // ContainerTypeIaaSVMContainer ... + ContainerTypeIaaSVMContainer ContainerTypeBasicProtectionContainer = "IaaSVMContainer" + // ContainerTypeMicrosoftClassicComputevirtualMachines ... + ContainerTypeMicrosoftClassicComputevirtualMachines ContainerTypeBasicProtectionContainer = "Microsoft.ClassicCompute/virtualMachines" + // ContainerTypeMicrosoftComputevirtualMachines ... + ContainerTypeMicrosoftComputevirtualMachines ContainerTypeBasicProtectionContainer = "Microsoft.Compute/virtualMachines" + // ContainerTypeProtectionContainer ... + ContainerTypeProtectionContainer ContainerTypeBasicProtectionContainer = "ProtectionContainer" + // ContainerTypeSQLAGWorkLoadContainer1 ... + ContainerTypeSQLAGWorkLoadContainer1 ContainerTypeBasicProtectionContainer = "SQLAGWorkLoadContainer" + // ContainerTypeStorageContainer1 ... + ContainerTypeStorageContainer1 ContainerTypeBasicProtectionContainer = "StorageContainer" + // ContainerTypeVMAppContainer1 ... + ContainerTypeVMAppContainer1 ContainerTypeBasicProtectionContainer = "VMAppContainer" + // ContainerTypeWindows1 ... + ContainerTypeWindows1 ContainerTypeBasicProtectionContainer = "Windows" +) + +// PossibleContainerTypeBasicProtectionContainerValues returns an array of possible values for the ContainerTypeBasicProtectionContainer const type. +func PossibleContainerTypeBasicProtectionContainerValues() []ContainerTypeBasicProtectionContainer { + return []ContainerTypeBasicProtectionContainer{ContainerTypeAzureBackupServerContainer1, ContainerTypeAzureSQLContainer1, ContainerTypeAzureWorkloadContainer, ContainerTypeDPMContainer1, ContainerTypeGenericContainer1, ContainerTypeIaaSVMContainer, ContainerTypeMicrosoftClassicComputevirtualMachines, ContainerTypeMicrosoftComputevirtualMachines, ContainerTypeProtectionContainer, ContainerTypeSQLAGWorkLoadContainer1, ContainerTypeStorageContainer1, ContainerTypeVMAppContainer1, ContainerTypeWindows1} +} + +// CopyOptions enumerates the values for copy options. +type CopyOptions string + +const ( + // CopyOptionsCreateCopy ... + CopyOptionsCreateCopy CopyOptions = "CreateCopy" + // CopyOptionsFailOnConflict ... + CopyOptionsFailOnConflict CopyOptions = "FailOnConflict" + // CopyOptionsInvalid ... + CopyOptionsInvalid CopyOptions = "Invalid" + // CopyOptionsOverwrite ... + CopyOptionsOverwrite CopyOptions = "Overwrite" + // CopyOptionsSkip ... + CopyOptionsSkip CopyOptions = "Skip" +) + +// PossibleCopyOptionsValues returns an array of possible values for the CopyOptions const type. +func PossibleCopyOptionsValues() []CopyOptions { + return []CopyOptions{CopyOptionsCreateCopy, CopyOptionsFailOnConflict, CopyOptionsInvalid, CopyOptionsOverwrite, CopyOptionsSkip} +} + +// CreateMode enumerates the values for create mode. +type CreateMode string + +const ( + // CreateModeDefault ... + CreateModeDefault CreateMode = "Default" + // CreateModeInvalid ... + CreateModeInvalid CreateMode = "Invalid" + // CreateModeRecover ... + CreateModeRecover CreateMode = "Recover" +) + +// PossibleCreateModeValues returns an array of possible values for the CreateMode const type. +func PossibleCreateModeValues() []CreateMode { + return []CreateMode{CreateModeDefault, CreateModeInvalid, CreateModeRecover} +} + +// DataSourceType enumerates the values for data source type. +type DataSourceType string + +const ( + // DataSourceTypeAzureFileShare ... + DataSourceTypeAzureFileShare DataSourceType = "AzureFileShare" + // DataSourceTypeAzureSQLDb ... + DataSourceTypeAzureSQLDb DataSourceType = "AzureSqlDb" + // DataSourceTypeClient ... + DataSourceTypeClient DataSourceType = "Client" + // DataSourceTypeExchange ... + DataSourceTypeExchange DataSourceType = "Exchange" + // DataSourceTypeFileFolder ... + DataSourceTypeFileFolder DataSourceType = "FileFolder" + // DataSourceTypeGenericDataSource ... + DataSourceTypeGenericDataSource DataSourceType = "GenericDataSource" + // DataSourceTypeInvalid ... + DataSourceTypeInvalid DataSourceType = "Invalid" + // DataSourceTypeSAPAseDatabase ... + DataSourceTypeSAPAseDatabase DataSourceType = "SAPAseDatabase" + // DataSourceTypeSAPHanaDatabase ... + DataSourceTypeSAPHanaDatabase DataSourceType = "SAPHanaDatabase" + // DataSourceTypeSharepoint ... + DataSourceTypeSharepoint DataSourceType = "Sharepoint" + // DataSourceTypeSQLDataBase ... + DataSourceTypeSQLDataBase DataSourceType = "SQLDataBase" + // DataSourceTypeSQLDB ... + DataSourceTypeSQLDB DataSourceType = "SQLDB" + // DataSourceTypeSystemState ... + DataSourceTypeSystemState DataSourceType = "SystemState" + // DataSourceTypeVM ... + DataSourceTypeVM DataSourceType = "VM" + // DataSourceTypeVMwareVM ... + DataSourceTypeVMwareVM DataSourceType = "VMwareVM" +) + +// PossibleDataSourceTypeValues returns an array of possible values for the DataSourceType const type. +func PossibleDataSourceTypeValues() []DataSourceType { + return []DataSourceType{DataSourceTypeAzureFileShare, DataSourceTypeAzureSQLDb, DataSourceTypeClient, DataSourceTypeExchange, DataSourceTypeFileFolder, DataSourceTypeGenericDataSource, DataSourceTypeInvalid, DataSourceTypeSAPAseDatabase, DataSourceTypeSAPHanaDatabase, DataSourceTypeSharepoint, DataSourceTypeSQLDataBase, DataSourceTypeSQLDB, DataSourceTypeSystemState, DataSourceTypeVM, DataSourceTypeVMwareVM} +} + +// DayOfWeek enumerates the values for day of week. +type DayOfWeek string + +const ( + // Friday ... + Friday DayOfWeek = "Friday" + // Monday ... + Monday DayOfWeek = "Monday" + // Saturday ... + Saturday DayOfWeek = "Saturday" + // Sunday ... + Sunday DayOfWeek = "Sunday" + // Thursday ... + Thursday DayOfWeek = "Thursday" + // Tuesday ... + Tuesday DayOfWeek = "Tuesday" + // Wednesday ... + Wednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{Friday, Monday, Saturday, Sunday, Thursday, Tuesday, Wednesday} +} + +// EngineType enumerates the values for engine type. +type EngineType string + +const ( + // BackupEngineTypeAzureBackupServerEngine ... + BackupEngineTypeAzureBackupServerEngine EngineType = "AzureBackupServerEngine" + // BackupEngineTypeBackupEngineBase ... + BackupEngineTypeBackupEngineBase EngineType = "BackupEngineBase" + // BackupEngineTypeDpmBackupEngine ... + BackupEngineTypeDpmBackupEngine EngineType = "DpmBackupEngine" +) + +// PossibleEngineTypeValues returns an array of possible values for the EngineType const type. +func PossibleEngineTypeValues() []EngineType { + return []EngineType{BackupEngineTypeAzureBackupServerEngine, BackupEngineTypeBackupEngineBase, BackupEngineTypeDpmBackupEngine} +} + +// EnhancedSecurityState enumerates the values for enhanced security state. +type EnhancedSecurityState string + +const ( + // EnhancedSecurityStateDisabled ... + EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" + // EnhancedSecurityStateEnabled ... + EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" + // EnhancedSecurityStateInvalid ... + EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" +) + +// PossibleEnhancedSecurityStateValues returns an array of possible values for the EnhancedSecurityState const type. +func PossibleEnhancedSecurityStateValues() []EnhancedSecurityState { + return []EnhancedSecurityState{EnhancedSecurityStateDisabled, EnhancedSecurityStateEnabled, EnhancedSecurityStateInvalid} +} + +// FabricName enumerates the values for fabric name. +type FabricName string + +const ( + // FabricNameAzure ... + FabricNameAzure FabricName = "Azure" + // FabricNameInvalid ... + FabricNameInvalid FabricName = "Invalid" +) + +// PossibleFabricNameValues returns an array of possible values for the FabricName const type. +func PossibleFabricNameValues() []FabricName { + return []FabricName{FabricNameAzure, FabricNameInvalid} +} + +// FeatureType enumerates the values for feature type. +type FeatureType string + +const ( + // FeatureTypeAzureBackupGoals ... + FeatureTypeAzureBackupGoals FeatureType = "AzureBackupGoals" + // FeatureTypeAzureVMResourceBackup ... + FeatureTypeAzureVMResourceBackup FeatureType = "AzureVMResourceBackup" + // FeatureTypeFeatureSupportRequest ... + FeatureTypeFeatureSupportRequest FeatureType = "FeatureSupportRequest" +) + +// PossibleFeatureTypeValues returns an array of possible values for the FeatureType const type. +func PossibleFeatureTypeValues() []FeatureType { + return []FeatureType{FeatureTypeAzureBackupGoals, FeatureTypeAzureVMResourceBackup, FeatureTypeFeatureSupportRequest} +} + +// HealthState enumerates the values for health state. +type HealthState string + +const ( + // HealthStateActionRequired ... + HealthStateActionRequired HealthState = "ActionRequired" + // HealthStateActionSuggested ... + HealthStateActionSuggested HealthState = "ActionSuggested" + // HealthStateInvalid ... + HealthStateInvalid HealthState = "Invalid" + // HealthStatePassed ... + HealthStatePassed HealthState = "Passed" +) + +// PossibleHealthStateValues returns an array of possible values for the HealthState const type. +func PossibleHealthStateValues() []HealthState { + return []HealthState{HealthStateActionRequired, HealthStateActionSuggested, HealthStateInvalid, HealthStatePassed} +} + +// HealthStatus enumerates the values for health status. +type HealthStatus string + +const ( + // HealthStatusActionRequired ... + HealthStatusActionRequired HealthStatus = "ActionRequired" + // HealthStatusActionSuggested ... + HealthStatusActionSuggested HealthStatus = "ActionSuggested" + // HealthStatusInvalid ... + HealthStatusInvalid HealthStatus = "Invalid" + // HealthStatusPassed ... + HealthStatusPassed HealthStatus = "Passed" +) + +// PossibleHealthStatusValues returns an array of possible values for the HealthStatus const type. +func PossibleHealthStatusValues() []HealthStatus { + return []HealthStatus{HealthStatusActionRequired, HealthStatusActionSuggested, HealthStatusInvalid, HealthStatusPassed} +} + +// HTTPStatusCode enumerates the values for http status code. +type HTTPStatusCode string + +const ( + // Accepted ... + Accepted HTTPStatusCode = "Accepted" + // Ambiguous ... + Ambiguous HTTPStatusCode = "Ambiguous" + // BadGateway ... + BadGateway HTTPStatusCode = "BadGateway" + // BadRequest ... + BadRequest HTTPStatusCode = "BadRequest" + // Conflict ... + Conflict HTTPStatusCode = "Conflict" + // Continue ... + Continue HTTPStatusCode = "Continue" + // Created ... + Created HTTPStatusCode = "Created" + // ExpectationFailed ... + ExpectationFailed HTTPStatusCode = "ExpectationFailed" + // Forbidden ... + Forbidden HTTPStatusCode = "Forbidden" + // Found ... + Found HTTPStatusCode = "Found" + // GatewayTimeout ... + GatewayTimeout HTTPStatusCode = "GatewayTimeout" + // Gone ... + Gone HTTPStatusCode = "Gone" + // HTTPVersionNotSupported ... + HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" + // InternalServerError ... + InternalServerError HTTPStatusCode = "InternalServerError" + // LengthRequired ... + LengthRequired HTTPStatusCode = "LengthRequired" + // MethodNotAllowed ... + MethodNotAllowed HTTPStatusCode = "MethodNotAllowed" + // Moved ... + Moved HTTPStatusCode = "Moved" + // MovedPermanently ... + MovedPermanently HTTPStatusCode = "MovedPermanently" + // MultipleChoices ... + MultipleChoices HTTPStatusCode = "MultipleChoices" + // NoContent ... + NoContent HTTPStatusCode = "NoContent" + // NonAuthoritativeInformation ... + NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" + // NotAcceptable ... + NotAcceptable HTTPStatusCode = "NotAcceptable" + // NotFound ... + NotFound HTTPStatusCode = "NotFound" + // NotImplemented ... + NotImplemented HTTPStatusCode = "NotImplemented" + // NotModified ... + NotModified HTTPStatusCode = "NotModified" + // OK ... + OK HTTPStatusCode = "OK" + // PartialContent ... + PartialContent HTTPStatusCode = "PartialContent" + // PaymentRequired ... + PaymentRequired HTTPStatusCode = "PaymentRequired" + // PreconditionFailed ... + PreconditionFailed HTTPStatusCode = "PreconditionFailed" + // ProxyAuthenticationRequired ... + ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" + // Redirect ... + Redirect HTTPStatusCode = "Redirect" + // RedirectKeepVerb ... + RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" + // RedirectMethod ... + RedirectMethod HTTPStatusCode = "RedirectMethod" + // RequestedRangeNotSatisfiable ... + RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" + // RequestEntityTooLarge ... + RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" + // RequestTimeout ... + RequestTimeout HTTPStatusCode = "RequestTimeout" + // RequestURITooLong ... + RequestURITooLong HTTPStatusCode = "RequestUriTooLong" + // ResetContent ... + ResetContent HTTPStatusCode = "ResetContent" + // SeeOther ... + SeeOther HTTPStatusCode = "SeeOther" + // ServiceUnavailable ... + ServiceUnavailable HTTPStatusCode = "ServiceUnavailable" + // SwitchingProtocols ... + SwitchingProtocols HTTPStatusCode = "SwitchingProtocols" + // TemporaryRedirect ... + TemporaryRedirect HTTPStatusCode = "TemporaryRedirect" + // Unauthorized ... + Unauthorized HTTPStatusCode = "Unauthorized" + // UnsupportedMediaType ... + UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" + // Unused ... + Unused HTTPStatusCode = "Unused" + // UpgradeRequired ... + UpgradeRequired HTTPStatusCode = "UpgradeRequired" + // UseProxy ... + UseProxy HTTPStatusCode = "UseProxy" +) + +// PossibleHTTPStatusCodeValues returns an array of possible values for the HTTPStatusCode const type. +func PossibleHTTPStatusCodeValues() []HTTPStatusCode { + return []HTTPStatusCode{Accepted, Ambiguous, BadGateway, BadRequest, Conflict, Continue, Created, ExpectationFailed, Forbidden, Found, GatewayTimeout, Gone, HTTPVersionNotSupported, InternalServerError, LengthRequired, MethodNotAllowed, Moved, MovedPermanently, MultipleChoices, NoContent, NonAuthoritativeInformation, NotAcceptable, NotFound, NotImplemented, NotModified, OK, PartialContent, PaymentRequired, PreconditionFailed, ProxyAuthenticationRequired, Redirect, RedirectKeepVerb, RedirectMethod, RequestedRangeNotSatisfiable, RequestEntityTooLarge, RequestTimeout, RequestURITooLong, ResetContent, SeeOther, ServiceUnavailable, SwitchingProtocols, TemporaryRedirect, Unauthorized, UnsupportedMediaType, Unused, UpgradeRequired, UseProxy} +} + +// InquiryStatus enumerates the values for inquiry status. +type InquiryStatus string + +const ( + // InquiryStatusFailed ... + InquiryStatusFailed InquiryStatus = "Failed" + // InquiryStatusInvalid ... + InquiryStatusInvalid InquiryStatus = "Invalid" + // InquiryStatusSuccess ... + InquiryStatusSuccess InquiryStatus = "Success" +) + +// PossibleInquiryStatusValues returns an array of possible values for the InquiryStatus const type. +func PossibleInquiryStatusValues() []InquiryStatus { + return []InquiryStatus{InquiryStatusFailed, InquiryStatusInvalid, InquiryStatusSuccess} +} + +// IntentItemType enumerates the values for intent item type. +type IntentItemType string + +const ( + // IntentItemTypeInvalid ... + IntentItemTypeInvalid IntentItemType = "Invalid" + // IntentItemTypeSQLAvailabilityGroupContainer ... + IntentItemTypeSQLAvailabilityGroupContainer IntentItemType = "SQLAvailabilityGroupContainer" + // IntentItemTypeSQLInstance ... + IntentItemTypeSQLInstance IntentItemType = "SQLInstance" +) + +// PossibleIntentItemTypeValues returns an array of possible values for the IntentItemType const type. +func PossibleIntentItemTypeValues() []IntentItemType { + return []IntentItemType{IntentItemTypeInvalid, IntentItemTypeSQLAvailabilityGroupContainer, IntentItemTypeSQLInstance} +} + +// ItemType enumerates the values for item type. +type ItemType string + +const ( + // ItemTypeAzureFileShare ... + ItemTypeAzureFileShare ItemType = "AzureFileShare" + // ItemTypeAzureSQLDb ... + ItemTypeAzureSQLDb ItemType = "AzureSqlDb" + // ItemTypeClient ... + ItemTypeClient ItemType = "Client" + // ItemTypeExchange ... + ItemTypeExchange ItemType = "Exchange" + // ItemTypeFileFolder ... + ItemTypeFileFolder ItemType = "FileFolder" + // ItemTypeGenericDataSource ... + ItemTypeGenericDataSource ItemType = "GenericDataSource" + // ItemTypeInvalid ... + ItemTypeInvalid ItemType = "Invalid" + // ItemTypeSAPAseDatabase ... + ItemTypeSAPAseDatabase ItemType = "SAPAseDatabase" + // ItemTypeSAPHanaDatabase ... + ItemTypeSAPHanaDatabase ItemType = "SAPHanaDatabase" + // ItemTypeSharepoint ... + ItemTypeSharepoint ItemType = "Sharepoint" + // ItemTypeSQLDataBase ... + ItemTypeSQLDataBase ItemType = "SQLDataBase" + // ItemTypeSQLDB ... + ItemTypeSQLDB ItemType = "SQLDB" + // ItemTypeSystemState ... + ItemTypeSystemState ItemType = "SystemState" + // ItemTypeVM ... + ItemTypeVM ItemType = "VM" + // ItemTypeVMwareVM ... + ItemTypeVMwareVM ItemType = "VMwareVM" +) + +// PossibleItemTypeValues returns an array of possible values for the ItemType const type. +func PossibleItemTypeValues() []ItemType { + return []ItemType{ItemTypeAzureFileShare, ItemTypeAzureSQLDb, ItemTypeClient, ItemTypeExchange, ItemTypeFileFolder, ItemTypeGenericDataSource, ItemTypeInvalid, ItemTypeSAPAseDatabase, ItemTypeSAPHanaDatabase, ItemTypeSharepoint, ItemTypeSQLDataBase, ItemTypeSQLDB, ItemTypeSystemState, ItemTypeVM, ItemTypeVMwareVM} +} + +// JobOperationType enumerates the values for job operation type. +type JobOperationType string + +const ( + // JobOperationTypeBackup ... + JobOperationTypeBackup JobOperationType = "Backup" + // JobOperationTypeConfigureBackup ... + JobOperationTypeConfigureBackup JobOperationType = "ConfigureBackup" + // JobOperationTypeCrossRegionRestore ... + JobOperationTypeCrossRegionRestore JobOperationType = "CrossRegionRestore" + // JobOperationTypeDeleteBackupData ... + JobOperationTypeDeleteBackupData JobOperationType = "DeleteBackupData" + // JobOperationTypeDisableBackup ... + JobOperationTypeDisableBackup JobOperationType = "DisableBackup" + // JobOperationTypeInvalid ... + JobOperationTypeInvalid JobOperationType = "Invalid" + // JobOperationTypeRegister ... + JobOperationTypeRegister JobOperationType = "Register" + // JobOperationTypeRestore ... + JobOperationTypeRestore JobOperationType = "Restore" + // JobOperationTypeUndelete ... + JobOperationTypeUndelete JobOperationType = "Undelete" + // JobOperationTypeUnRegister ... + JobOperationTypeUnRegister JobOperationType = "UnRegister" +) + +// PossibleJobOperationTypeValues returns an array of possible values for the JobOperationType const type. +func PossibleJobOperationTypeValues() []JobOperationType { + return []JobOperationType{JobOperationTypeBackup, JobOperationTypeConfigureBackup, JobOperationTypeCrossRegionRestore, JobOperationTypeDeleteBackupData, JobOperationTypeDisableBackup, JobOperationTypeInvalid, JobOperationTypeRegister, JobOperationTypeRestore, JobOperationTypeUndelete, JobOperationTypeUnRegister} +} + +// JobStatus enumerates the values for job status. +type JobStatus string + +const ( + // JobStatusCancelled ... + JobStatusCancelled JobStatus = "Cancelled" + // JobStatusCancelling ... + JobStatusCancelling JobStatus = "Cancelling" + // JobStatusCompleted ... + JobStatusCompleted JobStatus = "Completed" + // JobStatusCompletedWithWarnings ... + JobStatusCompletedWithWarnings JobStatus = "CompletedWithWarnings" + // JobStatusFailed ... + JobStatusFailed JobStatus = "Failed" + // JobStatusInProgress ... + JobStatusInProgress JobStatus = "InProgress" + // JobStatusInvalid ... + JobStatusInvalid JobStatus = "Invalid" +) + +// PossibleJobStatusValues returns an array of possible values for the JobStatus const type. +func PossibleJobStatusValues() []JobStatus { + return []JobStatus{JobStatusCancelled, JobStatusCancelling, JobStatusCompleted, JobStatusCompletedWithWarnings, JobStatusFailed, JobStatusInProgress, JobStatusInvalid} +} + +// JobSupportedAction enumerates the values for job supported action. +type JobSupportedAction string + +const ( + // JobSupportedActionCancellable ... + JobSupportedActionCancellable JobSupportedAction = "Cancellable" + // JobSupportedActionInvalid ... + JobSupportedActionInvalid JobSupportedAction = "Invalid" + // JobSupportedActionRetriable ... + JobSupportedActionRetriable JobSupportedAction = "Retriable" +) + +// PossibleJobSupportedActionValues returns an array of possible values for the JobSupportedAction const type. +func PossibleJobSupportedActionValues() []JobSupportedAction { + return []JobSupportedAction{JobSupportedActionCancellable, JobSupportedActionInvalid, JobSupportedActionRetriable} +} + +// JobType enumerates the values for job type. +type JobType string + +const ( + // JobTypeAzureIaaSVMJob ... + JobTypeAzureIaaSVMJob JobType = "AzureIaaSVMJob" + // JobTypeAzureStorageJob ... + JobTypeAzureStorageJob JobType = "AzureStorageJob" + // JobTypeAzureWorkloadJob ... + JobTypeAzureWorkloadJob JobType = "AzureWorkloadJob" + // JobTypeDpmJob ... + JobTypeDpmJob JobType = "DpmJob" + // JobTypeJob ... + JobTypeJob JobType = "Job" + // JobTypeMabJob ... + JobTypeMabJob JobType = "MabJob" +) + +// PossibleJobTypeValues returns an array of possible values for the JobType const type. +func PossibleJobTypeValues() []JobType { + return []JobType{JobTypeAzureIaaSVMJob, JobTypeAzureStorageJob, JobTypeAzureWorkloadJob, JobTypeDpmJob, JobTypeJob, JobTypeMabJob} +} + +// LastBackupStatus enumerates the values for last backup status. +type LastBackupStatus string + +const ( + // LastBackupStatusHealthy ... + LastBackupStatusHealthy LastBackupStatus = "Healthy" + // LastBackupStatusInvalid ... + LastBackupStatusInvalid LastBackupStatus = "Invalid" + // LastBackupStatusIRPending ... + LastBackupStatusIRPending LastBackupStatus = "IRPending" + // LastBackupStatusUnhealthy ... + LastBackupStatusUnhealthy LastBackupStatus = "Unhealthy" +) + +// PossibleLastBackupStatusValues returns an array of possible values for the LastBackupStatus const type. +func PossibleLastBackupStatusValues() []LastBackupStatus { + return []LastBackupStatus{LastBackupStatusHealthy, LastBackupStatusInvalid, LastBackupStatusIRPending, LastBackupStatusUnhealthy} +} + +// MabServerType enumerates the values for mab server type. +type MabServerType string + +const ( + // MabServerTypeAzureBackupServerContainer ... + MabServerTypeAzureBackupServerContainer MabServerType = "AzureBackupServerContainer" + // MabServerTypeAzureSQLContainer ... + MabServerTypeAzureSQLContainer MabServerType = "AzureSqlContainer" + // MabServerTypeCluster ... + MabServerTypeCluster MabServerType = "Cluster" + // MabServerTypeDPMContainer ... + MabServerTypeDPMContainer MabServerType = "DPMContainer" + // MabServerTypeGenericContainer ... + MabServerTypeGenericContainer MabServerType = "GenericContainer" + // MabServerTypeIaasVMContainer ... + MabServerTypeIaasVMContainer MabServerType = "IaasVMContainer" + // MabServerTypeIaasVMServiceContainer ... + MabServerTypeIaasVMServiceContainer MabServerType = "IaasVMServiceContainer" + // MabServerTypeInvalid ... + MabServerTypeInvalid MabServerType = "Invalid" + // MabServerTypeMABContainer ... + MabServerTypeMABContainer MabServerType = "MABContainer" + // MabServerTypeSQLAGWorkLoadContainer ... + MabServerTypeSQLAGWorkLoadContainer MabServerType = "SQLAGWorkLoadContainer" + // MabServerTypeStorageContainer ... + MabServerTypeStorageContainer MabServerType = "StorageContainer" + // MabServerTypeUnknown ... + MabServerTypeUnknown MabServerType = "Unknown" + // MabServerTypeVCenter ... + MabServerTypeVCenter MabServerType = "VCenter" + // MabServerTypeVMAppContainer ... + MabServerTypeVMAppContainer MabServerType = "VMAppContainer" + // MabServerTypeWindows ... + MabServerTypeWindows MabServerType = "Windows" +) + +// PossibleMabServerTypeValues returns an array of possible values for the MabServerType const type. +func PossibleMabServerTypeValues() []MabServerType { + return []MabServerType{MabServerTypeAzureBackupServerContainer, MabServerTypeAzureSQLContainer, MabServerTypeCluster, MabServerTypeDPMContainer, MabServerTypeGenericContainer, MabServerTypeIaasVMContainer, MabServerTypeIaasVMServiceContainer, MabServerTypeInvalid, MabServerTypeMABContainer, MabServerTypeSQLAGWorkLoadContainer, MabServerTypeStorageContainer, MabServerTypeUnknown, MabServerTypeVCenter, MabServerTypeVMAppContainer, MabServerTypeWindows} +} + +// ManagementType enumerates the values for management type. +type ManagementType string + +const ( + // ManagementTypeAzureBackupServer ... + ManagementTypeAzureBackupServer ManagementType = "AzureBackupServer" + // ManagementTypeAzureIaasVM ... + ManagementTypeAzureIaasVM ManagementType = "AzureIaasVM" + // ManagementTypeAzureSQL ... + ManagementTypeAzureSQL ManagementType = "AzureSql" + // ManagementTypeAzureStorage ... + ManagementTypeAzureStorage ManagementType = "AzureStorage" + // ManagementTypeAzureWorkload ... + ManagementTypeAzureWorkload ManagementType = "AzureWorkload" + // ManagementTypeDefaultBackup ... + ManagementTypeDefaultBackup ManagementType = "DefaultBackup" + // ManagementTypeDPM ... + ManagementTypeDPM ManagementType = "DPM" + // ManagementTypeInvalid ... + ManagementTypeInvalid ManagementType = "Invalid" + // ManagementTypeMAB ... + ManagementTypeMAB ManagementType = "MAB" +) + +// PossibleManagementTypeValues returns an array of possible values for the ManagementType const type. +func PossibleManagementTypeValues() []ManagementType { + return []ManagementType{ManagementTypeAzureBackupServer, ManagementTypeAzureIaasVM, ManagementTypeAzureSQL, ManagementTypeAzureStorage, ManagementTypeAzureWorkload, ManagementTypeDefaultBackup, ManagementTypeDPM, ManagementTypeInvalid, ManagementTypeMAB} +} + +// ManagementTypeBasicProtectionPolicy enumerates the values for management type basic protection policy. +type ManagementTypeBasicProtectionPolicy string + +const ( + // BackupManagementTypeAzureIaasVM ... + BackupManagementTypeAzureIaasVM ManagementTypeBasicProtectionPolicy = "AzureIaasVM" + // BackupManagementTypeAzureSQL ... + BackupManagementTypeAzureSQL ManagementTypeBasicProtectionPolicy = "AzureSql" + // BackupManagementTypeAzureStorage ... + BackupManagementTypeAzureStorage ManagementTypeBasicProtectionPolicy = "AzureStorage" + // BackupManagementTypeAzureWorkload ... + BackupManagementTypeAzureWorkload ManagementTypeBasicProtectionPolicy = "AzureWorkload" + // BackupManagementTypeGenericProtectionPolicy ... + BackupManagementTypeGenericProtectionPolicy ManagementTypeBasicProtectionPolicy = "GenericProtectionPolicy" + // BackupManagementTypeMAB ... + BackupManagementTypeMAB ManagementTypeBasicProtectionPolicy = "MAB" + // BackupManagementTypeProtectionPolicy ... + BackupManagementTypeProtectionPolicy ManagementTypeBasicProtectionPolicy = "ProtectionPolicy" +) + +// PossibleManagementTypeBasicProtectionPolicyValues returns an array of possible values for the ManagementTypeBasicProtectionPolicy const type. +func PossibleManagementTypeBasicProtectionPolicyValues() []ManagementTypeBasicProtectionPolicy { + return []ManagementTypeBasicProtectionPolicy{BackupManagementTypeAzureIaasVM, BackupManagementTypeAzureSQL, BackupManagementTypeAzureStorage, BackupManagementTypeAzureWorkload, BackupManagementTypeGenericProtectionPolicy, BackupManagementTypeMAB, BackupManagementTypeProtectionPolicy} +} + +// MonthOfYear enumerates the values for month of year. +type MonthOfYear string + +const ( + // MonthOfYearApril ... + MonthOfYearApril MonthOfYear = "April" + // MonthOfYearAugust ... + MonthOfYearAugust MonthOfYear = "August" + // MonthOfYearDecember ... + MonthOfYearDecember MonthOfYear = "December" + // MonthOfYearFebruary ... + MonthOfYearFebruary MonthOfYear = "February" + // MonthOfYearInvalid ... + MonthOfYearInvalid MonthOfYear = "Invalid" + // MonthOfYearJanuary ... + MonthOfYearJanuary MonthOfYear = "January" + // MonthOfYearJuly ... + MonthOfYearJuly MonthOfYear = "July" + // MonthOfYearJune ... + MonthOfYearJune MonthOfYear = "June" + // MonthOfYearMarch ... + MonthOfYearMarch MonthOfYear = "March" + // MonthOfYearMay ... + MonthOfYearMay MonthOfYear = "May" + // MonthOfYearNovember ... + MonthOfYearNovember MonthOfYear = "November" + // MonthOfYearOctober ... + MonthOfYearOctober MonthOfYear = "October" + // MonthOfYearSeptember ... + MonthOfYearSeptember MonthOfYear = "September" +) + +// PossibleMonthOfYearValues returns an array of possible values for the MonthOfYear const type. +func PossibleMonthOfYearValues() []MonthOfYear { + return []MonthOfYear{MonthOfYearApril, MonthOfYearAugust, MonthOfYearDecember, MonthOfYearFebruary, MonthOfYearInvalid, MonthOfYearJanuary, MonthOfYearJuly, MonthOfYearJune, MonthOfYearMarch, MonthOfYearMay, MonthOfYearNovember, MonthOfYearOctober, MonthOfYearSeptember} +} + +// ObjectType enumerates the values for object type. +type ObjectType string + +const ( + // ObjectTypeExportJobsOperationResultInfo ... + ObjectTypeExportJobsOperationResultInfo ObjectType = "ExportJobsOperationResultInfo" + // ObjectTypeOperationResultInfo ... + ObjectTypeOperationResultInfo ObjectType = "OperationResultInfo" + // ObjectTypeOperationResultInfoBase ... + ObjectTypeOperationResultInfoBase ObjectType = "OperationResultInfoBase" +) + +// PossibleObjectTypeValues returns an array of possible values for the ObjectType const type. +func PossibleObjectTypeValues() []ObjectType { + return []ObjectType{ObjectTypeExportJobsOperationResultInfo, ObjectTypeOperationResultInfo, ObjectTypeOperationResultInfoBase} +} + +// ObjectTypeBasicILRRequest enumerates the values for object type basic ilr request. +type ObjectTypeBasicILRRequest string + +const ( + // ObjectTypeAzureFileShareProvisionILRRequest ... + ObjectTypeAzureFileShareProvisionILRRequest ObjectTypeBasicILRRequest = "AzureFileShareProvisionILRRequest" + // ObjectTypeIaasVMILRRegistrationRequest ... + ObjectTypeIaasVMILRRegistrationRequest ObjectTypeBasicILRRequest = "IaasVMILRRegistrationRequest" + // ObjectTypeILRRequest ... + ObjectTypeILRRequest ObjectTypeBasicILRRequest = "ILRRequest" +) + +// PossibleObjectTypeBasicILRRequestValues returns an array of possible values for the ObjectTypeBasicILRRequest const type. +func PossibleObjectTypeBasicILRRequestValues() []ObjectTypeBasicILRRequest { + return []ObjectTypeBasicILRRequest{ObjectTypeAzureFileShareProvisionILRRequest, ObjectTypeIaasVMILRRegistrationRequest, ObjectTypeILRRequest} +} + +// ObjectTypeBasicOperationStatusExtendedInfo enumerates the values for object type basic operation status +// extended info. +type ObjectTypeBasicOperationStatusExtendedInfo string + +const ( + // ObjectTypeOperationStatusExtendedInfo ... + ObjectTypeOperationStatusExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusExtendedInfo" + // ObjectTypeOperationStatusJobExtendedInfo ... + ObjectTypeOperationStatusJobExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusJobExtendedInfo" + // ObjectTypeOperationStatusJobsExtendedInfo ... + ObjectTypeOperationStatusJobsExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusJobsExtendedInfo" + // ObjectTypeOperationStatusProvisionILRExtendedInfo ... + ObjectTypeOperationStatusProvisionILRExtendedInfo ObjectTypeBasicOperationStatusExtendedInfo = "OperationStatusProvisionILRExtendedInfo" +) + +// PossibleObjectTypeBasicOperationStatusExtendedInfoValues returns an array of possible values for the ObjectTypeBasicOperationStatusExtendedInfo const type. +func PossibleObjectTypeBasicOperationStatusExtendedInfoValues() []ObjectTypeBasicOperationStatusExtendedInfo { + return []ObjectTypeBasicOperationStatusExtendedInfo{ObjectTypeOperationStatusExtendedInfo, ObjectTypeOperationStatusJobExtendedInfo, ObjectTypeOperationStatusJobsExtendedInfo, ObjectTypeOperationStatusProvisionILRExtendedInfo} +} + +// ObjectTypeBasicRecoveryPoint enumerates the values for object type basic recovery point. +type ObjectTypeBasicRecoveryPoint string + +const ( + // ObjectTypeAzureFileShareRecoveryPoint ... + ObjectTypeAzureFileShareRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureFileShareRecoveryPoint" + // ObjectTypeAzureWorkloadPointInTimeRecoveryPoint ... + ObjectTypeAzureWorkloadPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadPointInTimeRecoveryPoint" + // ObjectTypeAzureWorkloadRecoveryPoint ... + ObjectTypeAzureWorkloadRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadRecoveryPoint" + // ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint ... + ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSAPHanaPointInTimeRecoveryPoint" + // ObjectTypeAzureWorkloadSAPHanaRecoveryPoint ... + ObjectTypeAzureWorkloadSAPHanaRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSAPHanaRecoveryPoint" + // ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint ... + ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSQLPointInTimeRecoveryPoint" + // ObjectTypeAzureWorkloadSQLRecoveryPoint ... + ObjectTypeAzureWorkloadSQLRecoveryPoint ObjectTypeBasicRecoveryPoint = "AzureWorkloadSQLRecoveryPoint" + // ObjectTypeGenericRecoveryPoint ... + ObjectTypeGenericRecoveryPoint ObjectTypeBasicRecoveryPoint = "GenericRecoveryPoint" + // ObjectTypeIaasVMRecoveryPoint ... + ObjectTypeIaasVMRecoveryPoint ObjectTypeBasicRecoveryPoint = "IaasVMRecoveryPoint" + // ObjectTypeRecoveryPoint ... + ObjectTypeRecoveryPoint ObjectTypeBasicRecoveryPoint = "RecoveryPoint" +) + +// PossibleObjectTypeBasicRecoveryPointValues returns an array of possible values for the ObjectTypeBasicRecoveryPoint const type. +func PossibleObjectTypeBasicRecoveryPointValues() []ObjectTypeBasicRecoveryPoint { + return []ObjectTypeBasicRecoveryPoint{ObjectTypeAzureFileShareRecoveryPoint, ObjectTypeAzureWorkloadPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadRecoveryPoint, ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadSAPHanaRecoveryPoint, ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint, ObjectTypeAzureWorkloadSQLRecoveryPoint, ObjectTypeGenericRecoveryPoint, ObjectTypeIaasVMRecoveryPoint, ObjectTypeRecoveryPoint} +} + +// ObjectTypeBasicRequest enumerates the values for object type basic request. +type ObjectTypeBasicRequest string + +const ( + // ObjectTypeAzureFileShareBackupRequest ... + ObjectTypeAzureFileShareBackupRequest ObjectTypeBasicRequest = "AzureFileShareBackupRequest" + // ObjectTypeAzureWorkloadBackupRequest ... + ObjectTypeAzureWorkloadBackupRequest ObjectTypeBasicRequest = "AzureWorkloadBackupRequest" + // ObjectTypeBackupRequest ... + ObjectTypeBackupRequest ObjectTypeBasicRequest = "BackupRequest" + // ObjectTypeIaasVMBackupRequest ... + ObjectTypeIaasVMBackupRequest ObjectTypeBasicRequest = "IaasVMBackupRequest" +) + +// PossibleObjectTypeBasicRequestValues returns an array of possible values for the ObjectTypeBasicRequest const type. +func PossibleObjectTypeBasicRequestValues() []ObjectTypeBasicRequest { + return []ObjectTypeBasicRequest{ObjectTypeAzureFileShareBackupRequest, ObjectTypeAzureWorkloadBackupRequest, ObjectTypeBackupRequest, ObjectTypeIaasVMBackupRequest} +} + +// ObjectTypeBasicRestoreRequest enumerates the values for object type basic restore request. +type ObjectTypeBasicRestoreRequest string + +const ( + // ObjectTypeAzureFileShareRestoreRequest ... + ObjectTypeAzureFileShareRestoreRequest ObjectTypeBasicRestoreRequest = "AzureFileShareRestoreRequest" + // ObjectTypeAzureWorkloadPointInTimeRestoreRequest ... + ObjectTypeAzureWorkloadPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadPointInTimeRestoreRequest" + // ObjectTypeAzureWorkloadRestoreRequest ... + ObjectTypeAzureWorkloadRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadRestoreRequest" + // ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest ... + ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSAPHanaPointInTimeRestoreRequest" + // ObjectTypeAzureWorkloadSAPHanaRestoreRequest ... + ObjectTypeAzureWorkloadSAPHanaRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSAPHanaRestoreRequest" + // ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest ... + ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSQLPointInTimeRestoreRequest" + // ObjectTypeAzureWorkloadSQLRestoreRequest ... + ObjectTypeAzureWorkloadSQLRestoreRequest ObjectTypeBasicRestoreRequest = "AzureWorkloadSQLRestoreRequest" + // ObjectTypeIaasVMRestoreRequest ... + ObjectTypeIaasVMRestoreRequest ObjectTypeBasicRestoreRequest = "IaasVMRestoreRequest" + // ObjectTypeRestoreRequest ... + ObjectTypeRestoreRequest ObjectTypeBasicRestoreRequest = "RestoreRequest" +) + +// PossibleObjectTypeBasicRestoreRequestValues returns an array of possible values for the ObjectTypeBasicRestoreRequest const type. +func PossibleObjectTypeBasicRestoreRequestValues() []ObjectTypeBasicRestoreRequest { + return []ObjectTypeBasicRestoreRequest{ObjectTypeAzureFileShareRestoreRequest, ObjectTypeAzureWorkloadPointInTimeRestoreRequest, ObjectTypeAzureWorkloadRestoreRequest, ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest, ObjectTypeAzureWorkloadSAPHanaRestoreRequest, ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest, ObjectTypeAzureWorkloadSQLRestoreRequest, ObjectTypeIaasVMRestoreRequest, ObjectTypeRestoreRequest} +} + +// ObjectTypeBasicValidateOperationRequest enumerates the values for object type basic validate operation +// request. +type ObjectTypeBasicValidateOperationRequest string + +const ( + // ObjectTypeValidateIaasVMRestoreOperationRequest ... + ObjectTypeValidateIaasVMRestoreOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateIaasVMRestoreOperationRequest" + // ObjectTypeValidateOperationRequest ... + ObjectTypeValidateOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateOperationRequest" + // ObjectTypeValidateRestoreOperationRequest ... + ObjectTypeValidateRestoreOperationRequest ObjectTypeBasicValidateOperationRequest = "ValidateRestoreOperationRequest" +) + +// PossibleObjectTypeBasicValidateOperationRequestValues returns an array of possible values for the ObjectTypeBasicValidateOperationRequest const type. +func PossibleObjectTypeBasicValidateOperationRequestValues() []ObjectTypeBasicValidateOperationRequest { + return []ObjectTypeBasicValidateOperationRequest{ObjectTypeValidateIaasVMRestoreOperationRequest, ObjectTypeValidateOperationRequest, ObjectTypeValidateRestoreOperationRequest} +} + +// OperationStatusValues enumerates the values for operation status values. +type OperationStatusValues string + +const ( + // OperationStatusValuesCanceled ... + OperationStatusValuesCanceled OperationStatusValues = "Canceled" + // OperationStatusValuesFailed ... + OperationStatusValuesFailed OperationStatusValues = "Failed" + // OperationStatusValuesInProgress ... + OperationStatusValuesInProgress OperationStatusValues = "InProgress" + // OperationStatusValuesInvalid ... + OperationStatusValuesInvalid OperationStatusValues = "Invalid" + // OperationStatusValuesSucceeded ... + OperationStatusValuesSucceeded OperationStatusValues = "Succeeded" +) + +// PossibleOperationStatusValuesValues returns an array of possible values for the OperationStatusValues const type. +func PossibleOperationStatusValuesValues() []OperationStatusValues { + return []OperationStatusValues{OperationStatusValuesCanceled, OperationStatusValuesFailed, OperationStatusValuesInProgress, OperationStatusValuesInvalid, OperationStatusValuesSucceeded} +} + +// OperationType enumerates the values for operation type. +type OperationType string + +const ( + // OperationTypeInvalid ... + OperationTypeInvalid OperationType = "Invalid" + // OperationTypeRegister ... + OperationTypeRegister OperationType = "Register" + // OperationTypeReregister ... + OperationTypeReregister OperationType = "Reregister" +) + +// PossibleOperationTypeValues returns an array of possible values for the OperationType const type. +func PossibleOperationTypeValues() []OperationType { + return []OperationType{OperationTypeInvalid, OperationTypeRegister, OperationTypeReregister} +} + +// OverwriteOptions enumerates the values for overwrite options. +type OverwriteOptions string + +const ( + // OverwriteOptionsFailOnConflict ... + OverwriteOptionsFailOnConflict OverwriteOptions = "FailOnConflict" + // OverwriteOptionsInvalid ... + OverwriteOptionsInvalid OverwriteOptions = "Invalid" + // OverwriteOptionsOverwrite ... + OverwriteOptionsOverwrite OverwriteOptions = "Overwrite" +) + +// PossibleOverwriteOptionsValues returns an array of possible values for the OverwriteOptions const type. +func PossibleOverwriteOptionsValues() []OverwriteOptions { + return []OverwriteOptions{OverwriteOptionsFailOnConflict, OverwriteOptionsInvalid, OverwriteOptionsOverwrite} +} + +// PolicyType enumerates the values for policy type. +type PolicyType string + +const ( + // PolicyTypeCopyOnlyFull ... + PolicyTypeCopyOnlyFull PolicyType = "CopyOnlyFull" + // PolicyTypeDifferential ... + PolicyTypeDifferential PolicyType = "Differential" + // PolicyTypeFull ... + PolicyTypeFull PolicyType = "Full" + // PolicyTypeInvalid ... + PolicyTypeInvalid PolicyType = "Invalid" + // PolicyTypeLog ... + PolicyTypeLog PolicyType = "Log" +) + +// PossiblePolicyTypeValues returns an array of possible values for the PolicyType const type. +func PossiblePolicyTypeValues() []PolicyType { + return []PolicyType{PolicyTypeCopyOnlyFull, PolicyTypeDifferential, PolicyTypeFull, PolicyTypeInvalid, PolicyTypeLog} +} + +// ProtectableContainerType enumerates the values for protectable container type. +type ProtectableContainerType string + +const ( + // ProtectableContainerTypeProtectableContainer ... + ProtectableContainerTypeProtectableContainer ProtectableContainerType = "ProtectableContainer" + // ProtectableContainerTypeStorageContainer ... + ProtectableContainerTypeStorageContainer ProtectableContainerType = "StorageContainer" + // ProtectableContainerTypeVMAppContainer ... + ProtectableContainerTypeVMAppContainer ProtectableContainerType = "VMAppContainer" +) + +// PossibleProtectableContainerTypeValues returns an array of possible values for the ProtectableContainerType const type. +func PossibleProtectableContainerTypeValues() []ProtectableContainerType { + return []ProtectableContainerType{ProtectableContainerTypeProtectableContainer, ProtectableContainerTypeStorageContainer, ProtectableContainerTypeVMAppContainer} +} + +// ProtectableItemType enumerates the values for protectable item type. +type ProtectableItemType string + +const ( + // ProtectableItemTypeAzureFileShare ... + ProtectableItemTypeAzureFileShare ProtectableItemType = "AzureFileShare" + // ProtectableItemTypeAzureVMWorkloadProtectableItem ... + ProtectableItemTypeAzureVMWorkloadProtectableItem ProtectableItemType = "AzureVmWorkloadProtectableItem" + // ProtectableItemTypeIaaSVMProtectableItem ... + ProtectableItemTypeIaaSVMProtectableItem ProtectableItemType = "IaaSVMProtectableItem" + // ProtectableItemTypeMicrosoftClassicComputevirtualMachines ... + ProtectableItemTypeMicrosoftClassicComputevirtualMachines ProtectableItemType = "Microsoft.ClassicCompute/virtualMachines" + // ProtectableItemTypeMicrosoftComputevirtualMachines ... + ProtectableItemTypeMicrosoftComputevirtualMachines ProtectableItemType = "Microsoft.Compute/virtualMachines" + // ProtectableItemTypeSAPAseSystem ... + ProtectableItemTypeSAPAseSystem ProtectableItemType = "SAPAseSystem" + // ProtectableItemTypeSAPHanaDatabase ... + ProtectableItemTypeSAPHanaDatabase ProtectableItemType = "SAPHanaDatabase" + // ProtectableItemTypeSAPHanaSystem ... + ProtectableItemTypeSAPHanaSystem ProtectableItemType = "SAPHanaSystem" + // ProtectableItemTypeSQLAvailabilityGroupContainer ... + ProtectableItemTypeSQLAvailabilityGroupContainer ProtectableItemType = "SQLAvailabilityGroupContainer" + // ProtectableItemTypeSQLDataBase ... + ProtectableItemTypeSQLDataBase ProtectableItemType = "SQLDataBase" + // ProtectableItemTypeSQLInstance ... + ProtectableItemTypeSQLInstance ProtectableItemType = "SQLInstance" + // ProtectableItemTypeWorkloadProtectableItem ... + ProtectableItemTypeWorkloadProtectableItem ProtectableItemType = "WorkloadProtectableItem" +) + +// PossibleProtectableItemTypeValues returns an array of possible values for the ProtectableItemType const type. +func PossibleProtectableItemTypeValues() []ProtectableItemType { + return []ProtectableItemType{ProtectableItemTypeAzureFileShare, ProtectableItemTypeAzureVMWorkloadProtectableItem, ProtectableItemTypeIaaSVMProtectableItem, ProtectableItemTypeMicrosoftClassicComputevirtualMachines, ProtectableItemTypeMicrosoftComputevirtualMachines, ProtectableItemTypeSAPAseSystem, ProtectableItemTypeSAPHanaDatabase, ProtectableItemTypeSAPHanaSystem, ProtectableItemTypeSQLAvailabilityGroupContainer, ProtectableItemTypeSQLDataBase, ProtectableItemTypeSQLInstance, ProtectableItemTypeWorkloadProtectableItem} +} + +// ProtectedItemHealthStatus enumerates the values for protected item health status. +type ProtectedItemHealthStatus string + +const ( + // ProtectedItemHealthStatusHealthy ... + ProtectedItemHealthStatusHealthy ProtectedItemHealthStatus = "Healthy" + // ProtectedItemHealthStatusInvalid ... + ProtectedItemHealthStatusInvalid ProtectedItemHealthStatus = "Invalid" + // ProtectedItemHealthStatusIRPending ... + ProtectedItemHealthStatusIRPending ProtectedItemHealthStatus = "IRPending" + // ProtectedItemHealthStatusNotReachable ... + ProtectedItemHealthStatusNotReachable ProtectedItemHealthStatus = "NotReachable" + // ProtectedItemHealthStatusUnhealthy ... + ProtectedItemHealthStatusUnhealthy ProtectedItemHealthStatus = "Unhealthy" +) + +// PossibleProtectedItemHealthStatusValues returns an array of possible values for the ProtectedItemHealthStatus const type. +func PossibleProtectedItemHealthStatusValues() []ProtectedItemHealthStatus { + return []ProtectedItemHealthStatus{ProtectedItemHealthStatusHealthy, ProtectedItemHealthStatusInvalid, ProtectedItemHealthStatusIRPending, ProtectedItemHealthStatusNotReachable, ProtectedItemHealthStatusUnhealthy} +} + +// ProtectedItemState enumerates the values for protected item state. +type ProtectedItemState string + +const ( + // ProtectedItemStateInvalid ... + ProtectedItemStateInvalid ProtectedItemState = "Invalid" + // ProtectedItemStateIRPending ... + ProtectedItemStateIRPending ProtectedItemState = "IRPending" + // ProtectedItemStateProtected ... + ProtectedItemStateProtected ProtectedItemState = "Protected" + // ProtectedItemStateProtectionError ... + ProtectedItemStateProtectionError ProtectedItemState = "ProtectionError" + // ProtectedItemStateProtectionPaused ... + ProtectedItemStateProtectionPaused ProtectedItemState = "ProtectionPaused" + // ProtectedItemStateProtectionStopped ... + ProtectedItemStateProtectionStopped ProtectedItemState = "ProtectionStopped" +) + +// PossibleProtectedItemStateValues returns an array of possible values for the ProtectedItemState const type. +func PossibleProtectedItemStateValues() []ProtectedItemState { + return []ProtectedItemState{ProtectedItemStateInvalid, ProtectedItemStateIRPending, ProtectedItemStateProtected, ProtectedItemStateProtectionError, ProtectedItemStateProtectionPaused, ProtectedItemStateProtectionStopped} +} + +// ProtectedItemType enumerates the values for protected item type. +type ProtectedItemType string + +const ( + // ProtectedItemTypeAzureFileShareProtectedItem ... + ProtectedItemTypeAzureFileShareProtectedItem ProtectedItemType = "AzureFileShareProtectedItem" + // ProtectedItemTypeAzureIaaSVMProtectedItem ... + ProtectedItemTypeAzureIaaSVMProtectedItem ProtectedItemType = "AzureIaaSVMProtectedItem" + // ProtectedItemTypeAzureVMWorkloadProtectedItem ... + ProtectedItemTypeAzureVMWorkloadProtectedItem ProtectedItemType = "AzureVmWorkloadProtectedItem" + // ProtectedItemTypeAzureVMWorkloadSAPAseDatabase ... + ProtectedItemTypeAzureVMWorkloadSAPAseDatabase ProtectedItemType = "AzureVmWorkloadSAPAseDatabase" + // ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase ... + ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase ProtectedItemType = "AzureVmWorkloadSAPHanaDatabase" + // ProtectedItemTypeAzureVMWorkloadSQLDatabase ... + ProtectedItemTypeAzureVMWorkloadSQLDatabase ProtectedItemType = "AzureVmWorkloadSQLDatabase" + // ProtectedItemTypeDPMProtectedItem ... + ProtectedItemTypeDPMProtectedItem ProtectedItemType = "DPMProtectedItem" + // ProtectedItemTypeGenericProtectedItem ... + ProtectedItemTypeGenericProtectedItem ProtectedItemType = "GenericProtectedItem" + // ProtectedItemTypeMabFileFolderProtectedItem ... + ProtectedItemTypeMabFileFolderProtectedItem ProtectedItemType = "MabFileFolderProtectedItem" + // ProtectedItemTypeMicrosoftClassicComputevirtualMachines ... + ProtectedItemTypeMicrosoftClassicComputevirtualMachines ProtectedItemType = "Microsoft.ClassicCompute/virtualMachines" + // ProtectedItemTypeMicrosoftComputevirtualMachines ... + ProtectedItemTypeMicrosoftComputevirtualMachines ProtectedItemType = "Microsoft.Compute/virtualMachines" + // ProtectedItemTypeMicrosoftSqlserversdatabases ... + ProtectedItemTypeMicrosoftSqlserversdatabases ProtectedItemType = "Microsoft.Sql/servers/databases" + // ProtectedItemTypeProtectedItem ... + ProtectedItemTypeProtectedItem ProtectedItemType = "ProtectedItem" +) + +// PossibleProtectedItemTypeValues returns an array of possible values for the ProtectedItemType const type. +func PossibleProtectedItemTypeValues() []ProtectedItemType { + return []ProtectedItemType{ProtectedItemTypeAzureFileShareProtectedItem, ProtectedItemTypeAzureIaaSVMProtectedItem, ProtectedItemTypeAzureVMWorkloadProtectedItem, ProtectedItemTypeAzureVMWorkloadSAPAseDatabase, ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase, ProtectedItemTypeAzureVMWorkloadSQLDatabase, ProtectedItemTypeDPMProtectedItem, ProtectedItemTypeGenericProtectedItem, ProtectedItemTypeMabFileFolderProtectedItem, ProtectedItemTypeMicrosoftClassicComputevirtualMachines, ProtectedItemTypeMicrosoftComputevirtualMachines, ProtectedItemTypeMicrosoftSqlserversdatabases, ProtectedItemTypeProtectedItem} +} + +// ProtectionIntentItemType enumerates the values for protection intent item type. +type ProtectionIntentItemType string + +const ( + // ProtectionIntentItemTypeAzureResourceItem ... + ProtectionIntentItemTypeAzureResourceItem ProtectionIntentItemType = "AzureResourceItem" + // ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent ... + ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadAutoProtectionIntent" + // ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent ... + ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent ProtectionIntentItemType = "AzureWorkloadSQLAutoProtectionIntent" + // ProtectionIntentItemTypeProtectionIntent ... + ProtectionIntentItemTypeProtectionIntent ProtectionIntentItemType = "ProtectionIntent" + // ProtectionIntentItemTypeRecoveryServiceVaultItem ... + ProtectionIntentItemTypeRecoveryServiceVaultItem ProtectionIntentItemType = "RecoveryServiceVaultItem" +) + +// PossibleProtectionIntentItemTypeValues returns an array of possible values for the ProtectionIntentItemType const type. +func PossibleProtectionIntentItemTypeValues() []ProtectionIntentItemType { + return []ProtectionIntentItemType{ProtectionIntentItemTypeAzureResourceItem, ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent, ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent, ProtectionIntentItemTypeProtectionIntent, ProtectionIntentItemTypeRecoveryServiceVaultItem} +} + +// ProtectionState enumerates the values for protection state. +type ProtectionState string + +const ( + // ProtectionStateInvalid ... + ProtectionStateInvalid ProtectionState = "Invalid" + // ProtectionStateIRPending ... + ProtectionStateIRPending ProtectionState = "IRPending" + // ProtectionStateProtected ... + ProtectionStateProtected ProtectionState = "Protected" + // ProtectionStateProtectionError ... + ProtectionStateProtectionError ProtectionState = "ProtectionError" + // ProtectionStateProtectionPaused ... + ProtectionStateProtectionPaused ProtectionState = "ProtectionPaused" + // ProtectionStateProtectionStopped ... + ProtectionStateProtectionStopped ProtectionState = "ProtectionStopped" +) + +// PossibleProtectionStateValues returns an array of possible values for the ProtectionState const type. +func PossibleProtectionStateValues() []ProtectionState { + return []ProtectionState{ProtectionStateInvalid, ProtectionStateIRPending, ProtectionStateProtected, ProtectionStateProtectionError, ProtectionStateProtectionPaused, ProtectionStateProtectionStopped} +} + +// ProtectionStatus enumerates the values for protection status. +type ProtectionStatus string + +const ( + // ProtectionStatusInvalid ... + ProtectionStatusInvalid ProtectionStatus = "Invalid" + // ProtectionStatusNotProtected ... + ProtectionStatusNotProtected ProtectionStatus = "NotProtected" + // ProtectionStatusProtected ... + ProtectionStatusProtected ProtectionStatus = "Protected" + // ProtectionStatusProtecting ... + ProtectionStatusProtecting ProtectionStatus = "Protecting" + // ProtectionStatusProtectionFailed ... + ProtectionStatusProtectionFailed ProtectionStatus = "ProtectionFailed" +) + +// PossibleProtectionStatusValues returns an array of possible values for the ProtectionStatus const type. +func PossibleProtectionStatusValues() []ProtectionStatus { + return []ProtectionStatus{ProtectionStatusInvalid, ProtectionStatusNotProtected, ProtectionStatusProtected, ProtectionStatusProtecting, ProtectionStatusProtectionFailed} +} + +// RecoveryMode enumerates the values for recovery mode. +type RecoveryMode string + +const ( + // RecoveryModeFileRecovery ... + RecoveryModeFileRecovery RecoveryMode = "FileRecovery" + // RecoveryModeInvalid ... + RecoveryModeInvalid RecoveryMode = "Invalid" + // RecoveryModeWorkloadRecovery ... + RecoveryModeWorkloadRecovery RecoveryMode = "WorkloadRecovery" +) + +// PossibleRecoveryModeValues returns an array of possible values for the RecoveryMode const type. +func PossibleRecoveryModeValues() []RecoveryMode { + return []RecoveryMode{RecoveryModeFileRecovery, RecoveryModeInvalid, RecoveryModeWorkloadRecovery} +} + +// RecoveryPointTierStatus enumerates the values for recovery point tier status. +type RecoveryPointTierStatus string + +const ( + // RecoveryPointTierStatusDeleted ... + RecoveryPointTierStatusDeleted RecoveryPointTierStatus = "Deleted" + // RecoveryPointTierStatusDisabled ... + RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" + // RecoveryPointTierStatusInvalid ... + RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" + // RecoveryPointTierStatusValid ... + RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" +) + +// PossibleRecoveryPointTierStatusValues returns an array of possible values for the RecoveryPointTierStatus const type. +func PossibleRecoveryPointTierStatusValues() []RecoveryPointTierStatus { + return []RecoveryPointTierStatus{RecoveryPointTierStatusDeleted, RecoveryPointTierStatusDisabled, RecoveryPointTierStatusInvalid, RecoveryPointTierStatusValid} +} + +// RecoveryPointTierType enumerates the values for recovery point tier type. +type RecoveryPointTierType string + +const ( + // RecoveryPointTierTypeHardenedRP ... + RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" + // RecoveryPointTierTypeInstantRP ... + RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" + // RecoveryPointTierTypeInvalid ... + RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" +) + +// PossibleRecoveryPointTierTypeValues returns an array of possible values for the RecoveryPointTierType const type. +func PossibleRecoveryPointTierTypeValues() []RecoveryPointTierType { + return []RecoveryPointTierType{RecoveryPointTierTypeHardenedRP, RecoveryPointTierTypeInstantRP, RecoveryPointTierTypeInvalid} +} + +// RecoveryType enumerates the values for recovery type. +type RecoveryType string + +const ( + // RecoveryTypeAlternateLocation ... + RecoveryTypeAlternateLocation RecoveryType = "AlternateLocation" + // RecoveryTypeInvalid ... + RecoveryTypeInvalid RecoveryType = "Invalid" + // RecoveryTypeOffline ... + RecoveryTypeOffline RecoveryType = "Offline" + // RecoveryTypeOriginalLocation ... + RecoveryTypeOriginalLocation RecoveryType = "OriginalLocation" + // RecoveryTypeRestoreDisks ... + RecoveryTypeRestoreDisks RecoveryType = "RestoreDisks" +) + +// PossibleRecoveryTypeValues returns an array of possible values for the RecoveryType const type. +func PossibleRecoveryTypeValues() []RecoveryType { + return []RecoveryType{RecoveryTypeAlternateLocation, RecoveryTypeInvalid, RecoveryTypeOffline, RecoveryTypeOriginalLocation, RecoveryTypeRestoreDisks} +} + +// RestorePointQueryType enumerates the values for restore point query type. +type RestorePointQueryType string + +const ( + // RestorePointQueryTypeAll ... + RestorePointQueryTypeAll RestorePointQueryType = "All" + // RestorePointQueryTypeDifferential ... + RestorePointQueryTypeDifferential RestorePointQueryType = "Differential" + // RestorePointQueryTypeFull ... + RestorePointQueryTypeFull RestorePointQueryType = "Full" + // RestorePointQueryTypeFullAndDifferential ... + RestorePointQueryTypeFullAndDifferential RestorePointQueryType = "FullAndDifferential" + // RestorePointQueryTypeInvalid ... + RestorePointQueryTypeInvalid RestorePointQueryType = "Invalid" + // RestorePointQueryTypeLog ... + RestorePointQueryTypeLog RestorePointQueryType = "Log" +) + +// PossibleRestorePointQueryTypeValues returns an array of possible values for the RestorePointQueryType const type. +func PossibleRestorePointQueryTypeValues() []RestorePointQueryType { + return []RestorePointQueryType{RestorePointQueryTypeAll, RestorePointQueryTypeDifferential, RestorePointQueryTypeFull, RestorePointQueryTypeFullAndDifferential, RestorePointQueryTypeInvalid, RestorePointQueryTypeLog} +} + +// RestorePointType enumerates the values for restore point type. +type RestorePointType string + +const ( + // RestorePointTypeDifferential ... + RestorePointTypeDifferential RestorePointType = "Differential" + // RestorePointTypeFull ... + RestorePointTypeFull RestorePointType = "Full" + // RestorePointTypeInvalid ... + RestorePointTypeInvalid RestorePointType = "Invalid" + // RestorePointTypeLog ... + RestorePointTypeLog RestorePointType = "Log" +) + +// PossibleRestorePointTypeValues returns an array of possible values for the RestorePointType const type. +func PossibleRestorePointTypeValues() []RestorePointType { + return []RestorePointType{RestorePointTypeDifferential, RestorePointTypeFull, RestorePointTypeInvalid, RestorePointTypeLog} +} + +// RestoreRequestType enumerates the values for restore request type. +type RestoreRequestType string + +const ( + // RestoreRequestTypeFullShareRestore ... + RestoreRequestTypeFullShareRestore RestoreRequestType = "FullShareRestore" + // RestoreRequestTypeInvalid ... + RestoreRequestTypeInvalid RestoreRequestType = "Invalid" + // RestoreRequestTypeItemLevelRestore ... + RestoreRequestTypeItemLevelRestore RestoreRequestType = "ItemLevelRestore" +) + +// PossibleRestoreRequestTypeValues returns an array of possible values for the RestoreRequestType const type. +func PossibleRestoreRequestTypeValues() []RestoreRequestType { + return []RestoreRequestType{RestoreRequestTypeFullShareRestore, RestoreRequestTypeInvalid, RestoreRequestTypeItemLevelRestore} +} + +// RetentionDurationType enumerates the values for retention duration type. +type RetentionDurationType string + +const ( + // RetentionDurationTypeDays ... + RetentionDurationTypeDays RetentionDurationType = "Days" + // RetentionDurationTypeInvalid ... + RetentionDurationTypeInvalid RetentionDurationType = "Invalid" + // RetentionDurationTypeMonths ... + RetentionDurationTypeMonths RetentionDurationType = "Months" + // RetentionDurationTypeWeeks ... + RetentionDurationTypeWeeks RetentionDurationType = "Weeks" + // RetentionDurationTypeYears ... + RetentionDurationTypeYears RetentionDurationType = "Years" +) + +// PossibleRetentionDurationTypeValues returns an array of possible values for the RetentionDurationType const type. +func PossibleRetentionDurationTypeValues() []RetentionDurationType { + return []RetentionDurationType{RetentionDurationTypeDays, RetentionDurationTypeInvalid, RetentionDurationTypeMonths, RetentionDurationTypeWeeks, RetentionDurationTypeYears} +} + +// RetentionPolicyType enumerates the values for retention policy type. +type RetentionPolicyType string + +const ( + // RetentionPolicyTypeLongTermRetentionPolicy ... + RetentionPolicyTypeLongTermRetentionPolicy RetentionPolicyType = "LongTermRetentionPolicy" + // RetentionPolicyTypeRetentionPolicy ... + RetentionPolicyTypeRetentionPolicy RetentionPolicyType = "RetentionPolicy" + // RetentionPolicyTypeSimpleRetentionPolicy ... + RetentionPolicyTypeSimpleRetentionPolicy RetentionPolicyType = "SimpleRetentionPolicy" +) + +// PossibleRetentionPolicyTypeValues returns an array of possible values for the RetentionPolicyType const type. +func PossibleRetentionPolicyTypeValues() []RetentionPolicyType { + return []RetentionPolicyType{RetentionPolicyTypeLongTermRetentionPolicy, RetentionPolicyTypeRetentionPolicy, RetentionPolicyTypeSimpleRetentionPolicy} +} + +// RetentionScheduleFormat enumerates the values for retention schedule format. +type RetentionScheduleFormat string + +const ( + // RetentionScheduleFormatDaily ... + RetentionScheduleFormatDaily RetentionScheduleFormat = "Daily" + // RetentionScheduleFormatInvalid ... + RetentionScheduleFormatInvalid RetentionScheduleFormat = "Invalid" + // RetentionScheduleFormatWeekly ... + RetentionScheduleFormatWeekly RetentionScheduleFormat = "Weekly" +) + +// PossibleRetentionScheduleFormatValues returns an array of possible values for the RetentionScheduleFormat const type. +func PossibleRetentionScheduleFormatValues() []RetentionScheduleFormat { + return []RetentionScheduleFormat{RetentionScheduleFormatDaily, RetentionScheduleFormatInvalid, RetentionScheduleFormatWeekly} +} + +// SchedulePolicyType enumerates the values for schedule policy type. +type SchedulePolicyType string + +const ( + // SchedulePolicyTypeLogSchedulePolicy ... + SchedulePolicyTypeLogSchedulePolicy SchedulePolicyType = "LogSchedulePolicy" + // SchedulePolicyTypeLongTermSchedulePolicy ... + SchedulePolicyTypeLongTermSchedulePolicy SchedulePolicyType = "LongTermSchedulePolicy" + // SchedulePolicyTypeSchedulePolicy ... + SchedulePolicyTypeSchedulePolicy SchedulePolicyType = "SchedulePolicy" + // SchedulePolicyTypeSimpleSchedulePolicy ... + SchedulePolicyTypeSimpleSchedulePolicy SchedulePolicyType = "SimpleSchedulePolicy" +) + +// PossibleSchedulePolicyTypeValues returns an array of possible values for the SchedulePolicyType const type. +func PossibleSchedulePolicyTypeValues() []SchedulePolicyType { + return []SchedulePolicyType{SchedulePolicyTypeLogSchedulePolicy, SchedulePolicyTypeLongTermSchedulePolicy, SchedulePolicyTypeSchedulePolicy, SchedulePolicyTypeSimpleSchedulePolicy} +} + +// ScheduleRunType enumerates the values for schedule run type. +type ScheduleRunType string + +const ( + // ScheduleRunTypeDaily ... + ScheduleRunTypeDaily ScheduleRunType = "Daily" + // ScheduleRunTypeInvalid ... + ScheduleRunTypeInvalid ScheduleRunType = "Invalid" + // ScheduleRunTypeWeekly ... + ScheduleRunTypeWeekly ScheduleRunType = "Weekly" +) + +// PossibleScheduleRunTypeValues returns an array of possible values for the ScheduleRunType const type. +func PossibleScheduleRunTypeValues() []ScheduleRunType { + return []ScheduleRunType{ScheduleRunTypeDaily, ScheduleRunTypeInvalid, ScheduleRunTypeWeekly} +} + +// SoftDeleteFeatureState enumerates the values for soft delete feature state. +type SoftDeleteFeatureState string + +const ( + // SoftDeleteFeatureStateDisabled ... + SoftDeleteFeatureStateDisabled SoftDeleteFeatureState = "Disabled" + // SoftDeleteFeatureStateEnabled ... + SoftDeleteFeatureStateEnabled SoftDeleteFeatureState = "Enabled" + // SoftDeleteFeatureStateInvalid ... + SoftDeleteFeatureStateInvalid SoftDeleteFeatureState = "Invalid" +) + +// PossibleSoftDeleteFeatureStateValues returns an array of possible values for the SoftDeleteFeatureState const type. +func PossibleSoftDeleteFeatureStateValues() []SoftDeleteFeatureState { + return []SoftDeleteFeatureState{SoftDeleteFeatureStateDisabled, SoftDeleteFeatureStateEnabled, SoftDeleteFeatureStateInvalid} +} + +// SQLDataDirectoryType enumerates the values for sql data directory type. +type SQLDataDirectoryType string + +const ( + // SQLDataDirectoryTypeData ... + SQLDataDirectoryTypeData SQLDataDirectoryType = "Data" + // SQLDataDirectoryTypeInvalid ... + SQLDataDirectoryTypeInvalid SQLDataDirectoryType = "Invalid" + // SQLDataDirectoryTypeLog ... + SQLDataDirectoryTypeLog SQLDataDirectoryType = "Log" +) + +// PossibleSQLDataDirectoryTypeValues returns an array of possible values for the SQLDataDirectoryType const type. +func PossibleSQLDataDirectoryTypeValues() []SQLDataDirectoryType { + return []SQLDataDirectoryType{SQLDataDirectoryTypeData, SQLDataDirectoryTypeInvalid, SQLDataDirectoryTypeLog} +} + +// StorageType enumerates the values for storage type. +type StorageType string + +const ( + // StorageTypeGeoRedundant ... + StorageTypeGeoRedundant StorageType = "GeoRedundant" + // StorageTypeInvalid ... + StorageTypeInvalid StorageType = "Invalid" + // StorageTypeLocallyRedundant ... + StorageTypeLocallyRedundant StorageType = "LocallyRedundant" +) + +// PossibleStorageTypeValues returns an array of possible values for the StorageType const type. +func PossibleStorageTypeValues() []StorageType { + return []StorageType{StorageTypeGeoRedundant, StorageTypeInvalid, StorageTypeLocallyRedundant} +} + +// StorageTypeState enumerates the values for storage type state. +type StorageTypeState string + +const ( + // StorageTypeStateInvalid ... + StorageTypeStateInvalid StorageTypeState = "Invalid" + // StorageTypeStateLocked ... + StorageTypeStateLocked StorageTypeState = "Locked" + // StorageTypeStateUnlocked ... + StorageTypeStateUnlocked StorageTypeState = "Unlocked" +) + +// PossibleStorageTypeStateValues returns an array of possible values for the StorageTypeState const type. +func PossibleStorageTypeStateValues() []StorageTypeState { + return []StorageTypeState{StorageTypeStateInvalid, StorageTypeStateLocked, StorageTypeStateUnlocked} +} + +// SupportStatus enumerates the values for support status. +type SupportStatus string + +const ( + // SupportStatusDefaultOFF ... + SupportStatusDefaultOFF SupportStatus = "DefaultOFF" + // SupportStatusDefaultON ... + SupportStatusDefaultON SupportStatus = "DefaultON" + // SupportStatusInvalid ... + SupportStatusInvalid SupportStatus = "Invalid" + // SupportStatusNotSupported ... + SupportStatusNotSupported SupportStatus = "NotSupported" + // SupportStatusSupported ... + SupportStatusSupported SupportStatus = "Supported" +) + +// PossibleSupportStatusValues returns an array of possible values for the SupportStatus const type. +func PossibleSupportStatusValues() []SupportStatus { + return []SupportStatus{SupportStatusDefaultOFF, SupportStatusDefaultON, SupportStatusInvalid, SupportStatusNotSupported, SupportStatusSupported} +} + +// Type enumerates the values for type. +type Type string + +const ( + // TypeBackupProtectedItemCountSummary ... + TypeBackupProtectedItemCountSummary Type = "BackupProtectedItemCountSummary" + // TypeBackupProtectionContainerCountSummary ... + TypeBackupProtectionContainerCountSummary Type = "BackupProtectionContainerCountSummary" + // TypeInvalid ... + TypeInvalid Type = "Invalid" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{TypeBackupProtectedItemCountSummary, TypeBackupProtectionContainerCountSummary, TypeInvalid} +} + +// TypeEnum enumerates the values for type enum. +type TypeEnum string + +const ( + // TypeEnumCopyOnlyFull ... + TypeEnumCopyOnlyFull TypeEnum = "CopyOnlyFull" + // TypeEnumDifferential ... + TypeEnumDifferential TypeEnum = "Differential" + // TypeEnumFull ... + TypeEnumFull TypeEnum = "Full" + // TypeEnumInvalid ... + TypeEnumInvalid TypeEnum = "Invalid" + // TypeEnumLog ... + TypeEnumLog TypeEnum = "Log" +) + +// PossibleTypeEnumValues returns an array of possible values for the TypeEnum const type. +func PossibleTypeEnumValues() []TypeEnum { + return []TypeEnum{TypeEnumCopyOnlyFull, TypeEnumDifferential, TypeEnumFull, TypeEnumInvalid, TypeEnumLog} +} + +// UsagesUnit enumerates the values for usages unit. +type UsagesUnit string + +const ( + // Bytes ... + Bytes UsagesUnit = "Bytes" + // BytesPerSecond ... + BytesPerSecond UsagesUnit = "BytesPerSecond" + // Count ... + Count UsagesUnit = "Count" + // CountPerSecond ... + CountPerSecond UsagesUnit = "CountPerSecond" + // Percent ... + Percent UsagesUnit = "Percent" + // Seconds ... + Seconds UsagesUnit = "Seconds" +) + +// PossibleUsagesUnitValues returns an array of possible values for the UsagesUnit const type. +func PossibleUsagesUnitValues() []UsagesUnit { + return []UsagesUnit{Bytes, BytesPerSecond, Count, CountPerSecond, Percent, Seconds} +} + +// ValidationStatus enumerates the values for validation status. +type ValidationStatus string + +const ( + // ValidationStatusFailed ... + ValidationStatusFailed ValidationStatus = "Failed" + // ValidationStatusInvalid ... + ValidationStatusInvalid ValidationStatus = "Invalid" + // ValidationStatusSucceeded ... + ValidationStatusSucceeded ValidationStatus = "Succeeded" +) + +// PossibleValidationStatusValues returns an array of possible values for the ValidationStatus const type. +func PossibleValidationStatusValues() []ValidationStatus { + return []ValidationStatus{ValidationStatusFailed, ValidationStatusInvalid, ValidationStatusSucceeded} +} + +// WeekOfMonth enumerates the values for week of month. +type WeekOfMonth string + +const ( + // WeekOfMonthFirst ... + WeekOfMonthFirst WeekOfMonth = "First" + // WeekOfMonthFourth ... + WeekOfMonthFourth WeekOfMonth = "Fourth" + // WeekOfMonthInvalid ... + WeekOfMonthInvalid WeekOfMonth = "Invalid" + // WeekOfMonthLast ... + WeekOfMonthLast WeekOfMonth = "Last" + // WeekOfMonthSecond ... + WeekOfMonthSecond WeekOfMonth = "Second" + // WeekOfMonthThird ... + WeekOfMonthThird WeekOfMonth = "Third" +) + +// PossibleWeekOfMonthValues returns an array of possible values for the WeekOfMonth const type. +func PossibleWeekOfMonthValues() []WeekOfMonth { + return []WeekOfMonth{WeekOfMonthFirst, WeekOfMonthFourth, WeekOfMonthInvalid, WeekOfMonthLast, WeekOfMonthSecond, WeekOfMonthThird} +} + +// WorkloadItemType enumerates the values for workload item type. +type WorkloadItemType string + +const ( + // WorkloadItemTypeInvalid ... + WorkloadItemTypeInvalid WorkloadItemType = "Invalid" + // WorkloadItemTypeSAPAseDatabase ... + WorkloadItemTypeSAPAseDatabase WorkloadItemType = "SAPAseDatabase" + // WorkloadItemTypeSAPAseSystem ... + WorkloadItemTypeSAPAseSystem WorkloadItemType = "SAPAseSystem" + // WorkloadItemTypeSAPHanaDatabase ... + WorkloadItemTypeSAPHanaDatabase WorkloadItemType = "SAPHanaDatabase" + // WorkloadItemTypeSAPHanaSystem ... + WorkloadItemTypeSAPHanaSystem WorkloadItemType = "SAPHanaSystem" + // WorkloadItemTypeSQLDataBase ... + WorkloadItemTypeSQLDataBase WorkloadItemType = "SQLDataBase" + // WorkloadItemTypeSQLInstance ... + WorkloadItemTypeSQLInstance WorkloadItemType = "SQLInstance" +) + +// PossibleWorkloadItemTypeValues returns an array of possible values for the WorkloadItemType const type. +func PossibleWorkloadItemTypeValues() []WorkloadItemType { + return []WorkloadItemType{WorkloadItemTypeInvalid, WorkloadItemTypeSAPAseDatabase, WorkloadItemTypeSAPAseSystem, WorkloadItemTypeSAPHanaDatabase, WorkloadItemTypeSAPHanaSystem, WorkloadItemTypeSQLDataBase, WorkloadItemTypeSQLInstance} +} + +// WorkloadItemTypeBasicWorkloadItem enumerates the values for workload item type basic workload item. +type WorkloadItemTypeBasicWorkloadItem string + +const ( + // WorkloadItemTypeAzureVMWorkloadItem ... + WorkloadItemTypeAzureVMWorkloadItem WorkloadItemTypeBasicWorkloadItem = "AzureVmWorkloadItem" + // WorkloadItemTypeSAPAseDatabase1 ... + WorkloadItemTypeSAPAseDatabase1 WorkloadItemTypeBasicWorkloadItem = "SAPAseDatabase" + // WorkloadItemTypeSAPAseSystem1 ... + WorkloadItemTypeSAPAseSystem1 WorkloadItemTypeBasicWorkloadItem = "SAPAseSystem" + // WorkloadItemTypeSAPHanaDatabase1 ... + WorkloadItemTypeSAPHanaDatabase1 WorkloadItemTypeBasicWorkloadItem = "SAPHanaDatabase" + // WorkloadItemTypeSAPHanaSystem1 ... + WorkloadItemTypeSAPHanaSystem1 WorkloadItemTypeBasicWorkloadItem = "SAPHanaSystem" + // WorkloadItemTypeSQLDataBase1 ... + WorkloadItemTypeSQLDataBase1 WorkloadItemTypeBasicWorkloadItem = "SQLDataBase" + // WorkloadItemTypeSQLInstance1 ... + WorkloadItemTypeSQLInstance1 WorkloadItemTypeBasicWorkloadItem = "SQLInstance" + // WorkloadItemTypeWorkloadItem ... + WorkloadItemTypeWorkloadItem WorkloadItemTypeBasicWorkloadItem = "WorkloadItem" +) + +// PossibleWorkloadItemTypeBasicWorkloadItemValues returns an array of possible values for the WorkloadItemTypeBasicWorkloadItem const type. +func PossibleWorkloadItemTypeBasicWorkloadItemValues() []WorkloadItemTypeBasicWorkloadItem { + return []WorkloadItemTypeBasicWorkloadItem{WorkloadItemTypeAzureVMWorkloadItem, WorkloadItemTypeSAPAseDatabase1, WorkloadItemTypeSAPAseSystem1, WorkloadItemTypeSAPHanaDatabase1, WorkloadItemTypeSAPHanaSystem1, WorkloadItemTypeSQLDataBase1, WorkloadItemTypeSQLInstance1, WorkloadItemTypeWorkloadItem} +} + +// WorkloadType enumerates the values for workload type. +type WorkloadType string + +const ( + // WorkloadTypeAzureFileShare ... + WorkloadTypeAzureFileShare WorkloadType = "AzureFileShare" + // WorkloadTypeAzureSQLDb ... + WorkloadTypeAzureSQLDb WorkloadType = "AzureSqlDb" + // WorkloadTypeClient ... + WorkloadTypeClient WorkloadType = "Client" + // WorkloadTypeExchange ... + WorkloadTypeExchange WorkloadType = "Exchange" + // WorkloadTypeFileFolder ... + WorkloadTypeFileFolder WorkloadType = "FileFolder" + // WorkloadTypeGenericDataSource ... + WorkloadTypeGenericDataSource WorkloadType = "GenericDataSource" + // WorkloadTypeInvalid ... + WorkloadTypeInvalid WorkloadType = "Invalid" + // WorkloadTypeSAPAseDatabase ... + WorkloadTypeSAPAseDatabase WorkloadType = "SAPAseDatabase" + // WorkloadTypeSAPHanaDatabase ... + WorkloadTypeSAPHanaDatabase WorkloadType = "SAPHanaDatabase" + // WorkloadTypeSharepoint ... + WorkloadTypeSharepoint WorkloadType = "Sharepoint" + // WorkloadTypeSQLDataBase ... + WorkloadTypeSQLDataBase WorkloadType = "SQLDataBase" + // WorkloadTypeSQLDB ... + WorkloadTypeSQLDB WorkloadType = "SQLDB" + // WorkloadTypeSystemState ... + WorkloadTypeSystemState WorkloadType = "SystemState" + // WorkloadTypeVM ... + WorkloadTypeVM WorkloadType = "VM" + // WorkloadTypeVMwareVM ... + WorkloadTypeVMwareVM WorkloadType = "VMwareVM" +) + +// PossibleWorkloadTypeValues returns an array of possible values for the WorkloadType const type. +func PossibleWorkloadTypeValues() []WorkloadType { + return []WorkloadType{WorkloadTypeAzureFileShare, WorkloadTypeAzureSQLDb, WorkloadTypeClient, WorkloadTypeExchange, WorkloadTypeFileFolder, WorkloadTypeGenericDataSource, WorkloadTypeInvalid, WorkloadTypeSAPAseDatabase, WorkloadTypeSAPHanaDatabase, WorkloadTypeSharepoint, WorkloadTypeSQLDataBase, WorkloadTypeSQLDB, WorkloadTypeSystemState, WorkloadTypeVM, WorkloadTypeVMwareVM} +} + +// AzureBackupGoalFeatureSupportRequest azure backup goal feature specific request. +type AzureBackupGoalFeatureSupportRequest struct { + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) { + abgfsr.FeatureType = FeatureTypeAzureBackupGoals + objectMap := make(map[string]interface{}) + if abgfsr.FeatureType != "" { + objectMap["featureType"] = abgfsr.FeatureType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { + return &abgfsr, true +} + +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { + return nil, false +} + +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { + return nil, false +} + +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureBackupGoalFeatureSupportRequest. +func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &abgfsr, true +} + +// AzureBackupServerContainer azureBackupServer (DPMVenus) workload-specific protection container. +type AzureBackupServerContainer struct { + // CanReRegister - Specifies whether the container is re-registrable. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ID of container. + ContainerID *string `json:"containerId,omitempty"` + // ProtectedItemCount - Number of protected items in the BackupEngine + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // DpmAgentVersion - Backup engine Agent version + DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` + // DpmServers - List of BackupEngines protecting the container + DpmServers *[]string `json:"dpmServers,omitempty"` + // UpgradeAvailable - To check if upgrade available + UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` + // ProtectionStatus - Protection status of the container. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ExtendedInfo - Extended Info of the container. + ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) { + absc.ContainerType = ContainerTypeAzureBackupServerContainer1 + objectMap := make(map[string]interface{}) + if absc.CanReRegister != nil { + objectMap["canReRegister"] = absc.CanReRegister + } + if absc.ContainerID != nil { + objectMap["containerId"] = absc.ContainerID + } + if absc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = absc.ProtectedItemCount + } + if absc.DpmAgentVersion != nil { + objectMap["dpmAgentVersion"] = absc.DpmAgentVersion + } + if absc.DpmServers != nil { + objectMap["dpmServers"] = absc.DpmServers + } + if absc.UpgradeAvailable != nil { + objectMap["upgradeAvailable"] = absc.UpgradeAvailable + } + if absc.ProtectionStatus != nil { + objectMap["protectionStatus"] = absc.ProtectionStatus + } + if absc.ExtendedInfo != nil { + objectMap["extendedInfo"] = absc.ExtendedInfo + } + if absc.FriendlyName != nil { + objectMap["friendlyName"] = absc.FriendlyName + } + if absc.BackupManagementType != "" { + objectMap["backupManagementType"] = absc.BackupManagementType + } + if absc.RegistrationStatus != nil { + objectMap["registrationStatus"] = absc.RegistrationStatus + } + if absc.HealthStatus != nil { + objectMap["healthStatus"] = absc.HealthStatus + } + if absc.ContainerType != "" { + objectMap["containerType"] = absc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return &absc, true +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return &absc, true +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &absc, true +} + +// AzureBackupServerEngine backup engine type when Azure Backup Server is used to manage the backups. +type AzureBackupServerEngine struct { + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) { + abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine + objectMap := make(map[string]interface{}) + if abse.FriendlyName != nil { + objectMap["friendlyName"] = abse.FriendlyName + } + if abse.BackupManagementType != "" { + objectMap["backupManagementType"] = abse.BackupManagementType + } + if abse.RegistrationStatus != nil { + objectMap["registrationStatus"] = abse.RegistrationStatus + } + if abse.BackupEngineState != nil { + objectMap["backupEngineState"] = abse.BackupEngineState + } + if abse.HealthStatus != nil { + objectMap["healthStatus"] = abse.HealthStatus + } + if abse.CanReRegister != nil { + objectMap["canReRegister"] = abse.CanReRegister + } + if abse.BackupEngineID != nil { + objectMap["backupEngineId"] = abse.BackupEngineID + } + if abse.DpmVersion != nil { + objectMap["dpmVersion"] = abse.DpmVersion + } + if abse.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion + } + if abse.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable + } + if abse.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable + } + if abse.ExtendedInfo != nil { + objectMap["extendedInfo"] = abse.ExtendedInfo + } + if abse.BackupEngineType != "" { + objectMap["backupEngineType"] = abse.BackupEngineType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerEngine is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return &abse, true +} + +// AsDpmBackupEngine is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return nil, false +} + +// AsEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) { + return nil, false +} + +// AsBasicEngineBase is the BasicEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) { + return &abse, true +} + +// AzureFileShareBackupRequest azureFileShare workload-specific backup request. +type AzureFileShareBackupRequest struct { + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) { + afsbr.ObjectType = ObjectTypeAzureFileShareBackupRequest + objectMap := make(map[string]interface{}) + if afsbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC + } + if afsbr.ObjectType != "" { + objectMap["objectType"] = afsbr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return &afsbr, true +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return nil, false +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return nil, false +} + +// AsRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) { + return nil, false +} + +// AsBasicRequest is the BasicRequest implementation for AzureFileShareBackupRequest. +func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &afsbr, true +} + +// AzureFileShareProtectableItem protectable item for Azure Fileshare workloads. +type AzureFileShareProtectableItem struct { + // ParentContainerFabricID - Full Fabric ID of container to which this protectable item belongs. For example, ARM ID. + ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"` + // ParentContainerFriendlyName - Friendly name of container to which this protectable item belongs. + ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"` + // AzureFileShareType - File Share type XSync or XSMB. Possible values include: 'Invalid', 'XSMB', 'XSync' + AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) { + afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare + objectMap := make(map[string]interface{}) + if afspi.ParentContainerFabricID != nil { + objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID + } + if afspi.ParentContainerFriendlyName != nil { + objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName + } + if afspi.AzureFileShareType != "" { + objectMap["azureFileShareType"] = afspi.AzureFileShareType + } + if afspi.BackupManagementType != nil { + objectMap["backupManagementType"] = afspi.BackupManagementType + } + if afspi.WorkloadType != nil { + objectMap["workloadType"] = afspi.WorkloadType + } + if afspi.FriendlyName != nil { + objectMap["friendlyName"] = afspi.FriendlyName + } + if afspi.ProtectionState != "" { + objectMap["protectionState"] = afspi.ProtectionState + } + if afspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = afspi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return &afspi, true +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureFileShareProtectableItem. +func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &afspi, true +} + +// AzureFileshareProtectedItem azure File Share workload-specific backup item. +type AzureFileshareProtectedItem struct { + // FriendlyName - Friendly name of the fileshare represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - backups running status for this backup item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ExtendedInfo - Additional information with this backup item. + ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) { + afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem + objectMap := make(map[string]interface{}) + if afpi.FriendlyName != nil { + objectMap["friendlyName"] = afpi.FriendlyName + } + if afpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = afpi.ProtectionStatus + } + if afpi.ProtectionState != "" { + objectMap["protectionState"] = afpi.ProtectionState + } + if afpi.HealthStatus != "" { + objectMap["healthStatus"] = afpi.HealthStatus + } + if afpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = afpi.LastBackupStatus + } + if afpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = afpi.LastBackupTime + } + if afpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = afpi.ExtendedInfo + } + if afpi.BackupManagementType != "" { + objectMap["backupManagementType"] = afpi.BackupManagementType + } + if afpi.WorkloadType != "" { + objectMap["workloadType"] = afpi.WorkloadType + } + if afpi.ContainerName != nil { + objectMap["containerName"] = afpi.ContainerName + } + if afpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = afpi.SourceResourceID + } + if afpi.PolicyID != nil { + objectMap["policyId"] = afpi.PolicyID + } + if afpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint + } + if afpi.BackupSetName != nil { + objectMap["backupSetName"] = afpi.BackupSetName + } + if afpi.CreateMode != "" { + objectMap["createMode"] = afpi.CreateMode + } + if afpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC + } + if afpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete + } + if afpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining + } + if afpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming + } + if afpi.IsRehydrate != nil { + objectMap["isRehydrate"] = afpi.IsRehydrate + } + if afpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = afpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return &afpi, true +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureFileshareProtectedItem. +func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &afpi, true +} + +// AzureFileshareProtectedItemExtendedInfo additional information about Azure File Share backup item. +type AzureFileshareProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this item in the service. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of available backup copies associated with this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyState - Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string `json:"policyState,omitempty"` + // ResourceState - READ-ONLY; Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted} + ResourceState *string `json:"resourceState,omitempty"` + // ResourceStateSyncTime - READ-ONLY; The resource state sync time for this backup item. + ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"` +} + +// AzureFileShareProtectionPolicy azureStorage backup policy. +type AzureFileShareProtectionPolicy struct { + // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkLoadType WorkloadType `json:"workLoadType,omitempty"` + // SchedulePolicy - Backup schedule specified as part of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy with the details on backup copy retention ranges. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) { + afspp.BackupManagementType = BackupManagementTypeAzureStorage + objectMap := make(map[string]interface{}) + if afspp.WorkLoadType != "" { + objectMap["workLoadType"] = afspp.WorkLoadType + } + objectMap["schedulePolicy"] = afspp.SchedulePolicy + objectMap["retentionPolicy"] = afspp.RetentionPolicy + if afspp.TimeZone != nil { + objectMap["timeZone"] = afspp.TimeZone + } + if afspp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount + } + if afspp.BackupManagementType != "" { + objectMap["backupManagementType"] = afspp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return &afspp, true +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureFileShareProtectionPolicy. +func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &afspp, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureFileShareProtectionPolicy struct. +func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "workLoadType": + if v != nil { + var workLoadType WorkloadType + err = json.Unmarshal(*v, &workLoadType) + if err != nil { + return err + } + afspp.WorkLoadType = workLoadType + } + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + afspp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + afspp.RetentionPolicy = retentionPolicy + } + case "timeZone": + if v != nil { + var timeZone string + err = json.Unmarshal(*v, &timeZone) + if err != nil { + return err + } + afspp.TimeZone = &timeZone + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + afspp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + afspp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// AzureFileShareProvisionILRRequest update snapshot Uri with the correct friendly Name of the source Azure +// file share. +type AzureFileShareProvisionILRRequest struct { + // RecoveryPointID - Recovery point ID. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // SourceResourceID - Source Storage account ARM Id + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) { + afspir.ObjectType = ObjectTypeAzureFileShareProvisionILRRequest + objectMap := make(map[string]interface{}) + if afspir.RecoveryPointID != nil { + objectMap["recoveryPointId"] = afspir.RecoveryPointID + } + if afspir.SourceResourceID != nil { + objectMap["sourceResourceId"] = afspir.SourceResourceID + } + if afspir.ObjectType != "" { + objectMap["objectType"] = afspir.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return &afspir, true +} + +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return nil, false +} + +// AsILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) { + return nil, false +} + +// AsBasicILRRequest is the BasicILRRequest implementation for AzureFileShareProvisionILRRequest. +func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &afspir, true +} + +// AzureFileShareRecoveryPoint azure File Share workload specific backup copy. +type AzureFileShareRecoveryPoint struct { + // RecoveryPointType - READ-ONLY; Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent. + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // FileShareSnapshotURI - READ-ONLY; Contains Url to the snapshot of fileshare, if applicable + FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"` + // RecoveryPointSizeInGB - READ-ONLY; Contains recovery point size + RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) { + afsrp.ObjectType = ObjectTypeAzureFileShareRecoveryPoint + objectMap := make(map[string]interface{}) + if afsrp.ObjectType != "" { + objectMap["objectType"] = afsrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return &afsrp, true +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureFileShareRecoveryPoint. +func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &afsrp, true +} + +// AzureFileShareRestoreRequest azureFileShare Restore Request +type AzureFileShareRestoreRequest struct { + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Source storage account ARM Id + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // CopyOptions - Options to resolve copy conflicts. Possible values include: 'CopyOptionsInvalid', 'CopyOptionsCreateCopy', 'CopyOptionsSkip', 'CopyOptionsOverwrite', 'CopyOptionsFailOnConflict' + CopyOptions CopyOptions `json:"copyOptions,omitempty"` + // RestoreRequestType - Restore Type (FullShareRestore or ItemLevelRestore). Possible values include: 'RestoreRequestTypeInvalid', 'RestoreRequestTypeFullShareRestore', 'RestoreRequestTypeItemLevelRestore' + RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"` + // RestoreFileSpecs - List of Source Files/Folders(which need to recover) and TargetFolderPath details + RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"` + // TargetDetails - Target File Share Details + TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) { + afsrr.ObjectType = ObjectTypeAzureFileShareRestoreRequest + objectMap := make(map[string]interface{}) + if afsrr.RecoveryType != "" { + objectMap["recoveryType"] = afsrr.RecoveryType + } + if afsrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = afsrr.SourceResourceID + } + if afsrr.CopyOptions != "" { + objectMap["copyOptions"] = afsrr.CopyOptions + } + if afsrr.RestoreRequestType != "" { + objectMap["restoreRequestType"] = afsrr.RestoreRequestType + } + if afsrr.RestoreFileSpecs != nil { + objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs + } + if afsrr.TargetDetails != nil { + objectMap["targetDetails"] = afsrr.TargetDetails + } + if afsrr.ObjectType != "" { + objectMap["objectType"] = afsrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return &afsrr, true +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureFileShareRestoreRequest. +func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &afsrr, true +} + +// AzureIaaSClassicComputeVMContainer iaaS VM workload-specific backup item representing a classic virtual +// machine. +type AzureIaaSClassicComputeVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { + aisccvc.ContainerType = ContainerTypeMicrosoftClassicComputevirtualMachines + objectMap := make(map[string]interface{}) + if aisccvc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvc.VirtualMachineID + } + if aisccvc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion + } + if aisccvc.ResourceGroup != nil { + objectMap["resourceGroup"] = aisccvc.ResourceGroup + } + if aisccvc.FriendlyName != nil { + objectMap["friendlyName"] = aisccvc.FriendlyName + } + if aisccvc.BackupManagementType != "" { + objectMap["backupManagementType"] = aisccvc.BackupManagementType + } + if aisccvc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aisccvc.RegistrationStatus + } + if aisccvc.HealthStatus != nil { + objectMap["healthStatus"] = aisccvc.HealthStatus + } + if aisccvc.ContainerType != "" { + objectMap["containerType"] = aisccvc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return &aisccvc, true +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &aisccvc, true +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aisccvc, true +} + +// AzureIaaSClassicComputeVMProtectableItem iaaS VM workload-specific backup item representing the Classic +// Compute VM. +type AzureIaaSClassicComputeVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines + objectMap := make(map[string]interface{}) + if aisccvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID + } + if aisccvpi.BackupManagementType != nil { + objectMap["backupManagementType"] = aisccvpi.BackupManagementType + } + if aisccvpi.WorkloadType != nil { + objectMap["workloadType"] = aisccvpi.WorkloadType + } + if aisccvpi.FriendlyName != nil { + objectMap["friendlyName"] = aisccvpi.FriendlyName + } + if aisccvpi.ProtectionState != "" { + objectMap["protectionState"] = aisccvpi.ProtectionState + } + if aisccvpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = aisccvpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return &aisccvpi, true +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &aisccvpi, true +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &aisccvpi, true +} + +// AzureIaaSClassicComputeVMProtectedItem iaaS VM workload-specific backup item representing the Classic +// Compute VM. +type AzureIaaSClassicComputeVMProtectedItem struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // HealthDetails - Health details on this backup item. + HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` + // LastBackupStatus - Last backup operation status. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectedItemDataID - Data ID of the protected item. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines + objectMap := make(map[string]interface{}) + if aisccvpi.FriendlyName != nil { + objectMap["friendlyName"] = aisccvpi.FriendlyName + } + if aisccvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID + } + if aisccvpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = aisccvpi.ProtectionStatus + } + if aisccvpi.ProtectionState != "" { + objectMap["protectionState"] = aisccvpi.ProtectionState + } + if aisccvpi.HealthStatus != "" { + objectMap["healthStatus"] = aisccvpi.HealthStatus + } + if aisccvpi.HealthDetails != nil { + objectMap["healthDetails"] = aisccvpi.HealthDetails + } + if aisccvpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus + } + if aisccvpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = aisccvpi.LastBackupTime + } + if aisccvpi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID + } + if aisccvpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aisccvpi.ExtendedInfo + } + if aisccvpi.ExtendedProperties != nil { + objectMap["extendedProperties"] = aisccvpi.ExtendedProperties + } + if aisccvpi.BackupManagementType != "" { + objectMap["backupManagementType"] = aisccvpi.BackupManagementType + } + if aisccvpi.WorkloadType != "" { + objectMap["workloadType"] = aisccvpi.WorkloadType + } + if aisccvpi.ContainerName != nil { + objectMap["containerName"] = aisccvpi.ContainerName + } + if aisccvpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aisccvpi.SourceResourceID + } + if aisccvpi.PolicyID != nil { + objectMap["policyId"] = aisccvpi.PolicyID + } + if aisccvpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint + } + if aisccvpi.BackupSetName != nil { + objectMap["backupSetName"] = aisccvpi.BackupSetName + } + if aisccvpi.CreateMode != "" { + objectMap["createMode"] = aisccvpi.CreateMode + } + if aisccvpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC + } + if aisccvpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete + } + if aisccvpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining + } + if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming + } + if aisccvpi.IsRehydrate != nil { + objectMap["isRehydrate"] = aisccvpi.IsRehydrate + } + if aisccvpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aisccvpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return &aisccvpi, true +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return &aisccvpi, true +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aisccvpi, true +} + +// AzureIaaSComputeVMContainer iaaS VM workload-specific backup item representing an Azure Resource Manager +// virtual machine. +type AzureIaaSComputeVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { + aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines + objectMap := make(map[string]interface{}) + if aiscvc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvc.VirtualMachineID + } + if aiscvc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion + } + if aiscvc.ResourceGroup != nil { + objectMap["resourceGroup"] = aiscvc.ResourceGroup + } + if aiscvc.FriendlyName != nil { + objectMap["friendlyName"] = aiscvc.FriendlyName + } + if aiscvc.BackupManagementType != "" { + objectMap["backupManagementType"] = aiscvc.BackupManagementType + } + if aiscvc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aiscvc.RegistrationStatus + } + if aiscvc.HealthStatus != nil { + objectMap["healthStatus"] = aiscvc.HealthStatus + } + if aiscvc.ContainerType != "" { + objectMap["containerType"] = aiscvc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return &aiscvc, true +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &aiscvc, true +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aiscvc, true +} + +// AzureIaaSComputeVMProtectableItem iaaS VM workload-specific backup item representing the Azure Resource +// Manager VM. +type AzureIaaSComputeVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines + objectMap := make(map[string]interface{}) + if aiscvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID + } + if aiscvpi.BackupManagementType != nil { + objectMap["backupManagementType"] = aiscvpi.BackupManagementType + } + if aiscvpi.WorkloadType != nil { + objectMap["workloadType"] = aiscvpi.WorkloadType + } + if aiscvpi.FriendlyName != nil { + objectMap["friendlyName"] = aiscvpi.FriendlyName + } + if aiscvpi.ProtectionState != "" { + objectMap["protectionState"] = aiscvpi.ProtectionState + } + if aiscvpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = aiscvpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return &aiscvpi, true +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &aiscvpi, true +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &aiscvpi, true +} + +// AzureIaaSComputeVMProtectedItem iaaS VM workload-specific backup item representing the Azure Resource +// Manager VM. +type AzureIaaSComputeVMProtectedItem struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // HealthDetails - Health details on this backup item. + HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` + // LastBackupStatus - Last backup operation status. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectedItemDataID - Data ID of the protected item. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines + objectMap := make(map[string]interface{}) + if aiscvpi.FriendlyName != nil { + objectMap["friendlyName"] = aiscvpi.FriendlyName + } + if aiscvpi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID + } + if aiscvpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = aiscvpi.ProtectionStatus + } + if aiscvpi.ProtectionState != "" { + objectMap["protectionState"] = aiscvpi.ProtectionState + } + if aiscvpi.HealthStatus != "" { + objectMap["healthStatus"] = aiscvpi.HealthStatus + } + if aiscvpi.HealthDetails != nil { + objectMap["healthDetails"] = aiscvpi.HealthDetails + } + if aiscvpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus + } + if aiscvpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = aiscvpi.LastBackupTime + } + if aiscvpi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID + } + if aiscvpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aiscvpi.ExtendedInfo + } + if aiscvpi.ExtendedProperties != nil { + objectMap["extendedProperties"] = aiscvpi.ExtendedProperties + } + if aiscvpi.BackupManagementType != "" { + objectMap["backupManagementType"] = aiscvpi.BackupManagementType + } + if aiscvpi.WorkloadType != "" { + objectMap["workloadType"] = aiscvpi.WorkloadType + } + if aiscvpi.ContainerName != nil { + objectMap["containerName"] = aiscvpi.ContainerName + } + if aiscvpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aiscvpi.SourceResourceID + } + if aiscvpi.PolicyID != nil { + objectMap["policyId"] = aiscvpi.PolicyID + } + if aiscvpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint + } + if aiscvpi.BackupSetName != nil { + objectMap["backupSetName"] = aiscvpi.BackupSetName + } + if aiscvpi.CreateMode != "" { + objectMap["createMode"] = aiscvpi.CreateMode + } + if aiscvpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC + } + if aiscvpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete + } + if aiscvpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining + } + if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming + } + if aiscvpi.IsRehydrate != nil { + objectMap["isRehydrate"] = aiscvpi.IsRehydrate + } + if aiscvpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aiscvpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return &aiscvpi, true +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return &aiscvpi, true +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aiscvpi, true +} + +// AzureIaaSVMErrorInfo azure IaaS VM workload-specific error information. +type AzureIaaSVMErrorInfo struct { + // ErrorCode - READ-ONLY; Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorTitle - READ-ONLY; Title: Typically, the entity that the error pertains to. + ErrorTitle *string `json:"errorTitle,omitempty"` + // ErrorString - READ-ONLY; Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - READ-ONLY; List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureIaaSVMHealthDetails azure IaaS VM workload-specific Health Details. +type AzureIaaSVMHealthDetails struct { + // Code - READ-ONLY; Health Code + Code *int32 `json:"code,omitempty"` + // Title - READ-ONLY; Health Title + Title *string `json:"title,omitempty"` + // Message - READ-ONLY; Health Message + Message *string `json:"message,omitempty"` + // Recommendations - READ-ONLY; Health Recommended Actions + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureIaaSVMJob azure IaaS VM workload-specific job object. +type AzureIaaSVMJob struct { + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` + // VirtualMachineVersion - Specifies whether the backup item is a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ExtendedInfo - Additional information for this job. + ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) { + aisj.JobType = JobTypeAzureIaaSVMJob + objectMap := make(map[string]interface{}) + if aisj.Duration != nil { + objectMap["duration"] = aisj.Duration + } + if aisj.ActionsInfo != nil { + objectMap["actionsInfo"] = aisj.ActionsInfo + } + if aisj.ErrorDetails != nil { + objectMap["errorDetails"] = aisj.ErrorDetails + } + if aisj.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion + } + if aisj.ExtendedInfo != nil { + objectMap["extendedInfo"] = aisj.ExtendedInfo + } + if aisj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = aisj.EntityFriendlyName + } + if aisj.BackupManagementType != "" { + objectMap["backupManagementType"] = aisj.BackupManagementType + } + if aisj.Operation != nil { + objectMap["operation"] = aisj.Operation + } + if aisj.Status != nil { + objectMap["status"] = aisj.Status + } + if aisj.StartTime != nil { + objectMap["startTime"] = aisj.StartTime + } + if aisj.EndTime != nil { + objectMap["endTime"] = aisj.EndTime + } + if aisj.ActivityID != nil { + objectMap["activityId"] = aisj.ActivityID + } + if aisj.JobType != "" { + objectMap["jobType"] = aisj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return &aisj, true +} + +// AsAzureStorageJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) { + return &aisj, true +} + +// AzureIaaSVMJobExtendedInfo azure IaaS VM workload-specific additional information for job. +type AzureIaaSVMJobExtendedInfo struct { + // TasksList - List of tasks associated with this job. + TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // InternalPropertyBag - Job internal properties. + InternalPropertyBag map[string]*string `json:"internalPropertyBag"` + // ProgressPercentage - Indicates progress of the job. Null if it has not started or completed. + ProgressPercentage *float64 `json:"progressPercentage,omitempty"` + // EstimatedRemainingDuration - Time remaining for execution of this job. + EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMJobExtendedInfo. +func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aisjei.TasksList != nil { + objectMap["tasksList"] = aisjei.TasksList + } + if aisjei.PropertyBag != nil { + objectMap["propertyBag"] = aisjei.PropertyBag + } + if aisjei.InternalPropertyBag != nil { + objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag + } + if aisjei.ProgressPercentage != nil { + objectMap["progressPercentage"] = aisjei.ProgressPercentage + } + if aisjei.EstimatedRemainingDuration != nil { + objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration + } + if aisjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// AzureIaaSVMJobTaskDetails azure IaaS VM workload-specific job task details. +type AzureIaaSVMJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // InstanceID - The instanceId. + InstanceID *string `json:"instanceId,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` + // ProgressPercentage - Progress of the task. + ProgressPercentage *float64 `json:"progressPercentage,omitempty"` + // TaskExecutionDetails - Details about execution of the task. + // eg: number of bytes transferred etc + TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"` +} + +// BasicAzureIaaSVMProtectedItem iaaS VM workload-specific backup item. +type BasicAzureIaaSVMProtectedItem interface { + AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) + AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) + AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) +} + +// AzureIaaSVMProtectedItem iaaS VM workload-specific backup item. +type AzureIaaSVMProtectedItem struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine represented by this item. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // HealthStatus - Health status of protected item. Possible values include: 'HealthStatusPassed', 'HealthStatusActionRequired', 'HealthStatusActionSuggested', 'HealthStatusInvalid' + HealthStatus HealthStatus `json:"healthStatus,omitempty"` + // HealthDetails - Health details on this backup item. + HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"` + // LastBackupStatus - Last backup operation status. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectedItemDataID - Data ID of the protected item. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectedItemType"] { + case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectedItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectedItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectedItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + default: + var aispi AzureIaaSVMProtectedItem + err := json.Unmarshal(body, &aispi) + return aispi, err + } +} +func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage) + if err != nil { + return nil, err + } + aispiArray[index] = aispi + } + return aispiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { + aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem + objectMap := make(map[string]interface{}) + if aispi.FriendlyName != nil { + objectMap["friendlyName"] = aispi.FriendlyName + } + if aispi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = aispi.VirtualMachineID + } + if aispi.ProtectionStatus != nil { + objectMap["protectionStatus"] = aispi.ProtectionStatus + } + if aispi.ProtectionState != "" { + objectMap["protectionState"] = aispi.ProtectionState + } + if aispi.HealthStatus != "" { + objectMap["healthStatus"] = aispi.HealthStatus + } + if aispi.HealthDetails != nil { + objectMap["healthDetails"] = aispi.HealthDetails + } + if aispi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = aispi.LastBackupStatus + } + if aispi.LastBackupTime != nil { + objectMap["lastBackupTime"] = aispi.LastBackupTime + } + if aispi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID + } + if aispi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aispi.ExtendedInfo + } + if aispi.ExtendedProperties != nil { + objectMap["extendedProperties"] = aispi.ExtendedProperties + } + if aispi.BackupManagementType != "" { + objectMap["backupManagementType"] = aispi.BackupManagementType + } + if aispi.WorkloadType != "" { + objectMap["workloadType"] = aispi.WorkloadType + } + if aispi.ContainerName != nil { + objectMap["containerName"] = aispi.ContainerName + } + if aispi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aispi.SourceResourceID + } + if aispi.PolicyID != nil { + objectMap["policyId"] = aispi.PolicyID + } + if aispi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint + } + if aispi.BackupSetName != nil { + objectMap["backupSetName"] = aispi.BackupSetName + } + if aispi.CreateMode != "" { + objectMap["createMode"] = aispi.CreateMode + } + if aispi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC + } + if aispi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete + } + if aispi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining + } + if aispi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming + } + if aispi.IsRehydrate != nil { + objectMap["isRehydrate"] = aispi.IsRehydrate + } + if aispi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aispi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return &aispi, true +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return &aispi, true +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aispi, true +} + +// AzureIaaSVMProtectedItemExtendedInfo additional information on Azure IaaS VM specific backup item. +type AzureIaaSVMProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this backup item. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of backup copies available for this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyInconsistent - Specifies if backup policy associated with the backup item is inconsistent. + PolicyInconsistent *bool `json:"policyInconsistent,omitempty"` +} + +// AzureIaaSVMProtectionPolicy iaaS VM workload-specific backup policy. +type AzureIaaSVMProtectionPolicy struct { + // SchedulePolicy - Backup schedule specified as part of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy with the details on backup copy retention ranges. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // InstantRpRetentionRangeInDays - Instant RP retention policy range in days + InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"` + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { + aispp.BackupManagementType = BackupManagementTypeAzureIaasVM + objectMap := make(map[string]interface{}) + objectMap["schedulePolicy"] = aispp.SchedulePolicy + objectMap["retentionPolicy"] = aispp.RetentionPolicy + if aispp.InstantRpRetentionRangeInDays != nil { + objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays + } + if aispp.TimeZone != nil { + objectMap["timeZone"] = aispp.TimeZone + } + if aispp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount + } + if aispp.BackupManagementType != "" { + objectMap["backupManagementType"] = aispp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return &aispp, true +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &aispp, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureIaaSVMProtectionPolicy struct. +func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + aispp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + aispp.RetentionPolicy = retentionPolicy + } + case "instantRpRetentionRangeInDays": + if v != nil { + var instantRpRetentionRangeInDays int32 + err = json.Unmarshal(*v, &instantRpRetentionRangeInDays) + if err != nil { + return err + } + aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays + } + case "timeZone": + if v != nil { + var timeZone string + err = json.Unmarshal(*v, &timeZone) + if err != nil { + return err + } + aispp.TimeZone = &timeZone + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + aispp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + aispp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// BasicAzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. +type BasicAzureRecoveryServiceVaultProtectionIntent interface { + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) + AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) +} + +// AzureRecoveryServiceVaultProtectionIntent azure Recovery Services Vault specific protection intent item. +type AzureRecoveryServiceVaultProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var arsvpi AzureRecoveryServiceVaultProtectionIntent + err := json.Unmarshal(body, &arsvpi) + return arsvpi, err + } +} +func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + arsvpiArray[index] = arsvpi + } + return arsvpiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) { + arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem + objectMap := make(map[string]interface{}) + if arsvpi.BackupManagementType != "" { + objectMap["backupManagementType"] = arsvpi.BackupManagementType + } + if arsvpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = arsvpi.SourceResourceID + } + if arsvpi.ItemID != nil { + objectMap["itemId"] = arsvpi.ItemID + } + if arsvpi.PolicyID != nil { + objectMap["policyId"] = arsvpi.PolicyID + } + if arsvpi.ProtectionState != "" { + objectMap["protectionState"] = arsvpi.ProtectionState + } + if arsvpi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return &arsvpi, true +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &arsvpi, true +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureRecoveryServiceVaultProtectionIntent. +func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &arsvpi, true +} + +// AzureResourceProtectionIntent iaaS VM specific backup protection intent item. +type AzureResourceProtectionIntent struct { + // FriendlyName - Friendly name of the VM represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) { + arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem + objectMap := make(map[string]interface{}) + if arpi.FriendlyName != nil { + objectMap["friendlyName"] = arpi.FriendlyName + } + if arpi.BackupManagementType != "" { + objectMap["backupManagementType"] = arpi.BackupManagementType + } + if arpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = arpi.SourceResourceID + } + if arpi.ItemID != nil { + objectMap["itemId"] = arpi.ItemID + } + if arpi.PolicyID != nil { + objectMap["policyId"] = arpi.PolicyID + } + if arpi.ProtectionState != "" { + objectMap["protectionState"] = arpi.ProtectionState + } + if arpi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return &arpi, true +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureResourceProtectionIntent. +func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &arpi, true +} + +// AzureSQLAGWorkloadContainerProtectionContainer container for SQL workloads under SQL Availability Group. +type AzureSQLAGWorkloadContainerProtectionContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) { + aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1 + objectMap := make(map[string]interface{}) + if aswcpc.SourceResourceID != nil { + objectMap["sourceResourceId"] = aswcpc.SourceResourceID + } + if aswcpc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime + } + if aswcpc.ExtendedInfo != nil { + objectMap["extendedInfo"] = aswcpc.ExtendedInfo + } + if aswcpc.WorkloadType != "" { + objectMap["workloadType"] = aswcpc.WorkloadType + } + if aswcpc.OperationType != "" { + objectMap["operationType"] = aswcpc.OperationType + } + if aswcpc.FriendlyName != nil { + objectMap["friendlyName"] = aswcpc.FriendlyName + } + if aswcpc.BackupManagementType != "" { + objectMap["backupManagementType"] = aswcpc.BackupManagementType + } + if aswcpc.RegistrationStatus != nil { + objectMap["registrationStatus"] = aswcpc.RegistrationStatus + } + if aswcpc.HealthStatus != nil { + objectMap["healthStatus"] = aswcpc.HealthStatus + } + if aswcpc.ContainerType != "" { + objectMap["containerType"] = aswcpc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return &aswcpc, true +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &aswcpc, true +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLAGWorkloadContainerProtectionContainer. +func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &aswcpc, true +} + +// AzureSQLContainer azure Sql workload-specific container. +type AzureSQLContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLContainer. +func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) { + asc.ContainerType = ContainerTypeAzureSQLContainer1 + objectMap := make(map[string]interface{}) + if asc.FriendlyName != nil { + objectMap["friendlyName"] = asc.FriendlyName + } + if asc.BackupManagementType != "" { + objectMap["backupManagementType"] = asc.BackupManagementType + } + if asc.RegistrationStatus != nil { + objectMap["registrationStatus"] = asc.RegistrationStatus + } + if asc.HealthStatus != nil { + objectMap["healthStatus"] = asc.HealthStatus + } + if asc.ContainerType != "" { + objectMap["containerType"] = asc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return &asc, true +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &asc, true +} + +// AzureSQLProtectedItem azure SQL workload-specific backup item. +type AzureSQLProtectedItem struct { + // ProtectedItemDataID - Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. + ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` + // ProtectionState - Backup state of the backed up item. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' + ProtectionState ProtectedItemState `json:"protectionState,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { + aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases + objectMap := make(map[string]interface{}) + if aspi.ProtectedItemDataID != nil { + objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID + } + if aspi.ProtectionState != "" { + objectMap["protectionState"] = aspi.ProtectionState + } + if aspi.ExtendedInfo != nil { + objectMap["extendedInfo"] = aspi.ExtendedInfo + } + if aspi.BackupManagementType != "" { + objectMap["backupManagementType"] = aspi.BackupManagementType + } + if aspi.WorkloadType != "" { + objectMap["workloadType"] = aspi.WorkloadType + } + if aspi.ContainerName != nil { + objectMap["containerName"] = aspi.ContainerName + } + if aspi.SourceResourceID != nil { + objectMap["sourceResourceId"] = aspi.SourceResourceID + } + if aspi.PolicyID != nil { + objectMap["policyId"] = aspi.PolicyID + } + if aspi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint + } + if aspi.BackupSetName != nil { + objectMap["backupSetName"] = aspi.BackupSetName + } + if aspi.CreateMode != "" { + objectMap["createMode"] = aspi.CreateMode + } + if aspi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC + } + if aspi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete + } + if aspi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining + } + if aspi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming + } + if aspi.IsRehydrate != nil { + objectMap["isRehydrate"] = aspi.IsRehydrate + } + if aspi.ProtectedItemType != "" { + objectMap["protectedItemType"] = aspi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return &aspi, true +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &aspi, true +} + +// AzureSQLProtectedItemExtendedInfo additional information on Azure Sql specific protected item. +type AzureSQLProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this item in the service. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of available backup copies associated with this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyState - State of the backup policy associated with this backup item. + PolicyState *string `json:"policyState,omitempty"` +} + +// AzureSQLProtectionPolicy azure SQL workload-specific backup policy. +type AzureSQLProtectionPolicy struct { + // RetentionPolicy - Retention policy details. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { + aspp.BackupManagementType = BackupManagementTypeAzureSQL + objectMap := make(map[string]interface{}) + objectMap["retentionPolicy"] = aspp.RetentionPolicy + if aspp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount + } + if aspp.BackupManagementType != "" { + objectMap["backupManagementType"] = aspp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return &aspp, true +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &aspp, true +} + +// UnmarshalJSON is the custom unmarshaler for AzureSQLProtectionPolicy struct. +func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + aspp.RetentionPolicy = retentionPolicy + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + aspp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + aspp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// AzureStorageContainer azure Storage Account workload-specific container. +type AzureStorageContainer struct { + // SourceResourceID - Fully qualified ARM url. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // StorageAccountVersion - Storage account version. + StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // ProtectedItemCount - Number of items backed up in this container. + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageContainer. +func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) { + asc.ContainerType = ContainerTypeStorageContainer1 + objectMap := make(map[string]interface{}) + if asc.SourceResourceID != nil { + objectMap["sourceResourceId"] = asc.SourceResourceID + } + if asc.StorageAccountVersion != nil { + objectMap["storageAccountVersion"] = asc.StorageAccountVersion + } + if asc.ResourceGroup != nil { + objectMap["resourceGroup"] = asc.ResourceGroup + } + if asc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = asc.ProtectedItemCount + } + if asc.FriendlyName != nil { + objectMap["friendlyName"] = asc.FriendlyName + } + if asc.BackupManagementType != "" { + objectMap["backupManagementType"] = asc.BackupManagementType + } + if asc.RegistrationStatus != nil { + objectMap["registrationStatus"] = asc.RegistrationStatus + } + if asc.HealthStatus != nil { + objectMap["healthStatus"] = asc.HealthStatus + } + if asc.ContainerType != "" { + objectMap["containerType"] = asc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return &asc, true +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureStorageContainer. +func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &asc, true +} + +// AzureStorageErrorInfo azure storage specific error information +type AzureStorageErrorInfo struct { + // ErrorCode - Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// AzureStorageJob azure storage specific job. +type AzureStorageJob struct { + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"` + // StorageAccountName - Specifies friendly name of the storage account. + StorageAccountName *string `json:"storageAccountName,omitempty"` + // StorageAccountVersion - Specifies whether the Storage account is a Classic or an Azure Resource Manager Storage account. + StorageAccountVersion *string `json:"storageAccountVersion,omitempty"` + // ExtendedInfo - Additional information about the job. + ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageJob. +func (asj AzureStorageJob) MarshalJSON() ([]byte, error) { + asj.JobType = JobTypeAzureStorageJob + objectMap := make(map[string]interface{}) + if asj.Duration != nil { + objectMap["duration"] = asj.Duration + } + if asj.ActionsInfo != nil { + objectMap["actionsInfo"] = asj.ActionsInfo + } + if asj.ErrorDetails != nil { + objectMap["errorDetails"] = asj.ErrorDetails + } + if asj.StorageAccountName != nil { + objectMap["storageAccountName"] = asj.StorageAccountName + } + if asj.StorageAccountVersion != nil { + objectMap["storageAccountVersion"] = asj.StorageAccountVersion + } + if asj.ExtendedInfo != nil { + objectMap["extendedInfo"] = asj.ExtendedInfo + } + if asj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = asj.EntityFriendlyName + } + if asj.BackupManagementType != "" { + objectMap["backupManagementType"] = asj.BackupManagementType + } + if asj.Operation != nil { + objectMap["operation"] = asj.Operation + } + if asj.Status != nil { + objectMap["status"] = asj.Status + } + if asj.StartTime != nil { + objectMap["startTime"] = asj.StartTime + } + if asj.EndTime != nil { + objectMap["endTime"] = asj.EndTime + } + if asj.ActivityID != nil { + objectMap["activityId"] = asj.ActivityID + } + if asj.JobType != "" { + objectMap["jobType"] = asj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return &asj, true +} + +// AsAzureWorkloadJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for AzureStorageJob. +func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) { + return &asj, true +} + +// AzureStorageJobExtendedInfo azure Storage workload-specific additional information for job. +type AzureStorageJobExtendedInfo struct { + // TasksList - List of tasks for this job + TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageJobExtendedInfo. +func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if asjei.TasksList != nil { + objectMap["tasksList"] = asjei.TasksList + } + if asjei.PropertyBag != nil { + objectMap["propertyBag"] = asjei.PropertyBag + } + if asjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// AzureStorageJobTaskDetails azure storage workload specific job task details. +type AzureStorageJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// AzureStorageProtectableContainer azure Storage-specific protectable containers +type AzureStorageProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) { + aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer + objectMap := make(map[string]interface{}) + if aspc.FriendlyName != nil { + objectMap["friendlyName"] = aspc.FriendlyName + } + if aspc.BackupManagementType != "" { + objectMap["backupManagementType"] = aspc.BackupManagementType + } + if aspc.HealthStatus != nil { + objectMap["healthStatus"] = aspc.HealthStatus + } + if aspc.ContainerID != nil { + objectMap["containerId"] = aspc.ContainerID + } + if aspc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = aspc.ProtectableContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { + return &aspc, true +} + +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { + return nil, false +} + +// AsProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { + return nil, false +} + +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureStorageProtectableContainer. +func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &aspc, true +} + +// AzureVMAppContainerProtectableContainer azure workload-specific container +type AzureVMAppContainerProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) { + avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer + objectMap := make(map[string]interface{}) + if avacpc.FriendlyName != nil { + objectMap["friendlyName"] = avacpc.FriendlyName + } + if avacpc.BackupManagementType != "" { + objectMap["backupManagementType"] = avacpc.BackupManagementType + } + if avacpc.HealthStatus != nil { + objectMap["healthStatus"] = avacpc.HealthStatus + } + if avacpc.ContainerID != nil { + objectMap["containerId"] = avacpc.ContainerID + } + if avacpc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = avacpc.ProtectableContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { + return &avacpc, true +} + +// AsProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { + return nil, false +} + +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for AzureVMAppContainerProtectableContainer. +func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &avacpc, true +} + +// AzureVMAppContainerProtectionContainer container for SQL workloads under Azure Virtual Machines. +type AzureVMAppContainerProtectionContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) { + avacpc.ContainerType = ContainerTypeVMAppContainer1 + objectMap := make(map[string]interface{}) + if avacpc.SourceResourceID != nil { + objectMap["sourceResourceId"] = avacpc.SourceResourceID + } + if avacpc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime + } + if avacpc.ExtendedInfo != nil { + objectMap["extendedInfo"] = avacpc.ExtendedInfo + } + if avacpc.WorkloadType != "" { + objectMap["workloadType"] = avacpc.WorkloadType + } + if avacpc.OperationType != "" { + objectMap["operationType"] = avacpc.OperationType + } + if avacpc.FriendlyName != nil { + objectMap["friendlyName"] = avacpc.FriendlyName + } + if avacpc.BackupManagementType != "" { + objectMap["backupManagementType"] = avacpc.BackupManagementType + } + if avacpc.RegistrationStatus != nil { + objectMap["registrationStatus"] = avacpc.RegistrationStatus + } + if avacpc.HealthStatus != nil { + objectMap["healthStatus"] = avacpc.HealthStatus + } + if avacpc.ContainerType != "" { + objectMap["containerType"] = avacpc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return &avacpc, true +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &avacpc, true +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureVMAppContainerProtectionContainer. +func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &avacpc, true +} + +// AzureVMResourceFeatureSupportRequest azureResource(IaaS VM) Specific feature support request +type AzureVMResourceFeatureSupportRequest struct { + // VMSize - Size of the resource: VM size(A/D series etc) in case of IaasVM + VMSize *string `json:"vmSize,omitempty"` + // VMSku - SKUs (Premium/Managed etc) in case of IaasVM + VMSku *string `json:"vmSku,omitempty"` + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) { + avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup + objectMap := make(map[string]interface{}) + if avrfsr.VMSize != nil { + objectMap["vmSize"] = avrfsr.VMSize + } + if avrfsr.VMSku != nil { + objectMap["vmSku"] = avrfsr.VMSku + } + if avrfsr.FeatureType != "" { + objectMap["featureType"] = avrfsr.FeatureType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { + return nil, false +} + +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { + return &avrfsr, true +} + +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { + return nil, false +} + +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for AzureVMResourceFeatureSupportRequest. +func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &avrfsr, true +} + +// AzureVMResourceFeatureSupportResponse response for feature support requests for Azure IaasVm +type AzureVMResourceFeatureSupportResponse struct { + autorest.Response `json:"-"` + // SupportStatus - Support status of feature. Possible values include: 'SupportStatusInvalid', 'SupportStatusSupported', 'SupportStatusDefaultOFF', 'SupportStatusDefaultON', 'SupportStatusNotSupported' + SupportStatus SupportStatus `json:"supportStatus,omitempty"` +} + +// BasicAzureVMWorkloadItem azure VM workload-specific workload item. +type BasicAzureVMWorkloadItem interface { + AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) + AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) + AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) +} + +// AzureVMWorkloadItem azure VM workload-specific workload item. +type AzureVMWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["workloadItemType"] { + case string(WorkloadItemTypeSAPAseDatabase1): + var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsadwi) + return avwsadwi, err + case string(WorkloadItemTypeSAPAseSystem1): + var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem + err := json.Unmarshal(body, &avwsaswi) + return avwsaswi, err + case string(WorkloadItemTypeSAPHanaDatabase1): + var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem + err := json.Unmarshal(body, &avwshdwi) + return avwshdwi, err + case string(WorkloadItemTypeSAPHanaSystem1): + var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem + err := json.Unmarshal(body, &avwshswi) + return avwshswi, err + case string(WorkloadItemTypeSQLDataBase1): + var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsdwi) + return avwsdwi, err + case string(WorkloadItemTypeSQLInstance1): + var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem + err := json.Unmarshal(body, &avwsiwi) + return avwsiwi, err + default: + var avwi AzureVMWorkloadItem + err := json.Unmarshal(body, &avwi) + return avwi, err + } +} +func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage) + if err != nil { + return nil, err + } + avwiArray[index] = avwi + } + return avwiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) { + avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem + objectMap := make(map[string]interface{}) + if avwi.ParentName != nil { + objectMap["parentName"] = avwi.ParentName + } + if avwi.ServerName != nil { + objectMap["serverName"] = avwi.ServerName + } + if avwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwi.IsAutoProtectable + } + if avwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwi.Subinquireditemcount + } + if avwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount + } + if avwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwi.BackupManagementType + } + if avwi.WorkloadType != nil { + objectMap["workloadType"] = avwi.WorkloadType + } + if avwi.FriendlyName != nil { + objectMap["friendlyName"] = avwi.FriendlyName + } + if avwi.ProtectionState != "" { + objectMap["protectionState"] = avwi.ProtectionState + } + if avwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return &avwi, true +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadItem. +func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwi, true +} + +// BasicAzureVMWorkloadProtectableItem azure VM workload-specific protectable item. +type BasicAzureVMWorkloadProtectableItem interface { + AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) + AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) + AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) + AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) + AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) +} + +// AzureVMWorkloadProtectableItem azure VM workload-specific protectable item. +type AzureVMWorkloadProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeSAPAseSystem): + var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem + err := json.Unmarshal(body, &avwsaspi) + return avwsaspi, err + case string(ProtectableItemTypeSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectableItemTypeSAPHanaSystem): + var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem + err := json.Unmarshal(body, &avwshspi) + return avwshspi, err + case string(ProtectableItemTypeSQLAvailabilityGroupContainer): + var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem + err := json.Unmarshal(body, &avwsagpi) + return avwsagpi, err + case string(ProtectableItemTypeSQLDataBase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + case string(ProtectableItemTypeSQLInstance): + var avwsipi AzureVMWorkloadSQLInstanceProtectableItem + err := json.Unmarshal(body, &avwsipi) + return avwsipi, err + default: + var avwpi AzureVMWorkloadProtectableItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + } +} +func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + avwpiArray[index] = avwpi + } + return avwpiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) { + avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem + objectMap := make(map[string]interface{}) + if avwpi.ParentName != nil { + objectMap["parentName"] = avwpi.ParentName + } + if avwpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwpi.ParentUniqueName + } + if avwpi.ServerName != nil { + objectMap["serverName"] = avwpi.ServerName + } + if avwpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable + } + if avwpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwpi.IsAutoProtected + } + if avwpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount + } + if avwpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount + } + if avwpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation + } + if avwpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwpi.BackupManagementType + } + if avwpi.WorkloadType != nil { + objectMap["workloadType"] = avwpi.WorkloadType + } + if avwpi.FriendlyName != nil { + objectMap["friendlyName"] = avwpi.FriendlyName + } + if avwpi.ProtectionState != "" { + objectMap["protectionState"] = avwpi.ProtectionState + } + if avwpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return &avwpi, true +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadProtectableItem. +func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwpi, true +} + +// BasicAzureVMWorkloadProtectedItem azure VM workload-specific protected item. +type BasicAzureVMWorkloadProtectedItem interface { + AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) + AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) +} + +// AzureVMWorkloadProtectedItem azure VM workload-specific protected item. +type AzureVMWorkloadProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectedItemType"] { + case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): + var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem + err := json.Unmarshal(body, &avwsadpi) + return avwsadpi, err + case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + default: + var avwpi AzureVMWorkloadProtectedItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + } +} +func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage) + if err != nil { + return nil, err + } + avwpiArray[index] = avwpi + } + return avwpiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) { + avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem + objectMap := make(map[string]interface{}) + if avwpi.FriendlyName != nil { + objectMap["friendlyName"] = avwpi.FriendlyName + } + if avwpi.ServerName != nil { + objectMap["serverName"] = avwpi.ServerName + } + if avwpi.ParentName != nil { + objectMap["parentName"] = avwpi.ParentName + } + if avwpi.ParentType != nil { + objectMap["parentType"] = avwpi.ParentType + } + if avwpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwpi.ProtectionStatus + } + if avwpi.ProtectionState != "" { + objectMap["protectionState"] = avwpi.ProtectionState + } + if avwpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwpi.LastBackupStatus + } + if avwpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwpi.LastBackupTime + } + if avwpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail + } + if avwpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID + } + if avwpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus + } + if avwpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwpi.ExtendedInfo + } + if avwpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwpi.BackupManagementType + } + if avwpi.WorkloadType != "" { + objectMap["workloadType"] = avwpi.WorkloadType + } + if avwpi.ContainerName != nil { + objectMap["containerName"] = avwpi.ContainerName + } + if avwpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwpi.SourceResourceID + } + if avwpi.PolicyID != nil { + objectMap["policyId"] = avwpi.PolicyID + } + if avwpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint + } + if avwpi.BackupSetName != nil { + objectMap["backupSetName"] = avwpi.BackupSetName + } + if avwpi.CreateMode != "" { + objectMap["createMode"] = avwpi.CreateMode + } + if avwpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC + } + if avwpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete + } + if avwpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining + } + if avwpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming + } + if avwpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwpi.IsRehydrate + } + if avwpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return &avwpi, true +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadProtectedItem. +func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwpi, true +} + +// AzureVMWorkloadProtectedItemExtendedInfo additional information on Azure Workload for SQL specific +// backup item. +type AzureVMWorkloadProtectedItemExtendedInfo struct { + // OldestRecoveryPoint - The oldest backup copy available for this backup item. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of backup copies available for this backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // PolicyState - Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string `json:"policyState,omitempty"` +} + +// AzureVMWorkloadProtectionPolicy azure VM (Mercury) workload-specific backup policy. +type AzureVMWorkloadProtectionPolicy struct { + // WorkLoadType - Type of workload for the backup management. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkLoadType WorkloadType `json:"workLoadType,omitempty"` + // Settings - Common settings for the backup management + Settings *Settings `json:"settings,omitempty"` + // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention + SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` + // MakePolicyConsistent - Fix the policy inconsistency + MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) { + avwpp.BackupManagementType = BackupManagementTypeAzureWorkload + objectMap := make(map[string]interface{}) + if avwpp.WorkLoadType != "" { + objectMap["workLoadType"] = avwpp.WorkLoadType + } + if avwpp.Settings != nil { + objectMap["settings"] = avwpp.Settings + } + if avwpp.SubProtectionPolicy != nil { + objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy + } + if avwpp.MakePolicyConsistent != nil { + objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent + } + if avwpp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount + } + if avwpp.BackupManagementType != "" { + objectMap["backupManagementType"] = avwpp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return &avwpp, true +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for AzureVMWorkloadProtectionPolicy. +func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &avwpp, true +} + +// AzureVMWorkloadSAPAseDatabaseProtectedItem azure VM workload-specific protected item representing SAP +// ASE Database. +type AzureVMWorkloadSAPAseDatabaseProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase + objectMap := make(map[string]interface{}) + if avwsadpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsadpi.FriendlyName + } + if avwsadpi.ServerName != nil { + objectMap["serverName"] = avwsadpi.ServerName + } + if avwsadpi.ParentName != nil { + objectMap["parentName"] = avwsadpi.ParentName + } + if avwsadpi.ParentType != nil { + objectMap["parentType"] = avwsadpi.ParentType + } + if avwsadpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwsadpi.ProtectionStatus + } + if avwsadpi.ProtectionState != "" { + objectMap["protectionState"] = avwsadpi.ProtectionState + } + if avwsadpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus + } + if avwsadpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwsadpi.LastBackupTime + } + if avwsadpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail + } + if avwsadpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID + } + if avwsadpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus + } + if avwsadpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwsadpi.ExtendedInfo + } + if avwsadpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwsadpi.BackupManagementType + } + if avwsadpi.WorkloadType != "" { + objectMap["workloadType"] = avwsadpi.WorkloadType + } + if avwsadpi.ContainerName != nil { + objectMap["containerName"] = avwsadpi.ContainerName + } + if avwsadpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwsadpi.SourceResourceID + } + if avwsadpi.PolicyID != nil { + objectMap["policyId"] = avwsadpi.PolicyID + } + if avwsadpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint + } + if avwsadpi.BackupSetName != nil { + objectMap["backupSetName"] = avwsadpi.BackupSetName + } + if avwsadpi.CreateMode != "" { + objectMap["createMode"] = avwsadpi.CreateMode + } + if avwsadpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC + } + if avwsadpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete + } + if avwsadpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining + } + if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming + } + if avwsadpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwsadpi.IsRehydrate + } + if avwsadpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwsadpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwsadpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return &avwsadpi, true +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPAseDatabaseProtectedItem. +func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwsadpi, true +} + +// AzureVMWorkloadSAPAseDatabaseWorkloadItem azure VM workload-specific workload item representing SAP ASE +// Database. +type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1 + objectMap := make(map[string]interface{}) + if avwsadwi.ParentName != nil { + objectMap["parentName"] = avwsadwi.ParentName + } + if avwsadwi.ServerName != nil { + objectMap["serverName"] = avwsadwi.ServerName + } + if avwsadwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable + } + if avwsadwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount + } + if avwsadwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount + } + if avwsadwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsadwi.BackupManagementType + } + if avwsadwi.WorkloadType != nil { + objectMap["workloadType"] = avwsadwi.WorkloadType + } + if avwsadwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsadwi.FriendlyName + } + if avwsadwi.ProtectionState != "" { + objectMap["protectionState"] = avwsadwi.ProtectionState + } + if avwsadwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsadwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsadwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return &avwsadwi, true +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseDatabaseWorkloadItem. +func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsadwi, true +} + +// AzureVMWorkloadSAPAseSystemProtectableItem azure VM workload-specific protectable item representing SAP +// ASE System. +type AzureVMWorkloadSAPAseSystemProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) { + avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem + objectMap := make(map[string]interface{}) + if avwsaspi.ParentName != nil { + objectMap["parentName"] = avwsaspi.ParentName + } + if avwsaspi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName + } + if avwsaspi.ServerName != nil { + objectMap["serverName"] = avwsaspi.ServerName + } + if avwsaspi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable + } + if avwsaspi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected + } + if avwsaspi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount + } + if avwsaspi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount + } + if avwsaspi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation + } + if avwsaspi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsaspi.BackupManagementType + } + if avwsaspi.WorkloadType != nil { + objectMap["workloadType"] = avwsaspi.WorkloadType + } + if avwsaspi.FriendlyName != nil { + objectMap["friendlyName"] = avwsaspi.FriendlyName + } + if avwsaspi.ProtectionState != "" { + objectMap["protectionState"] = avwsaspi.ProtectionState + } + if avwsaspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsaspi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsaspi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return &avwsaspi, true +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPAseSystemProtectableItem. +func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsaspi, true +} + +// AzureVMWorkloadSAPAseSystemWorkloadItem azure VM workload-specific workload item representing SAP ASE +// System. +type AzureVMWorkloadSAPAseSystemWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) { + avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1 + objectMap := make(map[string]interface{}) + if avwsaswi.ParentName != nil { + objectMap["parentName"] = avwsaswi.ParentName + } + if avwsaswi.ServerName != nil { + objectMap["serverName"] = avwsaswi.ServerName + } + if avwsaswi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable + } + if avwsaswi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount + } + if avwsaswi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount + } + if avwsaswi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsaswi.BackupManagementType + } + if avwsaswi.WorkloadType != nil { + objectMap["workloadType"] = avwsaswi.WorkloadType + } + if avwsaswi.FriendlyName != nil { + objectMap["friendlyName"] = avwsaswi.FriendlyName + } + if avwsaswi.ProtectionState != "" { + objectMap["protectionState"] = avwsaswi.ProtectionState + } + if avwsaswi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsaswi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsaswi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return &avwsaswi, true +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPAseSystemWorkloadItem. +func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsaswi, true +} + +// AzureVMWorkloadSAPHanaDatabaseProtectableItem azure VM workload-specific protectable item representing +// SAP HANA Database. +type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase + objectMap := make(map[string]interface{}) + if avwshdpi.ParentName != nil { + objectMap["parentName"] = avwshdpi.ParentName + } + if avwshdpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName + } + if avwshdpi.ServerName != nil { + objectMap["serverName"] = avwshdpi.ServerName + } + if avwshdpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable + } + if avwshdpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected + } + if avwshdpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount + } + if avwshdpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount + } + if avwshdpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation + } + if avwshdpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshdpi.BackupManagementType + } + if avwshdpi.WorkloadType != nil { + objectMap["workloadType"] = avwshdpi.WorkloadType + } + if avwshdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdpi.FriendlyName + } + if avwshdpi.ProtectionState != "" { + objectMap["protectionState"] = avwshdpi.ProtectionState + } + if avwshdpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwshdpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectableItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwshdpi, true +} + +// AzureVMWorkloadSAPHanaDatabaseProtectedItem azure VM workload-specific protected item representing SAP +// HANA Database. +type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase + objectMap := make(map[string]interface{}) + if avwshdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdpi.FriendlyName + } + if avwshdpi.ServerName != nil { + objectMap["serverName"] = avwshdpi.ServerName + } + if avwshdpi.ParentName != nil { + objectMap["parentName"] = avwshdpi.ParentName + } + if avwshdpi.ParentType != nil { + objectMap["parentType"] = avwshdpi.ParentType + } + if avwshdpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwshdpi.ProtectionStatus + } + if avwshdpi.ProtectionState != "" { + objectMap["protectionState"] = avwshdpi.ProtectionState + } + if avwshdpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus + } + if avwshdpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwshdpi.LastBackupTime + } + if avwshdpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail + } + if avwshdpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID + } + if avwshdpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus + } + if avwshdpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwshdpi.ExtendedInfo + } + if avwshdpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwshdpi.BackupManagementType + } + if avwshdpi.WorkloadType != "" { + objectMap["workloadType"] = avwshdpi.WorkloadType + } + if avwshdpi.ContainerName != nil { + objectMap["containerName"] = avwshdpi.ContainerName + } + if avwshdpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwshdpi.SourceResourceID + } + if avwshdpi.PolicyID != nil { + objectMap["policyId"] = avwshdpi.PolicyID + } + if avwshdpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint + } + if avwshdpi.BackupSetName != nil { + objectMap["backupSetName"] = avwshdpi.BackupSetName + } + if avwshdpi.CreateMode != "" { + objectMap["createMode"] = avwshdpi.CreateMode + } + if avwshdpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC + } + if avwshdpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete + } + if avwshdpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining + } + if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming + } + if avwshdpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwshdpi.IsRehydrate + } + if avwshdpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwshdpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return &avwshdpi, true +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSAPHanaDatabaseProtectedItem. +func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwshdpi, true +} + +// AzureVMWorkloadSAPHanaDatabaseWorkloadItem azure VM workload-specific workload item representing SAP +// HANA Database. +type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1 + objectMap := make(map[string]interface{}) + if avwshdwi.ParentName != nil { + objectMap["parentName"] = avwshdwi.ParentName + } + if avwshdwi.ServerName != nil { + objectMap["serverName"] = avwshdwi.ServerName + } + if avwshdwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable + } + if avwshdwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount + } + if avwshdwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount + } + if avwshdwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshdwi.BackupManagementType + } + if avwshdwi.WorkloadType != nil { + objectMap["workloadType"] = avwshdwi.WorkloadType + } + if avwshdwi.FriendlyName != nil { + objectMap["friendlyName"] = avwshdwi.FriendlyName + } + if avwshdwi.ProtectionState != "" { + objectMap["protectionState"] = avwshdwi.ProtectionState + } + if avwshdwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwshdwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwshdwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return &avwshdwi, true +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaDatabaseWorkloadItem. +func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwshdwi, true +} + +// AzureVMWorkloadSAPHanaSystemProtectableItem azure VM workload-specific protectable item representing SAP +// HANA System. +type AzureVMWorkloadSAPHanaSystemProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) { + avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem + objectMap := make(map[string]interface{}) + if avwshspi.ParentName != nil { + objectMap["parentName"] = avwshspi.ParentName + } + if avwshspi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwshspi.ParentUniqueName + } + if avwshspi.ServerName != nil { + objectMap["serverName"] = avwshspi.ServerName + } + if avwshspi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable + } + if avwshspi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwshspi.IsAutoProtected + } + if avwshspi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount + } + if avwshspi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount + } + if avwshspi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation + } + if avwshspi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshspi.BackupManagementType + } + if avwshspi.WorkloadType != nil { + objectMap["workloadType"] = avwshspi.WorkloadType + } + if avwshspi.FriendlyName != nil { + objectMap["friendlyName"] = avwshspi.FriendlyName + } + if avwshspi.ProtectionState != "" { + objectMap["protectionState"] = avwshspi.ProtectionState + } + if avwshspi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwshspi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwshspi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return &avwshspi, true +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSAPHanaSystemProtectableItem. +func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwshspi, true +} + +// AzureVMWorkloadSAPHanaSystemWorkloadItem azure VM workload-specific workload item representing SAP HANA +// System. +type AzureVMWorkloadSAPHanaSystemWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) { + avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1 + objectMap := make(map[string]interface{}) + if avwshswi.ParentName != nil { + objectMap["parentName"] = avwshswi.ParentName + } + if avwshswi.ServerName != nil { + objectMap["serverName"] = avwshswi.ServerName + } + if avwshswi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable + } + if avwshswi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount + } + if avwshswi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount + } + if avwshswi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwshswi.BackupManagementType + } + if avwshswi.WorkloadType != nil { + objectMap["workloadType"] = avwshswi.WorkloadType + } + if avwshswi.FriendlyName != nil { + objectMap["friendlyName"] = avwshswi.FriendlyName + } + if avwshswi.ProtectionState != "" { + objectMap["protectionState"] = avwshswi.ProtectionState + } + if avwshswi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwshswi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwshswi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return &avwshswi, true +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSAPHanaSystemWorkloadItem. +func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwshswi, true +} + +// AzureVMWorkloadSQLAvailabilityGroupProtectableItem azure VM workload-specific protectable item +// representing SQL Availability Group. +type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) { + avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer + objectMap := make(map[string]interface{}) + if avwsagpi.ParentName != nil { + objectMap["parentName"] = avwsagpi.ParentName + } + if avwsagpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName + } + if avwsagpi.ServerName != nil { + objectMap["serverName"] = avwsagpi.ServerName + } + if avwsagpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable + } + if avwsagpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected + } + if avwsagpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount + } + if avwsagpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount + } + if avwsagpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation + } + if avwsagpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsagpi.BackupManagementType + } + if avwsagpi.WorkloadType != nil { + objectMap["workloadType"] = avwsagpi.WorkloadType + } + if avwsagpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsagpi.FriendlyName + } + if avwsagpi.ProtectionState != "" { + objectMap["protectionState"] = avwsagpi.ProtectionState + } + if avwsagpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsagpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsagpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return &avwsagpi, true +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLAvailabilityGroupProtectableItem. +func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsagpi, true +} + +// AzureVMWorkloadSQLDatabaseProtectableItem azure VM workload-specific protectable item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) { + avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase + objectMap := make(map[string]interface{}) + if avwsdpi.ParentName != nil { + objectMap["parentName"] = avwsdpi.ParentName + } + if avwsdpi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName + } + if avwsdpi.ServerName != nil { + objectMap["serverName"] = avwsdpi.ServerName + } + if avwsdpi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable + } + if avwsdpi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected + } + if avwsdpi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount + } + if avwsdpi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount + } + if avwsdpi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation + } + if avwsdpi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsdpi.BackupManagementType + } + if avwsdpi.WorkloadType != nil { + objectMap["workloadType"] = avwsdpi.WorkloadType + } + if avwsdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdpi.FriendlyName + } + if avwsdpi.ProtectionState != "" { + objectMap["protectionState"] = avwsdpi.ProtectionState + } + if avwsdpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsdpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLDatabaseProtectableItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsdpi, true +} + +// AzureVMWorkloadSQLDatabaseProtectedItem azure VM workload-specific protected item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseProtectedItem struct { + // FriendlyName - Friendly name of the DB represented by this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // ParentName - Parent name of the DB such as Instance or Availability Group. + ParentName *string `json:"parentName,omitempty"` + // ParentType - Parent type of protected item, example: for a DB, standalone server or distributed + ParentType *string `json:"parentType,omitempty"` + // ProtectionStatus - Backup status of this backup item. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // LastBackupStatus - Last backup operation status. Possible values: Healthy, Unhealthy. Possible values include: 'LastBackupStatusInvalid', 'LastBackupStatusHealthy', 'LastBackupStatusUnhealthy', 'LastBackupStatusIRPending' + LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // LastBackupErrorDetail - Error details in last backup + LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"` + // ProtectedItemDataSourceID - Data ID of the protected item. + ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"` + // ProtectedItemHealthStatus - Health status of the backup item, evaluated based on last heartbeat received. Possible values include: 'ProtectedItemHealthStatusInvalid', 'ProtectedItemHealthStatusHealthy', 'ProtectedItemHealthStatusUnhealthy', 'ProtectedItemHealthStatusNotReachable', 'ProtectedItemHealthStatusIRPending' + ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"` + // ExtendedInfo - Additional information for this backup item. + ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) { + avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase + objectMap := make(map[string]interface{}) + if avwsdpi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdpi.FriendlyName + } + if avwsdpi.ServerName != nil { + objectMap["serverName"] = avwsdpi.ServerName + } + if avwsdpi.ParentName != nil { + objectMap["parentName"] = avwsdpi.ParentName + } + if avwsdpi.ParentType != nil { + objectMap["parentType"] = avwsdpi.ParentType + } + if avwsdpi.ProtectionStatus != nil { + objectMap["protectionStatus"] = avwsdpi.ProtectionStatus + } + if avwsdpi.ProtectionState != "" { + objectMap["protectionState"] = avwsdpi.ProtectionState + } + if avwsdpi.LastBackupStatus != "" { + objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus + } + if avwsdpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = avwsdpi.LastBackupTime + } + if avwsdpi.LastBackupErrorDetail != nil { + objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail + } + if avwsdpi.ProtectedItemDataSourceID != nil { + objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID + } + if avwsdpi.ProtectedItemHealthStatus != "" { + objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus + } + if avwsdpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = avwsdpi.ExtendedInfo + } + if avwsdpi.BackupManagementType != "" { + objectMap["backupManagementType"] = avwsdpi.BackupManagementType + } + if avwsdpi.WorkloadType != "" { + objectMap["workloadType"] = avwsdpi.WorkloadType + } + if avwsdpi.ContainerName != nil { + objectMap["containerName"] = avwsdpi.ContainerName + } + if avwsdpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = avwsdpi.SourceResourceID + } + if avwsdpi.PolicyID != nil { + objectMap["policyId"] = avwsdpi.PolicyID + } + if avwsdpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint + } + if avwsdpi.BackupSetName != nil { + objectMap["backupSetName"] = avwsdpi.BackupSetName + } + if avwsdpi.CreateMode != "" { + objectMap["createMode"] = avwsdpi.CreateMode + } + if avwsdpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC + } + if avwsdpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete + } + if avwsdpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining + } + if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming + } + if avwsdpi.IsRehydrate != nil { + objectMap["isRehydrate"] = avwsdpi.IsRehydrate + } + if avwsdpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = avwsdpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return &avwsdpi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return &avwsdpi, true +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for AzureVMWorkloadSQLDatabaseProtectedItem. +func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &avwsdpi, true +} + +// AzureVMWorkloadSQLDatabaseWorkloadItem azure VM workload-specific workload item representing SQL +// Database. +type AzureVMWorkloadSQLDatabaseWorkloadItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) { + avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1 + objectMap := make(map[string]interface{}) + if avwsdwi.ParentName != nil { + objectMap["parentName"] = avwsdwi.ParentName + } + if avwsdwi.ServerName != nil { + objectMap["serverName"] = avwsdwi.ServerName + } + if avwsdwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable + } + if avwsdwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount + } + if avwsdwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount + } + if avwsdwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsdwi.BackupManagementType + } + if avwsdwi.WorkloadType != nil { + objectMap["workloadType"] = avwsdwi.WorkloadType + } + if avwsdwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsdwi.FriendlyName + } + if avwsdwi.ProtectionState != "" { + objectMap["protectionState"] = avwsdwi.ProtectionState + } + if avwsdwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsdwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsdwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return &avwsdwi, true +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLDatabaseWorkloadItem. +func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsdwi, true +} + +// AzureVMWorkloadSQLInstanceProtectableItem azure VM workload-specific protectable item representing SQL +// Instance. +type AzureVMWorkloadSQLInstanceProtectableItem struct { + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ParentUniqueName - Parent Unique Name is added to provide the service formatted URI Name of the Parent + // Only Applicable for data bases where the parent would be either Instance or a SQL AG. + ParentUniqueName *string `json:"parentUniqueName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if protectable item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // IsAutoProtected - Indicates if protectable item is auto-protected + IsAutoProtected *bool `json:"isAutoProtected,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // Subprotectableitemcount - For instance or AG, indicates number of DB's to be protected + Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"` + // Prebackupvalidation - Pre-backup validation for protectable objects + Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) { + avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance + objectMap := make(map[string]interface{}) + if avwsipi.ParentName != nil { + objectMap["parentName"] = avwsipi.ParentName + } + if avwsipi.ParentUniqueName != nil { + objectMap["parentUniqueName"] = avwsipi.ParentUniqueName + } + if avwsipi.ServerName != nil { + objectMap["serverName"] = avwsipi.ServerName + } + if avwsipi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable + } + if avwsipi.IsAutoProtected != nil { + objectMap["isAutoProtected"] = avwsipi.IsAutoProtected + } + if avwsipi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount + } + if avwsipi.Subprotectableitemcount != nil { + objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount + } + if avwsipi.Prebackupvalidation != nil { + objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation + } + if avwsipi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsipi.BackupManagementType + } + if avwsipi.WorkloadType != nil { + objectMap["workloadType"] = avwsipi.WorkloadType + } + if avwsipi.FriendlyName != nil { + objectMap["friendlyName"] = avwsipi.FriendlyName + } + if avwsipi.ProtectionState != "" { + objectMap["protectionState"] = avwsipi.ProtectionState + } + if avwsipi.ProtectableItemType != "" { + objectMap["protectableItemType"] = avwsipi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return &avwsipi, true +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return &avwsipi, true +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for AzureVMWorkloadSQLInstanceProtectableItem. +func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &avwsipi, true +} + +// AzureVMWorkloadSQLInstanceWorkloadItem azure VM workload-specific workload item representing SQL +// Instance. +type AzureVMWorkloadSQLInstanceWorkloadItem struct { + // DataDirectoryPaths - Data Directory Paths for default directories + DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` + // ParentName - Name for instance or AG + ParentName *string `json:"parentName,omitempty"` + // ServerName - Host/Cluster Name for instance or AG + ServerName *string `json:"serverName,omitempty"` + // IsAutoProtectable - Indicates if workload item is auto-protectable + IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"` + // Subinquireditemcount - For instance or AG, indicates number of DB's present + Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"` + // SubWorkloadItemCount - For instance or AG, indicates number of DB's to be protected + SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) { + avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1 + objectMap := make(map[string]interface{}) + if avwsiwi.DataDirectoryPaths != nil { + objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths + } + if avwsiwi.ParentName != nil { + objectMap["parentName"] = avwsiwi.ParentName + } + if avwsiwi.ServerName != nil { + objectMap["serverName"] = avwsiwi.ServerName + } + if avwsiwi.IsAutoProtectable != nil { + objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable + } + if avwsiwi.Subinquireditemcount != nil { + objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount + } + if avwsiwi.SubWorkloadItemCount != nil { + objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount + } + if avwsiwi.BackupManagementType != nil { + objectMap["backupManagementType"] = avwsiwi.BackupManagementType + } + if avwsiwi.WorkloadType != nil { + objectMap["workloadType"] = avwsiwi.WorkloadType + } + if avwsiwi.FriendlyName != nil { + objectMap["friendlyName"] = avwsiwi.FriendlyName + } + if avwsiwi.ProtectionState != "" { + objectMap["protectionState"] = avwsiwi.ProtectionState + } + if avwsiwi.WorkloadItemType != "" { + objectMap["workloadItemType"] = avwsiwi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return &avwsiwi, true +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return &avwsiwi, true +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return nil, false +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for AzureVMWorkloadSQLInstanceWorkloadItem. +func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &avwsiwi, true +} + +// BasicAzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. +type BasicAzureWorkloadAutoProtectionIntent interface { + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) +} + +// AzureWorkloadAutoProtectionIntent azure Recovery Services Vault specific protection intent item. +type AzureWorkloadAutoProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + } +} +func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + awapiArray[index] = awapi + } + return awapiArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) { + awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent + objectMap := make(map[string]interface{}) + if awapi.BackupManagementType != "" { + objectMap["backupManagementType"] = awapi.BackupManagementType + } + if awapi.SourceResourceID != nil { + objectMap["sourceResourceId"] = awapi.SourceResourceID + } + if awapi.ItemID != nil { + objectMap["itemId"] = awapi.ItemID + } + if awapi.PolicyID != nil { + objectMap["policyId"] = awapi.PolicyID + } + if awapi.ProtectionState != "" { + objectMap["protectionState"] = awapi.ProtectionState + } + if awapi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &awapi, true +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return &awapi, true +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return &awapi, true +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadAutoProtectionIntent. +func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &awapi, true +} + +// AzureWorkloadBackupRequest azureWorkload workload-specific backup request. +type AzureWorkloadBackupRequest struct { + // BackupType - Type of backup, viz. Full, Differential, Log or CopyOnlyFull. Possible values include: 'TypeEnumInvalid', 'TypeEnumFull', 'TypeEnumDifferential', 'TypeEnumLog', 'TypeEnumCopyOnlyFull' + BackupType TypeEnum `json:"backupType,omitempty"` + // EnableCompression - Bool for Compression setting + EnableCompression *bool `json:"enableCompression,omitempty"` + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) { + awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest + objectMap := make(map[string]interface{}) + if awbr.BackupType != "" { + objectMap["backupType"] = awbr.BackupType + } + if awbr.EnableCompression != nil { + objectMap["enableCompression"] = awbr.EnableCompression + } + if awbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC + } + if awbr.ObjectType != "" { + objectMap["objectType"] = awbr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return nil, false +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return &awbr, true +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return nil, false +} + +// AsRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) { + return nil, false +} + +// AsBasicRequest is the BasicRequest implementation for AzureWorkloadBackupRequest. +func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &awbr, true +} + +// BasicAzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. +type BasicAzureWorkloadContainer interface { + AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) + AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) + AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) +} + +// AzureWorkloadContainer container for the workloads running inside Azure Compute or Classic Compute. +type AzureWorkloadContainer struct { + // SourceResourceID - ARM ID of the virtual machine represented by this Azure Workload Container + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // LastUpdatedTime - Time stamp when this container was updated. + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + // ExtendedInfo - Additional details of a workload container. + ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"` + // WorkloadType - Workload type for which registration was sent. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // OperationType - Re-Do Operation. Possible values include: 'OperationTypeInvalid', 'OperationTypeRegister', 'OperationTypeReregister' + OperationType OperationType `json:"operationType,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeSQLAGWorkLoadContainer1): + var aswcpc AzureSQLAGWorkloadContainerProtectionContainer + err := json.Unmarshal(body, &aswcpc) + return aswcpc, err + case string(ContainerTypeVMAppContainer1): + var avacpc AzureVMAppContainerProtectionContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + default: + var awc AzureWorkloadContainer + err := json.Unmarshal(body, &awc) + return awc, err + } +} +func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage) + if err != nil { + return nil, err + } + awcArray[index] = awc + } + return awcArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) { + awc.ContainerType = ContainerTypeAzureWorkloadContainer + objectMap := make(map[string]interface{}) + if awc.SourceResourceID != nil { + objectMap["sourceResourceId"] = awc.SourceResourceID + } + if awc.LastUpdatedTime != nil { + objectMap["lastUpdatedTime"] = awc.LastUpdatedTime + } + if awc.ExtendedInfo != nil { + objectMap["extendedInfo"] = awc.ExtendedInfo + } + if awc.WorkloadType != "" { + objectMap["workloadType"] = awc.WorkloadType + } + if awc.OperationType != "" { + objectMap["operationType"] = awc.OperationType + } + if awc.FriendlyName != nil { + objectMap["friendlyName"] = awc.FriendlyName + } + if awc.BackupManagementType != "" { + objectMap["backupManagementType"] = awc.BackupManagementType + } + if awc.RegistrationStatus != nil { + objectMap["registrationStatus"] = awc.RegistrationStatus + } + if awc.HealthStatus != nil { + objectMap["healthStatus"] = awc.HealthStatus + } + if awc.ContainerType != "" { + objectMap["containerType"] = awc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return &awc, true +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return &awc, true +} + +// AsDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for AzureWorkloadContainer. +func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &awc, true +} + +// AzureWorkloadContainerExtendedInfo extended information of the container. +type AzureWorkloadContainerExtendedInfo struct { + // HostServerName - Host Os Name in case of Stand Alone and Cluster Name in case of distributed container. + HostServerName *string `json:"hostServerName,omitempty"` + // InquiryInfo - Inquiry Status for the container. + InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"` + // NodesList - List of the nodes in case of distributed container. + NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"` +} + +// AzureWorkloadErrorInfo azure storage specific error information +type AzureWorkloadErrorInfo struct { + // ErrorCode - Error code. + ErrorCode *int32 `json:"errorCode,omitempty"` + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // ErrorTitle - Title: Typically, the entity that the error pertains to. + ErrorTitle *string `json:"errorTitle,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` + // AdditionalDetails - Additional details for above error code. + AdditionalDetails *string `json:"additionalDetails,omitempty"` +} + +// AzureWorkloadJob azure storage specific job. +type AzureWorkloadJob struct { + // WorkloadType - Workload type of the job + WorkloadType *string `json:"workloadType,omitempty"` + // Duration - Time elapsed during the execution of this job. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - Gets or sets the state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - Error details on execution of this job. + ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information about the job. + ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadJob. +func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) { + awj.JobType = JobTypeAzureWorkloadJob + objectMap := make(map[string]interface{}) + if awj.WorkloadType != nil { + objectMap["workloadType"] = awj.WorkloadType + } + if awj.Duration != nil { + objectMap["duration"] = awj.Duration + } + if awj.ActionsInfo != nil { + objectMap["actionsInfo"] = awj.ActionsInfo + } + if awj.ErrorDetails != nil { + objectMap["errorDetails"] = awj.ErrorDetails + } + if awj.ExtendedInfo != nil { + objectMap["extendedInfo"] = awj.ExtendedInfo + } + if awj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = awj.EntityFriendlyName + } + if awj.BackupManagementType != "" { + objectMap["backupManagementType"] = awj.BackupManagementType + } + if awj.Operation != nil { + objectMap["operation"] = awj.Operation + } + if awj.Status != nil { + objectMap["status"] = awj.Status + } + if awj.StartTime != nil { + objectMap["startTime"] = awj.StartTime + } + if awj.EndTime != nil { + objectMap["endTime"] = awj.EndTime + } + if awj.ActivityID != nil { + objectMap["activityId"] = awj.ActivityID + } + if awj.JobType != "" { + objectMap["jobType"] = awj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return &awj, true +} + +// AsDpmJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for AzureWorkloadJob. +func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) { + return &awj, true +} + +// AzureWorkloadJobExtendedInfo azure VM workload-specific additional information for job. +type AzureWorkloadJobExtendedInfo struct { + // TasksList - List of tasks for this job + TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - Job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadJobExtendedInfo. +func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if awjei.TasksList != nil { + objectMap["tasksList"] = awjei.TasksList + } + if awjei.PropertyBag != nil { + objectMap["propertyBag"] = awjei.PropertyBag + } + if awjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// AzureWorkloadJobTaskDetails azure VM workload specific job task details. +type AzureWorkloadJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// BasicAzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime +type BasicAzureWorkloadPointInTimeRecoveryPoint interface { + AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) + AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) +} + +// AzureWorkloadPointInTimeRecoveryPoint recovery point specific to PointInTime +type AzureWorkloadPointInTimeRecoveryPoint struct { + // TimeRanges - List of log ranges + TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): + var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awshpitrp) + return awshpitrp, err + default: + var awpitrp AzureWorkloadPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awpitrp) + return awpitrp, err + } +} +func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + awpitrpArray[index] = awpitrp + } + return awpitrpArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + awpitrp.ObjectType = ObjectTypeAzureWorkloadPointInTimeRecoveryPoint + objectMap := make(map[string]interface{}) + if awpitrp.TimeRanges != nil { + objectMap["timeRanges"] = awpitrp.TimeRanges + } + if awpitrp.ObjectType != "" { + objectMap["objectType"] = awpitrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return &awpitrp, true +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return &awpitrp, true +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awpitrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadPointInTimeRecoveryPoint. +func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awpitrp, true +} + +// AzureWorkloadPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for +// PointInTime/Log restore +type AzureWorkloadPointInTimeRestoreRequest struct { + // PointInTime - PointInTime value + PointInTime *date.Time `json:"pointInTime,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + awpitrr.ObjectType = ObjectTypeAzureWorkloadPointInTimeRestoreRequest + objectMap := make(map[string]interface{}) + if awpitrr.PointInTime != nil { + objectMap["pointInTime"] = awpitrr.PointInTime + } + if awpitrr.RecoveryType != "" { + objectMap["recoveryType"] = awpitrr.RecoveryType + } + if awpitrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awpitrr.SourceResourceID + } + if awpitrr.PropertyBag != nil { + objectMap["propertyBag"] = awpitrr.PropertyBag + } + if awpitrr.TargetInfo != nil { + objectMap["targetInfo"] = awpitrr.TargetInfo + } + if awpitrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awpitrr.RecoveryMode + } + if awpitrr.ObjectType != "" { + objectMap["objectType"] = awpitrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return &awpitrr, true +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awpitrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadPointInTimeRestoreRequest. +func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awpitrr, true +} + +// BasicAzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery point +type BasicAzureWorkloadRecoveryPoint interface { + AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) + AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) + AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) + AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) + AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) +} + +// AzureWorkloadRecoveryPoint workload specific recovery point, specifically encapsulates full/diff recovery +// point +type AzureWorkloadRecoveryPoint struct { + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): + var awpitrp AzureWorkloadPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awpitrp) + return awpitrp, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): + var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awshpitrp) + return awshpitrp, err + case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): + var awshrp AzureWorkloadSAPHanaRecoveryPoint + err := json.Unmarshal(body, &awshrp) + return awshrp, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): + var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awspitrp) + return awspitrp, err + case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): + var awsrp AzureWorkloadSQLRecoveryPoint + err := json.Unmarshal(body, &awsrp) + return awsrp, err + default: + var awrp AzureWorkloadRecoveryPoint + err := json.Unmarshal(body, &awrp) + return awrp, err + } +} +func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + awrpArray[index] = awrp + } + return awrpArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) { + awrp.ObjectType = ObjectTypeAzureWorkloadRecoveryPoint + objectMap := make(map[string]interface{}) + if awrp.ObjectType != "" { + objectMap["objectType"] = awrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return &awrp, true +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadRecoveryPoint. +func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awrp, true +} + +// BasicAzureWorkloadRestoreRequest azureWorkload-specific restore. +type BasicAzureWorkloadRestoreRequest interface { + AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) + AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) + AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) + AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) + AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) + AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) +} + +// AzureWorkloadRestoreRequest azureWorkload-specific restore. +type AzureWorkloadRestoreRequest struct { + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): + var awpitrr AzureWorkloadPointInTimeRestoreRequest + err := json.Unmarshal(body, &awpitrr) + return awpitrr, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): + var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest + err := json.Unmarshal(body, &awshpitrr) + return awshpitrr, err + case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): + var awshrr AzureWorkloadSAPHanaRestoreRequest + err := json.Unmarshal(body, &awshrr) + return awshrr, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): + var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest + err := json.Unmarshal(body, &awspitrr) + return awspitrr, err + case string(ObjectTypeAzureWorkloadSQLRestoreRequest): + var awsrr AzureWorkloadSQLRestoreRequest + err := json.Unmarshal(body, &awsrr) + return awsrr, err + default: + var awrr AzureWorkloadRestoreRequest + err := json.Unmarshal(body, &awrr) + return awrr, err + } +} +func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + awrrArray[index] = awrr + } + return awrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) { + awrr.ObjectType = ObjectTypeAzureWorkloadRestoreRequest + objectMap := make(map[string]interface{}) + if awrr.RecoveryType != "" { + objectMap["recoveryType"] = awrr.RecoveryType + } + if awrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awrr.SourceResourceID + } + if awrr.PropertyBag != nil { + objectMap["propertyBag"] = awrr.PropertyBag + } + if awrr.TargetInfo != nil { + objectMap["targetInfo"] = awrr.TargetInfo + } + if awrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awrr.RecoveryMode + } + if awrr.ObjectType != "" { + objectMap["objectType"] = awrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return &awrr, true +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadRestoreRequest. +func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awrr, true +} + +// AzureWorkloadSAPHanaPointInTimeRecoveryPoint recovery point specific to PointInTime in SAPHana +type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct { + // TimeRanges - List of log ranges + TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + awshpitrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint + objectMap := make(map[string]interface{}) + if awshpitrp.TimeRanges != nil { + objectMap["timeRanges"] = awshpitrp.TimeRanges + } + if awshpitrp.ObjectType != "" { + objectMap["objectType"] = awshpitrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaPointInTimeRecoveryPoint. +func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awshpitrp, true +} + +// AzureWorkloadSAPHanaPointInTimeRestoreRequest azureWorkload SAP Hana -specific restore. Specifically for +// PointInTime/Log restore +type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct { + // PointInTime - PointInTime value + PointInTime *date.Time `json:"pointInTime,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + awshpitrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest + objectMap := make(map[string]interface{}) + if awshpitrr.PointInTime != nil { + objectMap["pointInTime"] = awshpitrr.PointInTime + } + if awshpitrr.RecoveryType != "" { + objectMap["recoveryType"] = awshpitrr.RecoveryType + } + if awshpitrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awshpitrr.SourceResourceID + } + if awshpitrr.PropertyBag != nil { + objectMap["propertyBag"] = awshpitrr.PropertyBag + } + if awshpitrr.TargetInfo != nil { + objectMap["targetInfo"] = awshpitrr.TargetInfo + } + if awshpitrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awshpitrr.RecoveryMode + } + if awshpitrr.ObjectType != "" { + objectMap["objectType"] = awshpitrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awshpitrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return &awshpitrr, true +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return &awshpitrr, true +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaPointInTimeRestoreRequest. +func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awshpitrr, true +} + +// AzureWorkloadSAPHanaRecoveryPoint sAPHana specific recoverypoint, specifically encapsulates full/diff +// recoverypoints +type AzureWorkloadSAPHanaRecoveryPoint struct { + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) { + awshrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaRecoveryPoint + objectMap := make(map[string]interface{}) + if awshrp.ObjectType != "" { + objectMap["objectType"] = awshrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awshrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return &awshrp, true +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSAPHanaRecoveryPoint. +func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awshrp, true +} + +// BasicAzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. +type BasicAzureWorkloadSAPHanaRestoreRequest interface { + AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) +} + +// AzureWorkloadSAPHanaRestoreRequest azureWorkload SAP Hana-specific restore. +type AzureWorkloadSAPHanaRestoreRequest struct { + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): + var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest + err := json.Unmarshal(body, &awshpitrr) + return awshpitrr, err + default: + var awshrr AzureWorkloadSAPHanaRestoreRequest + err := json.Unmarshal(body, &awshrr) + return awshrr, err + } +} +func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + awshrrArray[index] = awshrr + } + return awshrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) { + awshrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaRestoreRequest + objectMap := make(map[string]interface{}) + if awshrr.RecoveryType != "" { + objectMap["recoveryType"] = awshrr.RecoveryType + } + if awshrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awshrr.SourceResourceID + } + if awshrr.PropertyBag != nil { + objectMap["propertyBag"] = awshrr.PropertyBag + } + if awshrr.TargetInfo != nil { + objectMap["targetInfo"] = awshrr.TargetInfo + } + if awshrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awshrr.RecoveryMode + } + if awshrr.ObjectType != "" { + objectMap["objectType"] = awshrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awshrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return &awshrr, true +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return &awshrr, true +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSAPHanaRestoreRequest. +func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awshrr, true +} + +// AzureWorkloadSQLAutoProtectionIntent azure Workload SQL Auto Protection intent item. +type AzureWorkloadSQLAutoProtectionIntent struct { + // WorkloadItemType - Workload item type of the item for which intent is to be set. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' + WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) { + awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent + objectMap := make(map[string]interface{}) + if awsapi.WorkloadItemType != "" { + objectMap["workloadItemType"] = awsapi.WorkloadItemType + } + if awsapi.BackupManagementType != "" { + objectMap["backupManagementType"] = awsapi.BackupManagementType + } + if awsapi.SourceResourceID != nil { + objectMap["sourceResourceId"] = awsapi.SourceResourceID + } + if awsapi.ItemID != nil { + objectMap["itemId"] = awsapi.ItemID + } + if awsapi.PolicyID != nil { + objectMap["policyId"] = awsapi.PolicyID + } + if awsapi.ProtectionState != "" { + objectMap["protectionState"] = awsapi.ProtectionState + } + if awsapi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return &awsapi, true +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return &awsapi, true +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return &awsapi, true +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return nil, false +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for AzureWorkloadSQLAutoProtectionIntent. +func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &awsapi, true +} + +// AzureWorkloadSQLPointInTimeRecoveryPoint recovery point specific to PointInTime +type AzureWorkloadSQLPointInTimeRecoveryPoint struct { + // TimeRanges - List of log ranges + TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"` + // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: + // When a specific recovery point is accessed using GetRecoveryPoint + // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter + ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) { + awspitrp.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint + objectMap := make(map[string]interface{}) + if awspitrp.TimeRanges != nil { + objectMap["timeRanges"] = awspitrp.TimeRanges + } + if awspitrp.ExtendedInfo != nil { + objectMap["extendedInfo"] = awspitrp.ExtendedInfo + } + if awspitrp.ObjectType != "" { + objectMap["objectType"] = awspitrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awspitrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return &awspitrp, true +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return &awspitrp, true +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLPointInTimeRecoveryPoint. +func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awspitrp, true +} + +// AzureWorkloadSQLPointInTimeRestoreRequest azureWorkload SQL -specific restore. Specifically for +// PointInTime/Log restore +type AzureWorkloadSQLPointInTimeRestoreRequest struct { + // PointInTime - PointInTime value + PointInTime *date.Time `json:"pointInTime,omitempty"` + // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` + // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` + // AlternateDirectoryPaths - Data directory details + AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) { + awspitrr.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest + objectMap := make(map[string]interface{}) + if awspitrr.PointInTime != nil { + objectMap["pointInTime"] = awspitrr.PointInTime + } + if awspitrr.ShouldUseAlternateTargetLocation != nil { + objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation + } + if awspitrr.IsNonRecoverable != nil { + objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable + } + if awspitrr.AlternateDirectoryPaths != nil { + objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths + } + if awspitrr.RecoveryType != "" { + objectMap["recoveryType"] = awspitrr.RecoveryType + } + if awspitrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awspitrr.SourceResourceID + } + if awspitrr.PropertyBag != nil { + objectMap["propertyBag"] = awspitrr.PropertyBag + } + if awspitrr.TargetInfo != nil { + objectMap["targetInfo"] = awspitrr.TargetInfo + } + if awspitrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awspitrr.RecoveryMode + } + if awspitrr.ObjectType != "" { + objectMap["objectType"] = awspitrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awspitrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return &awspitrr, true +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return &awspitrr, true +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLPointInTimeRestoreRequest. +func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awspitrr, true +} + +// BasicAzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint +// along with extended info +type BasicAzureWorkloadSQLRecoveryPoint interface { + AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) +} + +// AzureWorkloadSQLRecoveryPoint SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint +// along with extended info +type AzureWorkloadSQLRecoveryPoint struct { + // ExtendedInfo - Extended Info that provides data directory details. Will be populated in two cases: + // When a specific recovery point is accessed using GetRecoveryPoint + // Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo query filter + ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"` + // RecoveryPointTimeInUTC - READ-ONLY; UTC time at which recovery point was created + RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"` + // Type - READ-ONLY; Type of restore point. Possible values include: 'RestorePointTypeInvalid', 'RestorePointTypeFull', 'RestorePointTypeLog', 'RestorePointTypeDifferential' + Type RestorePointType `json:"type,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): + var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awspitrp) + return awspitrp, err + default: + var awsrp AzureWorkloadSQLRecoveryPoint + err := json.Unmarshal(body, &awsrp) + return awsrp, err + } +} +func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + awsrpArray[index] = awsrp + } + return awsrpArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) { + awsrp.ObjectType = ObjectTypeAzureWorkloadSQLRecoveryPoint + objectMap := make(map[string]interface{}) + if awsrp.ExtendedInfo != nil { + objectMap["extendedInfo"] = awsrp.ExtendedInfo + } + if awsrp.ObjectType != "" { + objectMap["objectType"] = awsrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return &awsrp, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return &awsrp, true +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return &awsrp, true +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for AzureWorkloadSQLRecoveryPoint. +func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &awsrp, true +} + +// AzureWorkloadSQLRecoveryPointExtendedInfo extended info class details +type AzureWorkloadSQLRecoveryPointExtendedInfo struct { + // DataDirectoryTimeInUTC - READ-ONLY; UTC time at which data directory info was captured + DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"` + // DataDirectoryPaths - READ-ONLY; List of data directory paths during restore operation. + DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"` +} + +// BasicAzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore +type BasicAzureWorkloadSQLRestoreRequest interface { + AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) + AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) +} + +// AzureWorkloadSQLRestoreRequest azureWorkload SQL -specific restore. Specifically for full/diff restore +type AzureWorkloadSQLRestoreRequest struct { + // ShouldUseAlternateTargetLocation - Default option set to true. If this is set to false, alternate data directory must be provided + ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"` + // IsNonRecoverable - SQL specific property where user can chose to set no-recovery when restore operation is tried + IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"` + // AlternateDirectoryPaths - Data directory details + AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM on which workload that was running is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PropertyBag - Workload specific property bag. + PropertyBag map[string]*string `json:"propertyBag"` + // TargetInfo - Details of target database + TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"` + // RecoveryMode - Defines whether the current recovery mode is file restore or database restore. Possible values include: 'RecoveryModeInvalid', 'RecoveryModeFileRecovery', 'RecoveryModeWorkloadRecovery' + RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): + var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest + err := json.Unmarshal(body, &awspitrr) + return awspitrr, err + default: + var awsrr AzureWorkloadSQLRestoreRequest + err := json.Unmarshal(body, &awsrr) + return awsrr, err + } +} +func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + awsrrArray[index] = awsrr + } + return awsrrArray, nil +} + +// MarshalJSON is the custom marshaler for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) { + awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest + objectMap := make(map[string]interface{}) + if awsrr.ShouldUseAlternateTargetLocation != nil { + objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation + } + if awsrr.IsNonRecoverable != nil { + objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable + } + if awsrr.AlternateDirectoryPaths != nil { + objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths + } + if awsrr.RecoveryType != "" { + objectMap["recoveryType"] = awsrr.RecoveryType + } + if awsrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = awsrr.SourceResourceID + } + if awsrr.PropertyBag != nil { + objectMap["propertyBag"] = awsrr.PropertyBag + } + if awsrr.TargetInfo != nil { + objectMap["targetInfo"] = awsrr.TargetInfo + } + if awsrr.RecoveryMode != "" { + objectMap["recoveryMode"] = awsrr.RecoveryMode + } + if awsrr.ObjectType != "" { + objectMap["objectType"] = awsrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return &awsrr, true +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return &awsrr, true +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return &awsrr, true +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for AzureWorkloadSQLRestoreRequest. +func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &awsrr, true +} + +// BEKDetails BEK is bitlocker encryption key. +type BEKDetails struct { + // SecretURL - Secret is BEK. + SecretURL *string `json:"secretUrl,omitempty"` + // SecretVaultID - ID of the Key Vault where this Secret is stored. + SecretVaultID *string `json:"secretVaultId,omitempty"` + // SecretData - BEK data. + SecretData *string `json:"secretData,omitempty"` +} + +// BMSBackupEngineQueryObject query parameters to fetch list of backup engines. +type BMSBackupEngineQueryObject struct { + // Expand - attribute to add extended info + Expand *string `json:"expand,omitempty"` +} + +// BMSBackupEnginesQueryObject query parameters to fetch list of backup engines. +type BMSBackupEnginesQueryObject struct { + // BackupManagementType - Backup management type for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // Expand - Attribute to add extended info. + Expand *string `json:"expand,omitempty"` +} + +// BMSBackupSummariesQueryObject query parameters to fetch backup summaries. +type BMSBackupSummariesQueryObject struct { + // Type - Backup management type for this container. Possible values include: 'TypeInvalid', 'TypeBackupProtectedItemCountSummary', 'TypeBackupProtectionContainerCountSummary' + Type Type `json:"type,omitempty"` +} + +// BMSContainerQueryObject the query filters that can be used with the list containers API. +type BMSContainerQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ContainerType - Type of container for filter. Possible values include: 'ContainerTypeInvalid', 'ContainerTypeUnknown', 'ContainerTypeIaasVMContainer', 'ContainerTypeIaasVMServiceContainer', 'ContainerTypeDPMContainer', 'ContainerTypeAzureBackupServerContainer', 'ContainerTypeMABContainer', 'ContainerTypeCluster', 'ContainerTypeAzureSQLContainer', 'ContainerTypeWindows', 'ContainerTypeVCenter', 'ContainerTypeVMAppContainer', 'ContainerTypeSQLAGWorkLoadContainer', 'ContainerTypeStorageContainer', 'ContainerTypeGenericContainer' + ContainerType ContainerType `json:"containerType,omitempty"` + // BackupEngineName - Backup engine name + BackupEngineName *string `json:"backupEngineName,omitempty"` + // FabricName - Fabric name for filter + FabricName *string `json:"fabricName,omitempty"` + // Status - Status of registration of this container with the Recovery Services Vault. + Status *string `json:"status,omitempty"` + // FriendlyName - Friendly name of this container. + FriendlyName *string `json:"friendlyName,omitempty"` +} + +// BMSContainersInquiryQueryObject the query filters that can be used with the inquire container API. +type BMSContainersInquiryQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Workload type for this container. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` +} + +// BMSPOQueryObject filters to list items that can be backed up. +type BMSPOQueryObject struct { + // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ContainerName - Full name of the container whose Protectable Objects should be returned. + ContainerName *string `json:"containerName,omitempty"` + // Status - Backup status query parameter. + Status *string `json:"status,omitempty"` + // FriendlyName - Friendly name. + FriendlyName *string `json:"friendlyName,omitempty"` +} + +// BMSRefreshContainersQueryObject the query filters that can be used with the refresh container API. +type BMSRefreshContainersQueryObject struct { + // BackupManagementType - Backup management type for this container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` +} + +// BMSRPQueryObject filters to list backup copies. +type BMSRPQueryObject struct { + // StartDate - Backup copies created after this time. + StartDate *date.Time `json:"startDate,omitempty"` + // EndDate - Backup copies created before this time. + EndDate *date.Time `json:"endDate,omitempty"` + // RestorePointQueryType - RestorePoint type. Possible values include: 'RestorePointQueryTypeInvalid', 'RestorePointQueryTypeFull', 'RestorePointQueryTypeLog', 'RestorePointQueryTypeDifferential', 'RestorePointQueryTypeFullAndDifferential', 'RestorePointQueryTypeAll' + RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"` + // ExtendedInfo - In Get Recovery Point, it tells whether extended information about recovery point is asked. + ExtendedInfo *bool `json:"extendedInfo,omitempty"` +} + +// BMSWorkloadItemQueryObject filters to list items that can be backed up. +type BMSWorkloadItemQueryObject struct { + // BackupManagementType - Backup management type. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadItemType - Workload Item type. Possible values include: 'WorkloadItemTypeInvalid', 'WorkloadItemTypeSQLInstance', 'WorkloadItemTypeSQLDataBase', 'WorkloadItemTypeSAPHanaSystem', 'WorkloadItemTypeSAPHanaDatabase', 'WorkloadItemTypeSAPAseSystem', 'WorkloadItemTypeSAPAseDatabase' + WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"` + // WorkloadType - Workload type. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ProtectionStatus - Backup status query parameter. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` +} + +// ClientDiscoveryDisplay localized display information of an operation. +type ClientDiscoveryDisplay struct { + // Provider - Name of the provider for display purposes + Provider *string `json:"provider,omitempty"` + // Resource - ResourceType for which this Operation can be performed. + Resource *string `json:"resource,omitempty"` + // Operation - Operations Name itself. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation having details of what operation is about. + Description *string `json:"description,omitempty"` +} + +// ClientDiscoveryForLogSpecification class to represent shoebox log specification in json client +// discovery. +type ClientDiscoveryForLogSpecification struct { + // Name - Name for shoebox log specification. + Name *string `json:"name,omitempty"` + // DisplayName - Localized display name + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - blob duration of shoebox log specification + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// ClientDiscoveryForProperties class to represent shoebox properties in json client discovery. +type ClientDiscoveryForProperties struct { + // ServiceSpecification - Operation properties. + ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// ClientDiscoveryForServiceSpecification class to represent shoebox service specification in json client +// discovery. +type ClientDiscoveryForServiceSpecification struct { + // LogSpecifications - List of log specifications of this operation. + LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` +} + +// ClientDiscoveryResponse operations List response which contains list of available APIs. +type ClientDiscoveryResponse struct { + autorest.Response `json:"-"` + // Value - List of available operations. + Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"` + // NextLink - Link to the next chunk of Response. + NextLink *string `json:"nextLink,omitempty"` +} + +// ClientDiscoveryResponseIterator provides access to a complete listing of +// ClientDiscoveryValueForSingleAPI values. +type ClientDiscoveryResponseIterator struct { + i int + page ClientDiscoveryResponsePage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ClientDiscoveryResponseIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ClientDiscoveryResponseIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI { + if !iter.page.NotDone() { + return ClientDiscoveryValueForSingleAPI{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ClientDiscoveryResponseIterator type. +func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator { + return ClientDiscoveryResponseIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (cdr ClientDiscoveryResponse) IsEmpty() bool { + return cdr.Value == nil || len(*cdr.Value) == 0 +} + +// clientDiscoveryResponsePreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) { + if cdr.NextLink == nil || len(to.String(cdr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(cdr.NextLink))) +} + +// ClientDiscoveryResponsePage contains a page of ClientDiscoveryValueForSingleAPI values. +type ClientDiscoveryResponsePage struct { + fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error) + cdr ClientDiscoveryResponse +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.cdr) + if err != nil { + return err + } + page.cdr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ClientDiscoveryResponsePage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ClientDiscoveryResponsePage) NotDone() bool { + return !page.cdr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse { + return page.cdr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI { + if page.cdr.IsEmpty() { + return nil + } + return *page.cdr.Value +} + +// Creates a new instance of the ClientDiscoveryResponsePage type. +func NewClientDiscoveryResponsePage(getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage { + return ClientDiscoveryResponsePage{fn: getNextPage} +} + +// ClientDiscoveryValueForSingleAPI available operation details. +type ClientDiscoveryValueForSingleAPI struct { + // Name - Name of the Operation. + Name *string `json:"name,omitempty"` + // Display - Contains the localized display information for this particular operation + Display *ClientDiscoveryDisplay `json:"display,omitempty"` + // Origin - The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX + Origin *string `json:"origin,omitempty"` + // Properties - ShoeBox properties for the given operation. + Properties *ClientDiscoveryForProperties `json:"properties,omitempty"` +} + +// ClientScriptForConnect client script details for file / folder restore. +type ClientScriptForConnect struct { + // ScriptContent - File content of the client script for file / folder restore. + ScriptContent *string `json:"scriptContent,omitempty"` + // ScriptExtension - File extension of the client script for file / folder restore - .ps1 , .sh , etc. + ScriptExtension *string `json:"scriptExtension,omitempty"` + // OsType - OS type - Windows, Linux etc. for which this file / folder restore client script works. + OsType *string `json:"osType,omitempty"` + // URL - URL of Executable from where to source the content. If this is not null then ScriptContent should not be used + URL *string `json:"url,omitempty"` + // ScriptNameSuffix - Mandatory suffix that should be added to the name of script that is given for download to user. + // If its null or empty then , ignore it. + ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"` +} + +// ContainerIdentityInfo container identity information +type ContainerIdentityInfo struct { + // UniqueName - Unique name of the container + UniqueName *string `json:"uniqueName,omitempty"` + // AadTenantID - Protection container identity - AAD Tenant + AadTenantID *string `json:"aadTenantId,omitempty"` + // ServicePrincipalClientID - Protection container identity - AAD Service Principal + ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` + // Audience - Protection container identity - Audience + Audience *string `json:"audience,omitempty"` +} + +// DailyRetentionFormat daily retention format. +type DailyRetentionFormat struct { + // DaysOfTheMonth - List of days of the month. + DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"` +} + +// DailyRetentionSchedule daily retention schedule. +type DailyRetentionSchedule struct { + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} + +// Day day of the week. +type Day struct { + // Date - Date of the month + Date *int32 `json:"date,omitempty"` + // IsLast - Whether Date is last date of month + IsLast *bool `json:"isLast,omitempty"` +} + +// DiskExclusionProperties ... +type DiskExclusionProperties struct { + // DiskLunList - List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection. + DiskLunList *[]int32 `json:"diskLunList,omitempty"` + // IsInclusionList - Flag to indicate whether DiskLunList is to be included/ excluded from backup. + IsInclusionList *bool `json:"isInclusionList,omitempty"` +} + +// DiskInformation disk information +type DiskInformation struct { + Lun *int32 `json:"lun,omitempty"` + Name *string `json:"name,omitempty"` +} + +// DistributedNodesInfo this is used to represent the various nodes of the distributed container. +type DistributedNodesInfo struct { + // NodeName - Name of the node under a distributed container. + NodeName *string `json:"nodeName,omitempty"` + // Status - Status of this Node. + // Failed | Succeeded + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Details if the Status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` +} + +// DpmBackupEngine data Protection Manager (DPM) specific backup engine. +type DpmBackupEngine struct { + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` +} + +// MarshalJSON is the custom marshaler for DpmBackupEngine. +func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { + dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine + objectMap := make(map[string]interface{}) + if dbe.FriendlyName != nil { + objectMap["friendlyName"] = dbe.FriendlyName + } + if dbe.BackupManagementType != "" { + objectMap["backupManagementType"] = dbe.BackupManagementType + } + if dbe.RegistrationStatus != nil { + objectMap["registrationStatus"] = dbe.RegistrationStatus + } + if dbe.BackupEngineState != nil { + objectMap["backupEngineState"] = dbe.BackupEngineState + } + if dbe.HealthStatus != nil { + objectMap["healthStatus"] = dbe.HealthStatus + } + if dbe.CanReRegister != nil { + objectMap["canReRegister"] = dbe.CanReRegister + } + if dbe.BackupEngineID != nil { + objectMap["backupEngineId"] = dbe.BackupEngineID + } + if dbe.DpmVersion != nil { + objectMap["dpmVersion"] = dbe.DpmVersion + } + if dbe.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion + } + if dbe.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable + } + if dbe.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable + } + if dbe.ExtendedInfo != nil { + objectMap["extendedInfo"] = dbe.ExtendedInfo + } + if dbe.BackupEngineType != "" { + objectMap["backupEngineType"] = dbe.BackupEngineType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerEngine is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return nil, false +} + +// AsDpmBackupEngine is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return &dbe, true +} + +// AsEngineBase is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) { + return nil, false +} + +// AsBasicEngineBase is the BasicEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) { + return &dbe, true +} + +// BasicDpmContainer DPM workload-specific protection container. +type BasicDpmContainer interface { + AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) + AsDpmContainer() (*DpmContainer, bool) +} + +// DpmContainer DPM workload-specific protection container. +type DpmContainer struct { + // CanReRegister - Specifies whether the container is re-registrable. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ID of container. + ContainerID *string `json:"containerId,omitempty"` + // ProtectedItemCount - Number of protected items in the BackupEngine + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // DpmAgentVersion - Backup engine Agent version + DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` + // DpmServers - List of BackupEngines protecting the container + DpmServers *[]string `json:"dpmServers,omitempty"` + // UpgradeAvailable - To check if upgrade available + UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"` + // ProtectionStatus - Protection status of the container. + ProtectionStatus *string `json:"protectionStatus,omitempty"` + // ExtendedInfo - Extended Info of the container. + ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeAzureBackupServerContainer1): + var absc AzureBackupServerContainer + err := json.Unmarshal(body, &absc) + return absc, err + default: + var dc DpmContainer + err := json.Unmarshal(body, &dc) + return dc, err + } +} +func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dcArray := make([]BasicDpmContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dc, err := unmarshalBasicDpmContainer(*rawMessage) + if err != nil { + return nil, err + } + dcArray[index] = dc + } + return dcArray, nil +} + +// MarshalJSON is the custom marshaler for DpmContainer. +func (dc DpmContainer) MarshalJSON() ([]byte, error) { + dc.ContainerType = ContainerTypeDPMContainer1 + objectMap := make(map[string]interface{}) + if dc.CanReRegister != nil { + objectMap["canReRegister"] = dc.CanReRegister + } + if dc.ContainerID != nil { + objectMap["containerId"] = dc.ContainerID + } + if dc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = dc.ProtectedItemCount + } + if dc.DpmAgentVersion != nil { + objectMap["dpmAgentVersion"] = dc.DpmAgentVersion + } + if dc.DpmServers != nil { + objectMap["dpmServers"] = dc.DpmServers + } + if dc.UpgradeAvailable != nil { + objectMap["upgradeAvailable"] = dc.UpgradeAvailable + } + if dc.ProtectionStatus != nil { + objectMap["protectionStatus"] = dc.ProtectionStatus + } + if dc.ExtendedInfo != nil { + objectMap["extendedInfo"] = dc.ExtendedInfo + } + if dc.FriendlyName != nil { + objectMap["friendlyName"] = dc.FriendlyName + } + if dc.BackupManagementType != "" { + objectMap["backupManagementType"] = dc.BackupManagementType + } + if dc.RegistrationStatus != nil { + objectMap["registrationStatus"] = dc.RegistrationStatus + } + if dc.HealthStatus != nil { + objectMap["healthStatus"] = dc.HealthStatus + } + if dc.ContainerType != "" { + objectMap["containerType"] = dc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { + return &dc, true +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return &dc, true +} + +// AsGenericContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &dc, true +} + +// DPMContainerExtendedInfo additional information of the DPMContainer. +type DPMContainerExtendedInfo struct { + // LastRefreshedAt - Last refresh time of the DPMContainer. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` +} + +// DpmErrorInfo DPM workload-specific error information. +type DpmErrorInfo struct { + // ErrorString - Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - List of localized recommendations for above error code. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// DpmJob DPM workload-specific job object. +type DpmJob struct { + // Duration - Time elapsed for job. + Duration *string `json:"duration,omitempty"` + // DpmServerName - DPM server name managing the backup item or backup job. + DpmServerName *string `json:"dpmServerName,omitempty"` + // ContainerName - Name of cluster/server protecting current backup item, if any. + ContainerName *string `json:"containerName,omitempty"` + // ContainerType - Type of container. + ContainerType *string `json:"containerType,omitempty"` + // WorkloadType - Type of backup item. + WorkloadType *string `json:"workloadType,omitempty"` + // ActionsInfo - The state/actions applicable on this job like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // ErrorDetails - The errors. + ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information for this job. + ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for DpmJob. +func (dj DpmJob) MarshalJSON() ([]byte, error) { + dj.JobType = JobTypeDpmJob + objectMap := make(map[string]interface{}) + if dj.Duration != nil { + objectMap["duration"] = dj.Duration + } + if dj.DpmServerName != nil { + objectMap["dpmServerName"] = dj.DpmServerName + } + if dj.ContainerName != nil { + objectMap["containerName"] = dj.ContainerName + } + if dj.ContainerType != nil { + objectMap["containerType"] = dj.ContainerType + } + if dj.WorkloadType != nil { + objectMap["workloadType"] = dj.WorkloadType + } + if dj.ActionsInfo != nil { + objectMap["actionsInfo"] = dj.ActionsInfo + } + if dj.ErrorDetails != nil { + objectMap["errorDetails"] = dj.ErrorDetails + } + if dj.ExtendedInfo != nil { + objectMap["extendedInfo"] = dj.ExtendedInfo + } + if dj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = dj.EntityFriendlyName + } + if dj.BackupManagementType != "" { + objectMap["backupManagementType"] = dj.BackupManagementType + } + if dj.Operation != nil { + objectMap["operation"] = dj.Operation + } + if dj.Status != nil { + objectMap["status"] = dj.Status + } + if dj.StartTime != nil { + objectMap["startTime"] = dj.StartTime + } + if dj.EndTime != nil { + objectMap["endTime"] = dj.EndTime + } + if dj.ActivityID != nil { + objectMap["activityId"] = dj.ActivityID + } + if dj.JobType != "" { + objectMap["jobType"] = dj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { + return &dj, true +} + +// AsMabJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for DpmJob. +func (dj DpmJob) AsBasicJob() (BasicJob, bool) { + return &dj, true +} + +// DpmJobExtendedInfo additional information on the DPM workload-specific job. +type DpmJobExtendedInfo struct { + // TasksList - List of tasks associated with this job. + TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - The job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message on job execution. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for DpmJobExtendedInfo. +func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if djei.TasksList != nil { + objectMap["tasksList"] = djei.TasksList + } + if djei.PropertyBag != nil { + objectMap["propertyBag"] = djei.PropertyBag + } + if djei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// DpmJobTaskDetails DPM workload-specific job task details. +type DpmJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// DPMProtectedItem additional information on Backup engine specific backup item. +type DPMProtectedItem struct { + // FriendlyName - Friendly name of the managed item + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupEngineName - Backup Management server protecting this backup item + BackupEngineName *string `json:"backupEngineName,omitempty"` + // ProtectionState - Protection state of the backup engine. Possible values include: 'ProtectedItemStateInvalid', 'ProtectedItemStateIRPending', 'ProtectedItemStateProtected', 'ProtectedItemStateProtectionError', 'ProtectedItemStateProtectionStopped', 'ProtectedItemStateProtectionPaused' + ProtectionState ProtectedItemState `json:"protectionState,omitempty"` + // ExtendedInfo - Extended info of the backup item. + ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for DPMProtectedItem. +func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) { + dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem + objectMap := make(map[string]interface{}) + if dpi.FriendlyName != nil { + objectMap["friendlyName"] = dpi.FriendlyName + } + if dpi.BackupEngineName != nil { + objectMap["backupEngineName"] = dpi.BackupEngineName + } + if dpi.ProtectionState != "" { + objectMap["protectionState"] = dpi.ProtectionState + } + if dpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = dpi.ExtendedInfo + } + if dpi.BackupManagementType != "" { + objectMap["backupManagementType"] = dpi.BackupManagementType + } + if dpi.WorkloadType != "" { + objectMap["workloadType"] = dpi.WorkloadType + } + if dpi.ContainerName != nil { + objectMap["containerName"] = dpi.ContainerName + } + if dpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = dpi.SourceResourceID + } + if dpi.PolicyID != nil { + objectMap["policyId"] = dpi.PolicyID + } + if dpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint + } + if dpi.BackupSetName != nil { + objectMap["backupSetName"] = dpi.BackupSetName + } + if dpi.CreateMode != "" { + objectMap["createMode"] = dpi.CreateMode + } + if dpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC + } + if dpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete + } + if dpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining + } + if dpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming + } + if dpi.IsRehydrate != nil { + objectMap["isRehydrate"] = dpi.IsRehydrate + } + if dpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = dpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return &dpi, true +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &dpi, true +} + +// DPMProtectedItemExtendedInfo additional information of DPM Protected item. +type DPMProtectedItemExtendedInfo struct { + // ProtectableObjectLoadPath - Attribute to provide information on various DBs. + ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"` + // Protected - To check if backup item is disk protected. + Protected *bool `json:"protected,omitempty"` + // IsPresentOnCloud - To check if backup item is cloud protected. + IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"` + // LastBackupStatus - Last backup status information on backup item. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastRefreshedAt - Last refresh time on backup item. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` + // OldestRecoveryPoint - Oldest cloud recovery point time. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - cloud recovery point count. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` + // OnPremiseOldestRecoveryPoint - Oldest disk recovery point time. + OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"` + // OnPremiseLatestRecoveryPoint - latest disk recovery point time. + OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"` + // OnPremiseRecoveryPointCount - disk recovery point count. + OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"` + // IsCollocated - To check if backup item is collocated. + IsCollocated *bool `json:"isCollocated,omitempty"` + // ProtectionGroupName - Protection group name of the backup item. + ProtectionGroupName *string `json:"protectionGroupName,omitempty"` + // DiskStorageUsedInBytes - Used Disk storage in bytes. + DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"` + // TotalDiskStorageSizeInBytes - total Disk storage in bytes. + TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` +} + +// MarshalJSON is the custom marshaler for DPMProtectedItemExtendedInfo. +func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpiei.ProtectableObjectLoadPath != nil { + objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath + } + if dpiei.Protected != nil { + objectMap["protected"] = dpiei.Protected + } + if dpiei.IsPresentOnCloud != nil { + objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud + } + if dpiei.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = dpiei.LastBackupStatus + } + if dpiei.LastRefreshedAt != nil { + objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt + } + if dpiei.OldestRecoveryPoint != nil { + objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint + } + if dpiei.RecoveryPointCount != nil { + objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount + } + if dpiei.OnPremiseOldestRecoveryPoint != nil { + objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint + } + if dpiei.OnPremiseLatestRecoveryPoint != nil { + objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint + } + if dpiei.OnPremiseRecoveryPointCount != nil { + objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount + } + if dpiei.IsCollocated != nil { + objectMap["isCollocated"] = dpiei.IsCollocated + } + if dpiei.ProtectionGroupName != nil { + objectMap["protectionGroupName"] = dpiei.ProtectionGroupName + } + if dpiei.DiskStorageUsedInBytes != nil { + objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes + } + if dpiei.TotalDiskStorageSizeInBytes != nil { + objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes + } + return json.Marshal(objectMap) +} + +// EncryptionDetails details needed if the VM was encrypted at the time of backup. +type EncryptionDetails struct { + // EncryptionEnabled - Identifies whether this backup copy represents an encrypted VM at the time of backup. + EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` + // KekURL - Key Url. + KekURL *string `json:"kekUrl,omitempty"` + // SecretKeyURL - Secret Url. + SecretKeyURL *string `json:"secretKeyUrl,omitempty"` + // KekVaultID - ID of Key Vault where KEK is stored. + KekVaultID *string `json:"kekVaultId,omitempty"` + // SecretKeyVaultID - ID of Key Vault where Secret is stored. + SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` +} + +// BasicEngineBase the base backup engine class. All workload specific backup engines derive from this class. +type BasicEngineBase interface { + AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) + AsDpmBackupEngine() (*DpmBackupEngine, bool) + AsEngineBase() (*EngineBase, bool) +} + +// EngineBase the base backup engine class. All workload specific backup engines derive from this class. +type EngineBase struct { + // FriendlyName - Friendly name of the backup engine. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the backup engine. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Registration status of the backup engine with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // BackupEngineState - Status of the backup engine with the Recovery Services Vault. = {Active/Deleting/DeleteFailed} + BackupEngineState *string `json:"backupEngineState,omitempty"` + // HealthStatus - Backup status of the backup engine. + HealthStatus *string `json:"healthStatus,omitempty"` + // CanReRegister - Flag indicating if the backup engine be registered, once already registered. + CanReRegister *bool `json:"canReRegister,omitempty"` + // BackupEngineID - ID of the backup engine. + BackupEngineID *string `json:"backupEngineId,omitempty"` + // DpmVersion - Backup engine version + DpmVersion *string `json:"dpmVersion,omitempty"` + // AzureBackupAgentVersion - Backup agent version + AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` + // IsAzureBackupAgentUpgradeAvailable - To check if backup agent upgrade available + IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` + // IsDpmUpgradeAvailable - To check if backup engine upgrade available + IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"` + // ExtendedInfo - Extended info of the backupengine + ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"` + // BackupEngineType - Possible values include: 'BackupEngineTypeBackupEngineBase', 'BackupEngineTypeAzureBackupServerEngine', 'BackupEngineTypeDpmBackupEngine' + BackupEngineType EngineType `json:"backupEngineType,omitempty"` +} + +func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["backupEngineType"] { + case string(BackupEngineTypeAzureBackupServerEngine): + var abse AzureBackupServerEngine + err := json.Unmarshal(body, &abse) + return abse, err + case string(BackupEngineTypeDpmBackupEngine): + var dbe DpmBackupEngine + err := json.Unmarshal(body, &dbe) + return dbe, err + default: + var eb EngineBase + err := json.Unmarshal(body, &eb) + return eb, err + } +} +func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ebArray := make([]BasicEngineBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + eb, err := unmarshalBasicEngineBase(*rawMessage) + if err != nil { + return nil, err + } + ebArray[index] = eb + } + return ebArray, nil +} + +// MarshalJSON is the custom marshaler for EngineBase. +func (eb EngineBase) MarshalJSON() ([]byte, error) { + eb.BackupEngineType = BackupEngineTypeBackupEngineBase + objectMap := make(map[string]interface{}) + if eb.FriendlyName != nil { + objectMap["friendlyName"] = eb.FriendlyName + } + if eb.BackupManagementType != "" { + objectMap["backupManagementType"] = eb.BackupManagementType + } + if eb.RegistrationStatus != nil { + objectMap["registrationStatus"] = eb.RegistrationStatus + } + if eb.BackupEngineState != nil { + objectMap["backupEngineState"] = eb.BackupEngineState + } + if eb.HealthStatus != nil { + objectMap["healthStatus"] = eb.HealthStatus + } + if eb.CanReRegister != nil { + objectMap["canReRegister"] = eb.CanReRegister + } + if eb.BackupEngineID != nil { + objectMap["backupEngineId"] = eb.BackupEngineID + } + if eb.DpmVersion != nil { + objectMap["dpmVersion"] = eb.DpmVersion + } + if eb.AzureBackupAgentVersion != nil { + objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion + } + if eb.IsAzureBackupAgentUpgradeAvailable != nil { + objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable + } + if eb.IsDpmUpgradeAvailable != nil { + objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable + } + if eb.ExtendedInfo != nil { + objectMap["extendedInfo"] = eb.ExtendedInfo + } + if eb.BackupEngineType != "" { + objectMap["backupEngineType"] = eb.BackupEngineType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerEngine is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return nil, false +} + +// AsDpmBackupEngine is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return nil, false +} + +// AsEngineBase is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsEngineBase() (*EngineBase, bool) { + return &eb, true +} + +// AsBasicEngineBase is the BasicEngineBase implementation for EngineBase. +func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) { + return &eb, true +} + +// EngineBaseResource the base backup engine class. All workload specific backup engines derive from this +// class. +type EngineBaseResource struct { + autorest.Response `json:"-"` + // Properties - BackupEngineBaseResource properties + Properties BasicEngineBase `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for EngineBaseResource. +func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = ebr.Properties + if ebr.Location != nil { + objectMap["location"] = ebr.Location + } + if ebr.Tags != nil { + objectMap["tags"] = ebr.Tags + } + if ebr.ETag != nil { + objectMap["eTag"] = ebr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for EngineBaseResource struct. +func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicEngineBase(*v) + if err != nil { + return err + } + ebr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ebr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ebr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ebr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ebr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ebr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + ebr.ETag = &eTag + } + } + } + + return nil +} + +// EngineBaseResourceList list of BackupEngineBase resources +type EngineBaseResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]EngineBaseResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// EngineBaseResourceListIterator provides access to a complete listing of EngineBaseResource values. +type EngineBaseResourceListIterator struct { + i int + page EngineBaseResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *EngineBaseResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EngineBaseResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter EngineBaseResourceListIterator) Value() EngineBaseResource { + if !iter.page.NotDone() { + return EngineBaseResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EngineBaseResourceListIterator type. +func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator { + return EngineBaseResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ebrl EngineBaseResourceList) IsEmpty() bool { + return ebrl.Value == nil || len(*ebrl.Value) == 0 +} + +// engineBaseResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) { + if ebrl.NextLink == nil || len(to.String(ebrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ebrl.NextLink))) +} + +// EngineBaseResourceListPage contains a page of EngineBaseResource values. +type EngineBaseResourceListPage struct { + fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error) + ebrl EngineBaseResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ebrl) + if err != nil { + return err + } + page.ebrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *EngineBaseResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EngineBaseResourceListPage) NotDone() bool { + return !page.ebrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EngineBaseResourceListPage) Response() EngineBaseResourceList { + return page.ebrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EngineBaseResourceListPage) Values() []EngineBaseResource { + if page.ebrl.IsEmpty() { + return nil + } + return *page.ebrl.Value +} + +// Creates a new instance of the EngineBaseResourceListPage type. +func NewEngineBaseResourceListPage(getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage { + return EngineBaseResourceListPage{fn: getNextPage} +} + +// EngineExtendedInfo additional information on backup engine. +type EngineExtendedInfo struct { + // DatabaseName - Database name of backup engine. + DatabaseName *string `json:"databaseName,omitempty"` + // ProtectedItemsCount - Number of protected items in the backup engine. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // ProtectedServersCount - Number of protected servers in the backup engine. + ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"` + // DiskCount - Number of disks in the backup engine. + DiskCount *int32 `json:"diskCount,omitempty"` + // UsedDiskSpace - Disk space used in the backup engine. + UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"` + // AvailableDiskSpace - Disk space currently available in the backup engine. + AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"` + // RefreshedAt - Last refresh time in the backup engine. + RefreshedAt *date.Time `json:"refreshedAt,omitempty"` + // AzureProtectedInstances - Protected instances in the backup engine. + AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"` +} + +// ErrorDetail error Detail class which encapsulates Code, Message and Recommendations. +type ErrorDetail struct { + // Code - READ-ONLY; Error code. + Code *string `json:"code,omitempty"` + // Message - READ-ONLY; Error Message related to the Code. + Message *string `json:"message,omitempty"` + // Recommendations - READ-ONLY; List of recommendation strings. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// ExportJobsOperationResultInfo this class is used to send blob details after exporting jobs. +type ExportJobsOperationResultInfo struct { + // BlobURL - URL of the blob into which the serialized string of list of jobs is exported. + BlobURL *string `json:"blobUrl,omitempty"` + // BlobSasKey - SAS key to access the blob. It expires in 15 mins. + BlobSasKey *string `json:"blobSasKey,omitempty"` + // ExcelFileBlobURL - URL of the blob into which the ExcelFile is uploaded. + ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"` + // ExcelFileBlobSasKey - SAS key to access the blob. It expires in 15 mins. + ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { + ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo + objectMap := make(map[string]interface{}) + if ejori.BlobURL != nil { + objectMap["blobUrl"] = ejori.BlobURL + } + if ejori.BlobSasKey != nil { + objectMap["blobSasKey"] = ejori.BlobSasKey + } + if ejori.ExcelFileBlobURL != nil { + objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL + } + if ejori.ExcelFileBlobSasKey != nil { + objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey + } + if ejori.ObjectType != "" { + objectMap["objectType"] = ejori.ObjectType + } + return json.Marshal(objectMap) +} + +// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return &ejori, true +} + +// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { + return nil, false +} + +// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { + return &ejori, true +} + +// ExtendedProperties extended Properties for Azure IaasVM Backup. +type ExtendedProperties struct { + // DiskExclusionProperties - Extended Properties for Disk Exclusion. + DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"` +} + +// BasicFeatureSupportRequest base class for feature request +type BasicFeatureSupportRequest interface { + AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) + AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) + AsFeatureSupportRequest() (*FeatureSupportRequest, bool) +} + +// FeatureSupportRequest base class for feature request +type FeatureSupportRequest struct { + // FeatureType - Possible values include: 'FeatureTypeFeatureSupportRequest', 'FeatureTypeAzureBackupGoals', 'FeatureTypeAzureVMResourceBackup' + FeatureType FeatureType `json:"featureType,omitempty"` +} + +func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["featureType"] { + case string(FeatureTypeAzureBackupGoals): + var abgfsr AzureBackupGoalFeatureSupportRequest + err := json.Unmarshal(body, &abgfsr) + return abgfsr, err + case string(FeatureTypeAzureVMResourceBackup): + var avrfsr AzureVMResourceFeatureSupportRequest + err := json.Unmarshal(body, &avrfsr) + return avrfsr, err + default: + var fsr FeatureSupportRequest + err := json.Unmarshal(body, &fsr) + return fsr, err + } +} +func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage) + if err != nil { + return nil, err + } + fsrArray[index] = fsr + } + return fsrArray, nil +} + +// MarshalJSON is the custom marshaler for FeatureSupportRequest. +func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) { + fsr.FeatureType = FeatureTypeFeatureSupportRequest + objectMap := make(map[string]interface{}) + if fsr.FeatureType != "" { + objectMap["featureType"] = fsr.FeatureType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupGoalFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) { + return nil, false +} + +// AsAzureVMResourceFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) { + return nil, false +} + +// AsFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) { + return &fsr, true +} + +// AsBasicFeatureSupportRequest is the BasicFeatureSupportRequest implementation for FeatureSupportRequest. +func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) { + return &fsr, true +} + +// GenericContainer base class for generic container of backup items +type GenericContainer struct { + // FabricName - Name of the container's fabric + FabricName *string `json:"fabricName,omitempty"` + // ExtendedInformation - Extended information (not returned in List container API calls) + ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericContainer. +func (gc GenericContainer) MarshalJSON() ([]byte, error) { + gc.ContainerType = ContainerTypeGenericContainer1 + objectMap := make(map[string]interface{}) + if gc.FabricName != nil { + objectMap["fabricName"] = gc.FabricName + } + if gc.ExtendedInformation != nil { + objectMap["extendedInformation"] = gc.ExtendedInformation + } + if gc.FriendlyName != nil { + objectMap["friendlyName"] = gc.FriendlyName + } + if gc.BackupManagementType != "" { + objectMap["backupManagementType"] = gc.BackupManagementType + } + if gc.RegistrationStatus != nil { + objectMap["registrationStatus"] = gc.RegistrationStatus + } + if gc.HealthStatus != nil { + objectMap["healthStatus"] = gc.HealthStatus + } + if gc.ContainerType != "" { + objectMap["containerType"] = gc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) { + return &gc, true +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for GenericContainer. +func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &gc, true +} + +// GenericContainerExtendedInfo container extended information +type GenericContainerExtendedInfo struct { + // RawCertData - Public key of container cert + RawCertData *string `json:"rawCertData,omitempty"` + // ContainerIdentityInfo - Container identity information + ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"` + // ServiceEndpoints - Azure Backup Service Endpoints for the container + ServiceEndpoints map[string]*string `json:"serviceEndpoints"` +} + +// MarshalJSON is the custom marshaler for GenericContainerExtendedInfo. +func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gcei.RawCertData != nil { + objectMap["rawCertData"] = gcei.RawCertData + } + if gcei.ContainerIdentityInfo != nil { + objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo + } + if gcei.ServiceEndpoints != nil { + objectMap["serviceEndpoints"] = gcei.ServiceEndpoints + } + return json.Marshal(objectMap) +} + +// GenericProtectedItem base class for backup items. +type GenericProtectedItem struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // PolicyState - Indicates consistency of policy object and policy applied to this backup item. + PolicyState *string `json:"policyState,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStateInvalid', 'ProtectionStateIRPending', 'ProtectionStateProtected', 'ProtectionStateProtectionError', 'ProtectionStateProtectionStopped', 'ProtectionStateProtectionPaused' + ProtectionState ProtectionState `json:"protectionState,omitempty"` + // ProtectedItemID - Data Plane Service ID of the protected item. + ProtectedItemID *int64 `json:"protectedItemId,omitempty"` + // SourceAssociations - Loosely coupled (type, value) associations (example - parent of a protected item) + SourceAssociations map[string]*string `json:"sourceAssociations"` + // FabricName - Name of this backup item's fabric. + FabricName *string `json:"fabricName,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericProtectedItem. +func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) { + gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem + objectMap := make(map[string]interface{}) + if gpi.FriendlyName != nil { + objectMap["friendlyName"] = gpi.FriendlyName + } + if gpi.PolicyState != nil { + objectMap["policyState"] = gpi.PolicyState + } + if gpi.ProtectionState != "" { + objectMap["protectionState"] = gpi.ProtectionState + } + if gpi.ProtectedItemID != nil { + objectMap["protectedItemId"] = gpi.ProtectedItemID + } + if gpi.SourceAssociations != nil { + objectMap["sourceAssociations"] = gpi.SourceAssociations + } + if gpi.FabricName != nil { + objectMap["fabricName"] = gpi.FabricName + } + if gpi.BackupManagementType != "" { + objectMap["backupManagementType"] = gpi.BackupManagementType + } + if gpi.WorkloadType != "" { + objectMap["workloadType"] = gpi.WorkloadType + } + if gpi.ContainerName != nil { + objectMap["containerName"] = gpi.ContainerName + } + if gpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = gpi.SourceResourceID + } + if gpi.PolicyID != nil { + objectMap["policyId"] = gpi.PolicyID + } + if gpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint + } + if gpi.BackupSetName != nil { + objectMap["backupSetName"] = gpi.BackupSetName + } + if gpi.CreateMode != "" { + objectMap["createMode"] = gpi.CreateMode + } + if gpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC + } + if gpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete + } + if gpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining + } + if gpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming + } + if gpi.IsRehydrate != nil { + objectMap["isRehydrate"] = gpi.IsRehydrate + } + if gpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = gpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return &gpi, true +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for GenericProtectedItem. +func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &gpi, true +} + +// GenericProtectionPolicy azure VM (Mercury) workload-specific backup policy. +type GenericProtectionPolicy struct { + // SubProtectionPolicy - List of sub-protection policies which includes schedule and retention + SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"` + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // FabricName - Name of this policy's fabric. + FabricName *string `json:"fabricName,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) { + gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy + objectMap := make(map[string]interface{}) + if gpp.SubProtectionPolicy != nil { + objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy + } + if gpp.TimeZone != nil { + objectMap["timeZone"] = gpp.TimeZone + } + if gpp.FabricName != nil { + objectMap["fabricName"] = gpp.FabricName + } + if gpp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount + } + if gpp.BackupManagementType != "" { + objectMap["backupManagementType"] = gpp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return &gpp, true +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for GenericProtectionPolicy. +func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &gpp, true +} + +// GenericRecoveryPoint generic backup copy. +type GenericRecoveryPoint struct { + // FriendlyName - Friendly name of the backup copy. + FriendlyName *string `json:"friendlyName,omitempty"` + // RecoveryPointType - Type of the backup copy. + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + // RecoveryPointTime - Time at which this backup copy was created. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // RecoveryPointAdditionalInfo - Additional information associated with this backup copy. + RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) { + grp.ObjectType = ObjectTypeGenericRecoveryPoint + objectMap := make(map[string]interface{}) + if grp.FriendlyName != nil { + objectMap["friendlyName"] = grp.FriendlyName + } + if grp.RecoveryPointType != nil { + objectMap["recoveryPointType"] = grp.RecoveryPointType + } + if grp.RecoveryPointTime != nil { + objectMap["recoveryPointTime"] = grp.RecoveryPointTime + } + if grp.RecoveryPointAdditionalInfo != nil { + objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo + } + if grp.ObjectType != "" { + objectMap["objectType"] = grp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return &grp, true +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &grp, true +} + +// GetProtectedItemQueryObject filters to list backup items. +type GetProtectedItemQueryObject struct { + // Expand - Specifies if the additional information should be provided for this item. + Expand *string `json:"expand,omitempty"` +} + +// IaasVMBackupRequest iaaS VM workload-specific backup request. +type IaasVMBackupRequest struct { + // RecoveryPointExpiryTimeInUTC - Backup copy will expire after the time specified (UTC). + RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { + ivbr.ObjectType = ObjectTypeIaasVMBackupRequest + objectMap := make(map[string]interface{}) + if ivbr.RecoveryPointExpiryTimeInUTC != nil { + objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC + } + if ivbr.ObjectType != "" { + objectMap["objectType"] = ivbr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return nil, false +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return nil, false +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return &ivbr, true +} + +// AsRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) { + return nil, false +} + +// AsBasicRequest is the BasicRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) { + return &ivbr, true +} + +// BasicIaaSVMContainer iaaS VM workload-specific container. +type BasicIaaSVMContainer interface { + AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) + AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) + AsIaaSVMContainer() (*IaaSVMContainer, bool) +} + +// IaaSVMContainer iaaS VM workload-specific container. +type IaaSVMContainer struct { + // VirtualMachineID - Fully qualified ARM url of the virtual machine represented by this Azure IaaS VM container. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // VirtualMachineVersion - Specifies whether the container represents a Classic or an Azure Resource Manager VM. + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + // ResourceGroup - Resource group name of Recovery Services Vault. + ResourceGroup *string `json:"resourceGroup,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeMicrosoftClassicComputevirtualMachines): + var aisccvc AzureIaaSClassicComputeVMContainer + err := json.Unmarshal(body, &aisccvc) + return aisccvc, err + case string(ContainerTypeMicrosoftComputevirtualMachines): + var aiscvc AzureIaaSComputeVMContainer + err := json.Unmarshal(body, &aiscvc) + return aiscvc, err + default: + var isc IaaSVMContainer + err := json.Unmarshal(body, &isc) + return isc, err + } +} +func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + iscArray := make([]BasicIaaSVMContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + isc, err := unmarshalBasicIaaSVMContainer(*rawMessage) + if err != nil { + return nil, err + } + iscArray[index] = isc + } + return iscArray, nil +} + +// MarshalJSON is the custom marshaler for IaaSVMContainer. +func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { + isc.ContainerType = ContainerTypeIaaSVMContainer + objectMap := make(map[string]interface{}) + if isc.VirtualMachineID != nil { + objectMap["virtualMachineId"] = isc.VirtualMachineID + } + if isc.VirtualMachineVersion != nil { + objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion + } + if isc.ResourceGroup != nil { + objectMap["resourceGroup"] = isc.ResourceGroup + } + if isc.FriendlyName != nil { + objectMap["friendlyName"] = isc.FriendlyName + } + if isc.BackupManagementType != "" { + objectMap["backupManagementType"] = isc.BackupManagementType + } + if isc.RegistrationStatus != nil { + objectMap["registrationStatus"] = isc.RegistrationStatus + } + if isc.HealthStatus != nil { + objectMap["healthStatus"] = isc.HealthStatus + } + if isc.ContainerType != "" { + objectMap["containerType"] = isc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return &isc, true +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return &isc, true +} + +// AsMabContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &isc, true +} + +// IaasVMILRRegistrationRequest restore files/folders from a backup copy of IaaS VM. +type IaasVMILRRegistrationRequest struct { + // RecoveryPointID - ID of the IaaS VM backup copy from where the files/folders have to be restored. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // VirtualMachineID - Fully qualified ARM ID of the virtual machine whose the files / folders have to be restored. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // InitiatorName - iSCSI initiator name. + InitiatorName *string `json:"initiatorName,omitempty"` + // RenewExistingRegistration - Whether to renew existing registration with the iSCSI server. + RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { + ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest + objectMap := make(map[string]interface{}) + if ivrr.RecoveryPointID != nil { + objectMap["recoveryPointId"] = ivrr.RecoveryPointID + } + if ivrr.VirtualMachineID != nil { + objectMap["virtualMachineId"] = ivrr.VirtualMachineID + } + if ivrr.InitiatorName != nil { + objectMap["initiatorName"] = ivrr.InitiatorName + } + if ivrr.RenewExistingRegistration != nil { + objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration + } + if ivrr.ObjectType != "" { + objectMap["objectType"] = ivrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return nil, false +} + +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return &ivrr, true +} + +// AsILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) { + return nil, false +} + +// AsBasicILRRequest is the BasicILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &ivrr, true +} + +// BasicIaaSVMProtectableItem iaaS VM workload-specific backup item. +type BasicIaaSVMProtectableItem interface { + AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) + AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) + AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) +} + +// IaaSVMProtectableItem iaaS VM workload-specific backup item. +type IaaSVMProtectableItem struct { + // VirtualMachineID - Fully qualified ARM ID of the virtual machine. + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectableItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectableItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectableItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + default: + var ispi IaaSVMProtectableItem + err := json.Unmarshal(body, &ispi) + return ispi, err + } +} +func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + ispiArray[index] = ispi + } + return ispiArray, nil +} + +// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { + ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem + objectMap := make(map[string]interface{}) + if ispi.VirtualMachineID != nil { + objectMap["virtualMachineId"] = ispi.VirtualMachineID + } + if ispi.BackupManagementType != nil { + objectMap["backupManagementType"] = ispi.BackupManagementType + } + if ispi.WorkloadType != nil { + objectMap["workloadType"] = ispi.WorkloadType + } + if ispi.FriendlyName != nil { + objectMap["friendlyName"] = ispi.FriendlyName + } + if ispi.ProtectionState != "" { + objectMap["protectionState"] = ispi.ProtectionState + } + if ispi.ProtectableItemType != "" { + objectMap["protectableItemType"] = ispi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return &ispi, true +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return &ispi, true +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &ispi, true +} + +// IaasVMRecoveryPoint iaaS VM workload specific backup copy. +type IaasVMRecoveryPoint struct { + // RecoveryPointType - READ-ONLY; Type of the backup copy. + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + // RecoveryPointTime - READ-ONLY; Time at which this backup copy was created. + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + // RecoveryPointAdditionalInfo - READ-ONLY; Additional information associated with this backup copy. + RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` + // SourceVMStorageType - READ-ONLY; Storage type of the VM whose backup copy is created. + SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` + // IsSourceVMEncrypted - READ-ONLY; Identifies whether the VM was encrypted when the backup copy is created. + IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` + // KeyAndSecret - Required details for recovering an encrypted VM. Applicable only when IsSourceVMEncrypted is true. + KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` + // IsInstantIlrSessionActive - Is the session to recover items from this backup copy still active. + IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"` + // RecoveryPointTierDetails - Recovery point tier information. + RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` + // IsManagedVirtualMachine - Whether VM is with Managed Disks + IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` + // VirtualMachineSize - Virtual Machine Size + VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` + // OriginalStorageAccountOption - Original Storage Account Option + OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` + // OsType - OS type + OsType *string `json:"osType,omitempty"` + // RecoveryPointDiskConfiguration - Disk configuration + RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { + ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint + objectMap := make(map[string]interface{}) + if ivrp.KeyAndSecret != nil { + objectMap["keyAndSecret"] = ivrp.KeyAndSecret + } + if ivrp.IsInstantIlrSessionActive != nil { + objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive + } + if ivrp.RecoveryPointTierDetails != nil { + objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails + } + if ivrp.IsManagedVirtualMachine != nil { + objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine + } + if ivrp.VirtualMachineSize != nil { + objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize + } + if ivrp.OriginalStorageAccountOption != nil { + objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption + } + if ivrp.OsType != nil { + objectMap["osType"] = ivrp.OsType + } + if ivrp.RecoveryPointDiskConfiguration != nil { + objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration + } + if ivrp.ObjectType != "" { + objectMap["objectType"] = ivrp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return &ivrp, true +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return nil, false +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &ivrp, true +} + +// IaasVMRestoreRequest iaaS VM workload-specific restore. +type IaasVMRestoreRequest struct { + // RecoveryPointID - ID of the backup copy to be recovered. + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + // RecoveryType - Type of this recovery. Possible values include: 'RecoveryTypeInvalid', 'RecoveryTypeOriginalLocation', 'RecoveryTypeAlternateLocation', 'RecoveryTypeRestoreDisks', 'RecoveryTypeOffline' + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + // SourceResourceID - Fully qualified ARM ID of the VM which is being recovered. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // TargetVirtualMachineID - This is the complete ARM Id of the VM that will be created. + // For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` + // TargetResourceGroupID - This is the ARM Id of the resource group that you want to create for this Virtual machine and other artifacts. + // For e.g. /subscriptions/{subId}/resourcegroups/{rg} + TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` + // StorageAccountID - Fully qualified ARM ID of the storage account to which the VM has to be restored. + StorageAccountID *string `json:"storageAccountId,omitempty"` + // VirtualNetworkID - This is the virtual network Id of the vnet that will be attached to the virtual machine. + // User will be validated for join action permissions in the linked access. + VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` + // SubnetID - Subnet ID, is the subnet ID associated with the to be restored VM. For Classic VMs it would be + // {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource ID used to represent + // the subnet. + SubnetID *string `json:"subnetId,omitempty"` + // TargetDomainNameID - Fully qualified ARM ID of the domain name to be associated to the VM being restored. This applies only to Classic + // Virtual Machines. + TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` + // Region - Region in which the virtual machine is restored. + Region *string `json:"region,omitempty"` + // AffinityGroup - Affinity group associated to VM to be restored. Used only for Classic Compute Virtual Machines. + AffinityGroup *string `json:"affinityGroup,omitempty"` + // CreateNewCloudService - Should a new cloud service be created while restoring the VM. If this is false, VM will be restored to the same + // cloud service as it was at the time of backup. + CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` + // OriginalStorageAccountOption - Original Storage Account Option + OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` + // EncryptionDetails - Details needed if the VM was encrypted at the time of backup. + EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` + // RestoreDiskLunList - List of Disk LUNs for partial restore + RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { + ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest + objectMap := make(map[string]interface{}) + if ivrr.RecoveryPointID != nil { + objectMap["recoveryPointId"] = ivrr.RecoveryPointID + } + if ivrr.RecoveryType != "" { + objectMap["recoveryType"] = ivrr.RecoveryType + } + if ivrr.SourceResourceID != nil { + objectMap["sourceResourceId"] = ivrr.SourceResourceID + } + if ivrr.TargetVirtualMachineID != nil { + objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID + } + if ivrr.TargetResourceGroupID != nil { + objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID + } + if ivrr.StorageAccountID != nil { + objectMap["storageAccountId"] = ivrr.StorageAccountID + } + if ivrr.VirtualNetworkID != nil { + objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID + } + if ivrr.SubnetID != nil { + objectMap["subnetId"] = ivrr.SubnetID + } + if ivrr.TargetDomainNameID != nil { + objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID + } + if ivrr.Region != nil { + objectMap["region"] = ivrr.Region + } + if ivrr.AffinityGroup != nil { + objectMap["affinityGroup"] = ivrr.AffinityGroup + } + if ivrr.CreateNewCloudService != nil { + objectMap["createNewCloudService"] = ivrr.CreateNewCloudService + } + if ivrr.OriginalStorageAccountOption != nil { + objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption + } + if ivrr.EncryptionDetails != nil { + objectMap["encryptionDetails"] = ivrr.EncryptionDetails + } + if ivrr.RestoreDiskLunList != nil { + objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList + } + if ivrr.ObjectType != "" { + objectMap["objectType"] = ivrr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return &ivrr, true +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return nil, false +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &ivrr, true +} + +// BasicILRRequest parameters to Provision ILR API. +type BasicILRRequest interface { + AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) + AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) + AsILRRequest() (*ILRRequest, bool) +} + +// ILRRequest parameters to Provision ILR API. +type ILRRequest struct { + // ObjectType - Possible values include: 'ObjectTypeILRRequest', 'ObjectTypeAzureFileShareProvisionILRRequest', 'ObjectTypeIaasVMILRRegistrationRequest' + ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareProvisionILRRequest): + var afspir AzureFileShareProvisionILRRequest + err := json.Unmarshal(body, &afspir) + return afspir, err + case string(ObjectTypeIaasVMILRRegistrationRequest): + var ivrr IaasVMILRRegistrationRequest + err := json.Unmarshal(body, &ivrr) + return ivrr, err + default: + var ir ILRRequest + err := json.Unmarshal(body, &ir) + return ir, err + } +} +func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + irArray := make([]BasicILRRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ir, err := unmarshalBasicILRRequest(*rawMessage) + if err != nil { + return nil, err + } + irArray[index] = ir + } + return irArray, nil +} + +// MarshalJSON is the custom marshaler for ILRRequest. +func (ir ILRRequest) MarshalJSON() ([]byte, error) { + ir.ObjectType = ObjectTypeILRRequest + objectMap := make(map[string]interface{}) + if ir.ObjectType != "" { + objectMap["objectType"] = ir.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProvisionILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) { + return nil, false +} + +// AsIaasVMILRRegistrationRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return nil, false +} + +// AsILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) { + return &ir, true +} + +// AsBasicILRRequest is the BasicILRRequest implementation for ILRRequest. +func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) { + return &ir, true +} + +// ILRRequestResource parameters to Provision ILR API. +type ILRRequestResource struct { + // Properties - ILRRequestResource properties + Properties BasicILRRequest `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ILRRequestResource. +func (irr ILRRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = irr.Properties + if irr.Location != nil { + objectMap["location"] = irr.Location + } + if irr.Tags != nil { + objectMap["tags"] = irr.Tags + } + if irr.ETag != nil { + objectMap["eTag"] = irr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. +func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicILRRequest(*v) + if err != nil { + return err + } + irr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + irr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + irr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + irr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + irr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + irr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + irr.ETag = &eTag + } + } + } + + return nil +} + +// InquiryInfo details about inquired protectable items under a given container. +type InquiryInfo struct { + // Status - Inquiry Status for this container such as + // InProgress | Failed | Succeeded + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Details if the Status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` + // InquiryDetails - Inquiry Details which will have workload specific details. + // For e.g. - For SQL and oracle this will contain different details. + InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"` +} + +// InquiryValidation validation for inquired protectable items under a given container. +type InquiryValidation struct { + // Status - Status for the Inquiry Validation. + Status *string `json:"status,omitempty"` + // ErrorDetail - Error Detail in case the status is non-success. + ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"` + // AdditionalDetail - READ-ONLY; Error Additional Detail in case the status is non-success. + AdditionalDetail *string `json:"additionalDetail,omitempty"` +} + +// InstantItemRecoveryTarget target details for file / folder restore. +type InstantItemRecoveryTarget struct { + // ClientScripts - List of client scripts. + ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"` +} + +// InstantRPAdditionalDetails ... +type InstantRPAdditionalDetails struct { + AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"` + AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"` +} + +// BasicJob defines workload agnostic properties for a job. +type BasicJob interface { + AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) + AsAzureStorageJob() (*AzureStorageJob, bool) + AsAzureWorkloadJob() (*AzureWorkloadJob, bool) + AsDpmJob() (*DpmJob, bool) + AsMabJob() (*MabJob, bool) + AsJob() (*Job, bool) +} + +// Job defines workload agnostic properties for a job. +type Job struct { + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +func unmarshalBasicJob(body []byte) (BasicJob, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["jobType"] { + case string(JobTypeAzureIaaSVMJob): + var aisj AzureIaaSVMJob + err := json.Unmarshal(body, &aisj) + return aisj, err + case string(JobTypeAzureStorageJob): + var asj AzureStorageJob + err := json.Unmarshal(body, &asj) + return asj, err + case string(JobTypeAzureWorkloadJob): + var awj AzureWorkloadJob + err := json.Unmarshal(body, &awj) + return awj, err + case string(JobTypeDpmJob): + var dj DpmJob + err := json.Unmarshal(body, &dj) + return dj, err + case string(JobTypeMabJob): + var mj MabJob + err := json.Unmarshal(body, &mj) + return mj, err + default: + var j Job + err := json.Unmarshal(body, &j) + return j, err + } +} +func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + jArray := make([]BasicJob, len(rawMessages)) + + for index, rawMessage := range rawMessages { + j, err := unmarshalBasicJob(*rawMessage) + if err != nil { + return nil, err + } + jArray[index] = j + } + return jArray, nil +} + +// MarshalJSON is the custom marshaler for Job. +func (j Job) MarshalJSON() ([]byte, error) { + j.JobType = JobTypeJob + objectMap := make(map[string]interface{}) + if j.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = j.EntityFriendlyName + } + if j.BackupManagementType != "" { + objectMap["backupManagementType"] = j.BackupManagementType + } + if j.Operation != nil { + objectMap["operation"] = j.Operation + } + if j.Status != nil { + objectMap["status"] = j.Status + } + if j.StartTime != nil { + objectMap["startTime"] = j.StartTime + } + if j.EndTime != nil { + objectMap["endTime"] = j.EndTime + } + if j.ActivityID != nil { + objectMap["activityId"] = j.ActivityID + } + if j.JobType != "" { + objectMap["jobType"] = j.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for Job. +func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for Job. +func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for Job. +func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for Job. +func (j Job) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for Job. +func (j Job) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AsJob is the BasicJob implementation for Job. +func (j Job) AsJob() (*Job, bool) { + return &j, true +} + +// AsBasicJob is the BasicJob implementation for Job. +func (j Job) AsBasicJob() (BasicJob, bool) { + return &j, true +} + +// JobQueryObject filters to list the jobs. +type JobQueryObject struct { + // Status - Status of the job. Possible values include: 'JobStatusInvalid', 'JobStatusInProgress', 'JobStatusCompleted', 'JobStatusFailed', 'JobStatusCompletedWithWarnings', 'JobStatusCancelled', 'JobStatusCancelling' + Status JobStatus `json:"status,omitempty"` + // BackupManagementType - Type of backup management for the job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - Type of operation. Possible values include: 'JobOperationTypeInvalid', 'JobOperationTypeRegister', 'JobOperationTypeUnRegister', 'JobOperationTypeConfigureBackup', 'JobOperationTypeBackup', 'JobOperationTypeRestore', 'JobOperationTypeDisableBackup', 'JobOperationTypeDeleteBackupData', 'JobOperationTypeCrossRegionRestore', 'JobOperationTypeUndelete' + Operation JobOperationType `json:"operation,omitempty"` + // JobID - JobID represents the job uniquely. + JobID *string `json:"jobId,omitempty"` + // StartTime - Job has started at this time. Value is in UTC. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Job has ended at this time. Value is in UTC. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// JobResource defines workload agnostic properties for a job. +type JobResource struct { + autorest.Response `json:"-"` + // Properties - JobResource properties + Properties BasicJob `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobResource. +func (jr JobResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = jr.Properties + if jr.Location != nil { + objectMap["location"] = jr.Location + } + if jr.Tags != nil { + objectMap["tags"] = jr.Tags + } + if jr.ETag != nil { + objectMap["eTag"] = jr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for JobResource struct. +func (jr *JobResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicJob(*v) + if err != nil { + return err + } + jr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + jr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + jr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + jr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + jr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + jr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + jr.ETag = &eTag + } + } + } + + return nil +} + +// JobResourceList list of Job resources +type JobResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]JobResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// JobResourceListIterator provides access to a complete listing of JobResource values. +type JobResourceListIterator struct { + i int + page JobResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *JobResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter JobResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter JobResourceListIterator) Response() JobResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter JobResourceListIterator) Value() JobResource { + if !iter.page.NotDone() { + return JobResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the JobResourceListIterator type. +func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator { + return JobResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (jrl JobResourceList) IsEmpty() bool { + return jrl.Value == nil || len(*jrl.Value) == 0 +} + +// jobResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) { + if jrl.NextLink == nil || len(to.String(jrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(jrl.NextLink))) +} + +// JobResourceListPage contains a page of JobResource values. +type JobResourceListPage struct { + fn func(context.Context, JobResourceList) (JobResourceList, error) + jrl JobResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.jrl) + if err != nil { + return err + } + page.jrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *JobResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page JobResourceListPage) NotDone() bool { + return !page.jrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page JobResourceListPage) Response() JobResourceList { + return page.jrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page JobResourceListPage) Values() []JobResource { + if page.jrl.IsEmpty() { + return nil + } + return *page.jrl.Value +} + +// Creates a new instance of the JobResourceListPage type. +func NewJobResourceListPage(getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage { + return JobResourceListPage{fn: getNextPage} +} + +// KEKDetails KEK is encryption key for BEK. +type KEKDetails struct { + // KeyURL - Key is KEK. + KeyURL *string `json:"keyUrl,omitempty"` + // KeyVaultID - Key Vault ID where this Key is stored. + KeyVaultID *string `json:"keyVaultId,omitempty"` + // KeyBackupData - KEK data. + KeyBackupData *string `json:"keyBackupData,omitempty"` +} + +// KeyAndSecretDetails BEK is bitlocker key. +// KEK is encryption key for BEK +// If the VM was encrypted then we will store following details : +// 1. Secret(BEK) - Url + Backup Data + vaultId. +// 2. Key(KEK) - Url + Backup Data + vaultId. +// 3. EncryptionMechanism +// BEK and KEK can potentially have different vault ids. +type KeyAndSecretDetails struct { + // KekDetails - KEK is encryption key for BEK. + KekDetails *KEKDetails `json:"kekDetails,omitempty"` + // BekDetails - BEK is bitlocker encryption key. + BekDetails *BEKDetails `json:"bekDetails,omitempty"` + // EncryptionMechanism - Encryption mechanism: None/ SinglePass/ DoublePass + EncryptionMechanism *string `json:"encryptionMechanism,omitempty"` +} + +// LogSchedulePolicy log policy schedule. +type LogSchedulePolicy struct { + // ScheduleFrequencyInMins - Frequency of the log schedule operation of this policy in minutes. + ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"` + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LogSchedulePolicy. +func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) { + lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy + objectMap := make(map[string]interface{}) + if lsp.ScheduleFrequencyInMins != nil { + objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins + } + if lsp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = lsp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return &lsp, true +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return nil, false +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return nil, false +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return nil, false +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LogSchedulePolicy. +func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return &lsp, true +} + +// LongTermRetentionPolicy long term retention policy. +type LongTermRetentionPolicy struct { + // DailySchedule - Daily retention schedule of the protection policy. + DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` + // WeeklySchedule - Weekly retention schedule of the protection policy. + WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` + // MonthlySchedule - Monthly retention schedule of the protection policy. + MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` + // YearlySchedule - Yearly retention schedule of the protection policy. + YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { + ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy + objectMap := make(map[string]interface{}) + if ltrp.DailySchedule != nil { + objectMap["dailySchedule"] = ltrp.DailySchedule + } + if ltrp.WeeklySchedule != nil { + objectMap["weeklySchedule"] = ltrp.WeeklySchedule + } + if ltrp.MonthlySchedule != nil { + objectMap["monthlySchedule"] = ltrp.MonthlySchedule + } + if ltrp.YearlySchedule != nil { + objectMap["yearlySchedule"] = ltrp.YearlySchedule + } + if ltrp.RetentionPolicyType != "" { + objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return <rp, true +} + +// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return nil, false +} + +// AsRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { + return nil, false +} + +// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { + return <rp, true +} + +// LongTermSchedulePolicy long term policy schedule. +type LongTermSchedulePolicy struct { + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { + ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy + objectMap := make(map[string]interface{}) + if ltsp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return nil, false +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return <sp, true +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return nil, false +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return nil, false +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return <sp, true +} + +// MabContainer container with items backed up using MAB backup engine. +type MabContainer struct { + // CanReRegister - Can the container be registered one more time. + CanReRegister *bool `json:"canReRegister,omitempty"` + // ContainerID - ContainerID represents the container. + ContainerID *int64 `json:"containerId,omitempty"` + // ProtectedItemCount - Number of items backed up in this container. + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + // AgentVersion - Agent version of this container. + AgentVersion *string `json:"agentVersion,omitempty"` + // ExtendedInfo - Additional information for this container + ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` + // MabContainerHealthDetails - Health details on this mab container. + MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"` + // ContainerHealthState - Health state of mab container. + ContainerHealthState *string `json:"containerHealthState,omitempty"` + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabContainer. +func (mc MabContainer) MarshalJSON() ([]byte, error) { + mc.ContainerType = ContainerTypeWindows1 + objectMap := make(map[string]interface{}) + if mc.CanReRegister != nil { + objectMap["canReRegister"] = mc.CanReRegister + } + if mc.ContainerID != nil { + objectMap["containerId"] = mc.ContainerID + } + if mc.ProtectedItemCount != nil { + objectMap["protectedItemCount"] = mc.ProtectedItemCount + } + if mc.AgentVersion != nil { + objectMap["agentVersion"] = mc.AgentVersion + } + if mc.ExtendedInfo != nil { + objectMap["extendedInfo"] = mc.ExtendedInfo + } + if mc.MabContainerHealthDetails != nil { + objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails + } + if mc.ContainerHealthState != nil { + objectMap["containerHealthState"] = mc.ContainerHealthState + } + if mc.FriendlyName != nil { + objectMap["friendlyName"] = mc.FriendlyName + } + if mc.BackupManagementType != "" { + objectMap["backupManagementType"] = mc.BackupManagementType + } + if mc.RegistrationStatus != nil { + objectMap["registrationStatus"] = mc.RegistrationStatus + } + if mc.HealthStatus != nil { + objectMap["healthStatus"] = mc.HealthStatus + } + if mc.ContainerType != "" { + objectMap["containerType"] = mc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { + return &mc, true +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return nil, false +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &mc, true +} + +// MabContainerExtendedInfo additional information of the container. +type MabContainerExtendedInfo struct { + // LastRefreshedAt - Time stamp when this container was refreshed. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` + // BackupItemType - Type of backup items associated with this container. Possible values include: 'ItemTypeInvalid', 'ItemTypeVM', 'ItemTypeFileFolder', 'ItemTypeAzureSQLDb', 'ItemTypeSQLDB', 'ItemTypeExchange', 'ItemTypeSharepoint', 'ItemTypeVMwareVM', 'ItemTypeSystemState', 'ItemTypeClient', 'ItemTypeGenericDataSource', 'ItemTypeSQLDataBase', 'ItemTypeAzureFileShare', 'ItemTypeSAPHanaDatabase', 'ItemTypeSAPAseDatabase' + BackupItemType ItemType `json:"backupItemType,omitempty"` + // BackupItems - List of backup items associated with this container. + BackupItems *[]string `json:"backupItems,omitempty"` + // PolicyName - Backup policy associated with this container. + PolicyName *string `json:"policyName,omitempty"` + // LastBackupStatus - Latest backup status of this container. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` +} + +// MABContainerHealthDetails MAB workload-specific Health Details. +type MABContainerHealthDetails struct { + // Code - Health Code + Code *int32 `json:"code,omitempty"` + // Title - Health Title + Title *string `json:"title,omitempty"` + // Message - Health Message + Message *string `json:"message,omitempty"` + // Recommendations - Health Recommended Actions + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// MabErrorInfo MAB workload-specific error information. +type MabErrorInfo struct { + // ErrorString - READ-ONLY; Localized error string. + ErrorString *string `json:"errorString,omitempty"` + // Recommendations - READ-ONLY; List of localized recommendations. + Recommendations *[]string `json:"recommendations,omitempty"` +} + +// MabFileFolderProtectedItem MAB workload-specific backup item. +type MabFileFolderProtectedItem struct { + // FriendlyName - Friendly name of this backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ComputerName - Name of the computer associated with this backup item. + ComputerName *string `json:"computerName,omitempty"` + // LastBackupStatus - Status of last backup operation. + LastBackupStatus *string `json:"lastBackupStatus,omitempty"` + // LastBackupTime - Timestamp of the last backup operation on this backup item. + LastBackupTime *date.Time `json:"lastBackupTime,omitempty"` + // ProtectionState - Protected, ProtectionStopped, IRPending or ProtectionError + ProtectionState *string `json:"protectionState,omitempty"` + // DeferredDeleteSyncTimeInUTC - Sync time for deferred deletion in UTC + DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"` + // ExtendedInfo - Additional information with this backup item. + ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { + mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem + objectMap := make(map[string]interface{}) + if mffpi.FriendlyName != nil { + objectMap["friendlyName"] = mffpi.FriendlyName + } + if mffpi.ComputerName != nil { + objectMap["computerName"] = mffpi.ComputerName + } + if mffpi.LastBackupStatus != nil { + objectMap["lastBackupStatus"] = mffpi.LastBackupStatus + } + if mffpi.LastBackupTime != nil { + objectMap["lastBackupTime"] = mffpi.LastBackupTime + } + if mffpi.ProtectionState != nil { + objectMap["protectionState"] = mffpi.ProtectionState + } + if mffpi.DeferredDeleteSyncTimeInUTC != nil { + objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC + } + if mffpi.ExtendedInfo != nil { + objectMap["extendedInfo"] = mffpi.ExtendedInfo + } + if mffpi.BackupManagementType != "" { + objectMap["backupManagementType"] = mffpi.BackupManagementType + } + if mffpi.WorkloadType != "" { + objectMap["workloadType"] = mffpi.WorkloadType + } + if mffpi.ContainerName != nil { + objectMap["containerName"] = mffpi.ContainerName + } + if mffpi.SourceResourceID != nil { + objectMap["sourceResourceId"] = mffpi.SourceResourceID + } + if mffpi.PolicyID != nil { + objectMap["policyId"] = mffpi.PolicyID + } + if mffpi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint + } + if mffpi.BackupSetName != nil { + objectMap["backupSetName"] = mffpi.BackupSetName + } + if mffpi.CreateMode != "" { + objectMap["createMode"] = mffpi.CreateMode + } + if mffpi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC + } + if mffpi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete + } + if mffpi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining + } + if mffpi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming + } + if mffpi.IsRehydrate != nil { + objectMap["isRehydrate"] = mffpi.IsRehydrate + } + if mffpi.ProtectedItemType != "" { + objectMap["protectedItemType"] = mffpi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return &mffpi, true +} + +// AsProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return nil, false +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &mffpi, true +} + +// MabFileFolderProtectedItemExtendedInfo additional information on the backed up item. +type MabFileFolderProtectedItemExtendedInfo struct { + // LastRefreshedAt - Last time when the agent data synced to service. + LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` + // OldestRecoveryPoint - The oldest backup copy available. + OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` + // RecoveryPointCount - Number of backup copies associated with the backup item. + RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` +} + +// MabJob MAB workload-specific job. +type MabJob struct { + // Duration - Time taken by job to run. + Duration *string `json:"duration,omitempty"` + // ActionsInfo - The state/actions applicable on jobs like cancel/retry. + ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` + // MabServerName - Name of server protecting the DS. + MabServerName *string `json:"mabServerName,omitempty"` + // MabServerType - Server type of MAB container. Possible values include: 'MabServerTypeInvalid', 'MabServerTypeUnknown', 'MabServerTypeIaasVMContainer', 'MabServerTypeIaasVMServiceContainer', 'MabServerTypeDPMContainer', 'MabServerTypeAzureBackupServerContainer', 'MabServerTypeMABContainer', 'MabServerTypeCluster', 'MabServerTypeAzureSQLContainer', 'MabServerTypeWindows', 'MabServerTypeVCenter', 'MabServerTypeVMAppContainer', 'MabServerTypeSQLAGWorkLoadContainer', 'MabServerTypeStorageContainer', 'MabServerTypeGenericContainer' + MabServerType MabServerType `json:"mabServerType,omitempty"` + // WorkloadType - Workload type of backup item. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` + // ErrorDetails - The errors. + ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"` + // ExtendedInfo - Additional information on the job. + ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` + // EntityFriendlyName - Friendly name of the entity on which the current job is executing. + EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` + // BackupManagementType - Backup management type to execute the current job. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // Operation - The operation name. + Operation *string `json:"operation,omitempty"` + // Status - Job status. + Status *string `json:"status,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // ActivityID - ActivityId of job. + ActivityID *string `json:"activityId,omitempty"` + // JobType - Possible values include: 'JobTypeJob', 'JobTypeAzureIaaSVMJob', 'JobTypeAzureStorageJob', 'JobTypeAzureWorkloadJob', 'JobTypeDpmJob', 'JobTypeMabJob' + JobType JobType `json:"jobType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabJob. +func (mj MabJob) MarshalJSON() ([]byte, error) { + mj.JobType = JobTypeMabJob + objectMap := make(map[string]interface{}) + if mj.Duration != nil { + objectMap["duration"] = mj.Duration + } + if mj.ActionsInfo != nil { + objectMap["actionsInfo"] = mj.ActionsInfo + } + if mj.MabServerName != nil { + objectMap["mabServerName"] = mj.MabServerName + } + if mj.MabServerType != "" { + objectMap["mabServerType"] = mj.MabServerType + } + if mj.WorkloadType != "" { + objectMap["workloadType"] = mj.WorkloadType + } + if mj.ErrorDetails != nil { + objectMap["errorDetails"] = mj.ErrorDetails + } + if mj.ExtendedInfo != nil { + objectMap["extendedInfo"] = mj.ExtendedInfo + } + if mj.EntityFriendlyName != nil { + objectMap["entityFriendlyName"] = mj.EntityFriendlyName + } + if mj.BackupManagementType != "" { + objectMap["backupManagementType"] = mj.BackupManagementType + } + if mj.Operation != nil { + objectMap["operation"] = mj.Operation + } + if mj.Status != nil { + objectMap["status"] = mj.Status + } + if mj.StartTime != nil { + objectMap["startTime"] = mj.StartTime + } + if mj.EndTime != nil { + objectMap["endTime"] = mj.EndTime + } + if mj.ActivityID != nil { + objectMap["activityId"] = mj.ActivityID + } + if mj.JobType != "" { + objectMap["jobType"] = mj.JobType + } + return json.Marshal(objectMap) +} + +// AsAzureIaaSVMJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsAzureStorageJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) { + return nil, false +} + +// AsAzureWorkloadJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) { + return nil, false +} + +// AsDpmJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsMabJob() (*MabJob, bool) { + return &mj, true +} + +// AsJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsJob() (*Job, bool) { + return nil, false +} + +// AsBasicJob is the BasicJob implementation for MabJob. +func (mj MabJob) AsBasicJob() (BasicJob, bool) { + return &mj, true +} + +// MabJobExtendedInfo additional information for the MAB workload-specific job. +type MabJobExtendedInfo struct { + // TasksList - List of tasks for this job. + TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` + // PropertyBag - The job properties. + PropertyBag map[string]*string `json:"propertyBag"` + // DynamicErrorMessage - Non localized error message specific to this job. + DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabJobExtendedInfo. +func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mjei.TasksList != nil { + objectMap["tasksList"] = mjei.TasksList + } + if mjei.PropertyBag != nil { + objectMap["propertyBag"] = mjei.PropertyBag + } + if mjei.DynamicErrorMessage != nil { + objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage + } + return json.Marshal(objectMap) +} + +// MabJobTaskDetails MAB workload-specific job task details. +type MabJobTaskDetails struct { + // TaskID - The task display name. + TaskID *string `json:"taskId,omitempty"` + // StartTime - The start time. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time. + EndTime *date.Time `json:"endTime,omitempty"` + // Duration - Time elapsed for task. + Duration *string `json:"duration,omitempty"` + // Status - The status. + Status *string `json:"status,omitempty"` +} + +// MabProtectionPolicy mab container-specific backup policy. +type MabProtectionPolicy struct { + // SchedulePolicy - Backup schedule of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy details. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabProtectionPolicy. +func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) { + mpp.BackupManagementType = BackupManagementTypeMAB + objectMap := make(map[string]interface{}) + objectMap["schedulePolicy"] = mpp.SchedulePolicy + objectMap["retentionPolicy"] = mpp.RetentionPolicy + if mpp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount + } + if mpp.BackupManagementType != "" { + objectMap["backupManagementType"] = mpp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return &mpp, true +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return nil, false +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &mpp, true +} + +// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct. +func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + mpp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + mpp.RetentionPolicy = retentionPolicy + } + case "protectedItemsCount": + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*v, &protectedItemsCount) + if err != nil { + return err + } + mpp.ProtectedItemsCount = &protectedItemsCount + } + case "backupManagementType": + if v != nil { + var backupManagementType ManagementTypeBasicProtectionPolicy + err = json.Unmarshal(*v, &backupManagementType) + if err != nil { + return err + } + mpp.BackupManagementType = backupManagementType + } + } + } + + return nil +} + +// ManagementUsage backup management usages of a vault. +type ManagementUsage struct { + // Unit - Unit of the usage. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' + Unit UsagesUnit `json:"unit,omitempty"` + // QuotaPeriod - Quota period of usage. + QuotaPeriod *string `json:"quotaPeriod,omitempty"` + // NextResetTime - Next reset time of usage. + NextResetTime *date.Time `json:"nextResetTime,omitempty"` + // CurrentValue - Current value of usage. + CurrentValue *int64 `json:"currentValue,omitempty"` + // Limit - Limit of usage. + Limit *int64 `json:"limit,omitempty"` + // Name - Name of usage. + Name *NameInfo `json:"name,omitempty"` +} + +// ManagementUsageList backup management usage for vault. +type ManagementUsageList struct { + autorest.Response `json:"-"` + // Value - The list of backup management usages for the given vault. + Value *[]ManagementUsage `json:"value,omitempty"` +} + +// MonthlyRetentionSchedule monthly retention schedule. +type MonthlyRetentionSchedule struct { + // RetentionScheduleFormatType - Retention schedule format type for monthly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' + RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` + // RetentionScheduleDaily - Daily retention format for monthly retention policy. + RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` + // RetentionScheduleWeekly - Weekly retention format for monthly retention policy. + RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} + +// NameInfo the name of usage. +type NameInfo struct { + // Value - Value of usage. + Value *string `json:"value,omitempty"` + // LocalizedValue - Localized value of usage. + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// OperationResultInfo operation result info. +type OperationResultInfo struct { + // JobList - List of jobs created by this operation. + JobList *[]string `json:"jobList,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationResultInfo. +func (ori OperationResultInfo) MarshalJSON() ([]byte, error) { + ori.ObjectType = ObjectTypeOperationResultInfo + objectMap := make(map[string]interface{}) + if ori.JobList != nil { + objectMap["jobList"] = ori.JobList + } + if ori.ObjectType != "" { + objectMap["objectType"] = ori.ObjectType + } + return json.Marshal(objectMap) +} + +// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { + return &ori, true +} + +// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { + return nil, false +} + +// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { + return &ori, true +} + +// BasicOperationResultInfoBase base class for operation result info. +type BasicOperationResultInfoBase interface { + AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) + AsOperationResultInfo() (*OperationResultInfo, bool) + AsOperationResultInfoBase() (*OperationResultInfoBase, bool) +} + +// OperationResultInfoBase base class for operation result info. +type OperationResultInfoBase struct { + // ObjectType - Possible values include: 'ObjectTypeOperationResultInfoBase', 'ObjectTypeExportJobsOperationResultInfo', 'ObjectTypeOperationResultInfo' + ObjectType ObjectType `json:"objectType,omitempty"` +} + +func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeExportJobsOperationResultInfo): + var ejori ExportJobsOperationResultInfo + err := json.Unmarshal(body, &ejori) + return ejori, err + case string(ObjectTypeOperationResultInfo): + var ori OperationResultInfo + err := json.Unmarshal(body, &ori) + return ori, err + default: + var orib OperationResultInfoBase + err := json.Unmarshal(body, &orib) + return orib, err + } +} +func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oribArray := make([]BasicOperationResultInfoBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage) + if err != nil { + return nil, err + } + oribArray[index] = orib + } + return oribArray, nil +} + +// MarshalJSON is the custom marshaler for OperationResultInfoBase. +func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) { + orib.ObjectType = ObjectTypeOperationResultInfoBase + objectMap := make(map[string]interface{}) + if orib.ObjectType != "" { + objectMap["objectType"] = orib.ObjectType + } + return json.Marshal(objectMap) +} + +// AsExportJobsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfo is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) { + return &orib, true +} + +// AsBasicOperationResultInfoBase is the BasicOperationResultInfoBase implementation for OperationResultInfoBase. +func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) { + return &orib, true +} + +// OperationResultInfoBaseResource base class for operation result info. +type OperationResultInfoBaseResource struct { + autorest.Response `json:"-"` + // Operation - OperationResultInfoBaseResource operation + Operation BasicOperationResultInfoBase `json:"operation,omitempty"` + // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' + StatusCode HTTPStatusCode `json:"statusCode,omitempty"` + // Headers - HTTP headers associated with this operation. + Headers map[string][]string `json:"headers"` +} + +// MarshalJSON is the custom marshaler for OperationResultInfoBaseResource. +func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["operation"] = oribr.Operation + if oribr.StatusCode != "" { + objectMap["statusCode"] = oribr.StatusCode + } + if oribr.Headers != nil { + objectMap["headers"] = oribr.Headers + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct. +func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "operation": + if v != nil { + operation, err := unmarshalBasicOperationResultInfoBase(*v) + if err != nil { + return err + } + oribr.Operation = operation + } + case "statusCode": + if v != nil { + var statusCode HTTPStatusCode + err = json.Unmarshal(*v, &statusCode) + if err != nil { + return err + } + oribr.StatusCode = statusCode + } + case "headers": + if v != nil { + var headers map[string][]string + err = json.Unmarshal(*v, &headers) + if err != nil { + return err + } + oribr.Headers = headers + } + } + } + + return nil +} + +// OperationStatus operation status. +type OperationStatus struct { + autorest.Response `json:"-"` + // ID - ID of the operation. + ID *string `json:"id,omitempty"` + // Name - Name of the operation. + Name *string `json:"name,omitempty"` + // Status - Operation status. Possible values include: 'OperationStatusValuesInvalid', 'OperationStatusValuesInProgress', 'OperationStatusValuesSucceeded', 'OperationStatusValuesFailed', 'OperationStatusValuesCanceled' + Status OperationStatusValues `json:"status,omitempty"` + // StartTime - Operation start time. Format: ISO-8601. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - Operation end time. Format: ISO-8601. + EndTime *date.Time `json:"endTime,omitempty"` + // Error - Error information related to this operation. + Error *OperationStatusError `json:"error,omitempty"` + // Properties - Additional information associated with this operation. + Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. +func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + osVar.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + osVar.Name = &name + } + case "status": + if v != nil { + var status OperationStatusValues + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + osVar.Status = status + } + case "startTime": + if v != nil { + var startTime date.Time + err = json.Unmarshal(*v, &startTime) + if err != nil { + return err + } + osVar.StartTime = &startTime + } + case "endTime": + if v != nil { + var endTime date.Time + err = json.Unmarshal(*v, &endTime) + if err != nil { + return err + } + osVar.EndTime = &endTime + } + case "error": + if v != nil { + var errorVar OperationStatusError + err = json.Unmarshal(*v, &errorVar) + if err != nil { + return err + } + osVar.Error = &errorVar + } + case "properties": + if v != nil { + properties, err := unmarshalBasicOperationStatusExtendedInfo(*v) + if err != nil { + return err + } + osVar.Properties = properties + } + } + } + + return nil +} + +// OperationStatusError error information associated with operation status call. +type OperationStatusError struct { + // Code - Error code of the operation failure. + Code *string `json:"code,omitempty"` + // Message - Error message displayed if the operation failure. + Message *string `json:"message,omitempty"` +} + +// BasicOperationStatusExtendedInfo base class for additional information of operation status. +type BasicOperationStatusExtendedInfo interface { + AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) + AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) + AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) + AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) +} + +// OperationStatusExtendedInfo base class for additional information of operation status. +type OperationStatusExtendedInfo struct { + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeOperationStatusJobExtendedInfo): + var osjei OperationStatusJobExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusJobsExtendedInfo): + var osjei OperationStatusJobsExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): + var ospiei OperationStatusProvisionILRExtendedInfo + err := json.Unmarshal(body, &ospiei) + return ospiei, err + default: + var osei OperationStatusExtendedInfo + err := json.Unmarshal(body, &osei) + return osei, err + } +} +func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage) + if err != nil { + return nil, err + } + oseiArray[index] = osei + } + return oseiArray, nil +} + +// MarshalJSON is the custom marshaler for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) { + osei.ObjectType = ObjectTypeOperationStatusExtendedInfo + objectMap := make(map[string]interface{}) + if osei.ObjectType != "" { + objectMap["objectType"] = osei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return &osei, true +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusExtendedInfo. +func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osei, true +} + +// OperationStatusJobExtendedInfo operation status job extended info. +type OperationStatusJobExtendedInfo struct { + // JobID - ID of the job created for this protected item. + JobID *string `json:"jobId,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo + objectMap := make(map[string]interface{}) + if osjei.JobID != nil { + objectMap["jobId"] = osjei.JobID + } + if osjei.ObjectType != "" { + objectMap["objectType"] = osjei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return &osjei, true +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osjei, true +} + +// OperationStatusJobsExtendedInfo operation status extended info for list of jobs. +type OperationStatusJobsExtendedInfo struct { + // JobIds - IDs of the jobs created for the protected item. + JobIds *[]string `json:"jobIds,omitempty"` + // FailedJobsError - Stores all the failed jobs along with the corresponding error codes. + FailedJobsError map[string]*string `json:"failedJobsError"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo + objectMap := make(map[string]interface{}) + if osjei.JobIds != nil { + objectMap["jobIds"] = osjei.JobIds + } + if osjei.FailedJobsError != nil { + objectMap["failedJobsError"] = osjei.FailedJobsError + } + if osjei.ObjectType != "" { + objectMap["objectType"] = osjei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return &osjei, true +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &osjei, true +} + +// OperationStatusProvisionILRExtendedInfo operation status extended info for ILR provision action. +type OperationStatusProvisionILRExtendedInfo struct { + // RecoveryTarget - Target details for file / folder restore. + RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeOperationStatusExtendedInfo', 'ObjectTypeOperationStatusJobExtendedInfo', 'ObjectTypeOperationStatusJobsExtendedInfo', 'ObjectTypeOperationStatusProvisionILRExtendedInfo' + ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { + ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo + objectMap := make(map[string]interface{}) + if ospiei.RecoveryTarget != nil { + objectMap["recoveryTarget"] = ospiei.RecoveryTarget + } + if ospiei.ObjectType != "" { + objectMap["objectType"] = ospiei.ObjectType + } + return json.Marshal(objectMap) +} + +// AsOperationStatusJobExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return &ospiei, true +} + +// AsOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) { + return nil, false +} + +// AsBasicOperationStatusExtendedInfo is the BasicOperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) { + return &ospiei, true +} + +// OperationWorkerResponse this is the base class for operation result responses. +type OperationWorkerResponse struct { + // StatusCode - HTTP Status Code of the operation. Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported' + StatusCode HTTPStatusCode `json:"statusCode,omitempty"` + // Headers - HTTP headers associated with this operation. + Headers map[string][]string `json:"headers"` +} + +// MarshalJSON is the custom marshaler for OperationWorkerResponse. +func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if owr.StatusCode != "" { + objectMap["statusCode"] = owr.StatusCode + } + if owr.Headers != nil { + objectMap["headers"] = owr.Headers + } + return json.Marshal(objectMap) +} + +// PointInTimeRange provides details for log ranges +type PointInTimeRange struct { + // StartTime - Start time of the time range for log recovery. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - End time of the time range for log recovery. + EndTime *date.Time `json:"endTime,omitempty"` +} + +// PreBackupValidation pre-backup validation for Azure VM Workload provider. +type PreBackupValidation struct { + // Status - Status of protectable item, i.e. InProgress,Succeeded,Failed. Possible values include: 'InquiryStatusInvalid', 'InquiryStatusSuccess', 'InquiryStatusFailed' + Status InquiryStatus `json:"status,omitempty"` + // Code - Error code of protectable item + Code *string `json:"code,omitempty"` + // Message - Message corresponding to the error code for the protectable item + Message *string `json:"message,omitempty"` +} + +// PreValidateEnableBackupRequest contract to validate if backup can be enabled on the given resource in a +// given vault and given configuration. +// It will validate followings +// 1. Vault capacity +// 2. VM is already protected +// 3. Any VM related configuration passed in properties. +type PreValidateEnableBackupRequest struct { + // ResourceType - ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + ResourceType DataSourceType `json:"resourceType,omitempty"` + // ResourceID - ARM Virtual Machine Id + ResourceID *string `json:"resourceId,omitempty"` + // VaultID - ARM id of the Recovery Services Vault + VaultID *string `json:"vaultId,omitempty"` + // Properties - Configuration of VM if any needs to be validated like OS type etc + Properties *string `json:"properties,omitempty"` +} + +// PreValidateEnableBackupResponse response contract for enable backup validation request +type PreValidateEnableBackupResponse struct { + autorest.Response `json:"-"` + // Status - Validation Status. Possible values include: 'ValidationStatusInvalid', 'ValidationStatusSucceeded', 'ValidationStatusFailed' + Status ValidationStatus `json:"status,omitempty"` + // ErrorCode - Response error code + ErrorCode *string `json:"errorCode,omitempty"` + // ErrorMessage - Response error message + ErrorMessage *string `json:"errorMessage,omitempty"` + // Recommendation - Recommended action for user + Recommendation *string `json:"recommendation,omitempty"` + // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required + // for portal + ContainerName *string `json:"containerName,omitempty"` + // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;rgname;vmname. This is required for portal + ProtectedItemName *string `json:"protectedItemName,omitempty"` +} + +// BasicProtectableContainer protectable Container Class. +type BasicProtectableContainer interface { + AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) + AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) + AsProtectableContainer() (*ProtectableContainer, bool) +} + +// ProtectableContainer protectable Container Class. +type ProtectableContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerID - Fabric Id of the container such as ARM Id. + ContainerID *string `json:"containerId,omitempty"` + // ProtectableContainerType - Possible values include: 'ProtectableContainerTypeProtectableContainer', 'ProtectableContainerTypeStorageContainer', 'ProtectableContainerTypeVMAppContainer' + ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"` +} + +func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableContainerType"] { + case string(ProtectableContainerTypeStorageContainer): + var aspc AzureStorageProtectableContainer + err := json.Unmarshal(body, &aspc) + return aspc, err + case string(ProtectableContainerTypeVMAppContainer): + var avacpc AzureVMAppContainerProtectableContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + default: + var pc ProtectableContainer + err := json.Unmarshal(body, &pc) + return pc, err + } +} +func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pcArray := make([]BasicProtectableContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pc, err := unmarshalBasicProtectableContainer(*rawMessage) + if err != nil { + return nil, err + } + pcArray[index] = pc + } + return pcArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectableContainer. +func (pc ProtectableContainer) MarshalJSON() ([]byte, error) { + pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer + objectMap := make(map[string]interface{}) + if pc.FriendlyName != nil { + objectMap["friendlyName"] = pc.FriendlyName + } + if pc.BackupManagementType != "" { + objectMap["backupManagementType"] = pc.BackupManagementType + } + if pc.HealthStatus != nil { + objectMap["healthStatus"] = pc.HealthStatus + } + if pc.ContainerID != nil { + objectMap["containerId"] = pc.ContainerID + } + if pc.ProtectableContainerType != "" { + objectMap["protectableContainerType"] = pc.ProtectableContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureStorageProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) { + return nil, false +} + +// AsProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) { + return &pc, true +} + +// AsBasicProtectableContainer is the BasicProtectableContainer implementation for ProtectableContainer. +func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) { + return &pc, true +} + +// ProtectableContainerResource protectable Container Class. +type ProtectableContainerResource struct { + // Properties - ProtectableContainerResource properties + Properties BasicProtectableContainer `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectableContainerResource. +func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pcr.Properties + if pcr.Location != nil { + objectMap["location"] = pcr.Location + } + if pcr.Tags != nil { + objectMap["tags"] = pcr.Tags + } + if pcr.ETag != nil { + objectMap["eTag"] = pcr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectableContainerResource struct. +func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectableContainer(*v) + if err != nil { + return err + } + pcr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pcr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pcr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pcr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pcr.ETag = &eTag + } + } + } + + return nil +} + +// ProtectableContainerResourceList list of ProtectableContainer resources +type ProtectableContainerResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectableContainerResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectableContainerResourceListIterator provides access to a complete listing of +// ProtectableContainerResource values. +type ProtectableContainerResourceListIterator struct { + i int + page ProtectableContainerResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectableContainerResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectableContainerResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource { + if !iter.page.NotDone() { + return ProtectableContainerResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectableContainerResourceListIterator type. +func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator { + return ProtectableContainerResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pcrl ProtectableContainerResourceList) IsEmpty() bool { + return pcrl.Value == nil || len(*pcrl.Value) == 0 +} + +// protectableContainerResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pcrl.NextLink))) +} + +// ProtectableContainerResourceListPage contains a page of ProtectableContainerResource values. +type ProtectableContainerResourceListPage struct { + fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error) + pcrl ProtectableContainerResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pcrl) + if err != nil { + return err + } + page.pcrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectableContainerResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectableContainerResourceListPage) NotDone() bool { + return !page.pcrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList { + return page.pcrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource { + if page.pcrl.IsEmpty() { + return nil + } + return *page.pcrl.Value +} + +// Creates a new instance of the ProtectableContainerResourceListPage type. +func NewProtectableContainerResourceListPage(getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage { + return ProtectableContainerResourceListPage{fn: getNextPage} +} + +// BasicProtectedItem base class for backup items. +type BasicProtectedItem interface { + AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) + AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) + AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) + AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) + AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) + AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) + AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) + AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) + AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) + AsDPMProtectedItem() (*DPMProtectedItem, bool) + AsGenericProtectedItem() (*GenericProtectedItem, bool) + AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) + AsProtectedItem() (*ProtectedItem, bool) +} + +// ProtectedItem base class for backup items. +type ProtectedItem struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + WorkloadType DataSourceType `json:"workloadType,omitempty"` + // ContainerName - Unique name of container + ContainerName *string `json:"containerName,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // LastRecoveryPoint - Timestamp when the last (latest) backup copy was created for this backup item. + LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + // BackupSetName - Name of the backup set the backup item belongs to + BackupSetName *string `json:"backupSetName,omitempty"` + // CreateMode - Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Possible values include: 'CreateModeInvalid', 'CreateModeDefault', 'CreateModeRecover' + CreateMode CreateMode `json:"createMode,omitempty"` + // DeferredDeleteTimeInUTC - Time for deferred deletion in UTC + DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"` + // IsScheduledForDeferredDelete - Flag to identify whether the DS is scheduled for deferred delete + IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"` + // DeferredDeleteTimeRemaining - Time remaining before the DS marked for deferred delete is permanently deleted + DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"` + // IsDeferredDeleteScheduleUpcoming - Flag to identify whether the deferred deleted DS is to be purged soon + IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"` + // IsRehydrate - Flag to identify that deferred deleted DS is to be moved into Pause state + IsRehydrate *bool `json:"isRehydrate,omitempty"` + // ProtectedItemType - Possible values include: 'ProtectedItemTypeProtectedItem', 'ProtectedItemTypeAzureFileShareProtectedItem', 'ProtectedItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectedItemTypeMicrosoftComputevirtualMachines', 'ProtectedItemTypeAzureIaaSVMProtectedItem', 'ProtectedItemTypeMicrosoftSqlserversdatabases', 'ProtectedItemTypeAzureVMWorkloadProtectedItem', 'ProtectedItemTypeAzureVMWorkloadSAPAseDatabase', 'ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase', 'ProtectedItemTypeAzureVMWorkloadSQLDatabase', 'ProtectedItemTypeDPMProtectedItem', 'ProtectedItemTypeGenericProtectedItem', 'ProtectedItemTypeMabFileFolderProtectedItem' + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` +} + +func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectedItemType"] { + case string(ProtectedItemTypeAzureFileShareProtectedItem): + var afpi AzureFileshareProtectedItem + err := json.Unmarshal(body, &afpi) + return afpi, err + case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectedItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectedItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectedItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + case string(ProtectedItemTypeAzureIaaSVMProtectedItem): + var aispi AzureIaaSVMProtectedItem + err := json.Unmarshal(body, &aispi) + return aispi, err + case string(ProtectedItemTypeMicrosoftSqlserversdatabases): + var aspi AzureSQLProtectedItem + err := json.Unmarshal(body, &aspi) + return aspi, err + case string(ProtectedItemTypeAzureVMWorkloadProtectedItem): + var avwpi AzureVMWorkloadProtectedItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase): + var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem + err := json.Unmarshal(body, &avwsadpi) + return avwsadpi, err + case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + case string(ProtectedItemTypeDPMProtectedItem): + var dpi DPMProtectedItem + err := json.Unmarshal(body, &dpi) + return dpi, err + case string(ProtectedItemTypeGenericProtectedItem): + var gpi GenericProtectedItem + err := json.Unmarshal(body, &gpi) + return gpi, err + case string(ProtectedItemTypeMabFileFolderProtectedItem): + var mffpi MabFileFolderProtectedItem + err := json.Unmarshal(body, &mffpi) + return mffpi, err + default: + var pi ProtectedItem + err := json.Unmarshal(body, &pi) + return pi, err + } +} +func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + piArray := make([]BasicProtectedItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pi, err := unmarshalBasicProtectedItem(*rawMessage) + if err != nil { + return nil, err + } + piArray[index] = pi + } + return piArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectedItem. +func (pi ProtectedItem) MarshalJSON() ([]byte, error) { + pi.ProtectedItemType = ProtectedItemTypeProtectedItem + objectMap := make(map[string]interface{}) + if pi.BackupManagementType != "" { + objectMap["backupManagementType"] = pi.BackupManagementType + } + if pi.WorkloadType != "" { + objectMap["workloadType"] = pi.WorkloadType + } + if pi.ContainerName != nil { + objectMap["containerName"] = pi.ContainerName + } + if pi.SourceResourceID != nil { + objectMap["sourceResourceId"] = pi.SourceResourceID + } + if pi.PolicyID != nil { + objectMap["policyId"] = pi.PolicyID + } + if pi.LastRecoveryPoint != nil { + objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint + } + if pi.BackupSetName != nil { + objectMap["backupSetName"] = pi.BackupSetName + } + if pi.CreateMode != "" { + objectMap["createMode"] = pi.CreateMode + } + if pi.DeferredDeleteTimeInUTC != nil { + objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC + } + if pi.IsScheduledForDeferredDelete != nil { + objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete + } + if pi.DeferredDeleteTimeRemaining != nil { + objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining + } + if pi.IsDeferredDeleteScheduleUpcoming != nil { + objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming + } + if pi.IsRehydrate != nil { + objectMap["isRehydrate"] = pi.IsRehydrate + } + if pi.ProtectedItemType != "" { + objectMap["protectedItemType"] = pi.ProtectedItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileshareProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureIaaSVMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsGenericProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AsProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) { + return &pi, true +} + +// AsBasicProtectedItem is the BasicProtectedItem implementation for ProtectedItem. +func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) { + return &pi, true +} + +// ProtectedItemQueryObject filters to list backup items. +type ProtectedItemQueryObject struct { + // HealthState - Health State for the backed up item. Possible values include: 'HealthStatePassed', 'HealthStateActionRequired', 'HealthStateActionSuggested', 'HealthStateInvalid' + HealthState HealthState `json:"healthState,omitempty"` + // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ItemType - Type of workload this item represents. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + ItemType DataSourceType `json:"itemType,omitempty"` + // PolicyName - Backup policy name associated with the backup item. + PolicyName *string `json:"policyName,omitempty"` + // ContainerName - Name of the container. + ContainerName *string `json:"containerName,omitempty"` + // BackupEngineName - Backup Engine name + BackupEngineName *string `json:"backupEngineName,omitempty"` + // FriendlyName - Friendly name of protected item + FriendlyName *string `json:"friendlyName,omitempty"` + // FabricName - Name of the fabric. + FabricName *string `json:"fabricName,omitempty"` + // BackupSetName - Name of the backup set. + BackupSetName *string `json:"backupSetName,omitempty"` +} + +// ProtectedItemResource base class for backup items. +type ProtectedItemResource struct { + autorest.Response `json:"-"` + // Properties - ProtectedItemResource properties + Properties BasicProtectedItem `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectedItemResource. +func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pir.Properties + if pir.Location != nil { + objectMap["location"] = pir.Location + } + if pir.Tags != nil { + objectMap["tags"] = pir.Tags + } + if pir.ETag != nil { + objectMap["eTag"] = pir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct. +func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectedItem(*v) + if err != nil { + return err + } + pir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pir.ETag = &eTag + } + } + } + + return nil +} + +// ProtectedItemResourceList list of ProtectedItem resources +type ProtectedItemResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectedItemResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectedItemResourceListIterator provides access to a complete listing of ProtectedItemResource values. +type ProtectedItemResourceListIterator struct { + i int + page ProtectedItemResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectedItemResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectedItemResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource { + if !iter.page.NotDone() { + return ProtectedItemResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectedItemResourceListIterator type. +func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator { + return ProtectedItemResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pirl ProtectedItemResourceList) IsEmpty() bool { + return pirl.Value == nil || len(*pirl.Value) == 0 +} + +// protectedItemResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pirl.NextLink == nil || len(to.String(pirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pirl.NextLink))) +} + +// ProtectedItemResourceListPage contains a page of ProtectedItemResource values. +type ProtectedItemResourceListPage struct { + fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error) + pirl ProtectedItemResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pirl) + if err != nil { + return err + } + page.pirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectedItemResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectedItemResourceListPage) NotDone() bool { + return !page.pirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList { + return page.pirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource { + if page.pirl.IsEmpty() { + return nil + } + return *page.pirl.Value +} + +// Creates a new instance of the ProtectedItemResourceListPage type. +func NewProtectedItemResourceListPage(getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage { + return ProtectedItemResourceListPage{fn: getNextPage} +} + +// BasicProtectionContainer base class for container with backup items. Containers with specific workloads are derived +// from this class. +type BasicProtectionContainer interface { + AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) + AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) + AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) + AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) + AsAzureSQLContainer() (*AzureSQLContainer, bool) + AsAzureStorageContainer() (*AzureStorageContainer, bool) + AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) + AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) + AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) + AsDpmContainer() (*DpmContainer, bool) + AsBasicDpmContainer() (BasicDpmContainer, bool) + AsGenericContainer() (*GenericContainer, bool) + AsIaaSVMContainer() (*IaaSVMContainer, bool) + AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) + AsMabContainer() (*MabContainer, bool) + AsProtectionContainer() (*ProtectionContainer, bool) +} + +// ProtectionContainer base class for container with backup items. Containers with specific workloads are +// derived from this class. +type ProtectionContainer struct { + // FriendlyName - Friendly name of the container. + FriendlyName *string `json:"friendlyName,omitempty"` + // BackupManagementType - Type of backup management for the container. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // RegistrationStatus - Status of registration of the container with the Recovery Services Vault. + RegistrationStatus *string `json:"registrationStatus,omitempty"` + // HealthStatus - Status of health of the container. + HealthStatus *string `json:"healthStatus,omitempty"` + // ContainerType - Possible values include: 'ContainerTypeProtectionContainer', 'ContainerTypeAzureBackupServerContainer1', 'ContainerTypeMicrosoftClassicComputevirtualMachines', 'ContainerTypeMicrosoftComputevirtualMachines', 'ContainerTypeSQLAGWorkLoadContainer1', 'ContainerTypeAzureSQLContainer1', 'ContainerTypeStorageContainer1', 'ContainerTypeVMAppContainer1', 'ContainerTypeAzureWorkloadContainer', 'ContainerTypeDPMContainer1', 'ContainerTypeGenericContainer1', 'ContainerTypeIaaSVMContainer', 'ContainerTypeWindows1' + ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"` +} + +func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["containerType"] { + case string(ContainerTypeAzureBackupServerContainer1): + var absc AzureBackupServerContainer + err := json.Unmarshal(body, &absc) + return absc, err + case string(ContainerTypeMicrosoftClassicComputevirtualMachines): + var aisccvc AzureIaaSClassicComputeVMContainer + err := json.Unmarshal(body, &aisccvc) + return aisccvc, err + case string(ContainerTypeMicrosoftComputevirtualMachines): + var aiscvc AzureIaaSComputeVMContainer + err := json.Unmarshal(body, &aiscvc) + return aiscvc, err + case string(ContainerTypeSQLAGWorkLoadContainer1): + var aswcpc AzureSQLAGWorkloadContainerProtectionContainer + err := json.Unmarshal(body, &aswcpc) + return aswcpc, err + case string(ContainerTypeAzureSQLContainer1): + var asc AzureSQLContainer + err := json.Unmarshal(body, &asc) + return asc, err + case string(ContainerTypeStorageContainer1): + var asc AzureStorageContainer + err := json.Unmarshal(body, &asc) + return asc, err + case string(ContainerTypeVMAppContainer1): + var avacpc AzureVMAppContainerProtectionContainer + err := json.Unmarshal(body, &avacpc) + return avacpc, err + case string(ContainerTypeAzureWorkloadContainer): + var awc AzureWorkloadContainer + err := json.Unmarshal(body, &awc) + return awc, err + case string(ContainerTypeDPMContainer1): + var dc DpmContainer + err := json.Unmarshal(body, &dc) + return dc, err + case string(ContainerTypeGenericContainer1): + var gc GenericContainer + err := json.Unmarshal(body, &gc) + return gc, err + case string(ContainerTypeIaaSVMContainer): + var isc IaaSVMContainer + err := json.Unmarshal(body, &isc) + return isc, err + case string(ContainerTypeWindows1): + var mc MabContainer + err := json.Unmarshal(body, &mc) + return mc, err + default: + var pc ProtectionContainer + err := json.Unmarshal(body, &pc) + return pc, err + } +} +func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pcArray := make([]BasicProtectionContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pc, err := unmarshalBasicProtectionContainer(*rawMessage) + if err != nil { + return nil, err + } + pcArray[index] = pc + } + return pcArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectionContainer. +func (pc ProtectionContainer) MarshalJSON() ([]byte, error) { + pc.ContainerType = ContainerTypeProtectionContainer + objectMap := make(map[string]interface{}) + if pc.FriendlyName != nil { + objectMap["friendlyName"] = pc.FriendlyName + } + if pc.BackupManagementType != "" { + objectMap["backupManagementType"] = pc.BackupManagementType + } + if pc.RegistrationStatus != nil { + objectMap["registrationStatus"] = pc.RegistrationStatus + } + if pc.HealthStatus != nil { + objectMap["healthStatus"] = pc.HealthStatus + } + if pc.ContainerType != "" { + objectMap["containerType"] = pc.ContainerType + } + return json.Marshal(objectMap) +} + +// AsAzureBackupServerContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLAGWorkloadContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsAzureStorageContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) { + return nil, false +} + +// AsAzureVMAppContainerProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) { + return nil, false +} + +// AsAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) { + return nil, false +} + +// AsBasicAzureWorkloadContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) { + return nil, false +} + +// AsDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsBasicDpmContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) { + return nil, false +} + +// AsGenericContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsBasicIaaSVMContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AsProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) { + return &pc, true +} + +// AsBasicProtectionContainer is the BasicProtectionContainer implementation for ProtectionContainer. +func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) { + return &pc, true +} + +// ProtectionContainerResource base class for container with backup items. Containers with specific +// workloads are derived from this class. +type ProtectionContainerResource struct { + autorest.Response `json:"-"` + // Properties - ProtectionContainerResource properties + Properties BasicProtectionContainer `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectionContainerResource. +func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pcr.Properties + if pcr.Location != nil { + objectMap["location"] = pcr.Location + } + if pcr.Tags != nil { + objectMap["tags"] = pcr.Tags + } + if pcr.ETag != nil { + objectMap["eTag"] = pcr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. +func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectionContainer(*v) + if err != nil { + return err + } + pcr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pcr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pcr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pcr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pcr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pcr.ETag = &eTag + } + } + } + + return nil +} + +// ProtectionContainerResourceList list of ProtectionContainer resources +type ProtectionContainerResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectionContainerResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionContainerResourceListIterator provides access to a complete listing of +// ProtectionContainerResource values. +type ProtectionContainerResourceListIterator struct { + i int + page ProtectionContainerResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionContainerResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionContainerResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource { + if !iter.page.NotDone() { + return ProtectionContainerResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionContainerResourceListIterator type. +func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator { + return ProtectionContainerResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pcrl ProtectionContainerResourceList) IsEmpty() bool { + return pcrl.Value == nil || len(*pcrl.Value) == 0 +} + +// protectionContainerResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pcrl.NextLink))) +} + +// ProtectionContainerResourceListPage contains a page of ProtectionContainerResource values. +type ProtectionContainerResourceListPage struct { + fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error) + pcrl ProtectionContainerResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pcrl) + if err != nil { + return err + } + page.pcrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionContainerResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionContainerResourceListPage) NotDone() bool { + return !page.pcrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList { + return page.pcrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource { + if page.pcrl.IsEmpty() { + return nil + } + return *page.pcrl.Value +} + +// Creates a new instance of the ProtectionContainerResourceListPage type. +func NewProtectionContainerResourceListPage(getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage { + return ProtectionContainerResourceListPage{fn: getNextPage} +} + +// BasicProtectionIntent base class for backup ProtectionIntent. +type BasicProtectionIntent interface { + AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) + AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) + AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) + AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) + AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) + AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) + AsProtectionIntent() (*ProtectionIntent, bool) +} + +// ProtectionIntent base class for backup ProtectionIntent. +type ProtectionIntent struct { + // BackupManagementType - Type of backup management for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // SourceResourceID - ARM ID of the resource to be backed up. + SourceResourceID *string `json:"sourceResourceId,omitempty"` + // ItemID - ID of the item which is getting protected, In case of Azure Vm , it is ProtectedItemId + ItemID *string `json:"itemId,omitempty"` + // PolicyID - ID of the backup policy with which this item is backed up. + PolicyID *string `json:"policyId,omitempty"` + // ProtectionState - Backup state of this backup item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectionIntentItemType - Possible values include: 'ProtectionIntentItemTypeProtectionIntent', 'ProtectionIntentItemTypeRecoveryServiceVaultItem', 'ProtectionIntentItemTypeAzureResourceItem', 'ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent', 'ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent' + ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"` +} + +func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectionIntentItemType"] { + case string(ProtectionIntentItemTypeRecoveryServiceVaultItem): + var arsvpi AzureRecoveryServiceVaultProtectionIntent + err := json.Unmarshal(body, &arsvpi) + return arsvpi, err + case string(ProtectionIntentItemTypeAzureResourceItem): + var arpi AzureResourceProtectionIntent + err := json.Unmarshal(body, &arpi) + return arpi, err + case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent): + var awapi AzureWorkloadAutoProtectionIntent + err := json.Unmarshal(body, &awapi) + return awapi, err + case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent): + var awsapi AzureWorkloadSQLAutoProtectionIntent + err := json.Unmarshal(body, &awsapi) + return awsapi, err + default: + var pi ProtectionIntent + err := json.Unmarshal(body, &pi) + return pi, err + } +} +func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + piArray := make([]BasicProtectionIntent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pi, err := unmarshalBasicProtectionIntent(*rawMessage) + if err != nil { + return nil, err + } + piArray[index] = pi + } + return piArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectionIntent. +func (pi ProtectionIntent) MarshalJSON() ([]byte, error) { + pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent + objectMap := make(map[string]interface{}) + if pi.BackupManagementType != "" { + objectMap["backupManagementType"] = pi.BackupManagementType + } + if pi.SourceResourceID != nil { + objectMap["sourceResourceId"] = pi.SourceResourceID + } + if pi.ItemID != nil { + objectMap["itemId"] = pi.ItemID + } + if pi.PolicyID != nil { + objectMap["policyId"] = pi.PolicyID + } + if pi.ProtectionState != "" { + objectMap["protectionState"] = pi.ProtectionState + } + if pi.ProtectionIntentItemType != "" { + objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType + } + return json.Marshal(objectMap) +} + +// AsAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureRecoveryServiceVaultProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) { + return nil, false +} + +// AsAzureResourceProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsBasicAzureWorkloadAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) { + return nil, false +} + +// AsAzureWorkloadSQLAutoProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) { + return nil, false +} + +// AsProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) { + return &pi, true +} + +// AsBasicProtectionIntent is the BasicProtectionIntent implementation for ProtectionIntent. +func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) { + return &pi, true +} + +// ProtectionIntentQueryObject filters to list protection intent. +type ProtectionIntentQueryObject struct { + // BackupManagementType - Backup management type for the backed up item. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // ItemType - Type of workload this item represents. Possible values include: 'IntentItemTypeInvalid', 'IntentItemTypeSQLInstance', 'IntentItemTypeSQLAvailabilityGroupContainer' + ItemType IntentItemType `json:"itemType,omitempty"` + // ParentName - Parent name of the intent + ParentName *string `json:"parentName,omitempty"` + // ItemName - Item name of the intent + ItemName *string `json:"itemName,omitempty"` +} + +// ProtectionIntentResource base class for backup ProtectionIntent. +type ProtectionIntentResource struct { + autorest.Response `json:"-"` + // Properties - ProtectionIntentResource properties + Properties BasicProtectionIntent `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectionIntentResource. +func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = pir.Properties + if pir.Location != nil { + objectMap["location"] = pir.Location + } + if pir.Tags != nil { + objectMap["tags"] = pir.Tags + } + if pir.ETag != nil { + objectMap["eTag"] = pir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionIntentResource struct. +func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectionIntent(*v) + if err != nil { + return err + } + pir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + pir.ETag = &eTag + } + } + } + + return nil +} + +// ProtectionIntentResourceList list of ProtectionIntent resources +type ProtectionIntentResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectionIntentResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionIntentResourceListIterator provides access to a complete listing of ProtectionIntentResource +// values. +type ProtectionIntentResourceListIterator struct { + i int + page ProtectionIntentResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionIntentResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionIntentResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource { + if !iter.page.NotDone() { + return ProtectionIntentResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionIntentResourceListIterator type. +func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator { + return ProtectionIntentResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pirl ProtectionIntentResourceList) IsEmpty() bool { + return pirl.Value == nil || len(*pirl.Value) == 0 +} + +// protectionIntentResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pirl.NextLink == nil || len(to.String(pirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pirl.NextLink))) +} + +// ProtectionIntentResourceListPage contains a page of ProtectionIntentResource values. +type ProtectionIntentResourceListPage struct { + fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error) + pirl ProtectionIntentResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pirl) + if err != nil { + return err + } + page.pirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionIntentResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionIntentResourceListPage) NotDone() bool { + return !page.pirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList { + return page.pirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource { + if page.pirl.IsEmpty() { + return nil + } + return *page.pirl.Value +} + +// Creates a new instance of the ProtectionIntentResourceListPage type. +func NewProtectionIntentResourceListPage(getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage { + return ProtectionIntentResourceListPage{fn: getNextPage} +} + +// BasicProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this class. +type BasicProtectionPolicy interface { + AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) + AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) + AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) + AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) + AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) + AsMabProtectionPolicy() (*MabProtectionPolicy, bool) + AsProtectionPolicy() (*ProtectionPolicy, bool) +} + +// ProtectionPolicy base class for backup policy. Workload-specific backup policies are derived from this +// class. +type ProtectionPolicy struct { + // ProtectedItemsCount - Number of items associated with this policy. + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + // BackupManagementType - Possible values include: 'BackupManagementTypeProtectionPolicy', 'BackupManagementTypeAzureWorkload', 'BackupManagementTypeAzureStorage', 'BackupManagementTypeAzureIaasVM', 'BackupManagementTypeAzureSQL', 'BackupManagementTypeGenericProtectionPolicy', 'BackupManagementTypeMAB' + BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"` +} + +func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["backupManagementType"] { + case string(BackupManagementTypeAzureWorkload): + var avwpp AzureVMWorkloadProtectionPolicy + err := json.Unmarshal(body, &avwpp) + return avwpp, err + case string(BackupManagementTypeAzureStorage): + var afspp AzureFileShareProtectionPolicy + err := json.Unmarshal(body, &afspp) + return afspp, err + case string(BackupManagementTypeAzureIaasVM): + var aispp AzureIaaSVMProtectionPolicy + err := json.Unmarshal(body, &aispp) + return aispp, err + case string(BackupManagementTypeAzureSQL): + var aspp AzureSQLProtectionPolicy + err := json.Unmarshal(body, &aspp) + return aspp, err + case string(BackupManagementTypeGenericProtectionPolicy): + var gpp GenericProtectionPolicy + err := json.Unmarshal(body, &gpp) + return gpp, err + case string(BackupManagementTypeMAB): + var mpp MabProtectionPolicy + err := json.Unmarshal(body, &mpp) + return mpp, err + default: + var pp ProtectionPolicy + err := json.Unmarshal(body, &pp) + return pp, err + } +} +func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ppArray := make([]BasicProtectionPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pp, err := unmarshalBasicProtectionPolicy(*rawMessage) + if err != nil { + return nil, err + } + ppArray[index] = pp + } + return ppArray, nil +} + +// MarshalJSON is the custom marshaler for ProtectionPolicy. +func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) { + pp.BackupManagementType = BackupManagementTypeProtectionPolicy + objectMap := make(map[string]interface{}) + if pp.ProtectedItemsCount != nil { + objectMap["protectedItemsCount"] = pp.ProtectedItemsCount + } + if pp.BackupManagementType != "" { + objectMap["backupManagementType"] = pp.BackupManagementType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) { + return nil, false +} + +// AsAzureFileShareProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsGenericProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// AsProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) { + return &pp, true +} + +// AsBasicProtectionPolicy is the BasicProtectionPolicy implementation for ProtectionPolicy. +func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) { + return &pp, true +} + +// ProtectionPolicyQueryObject filters the list backup policies API. +type ProtectionPolicyQueryObject struct { + // BackupManagementType - Backup management type for the backup policy. Possible values include: 'ManagementTypeInvalid', 'ManagementTypeAzureIaasVM', 'ManagementTypeMAB', 'ManagementTypeDPM', 'ManagementTypeAzureBackupServer', 'ManagementTypeAzureSQL', 'ManagementTypeAzureStorage', 'ManagementTypeAzureWorkload', 'ManagementTypeDefaultBackup' + BackupManagementType ManagementType `json:"backupManagementType,omitempty"` + // FabricName - Fabric name for filter + FabricName *string `json:"fabricName,omitempty"` + // WorkloadType - Workload type for the backup policy. Possible values include: 'WorkloadTypeInvalid', 'WorkloadTypeVM', 'WorkloadTypeFileFolder', 'WorkloadTypeAzureSQLDb', 'WorkloadTypeSQLDB', 'WorkloadTypeExchange', 'WorkloadTypeSharepoint', 'WorkloadTypeVMwareVM', 'WorkloadTypeSystemState', 'WorkloadTypeClient', 'WorkloadTypeGenericDataSource', 'WorkloadTypeSQLDataBase', 'WorkloadTypeAzureFileShare', 'WorkloadTypeSAPHanaDatabase', 'WorkloadTypeSAPAseDatabase' + WorkloadType WorkloadType `json:"workloadType,omitempty"` +} + +// ProtectionPolicyResource base class for backup policy. Workload-specific backup policies are derived +// from this class. +type ProtectionPolicyResource struct { + autorest.Response `json:"-"` + // Properties - ProtectionPolicyResource properties + Properties BasicProtectionPolicy `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProtectionPolicyResource. +func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = ppr.Properties + if ppr.Location != nil { + objectMap["location"] = ppr.Location + } + if ppr.Tags != nil { + objectMap["tags"] = ppr.Tags + } + if ppr.ETag != nil { + objectMap["eTag"] = ppr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct. +func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicProtectionPolicy(*v) + if err != nil { + return err + } + ppr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ppr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ppr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ppr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ppr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ppr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + ppr.ETag = &eTag + } + } + } + + return nil +} + +// ProtectionPolicyResourceList list of ProtectionPolicy resources +type ProtectionPolicyResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]ProtectionPolicyResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ProtectionPolicyResourceListIterator provides access to a complete listing of ProtectionPolicyResource +// values. +type ProtectionPolicyResourceListIterator struct { + i int + page ProtectionPolicyResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ProtectionPolicyResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ProtectionPolicyResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource { + if !iter.page.NotDone() { + return ProtectionPolicyResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ProtectionPolicyResourceListIterator type. +func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator { + return ProtectionPolicyResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pprl ProtectionPolicyResourceList) IsEmpty() bool { + return pprl.Value == nil || len(*pprl.Value) == 0 +} + +// protectionPolicyResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) { + if pprl.NextLink == nil || len(to.String(pprl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pprl.NextLink))) +} + +// ProtectionPolicyResourceListPage contains a page of ProtectionPolicyResource values. +type ProtectionPolicyResourceListPage struct { + fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error) + pprl ProtectionPolicyResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.pprl) + if err != nil { + return err + } + page.pprl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ProtectionPolicyResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ProtectionPolicyResourceListPage) NotDone() bool { + return !page.pprl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList { + return page.pprl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource { + if page.pprl.IsEmpty() { + return nil + } + return *page.pprl.Value +} + +// Creates a new instance of the ProtectionPolicyResourceListPage type. +func NewProtectionPolicyResourceListPage(getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage { + return ProtectionPolicyResourceListPage{fn: getNextPage} +} + +// BasicRecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. +type BasicRecoveryPoint interface { + AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) + AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) + AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) + AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) + AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) + AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) + AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) + AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) + AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) + AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) + AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) + AsRecoveryPoint() (*RecoveryPoint, bool) +} + +// RecoveryPoint base class for backup copies. Workload-specific backup copies are derived from this class. +type RecoveryPoint struct { + // ObjectType - Possible values include: 'ObjectTypeRecoveryPoint', 'ObjectTypeAzureFileShareRecoveryPoint', 'ObjectTypeAzureWorkloadPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSAPHanaRecoveryPoint', 'ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint', 'ObjectTypeAzureWorkloadSQLRecoveryPoint', 'ObjectTypeGenericRecoveryPoint', 'ObjectTypeIaasVMRecoveryPoint' + ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"` +} + +func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareRecoveryPoint): + var afsrp AzureFileShareRecoveryPoint + err := json.Unmarshal(body, &afsrp) + return afsrp, err + case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint): + var awpitrp AzureWorkloadPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awpitrp) + return awpitrp, err + case string(ObjectTypeAzureWorkloadRecoveryPoint): + var awrp AzureWorkloadRecoveryPoint + err := json.Unmarshal(body, &awrp) + return awrp, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint): + var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awshpitrp) + return awshpitrp, err + case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint): + var awshrp AzureWorkloadSAPHanaRecoveryPoint + err := json.Unmarshal(body, &awshrp) + return awshrp, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint): + var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint + err := json.Unmarshal(body, &awspitrp) + return awspitrp, err + case string(ObjectTypeAzureWorkloadSQLRecoveryPoint): + var awsrp AzureWorkloadSQLRecoveryPoint + err := json.Unmarshal(body, &awsrp) + return awsrp, err + case string(ObjectTypeGenericRecoveryPoint): + var grp GenericRecoveryPoint + err := json.Unmarshal(body, &grp) + return grp, err + case string(ObjectTypeIaasVMRecoveryPoint): + var ivrp IaasVMRecoveryPoint + err := json.Unmarshal(body, &ivrp) + return ivrp, err + default: + var rp RecoveryPoint + err := json.Unmarshal(body, &rp) + return rp, err + } +} +func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpArray := make([]BasicRecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rp, err := unmarshalBasicRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + rpArray[index] = rp + } + return rpArray, nil +} + +// MarshalJSON is the custom marshaler for RecoveryPoint. +func (rp RecoveryPoint) MarshalJSON() ([]byte, error) { + rp.ObjectType = ObjectTypeRecoveryPoint + objectMap := make(map[string]interface{}) + if rp.ObjectType != "" { + objectMap["objectType"] = rp.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) { + return nil, false +} + +// AsGenericRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false +} + +// AsRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) { + return &rp, true +} + +// AsBasicRecoveryPoint is the BasicRecoveryPoint implementation for RecoveryPoint. +func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) { + return &rp, true +} + +// RecoveryPointDiskConfiguration disk configuration +type RecoveryPointDiskConfiguration struct { + // NumberOfDisksIncludedInBackup - Number of disks included in backup + NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"` + // NumberOfDisksAttachedToVM - Number of disks attached to the VM + NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"` + // IncludedDiskList - Information of disks included in backup + IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"` + // ExcludedDiskList - Information of disks excluded from backup + ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"` +} + +// RecoveryPointResource base class for backup copies. Workload-specific backup copies are derived from +// this class. +type RecoveryPointResource struct { + autorest.Response `json:"-"` + // Properties - RecoveryPointResource properties + Properties BasicRecoveryPoint `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPointResource. +func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = rpr.Properties + if rpr.Location != nil { + objectMap["location"] = rpr.Location + } + if rpr.Tags != nil { + objectMap["tags"] = rpr.Tags + } + if rpr.ETag != nil { + objectMap["eTag"] = rpr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct. +func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicRecoveryPoint(*v) + if err != nil { + return err + } + rpr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rpr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rpr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rpr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rpr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rpr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + rpr.ETag = &eTag + } + } + } + + return nil +} + +// RecoveryPointResourceList list of RecoveryPoint resources +type RecoveryPointResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]RecoveryPointResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// RecoveryPointResourceListIterator provides access to a complete listing of RecoveryPointResource values. +type RecoveryPointResourceListIterator struct { + i int + page RecoveryPointResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *RecoveryPointResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter RecoveryPointResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource { + if !iter.page.NotDone() { + return RecoveryPointResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the RecoveryPointResourceListIterator type. +func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator { + return RecoveryPointResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (rprl RecoveryPointResourceList) IsEmpty() bool { + return rprl.Value == nil || len(*rprl.Value) == 0 +} + +// recoveryPointResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) { + if rprl.NextLink == nil || len(to.String(rprl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(rprl.NextLink))) +} + +// RecoveryPointResourceListPage contains a page of RecoveryPointResource values. +type RecoveryPointResourceListPage struct { + fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error) + rprl RecoveryPointResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.rprl) + if err != nil { + return err + } + page.rprl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *RecoveryPointResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page RecoveryPointResourceListPage) NotDone() bool { + return !page.rprl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList { + return page.rprl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource { + if page.rprl.IsEmpty() { + return nil + } + return *page.rprl.Value +} + +// Creates a new instance of the RecoveryPointResourceListPage type. +func NewRecoveryPointResourceListPage(getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage { + return RecoveryPointResourceListPage{fn: getNextPage} +} + +// RecoveryPointTierInformation recovery point tier information. +type RecoveryPointTierInformation struct { + // Type - Recovery point tier type. Possible values include: 'RecoveryPointTierTypeInvalid', 'RecoveryPointTierTypeInstantRP', 'RecoveryPointTierTypeHardenedRP' + Type RecoveryPointTierType `json:"type,omitempty"` + // Status - Recovery point tier status. Possible values include: 'RecoveryPointTierStatusInvalid', 'RecoveryPointTierStatusValid', 'RecoveryPointTierStatusDisabled', 'RecoveryPointTierStatusDeleted' + Status RecoveryPointTierStatus `json:"status,omitempty"` +} + +// BasicRequest base class for backup request. Workload-specific backup requests are derived from this class. +type BasicRequest interface { + AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) + AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) + AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) + AsRequest() (*Request, bool) +} + +// Request base class for backup request. Workload-specific backup requests are derived from this class. +type Request struct { + // ObjectType - Possible values include: 'ObjectTypeBackupRequest', 'ObjectTypeAzureFileShareBackupRequest', 'ObjectTypeAzureWorkloadBackupRequest', 'ObjectTypeIaasVMBackupRequest' + ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicRequest(body []byte) (BasicRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareBackupRequest): + var afsbr AzureFileShareBackupRequest + err := json.Unmarshal(body, &afsbr) + return afsbr, err + case string(ObjectTypeAzureWorkloadBackupRequest): + var awbr AzureWorkloadBackupRequest + err := json.Unmarshal(body, &awbr) + return awbr, err + case string(ObjectTypeIaasVMBackupRequest): + var ivbr IaasVMBackupRequest + err := json.Unmarshal(body, &ivbr) + return ivbr, err + default: + var r Request + err := json.Unmarshal(body, &r) + return r, err + } +} +func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rArray := make([]BasicRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + r, err := unmarshalBasicRequest(*rawMessage) + if err != nil { + return nil, err + } + rArray[index] = r + } + return rArray, nil +} + +// MarshalJSON is the custom marshaler for Request. +func (r Request) MarshalJSON() ([]byte, error) { + r.ObjectType = ObjectTypeBackupRequest + objectMap := make(map[string]interface{}) + if r.ObjectType != "" { + objectMap["objectType"] = r.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) { + return nil, false +} + +// AsAzureWorkloadBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) { + return nil, false +} + +// AsIaasVMBackupRequest is the BasicRequest implementation for Request. +func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return nil, false +} + +// AsRequest is the BasicRequest implementation for Request. +func (r Request) AsRequest() (*Request, bool) { + return &r, true +} + +// AsBasicRequest is the BasicRequest implementation for Request. +func (r Request) AsBasicRequest() (BasicRequest, bool) { + return &r, true +} + +// RequestResource base class for backup request. Workload-specific backup requests are derived from this +// class. +type RequestResource struct { + // Properties - BackupRequestResource properties + Properties BasicRequest `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for RequestResource. +func (rr RequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = rr.Properties + if rr.Location != nil { + objectMap["location"] = rr.Location + } + if rr.Tags != nil { + objectMap["tags"] = rr.Tags + } + if rr.ETag != nil { + objectMap["eTag"] = rr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RequestResource struct. +func (rr *RequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicRequest(*v) + if err != nil { + return err + } + rr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + rr.ETag = &eTag + } + } + } + + return nil +} + +// Resource ARM Resource. +type Resource struct { + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + if r.ETag != nil { + objectMap["eTag"] = r.ETag + } + return json.Marshal(objectMap) +} + +// ResourceConfig the resource storage details. +type ResourceConfig struct { + // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageModelType StorageType `json:"storageModelType,omitempty"` + // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageType StorageType `json:"storageType,omitempty"` + // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' + StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` +} + +// ResourceConfigResource the resource storage details. +type ResourceConfigResource struct { + autorest.Response `json:"-"` + // Properties - BackupResourceConfigResource properties + Properties *ResourceConfig `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceConfigResource. +func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rcr.Properties != nil { + objectMap["properties"] = rcr.Properties + } + if rcr.Location != nil { + objectMap["location"] = rcr.Location + } + if rcr.Tags != nil { + objectMap["tags"] = rcr.Tags + } + if rcr.ETag != nil { + objectMap["eTag"] = rcr.ETag + } + return json.Marshal(objectMap) +} + +// ResourceList base for all lists of resources. +type ResourceList struct { + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceVaultConfig backup resource vault config details. +type ResourceVaultConfig struct { + // StorageModelType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageModelType StorageType `json:"storageModelType,omitempty"` + // StorageType - Storage type. Possible values include: 'StorageTypeInvalid', 'StorageTypeGeoRedundant', 'StorageTypeLocallyRedundant' + StorageType StorageType `json:"storageType,omitempty"` + // StorageTypeState - Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked. Possible values include: 'StorageTypeStateInvalid', 'StorageTypeStateLocked', 'StorageTypeStateUnlocked' + StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` + // EnhancedSecurityState - Enabled or Disabled. Possible values include: 'EnhancedSecurityStateInvalid', 'EnhancedSecurityStateEnabled', 'EnhancedSecurityStateDisabled' + EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` + // SoftDeleteFeatureState - Soft Delete feature state. Possible values include: 'SoftDeleteFeatureStateInvalid', 'SoftDeleteFeatureStateEnabled', 'SoftDeleteFeatureStateDisabled' + SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"` +} + +// ResourceVaultConfigResource backup resource vault config details. +type ResourceVaultConfigResource struct { + autorest.Response `json:"-"` + // Properties - BackupResourceVaultConfigResource properties + Properties *ResourceVaultConfig `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceVaultConfigResource. +func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rvcr.Properties != nil { + objectMap["properties"] = rvcr.Properties + } + if rvcr.Location != nil { + objectMap["location"] = rvcr.Location + } + if rvcr.Tags != nil { + objectMap["tags"] = rvcr.Tags + } + if rvcr.ETag != nil { + objectMap["eTag"] = rvcr.ETag + } + return json.Marshal(objectMap) +} + +// RestoreFileSpecs restore file specs like file path, type and target folder path info. +type RestoreFileSpecs struct { + // Path - Source File/Folder path + Path *string `json:"path,omitempty"` + // FileSpecType - Indicates what the Path variable stands for + FileSpecType *string `json:"fileSpecType,omitempty"` + // TargetFolderPath - Destination folder path in target FileShare + TargetFolderPath *string `json:"targetFolderPath,omitempty"` +} + +// BasicRestoreRequest base class for restore request. Workload-specific restore requests are derived from this class. +type BasicRestoreRequest interface { + AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) + AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) + AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) + AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) + AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) + AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) + AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) + AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) + AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) + AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) + AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) + AsRestoreRequest() (*RestoreRequest, bool) +} + +// RestoreRequest base class for restore request. Workload-specific restore requests are derived from this +// class. +type RestoreRequest struct { + // ObjectType - Possible values include: 'ObjectTypeRestoreRequest', 'ObjectTypeAzureFileShareRestoreRequest', 'ObjectTypeAzureWorkloadPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSAPHanaRestoreRequest', 'ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest', 'ObjectTypeAzureWorkloadSQLRestoreRequest', 'ObjectTypeIaasVMRestoreRequest' + ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeAzureFileShareRestoreRequest): + var afsrr AzureFileShareRestoreRequest + err := json.Unmarshal(body, &afsrr) + return afsrr, err + case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest): + var awpitrr AzureWorkloadPointInTimeRestoreRequest + err := json.Unmarshal(body, &awpitrr) + return awpitrr, err + case string(ObjectTypeAzureWorkloadRestoreRequest): + var awrr AzureWorkloadRestoreRequest + err := json.Unmarshal(body, &awrr) + return awrr, err + case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest): + var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest + err := json.Unmarshal(body, &awshpitrr) + return awshpitrr, err + case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest): + var awshrr AzureWorkloadSAPHanaRestoreRequest + err := json.Unmarshal(body, &awshrr) + return awshrr, err + case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest): + var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest + err := json.Unmarshal(body, &awspitrr) + return awspitrr, err + case string(ObjectTypeAzureWorkloadSQLRestoreRequest): + var awsrr AzureWorkloadSQLRestoreRequest + err := json.Unmarshal(body, &awsrr) + return awsrr, err + case string(ObjectTypeIaasVMRestoreRequest): + var ivrr IaasVMRestoreRequest + err := json.Unmarshal(body, &ivrr) + return ivrr, err + default: + var rr RestoreRequest + err := json.Unmarshal(body, &rr) + return rr, err + } +} +func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rrArray := make([]BasicRestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rr, err := unmarshalBasicRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + rrArray[index] = rr + } + return rrArray, nil +} + +// MarshalJSON is the custom marshaler for RestoreRequest. +func (rr RestoreRequest) MarshalJSON() ([]byte, error) { + rr.ObjectType = ObjectTypeRestoreRequest + objectMap := make(map[string]interface{}) + if rr.ObjectType != "" { + objectMap["objectType"] = rr.ObjectType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSAPHanaRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLPointInTimeRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) { + return nil, false +} + +// AsAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsBasicAzureWorkloadSQLRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) { + return nil, false +} + +// AsIaasVMRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return nil, false +} + +// AsRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) { + return &rr, true +} + +// AsBasicRestoreRequest is the BasicRestoreRequest implementation for RestoreRequest. +func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) { + return &rr, true +} + +// RestoreRequestResource base class for restore request. Workload-specific restore requests are derived +// from this class. +type RestoreRequestResource struct { + // Properties - RestoreRequestResource properties + Properties BasicRestoreRequest `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestoreRequestResource. +func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = rrr.Properties + if rrr.Location != nil { + objectMap["location"] = rrr.Location + } + if rrr.Tags != nil { + objectMap["tags"] = rrr.Tags + } + if rrr.ETag != nil { + objectMap["eTag"] = rrr.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct. +func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicRestoreRequest(*v) + if err != nil { + return err + } + rrr.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rrr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rrr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rrr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + rrr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + rrr.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + rrr.ETag = &eTag + } + } + } + + return nil +} + +// RetentionDuration retention duration. +type RetentionDuration struct { + // Count - Count of duration types. Retention duration is obtained by the counting the duration type Count times. + // For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks. + Count *int32 `json:"count,omitempty"` + // DurationType - Retention duration type of retention policy. Possible values include: 'RetentionDurationTypeInvalid', 'RetentionDurationTypeDays', 'RetentionDurationTypeWeeks', 'RetentionDurationTypeMonths', 'RetentionDurationTypeYears' + DurationType RetentionDurationType `json:"durationType,omitempty"` +} + +// BasicRetentionPolicy base class for retention policy. +type BasicRetentionPolicy interface { + AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) + AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) + AsRetentionPolicy() (*RetentionPolicy, bool) +} + +// RetentionPolicy base class for retention policy. +type RetentionPolicy struct { + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` +} + +func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["retentionPolicyType"] { + case string(RetentionPolicyTypeLongTermRetentionPolicy): + var ltrp LongTermRetentionPolicy + err := json.Unmarshal(body, <rp) + return ltrp, err + case string(RetentionPolicyTypeSimpleRetentionPolicy): + var srp SimpleRetentionPolicy + err := json.Unmarshal(body, &srp) + return srp, err + default: + var rp RetentionPolicy + err := json.Unmarshal(body, &rp) + return rp, err + } +} +func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpArray := make([]BasicRetentionPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rp, err := unmarshalBasicRetentionPolicy(*rawMessage) + if err != nil { + return nil, err + } + rpArray[index] = rp + } + return rpArray, nil +} + +// MarshalJSON is the custom marshaler for RetentionPolicy. +func (rp RetentionPolicy) MarshalJSON() ([]byte, error) { + rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy + objectMap := make(map[string]interface{}) + if rp.RetentionPolicyType != "" { + objectMap["retentionPolicyType"] = rp.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return nil, false +} + +// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return nil, false +} + +// AsRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { + return &rp, true +} + +// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for RetentionPolicy. +func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { + return &rp, true +} + +// BasicSchedulePolicy base class for backup schedule. +type BasicSchedulePolicy interface { + AsLogSchedulePolicy() (*LogSchedulePolicy, bool) + AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) + AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) + AsSchedulePolicy() (*SchedulePolicy, bool) +} + +// SchedulePolicy base class for backup schedule. +type SchedulePolicy struct { + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["schedulePolicyType"] { + case string(SchedulePolicyTypeLogSchedulePolicy): + var lsp LogSchedulePolicy + err := json.Unmarshal(body, &lsp) + return lsp, err + case string(SchedulePolicyTypeLongTermSchedulePolicy): + var ltsp LongTermSchedulePolicy + err := json.Unmarshal(body, <sp) + return ltsp, err + case string(SchedulePolicyTypeSimpleSchedulePolicy): + var ssp SimpleSchedulePolicy + err := json.Unmarshal(body, &ssp) + return ssp, err + default: + var sp SchedulePolicy + err := json.Unmarshal(body, &sp) + return sp, err + } +} +func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + spArray := make([]BasicSchedulePolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sp, err := unmarshalBasicSchedulePolicy(*rawMessage) + if err != nil { + return nil, err + } + spArray[index] = sp + } + return spArray, nil +} + +// MarshalJSON is the custom marshaler for SchedulePolicy. +func (sp SchedulePolicy) MarshalJSON() ([]byte, error) { + sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy + objectMap := make(map[string]interface{}) + if sp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = sp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return nil, false +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return nil, false +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return nil, false +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return &sp, true +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SchedulePolicy. +func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return &sp, true +} + +// Settings common settings field for backup management +type Settings struct { + // TimeZone - TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". + TimeZone *string `json:"timeZone,omitempty"` + // Issqlcompression - SQL compression flag + Issqlcompression *bool `json:"issqlcompression,omitempty"` + // IsCompression - Workload compression flag. This has been added so that 'isSqlCompression' + // will be deprecated once clients upgrade to consider this flag. + IsCompression *bool `json:"isCompression,omitempty"` +} + +// SimpleRetentionPolicy simple policy retention. +type SimpleRetentionPolicy struct { + // RetentionDuration - Retention duration of the protection policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicy', 'RetentionPolicyTypeLongTermRetentionPolicy', 'RetentionPolicyTypeSimpleRetentionPolicy' + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { + srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy + objectMap := make(map[string]interface{}) + if srp.RetentionDuration != nil { + objectMap["retentionDuration"] = srp.RetentionDuration + } + if srp.RetentionPolicyType != "" { + objectMap["retentionPolicyType"] = srp.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsLongTermRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return nil, false +} + +// AsSimpleRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return &srp, true +} + +// AsRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) { + return nil, false +} + +// AsBasicRetentionPolicy is the BasicRetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) { + return &srp, true +} + +// SimpleSchedulePolicy simple policy schedule. +type SimpleSchedulePolicy struct { + // ScheduleRunFrequency - Frequency of the schedule operation of this policy. Possible values include: 'ScheduleRunTypeInvalid', 'ScheduleRunTypeDaily', 'ScheduleRunTypeWeekly' + ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` + // ScheduleRunDays - List of days of week this schedule has to be run. + ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` + // ScheduleRunTimes - List of times of day this schedule has to be run. + ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` + // ScheduleWeeklyFrequency - At every number weeks this schedule has to be run. + ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` + // SchedulePolicyType - Possible values include: 'SchedulePolicyTypeSchedulePolicy', 'SchedulePolicyTypeLogSchedulePolicy', 'SchedulePolicyTypeLongTermSchedulePolicy', 'SchedulePolicyTypeSimpleSchedulePolicy' + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { + ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy + objectMap := make(map[string]interface{}) + if ssp.ScheduleRunFrequency != "" { + objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency + } + if ssp.ScheduleRunDays != nil { + objectMap["scheduleRunDays"] = ssp.ScheduleRunDays + } + if ssp.ScheduleRunTimes != nil { + objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes + } + if ssp.ScheduleWeeklyFrequency != nil { + objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency + } + if ssp.SchedulePolicyType != "" { + objectMap["schedulePolicyType"] = ssp.SchedulePolicyType + } + return json.Marshal(objectMap) +} + +// AsLogSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) { + return nil, false +} + +// AsLongTermSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return nil, false +} + +// AsSimpleSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return &ssp, true +} + +// AsSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) { + return nil, false +} + +// AsBasicSchedulePolicy is the BasicSchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) { + return &ssp, true +} + +// SQLDataDirectory sQLDataDirectory info +type SQLDataDirectory struct { + // Type - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' + Type SQLDataDirectoryType `json:"type,omitempty"` + // Path - File path + Path *string `json:"path,omitempty"` + // LogicalName - Logical name of the file + LogicalName *string `json:"logicalName,omitempty"` +} + +// SQLDataDirectoryMapping encapsulates information regarding data directory +type SQLDataDirectoryMapping struct { + // MappingType - Type of data directory mapping. Possible values include: 'SQLDataDirectoryTypeInvalid', 'SQLDataDirectoryTypeData', 'SQLDataDirectoryTypeLog' + MappingType SQLDataDirectoryType `json:"mappingType,omitempty"` + // SourceLogicalName - Restore source logical name path + SourceLogicalName *string `json:"sourceLogicalName,omitempty"` + // SourcePath - Restore source path + SourcePath *string `json:"sourcePath,omitempty"` + // TargetPath - Target path + TargetPath *string `json:"targetPath,omitempty"` +} + +// StatusRequest backupStatus request. +type StatusRequest struct { + // ResourceType - Container Type - VM, SQLPaaS, DPM, AzureFileShare. Possible values include: 'DataSourceTypeInvalid', 'DataSourceTypeVM', 'DataSourceTypeFileFolder', 'DataSourceTypeAzureSQLDb', 'DataSourceTypeSQLDB', 'DataSourceTypeExchange', 'DataSourceTypeSharepoint', 'DataSourceTypeVMwareVM', 'DataSourceTypeSystemState', 'DataSourceTypeClient', 'DataSourceTypeGenericDataSource', 'DataSourceTypeSQLDataBase', 'DataSourceTypeAzureFileShare', 'DataSourceTypeSAPHanaDatabase', 'DataSourceTypeSAPAseDatabase' + ResourceType DataSourceType `json:"resourceType,omitempty"` + // ResourceID - Entire ARM resource id of the resource + ResourceID *string `json:"resourceId,omitempty"` + // PoLogicalName - Protectable Item Logical Name + PoLogicalName *string `json:"poLogicalName,omitempty"` +} + +// StatusResponse backupStatus response. +type StatusResponse struct { + autorest.Response `json:"-"` + // ProtectionStatus - Specifies whether the container is registered or not. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"` + // VaultID - Specifies the arm resource id of the vault + VaultID *string `json:"vaultId,omitempty"` + // FabricName - Specifies the fabric name - Azure or AD. Possible values include: 'FabricNameInvalid', 'FabricNameAzure' + FabricName FabricName `json:"fabricName,omitempty"` + // ContainerName - Specifies the product specific container name. E.g. iaasvmcontainer;iaasvmcontainer;csname;vmname. + ContainerName *string `json:"containerName,omitempty"` + // ProtectedItemName - Specifies the product specific ds name. E.g. vm;iaasvmcontainer;csname;vmname. + ProtectedItemName *string `json:"protectedItemName,omitempty"` + // ErrorCode - ErrorCode in case of intent failed + ErrorCode *string `json:"errorCode,omitempty"` + // ErrorMessage - ErrorMessage in case of intent failed. + ErrorMessage *string `json:"errorMessage,omitempty"` + // PolicyName - Specifies the policy name which is used for protection + PolicyName *string `json:"policyName,omitempty"` + // RegistrationStatus - Container registration status + RegistrationStatus *string `json:"registrationStatus,omitempty"` +} + +// SubProtectionPolicy sub-protection policy which includes schedule and retention +type SubProtectionPolicy struct { + // PolicyType - Type of backup policy type. Possible values include: 'PolicyTypeInvalid', 'PolicyTypeFull', 'PolicyTypeDifferential', 'PolicyTypeLog', 'PolicyTypeCopyOnlyFull' + PolicyType PolicyType `json:"policyType,omitempty"` + // SchedulePolicy - Backup schedule specified as part of backup policy. + SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"` + // RetentionPolicy - Retention policy with the details on backup copy retention ranges. + RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SubProtectionPolicy struct. +func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "policyType": + if v != nil { + var policyType PolicyType + err = json.Unmarshal(*v, &policyType) + if err != nil { + return err + } + spp.PolicyType = policyType + } + case "schedulePolicy": + if v != nil { + schedulePolicy, err := unmarshalBasicSchedulePolicy(*v) + if err != nil { + return err + } + spp.SchedulePolicy = schedulePolicy + } + case "retentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicRetentionPolicy(*v) + if err != nil { + return err + } + spp.RetentionPolicy = retentionPolicy + } + } + } + + return nil +} + +// TargetAFSRestoreInfo target Azure File Share Info. +type TargetAFSRestoreInfo struct { + // Name - File share name + Name *string `json:"name,omitempty"` + // TargetResourceID - Target file share resource ARM ID + TargetResourceID *string `json:"targetResourceId,omitempty"` +} + +// TargetRestoreInfo details about target workload during restore operation. +type TargetRestoreInfo struct { + // OverwriteOption - Can Overwrite if Target DataBase already exists. Possible values include: 'OverwriteOptionsInvalid', 'OverwriteOptionsFailOnConflict', 'OverwriteOptionsOverwrite' + OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"` + // ContainerID - Resource Id name of the container in which Target DataBase resides + ContainerID *string `json:"containerId,omitempty"` + // DatabaseName - Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana + DatabaseName *string `json:"databaseName,omitempty"` +} + +// TokenInformation the token information details. +type TokenInformation struct { + autorest.Response `json:"-"` + // Token - Token value. + Token *string `json:"token,omitempty"` + // ExpiryTimeInUtcTicks - Expiry time of token. + ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"` + // SecurityPIN - Security PIN + SecurityPIN *string `json:"securityPIN,omitempty"` +} + +// ValidateIaasVMRestoreOperationRequest azureRestoreValidation request. +type ValidateIaasVMRestoreOperationRequest struct { + // RestoreRequest - Sets restore request to be validated + RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' + ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) { + vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest + objectMap := make(map[string]interface{}) + objectMap["restoreRequest"] = vivror.RestoreRequest + if vivror.ObjectType != "" { + objectMap["objectType"] = vivror.ObjectType + } + return json.Marshal(objectMap) +} + +// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { + return &vivror, true +} + +// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { + return &vivror, true +} + +// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateIaasVMRestoreOperationRequest. +func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { + return &vivror, true +} + +// UnmarshalJSON is the custom unmarshaler for ValidateIaasVMRestoreOperationRequest struct. +func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "restoreRequest": + if v != nil { + restoreRequest, err := unmarshalBasicRestoreRequest(*v) + if err != nil { + return err + } + vivror.RestoreRequest = restoreRequest + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicValidateOperationRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + vivror.ObjectType = objectType + } + } + } + + return nil +} + +// BasicValidateOperationRequest base class for validate operation request. +type BasicValidateOperationRequest interface { + AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) + AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) + AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) + AsValidateOperationRequest() (*ValidateOperationRequest, bool) +} + +// ValidateOperationRequest base class for validate operation request. +type ValidateOperationRequest struct { + // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' + ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeValidateIaasVMRestoreOperationRequest): + var vivror ValidateIaasVMRestoreOperationRequest + err := json.Unmarshal(body, &vivror) + return vivror, err + case string(ObjectTypeValidateRestoreOperationRequest): + var vror ValidateRestoreOperationRequest + err := json.Unmarshal(body, &vror) + return vror, err + default: + var vor ValidateOperationRequest + err := json.Unmarshal(body, &vor) + return vor, err + } +} +func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + vorArray := make([]BasicValidateOperationRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + vor, err := unmarshalBasicValidateOperationRequest(*rawMessage) + if err != nil { + return nil, err + } + vorArray[index] = vor + } + return vorArray, nil +} + +// MarshalJSON is the custom marshaler for ValidateOperationRequest. +func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) { + vor.ObjectType = ObjectTypeValidateOperationRequest + objectMap := make(map[string]interface{}) + if vor.ObjectType != "" { + objectMap["objectType"] = vor.ObjectType + } + return json.Marshal(objectMap) +} + +// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { + return nil, false +} + +// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { + return nil, false +} + +// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { + return &vor, true +} + +// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateOperationRequest. +func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { + return &vor, true +} + +// ValidateOperationResponse base class for validate operation response. +type ValidateOperationResponse struct { + // ValidationResults - Gets the validation result + ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"` +} + +// ValidateOperationsResponse ... +type ValidateOperationsResponse struct { + autorest.Response `json:"-"` + ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"` +} + +// BasicValidateRestoreOperationRequest azureRestoreValidation request. +type BasicValidateRestoreOperationRequest interface { + AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) + AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) +} + +// ValidateRestoreOperationRequest azureRestoreValidation request. +type ValidateRestoreOperationRequest struct { + // RestoreRequest - Sets restore request to be validated + RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"` + // ObjectType - Possible values include: 'ObjectTypeValidateOperationRequest', 'ObjectTypeValidateIaasVMRestoreOperationRequest', 'ObjectTypeValidateRestoreOperationRequest' + ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"` +} + +func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeValidateIaasVMRestoreOperationRequest): + var vivror ValidateIaasVMRestoreOperationRequest + err := json.Unmarshal(body, &vivror) + return vivror, err + default: + var vror ValidateRestoreOperationRequest + err := json.Unmarshal(body, &vror) + return vror, err + } +} +func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage) + if err != nil { + return nil, err + } + vrorArray[index] = vror + } + return vrorArray, nil +} + +// MarshalJSON is the custom marshaler for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) { + vror.ObjectType = ObjectTypeValidateRestoreOperationRequest + objectMap := make(map[string]interface{}) + objectMap["restoreRequest"] = vror.RestoreRequest + if vror.ObjectType != "" { + objectMap["objectType"] = vror.ObjectType + } + return json.Marshal(objectMap) +} + +// AsValidateIaasVMRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) { + return nil, false +} + +// AsValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) { + return &vror, true +} + +// AsBasicValidateRestoreOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) { + return &vror, true +} + +// AsValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) { + return nil, false +} + +// AsBasicValidateOperationRequest is the BasicValidateOperationRequest implementation for ValidateRestoreOperationRequest. +func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) { + return &vror, true +} + +// UnmarshalJSON is the custom unmarshaler for ValidateRestoreOperationRequest struct. +func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "restoreRequest": + if v != nil { + restoreRequest, err := unmarshalBasicRestoreRequest(*v) + if err != nil { + return err + } + vror.RestoreRequest = restoreRequest + } + case "objectType": + if v != nil { + var objectType ObjectTypeBasicValidateOperationRequest + err = json.Unmarshal(*v, &objectType) + if err != nil { + return err + } + vror.ObjectType = objectType + } + } + } + + return nil +} + +// WeeklyRetentionFormat weekly retention format. +type WeeklyRetentionFormat struct { + // DaysOfTheWeek - List of days of the week. + DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` + // WeeksOfTheMonth - List of weeks of month. + WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"` +} + +// WeeklyRetentionSchedule weekly retention schedule. +type WeeklyRetentionSchedule struct { + // DaysOfTheWeek - List of days of week for weekly retention policy. + DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"` + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} + +// WorkloadInquiryDetails details of an inquired protectable item. +type WorkloadInquiryDetails struct { + // Type - Type of the Workload such as SQL, Oracle etc. + Type *string `json:"type,omitempty"` + // ItemCount - Contains the protectable item Count inside this Container. + ItemCount *int64 `json:"itemCount,omitempty"` + // InquiryValidation - Inquiry validation such as permissions and other backup validations. + InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"` +} + +// BasicWorkloadItem base class for backup item. Workload-specific backup items are derived from this class. +type BasicWorkloadItem interface { + AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) + AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) + AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) + AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) + AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) + AsWorkloadItem() (*WorkloadItem, bool) +} + +// WorkloadItem base class for backup item. Workload-specific backup items are derived from this class. +type WorkloadItem struct { + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // WorkloadItemType - Possible values include: 'WorkloadItemTypeWorkloadItem', 'WorkloadItemTypeAzureVMWorkloadItem', 'WorkloadItemTypeSAPAseDatabase1', 'WorkloadItemTypeSAPAseSystem1', 'WorkloadItemTypeSAPHanaDatabase1', 'WorkloadItemTypeSAPHanaSystem1', 'WorkloadItemTypeSQLDataBase1', 'WorkloadItemTypeSQLInstance1' + WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"` +} + +func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["workloadItemType"] { + case string(WorkloadItemTypeAzureVMWorkloadItem): + var avwi AzureVMWorkloadItem + err := json.Unmarshal(body, &avwi) + return avwi, err + case string(WorkloadItemTypeSAPAseDatabase1): + var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsadwi) + return avwsadwi, err + case string(WorkloadItemTypeSAPAseSystem1): + var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem + err := json.Unmarshal(body, &avwsaswi) + return avwsaswi, err + case string(WorkloadItemTypeSAPHanaDatabase1): + var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem + err := json.Unmarshal(body, &avwshdwi) + return avwshdwi, err + case string(WorkloadItemTypeSAPHanaSystem1): + var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem + err := json.Unmarshal(body, &avwshswi) + return avwshswi, err + case string(WorkloadItemTypeSQLDataBase1): + var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem + err := json.Unmarshal(body, &avwsdwi) + return avwsdwi, err + case string(WorkloadItemTypeSQLInstance1): + var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem + err := json.Unmarshal(body, &avwsiwi) + return avwsiwi, err + default: + var wi WorkloadItem + err := json.Unmarshal(body, &wi) + return wi, err + } +} +func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + wiArray := make([]BasicWorkloadItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + wi, err := unmarshalBasicWorkloadItem(*rawMessage) + if err != nil { + return nil, err + } + wiArray[index] = wi + } + return wiArray, nil +} + +// MarshalJSON is the custom marshaler for WorkloadItem. +func (wi WorkloadItem) MarshalJSON() ([]byte, error) { + wi.WorkloadItemType = WorkloadItemTypeWorkloadItem + objectMap := make(map[string]interface{}) + if wi.BackupManagementType != nil { + objectMap["backupManagementType"] = wi.BackupManagementType + } + if wi.WorkloadType != nil { + objectMap["workloadType"] = wi.WorkloadType + } + if wi.FriendlyName != nil { + objectMap["friendlyName"] = wi.FriendlyName + } + if wi.ProtectionState != "" { + objectMap["protectionState"] = wi.ProtectionState + } + if wi.WorkloadItemType != "" { + objectMap["workloadItemType"] = wi.WorkloadItemType + } + return json.Marshal(objectMap) +} + +// AsAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) { + return nil, false +} + +// AsWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) { + return &wi, true +} + +// AsBasicWorkloadItem is the BasicWorkloadItem implementation for WorkloadItem. +func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) { + return &wi, true +} + +// WorkloadItemResource base class for backup item. Workload-specific backup items are derived from this +// class. +type WorkloadItemResource struct { + // Properties - WorkloadItemResource properties + Properties BasicWorkloadItem `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkloadItemResource. +func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = wir.Properties + if wir.Location != nil { + objectMap["location"] = wir.Location + } + if wir.Tags != nil { + objectMap["tags"] = wir.Tags + } + if wir.ETag != nil { + objectMap["eTag"] = wir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkloadItemResource struct. +func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicWorkloadItem(*v) + if err != nil { + return err + } + wir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + wir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + wir.ETag = &eTag + } + } + } + + return nil +} + +// WorkloadItemResourceList list of WorkloadItem resources +type WorkloadItemResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]WorkloadItemResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkloadItemResourceListIterator provides access to a complete listing of WorkloadItemResource values. +type WorkloadItemResourceListIterator struct { + i int + page WorkloadItemResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkloadItemResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkloadItemResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource { + if !iter.page.NotDone() { + return WorkloadItemResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkloadItemResourceListIterator type. +func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator { + return WorkloadItemResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wirl WorkloadItemResourceList) IsEmpty() bool { + return wirl.Value == nil || len(*wirl.Value) == 0 +} + +// workloadItemResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) { + if wirl.NextLink == nil || len(to.String(wirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wirl.NextLink))) +} + +// WorkloadItemResourceListPage contains a page of WorkloadItemResource values. +type WorkloadItemResourceListPage struct { + fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error) + wirl WorkloadItemResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wirl) + if err != nil { + return err + } + page.wirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkloadItemResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkloadItemResourceListPage) NotDone() bool { + return !page.wirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList { + return page.wirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource { + if page.wirl.IsEmpty() { + return nil + } + return *page.wirl.Value +} + +// Creates a new instance of the WorkloadItemResourceListPage type. +func NewWorkloadItemResourceListPage(getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage { + return WorkloadItemResourceListPage{fn: getNextPage} +} + +// BasicWorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this class. +type BasicWorkloadProtectableItem interface { + AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) + AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) + AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) + AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) + AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) + AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) + AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) + AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) + AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) + AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) + AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) + AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) + AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) + AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) +} + +// WorkloadProtectableItem base class for backup item. Workload-specific backup items are derived from this +// class. +type WorkloadProtectableItem struct { + // BackupManagementType - Type of backup management to backup an item. + BackupManagementType *string `json:"backupManagementType,omitempty"` + // WorkloadType - Type of workload for the backup management + WorkloadType *string `json:"workloadType,omitempty"` + // FriendlyName - Friendly name of the backup item. + FriendlyName *string `json:"friendlyName,omitempty"` + // ProtectionState - State of the back up item. Possible values include: 'ProtectionStatusInvalid', 'ProtectionStatusNotProtected', 'ProtectionStatusProtecting', 'ProtectionStatusProtected', 'ProtectionStatusProtectionFailed' + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + // ProtectableItemType - Possible values include: 'ProtectableItemTypeWorkloadProtectableItem', 'ProtectableItemTypeAzureFileShare', 'ProtectableItemTypeMicrosoftClassicComputevirtualMachines', 'ProtectableItemTypeMicrosoftComputevirtualMachines', 'ProtectableItemTypeAzureVMWorkloadProtectableItem', 'ProtectableItemTypeSAPAseSystem', 'ProtectableItemTypeSAPHanaDatabase', 'ProtectableItemTypeSAPHanaSystem', 'ProtectableItemTypeSQLAvailabilityGroupContainer', 'ProtectableItemTypeSQLDataBase', 'ProtectableItemTypeSQLInstance', 'ProtectableItemTypeIaaSVMProtectableItem' + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` +} + +func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeAzureFileShare): + var afspi AzureFileShareProtectableItem + err := json.Unmarshal(body, &afspi) + return afspi, err + case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectableItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectableItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectableItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + case string(ProtectableItemTypeAzureVMWorkloadProtectableItem): + var avwpi AzureVMWorkloadProtectableItem + err := json.Unmarshal(body, &avwpi) + return avwpi, err + case string(ProtectableItemTypeSAPAseSystem): + var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem + err := json.Unmarshal(body, &avwsaspi) + return avwsaspi, err + case string(ProtectableItemTypeSAPHanaDatabase): + var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem + err := json.Unmarshal(body, &avwshdpi) + return avwshdpi, err + case string(ProtectableItemTypeSAPHanaSystem): + var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem + err := json.Unmarshal(body, &avwshspi) + return avwshspi, err + case string(ProtectableItemTypeSQLAvailabilityGroupContainer): + var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem + err := json.Unmarshal(body, &avwsagpi) + return avwsagpi, err + case string(ProtectableItemTypeSQLDataBase): + var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem + err := json.Unmarshal(body, &avwsdpi) + return avwsdpi, err + case string(ProtectableItemTypeSQLInstance): + var avwsipi AzureVMWorkloadSQLInstanceProtectableItem + err := json.Unmarshal(body, &avwsipi) + return avwsipi, err + case string(ProtectableItemTypeIaaSVMProtectableItem): + var ispi IaaSVMProtectableItem + err := json.Unmarshal(body, &ispi) + return ispi, err + default: + var wpi WorkloadProtectableItem + err := json.Unmarshal(body, &wpi) + return wpi, err + } +} +func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + wpiArray[index] = wpi + } + return wpiArray, nil +} + +// MarshalJSON is the custom marshaler for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) { + wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem + objectMap := make(map[string]interface{}) + if wpi.BackupManagementType != nil { + objectMap["backupManagementType"] = wpi.BackupManagementType + } + if wpi.WorkloadType != nil { + objectMap["workloadType"] = wpi.WorkloadType + } + if wpi.FriendlyName != nil { + objectMap["friendlyName"] = wpi.FriendlyName + } + if wpi.ProtectionState != "" { + objectMap["protectionState"] = wpi.ProtectionState + } + if wpi.ProtectableItemType != "" { + objectMap["protectableItemType"] = wpi.ProtectableItemType + } + return json.Marshal(objectMap) +} + +// AsAzureFileShareProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsBasicAzureVMWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPAseSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSAPHanaSystemProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLDatabaseProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) { + return nil, false +} + +// AsAzureVMWorkloadSQLInstanceProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AsBasicIaaSVMProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) { + return nil, false +} + +// AsWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) { + return &wpi, true +} + +// AsBasicWorkloadProtectableItem is the BasicWorkloadProtectableItem implementation for WorkloadProtectableItem. +func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) { + return &wpi, true +} + +// WorkloadProtectableItemResource base class for backup item. Workload-specific backup items are derived +// from this class. +type WorkloadProtectableItemResource struct { + // Properties - WorkloadProtectableItemResource properties + Properties BasicWorkloadProtectableItem `json:"properties,omitempty"` + // ID - READ-ONLY; Resource Id represents the complete path to the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name associated with the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // ETag - Optional ETag. + ETag *string `json:"eTag,omitempty"` +} + +// MarshalJSON is the custom marshaler for WorkloadProtectableItemResource. +func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = wpir.Properties + if wpir.Location != nil { + objectMap["location"] = wpir.Location + } + if wpir.Tags != nil { + objectMap["tags"] = wpir.Tags + } + if wpir.ETag != nil { + objectMap["eTag"] = wpir.ETag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct. +func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicWorkloadProtectableItem(*v) + if err != nil { + return err + } + wpir.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wpir.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wpir.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wpir.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + wpir.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wpir.Tags = tags + } + case "eTag": + if v != nil { + var eTag string + err = json.Unmarshal(*v, &eTag) + if err != nil { + return err + } + wpir.ETag = &eTag + } + } + } + + return nil +} + +// WorkloadProtectableItemResourceList list of WorkloadProtectableItem resources +type WorkloadProtectableItemResourceList struct { + autorest.Response `json:"-"` + // Value - List of resources. + Value *[]WorkloadProtectableItemResource `json:"value,omitempty"` + // NextLink - The uri to fetch the next page of resources. Call ListNext() fetches next page of resources. + NextLink *string `json:"nextLink,omitempty"` +} + +// WorkloadProtectableItemResourceListIterator provides access to a complete listing of +// WorkloadProtectableItemResource values. +type WorkloadProtectableItemResourceListIterator struct { + i int + page WorkloadProtectableItemResourceListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WorkloadProtectableItemResourceListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource { + if !iter.page.NotDone() { + return WorkloadProtectableItemResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WorkloadProtectableItemResourceListIterator type. +func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator { + return WorkloadProtectableItemResourceListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool { + return wpirl.Value == nil || len(*wpirl.Value) == 0 +} + +// workloadProtectableItemResourceListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) { + if wpirl.NextLink == nil || len(to.String(wpirl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wpirl.NextLink))) +} + +// WorkloadProtectableItemResourceListPage contains a page of WorkloadProtectableItemResource values. +type WorkloadProtectableItemResourceListPage struct { + fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error) + wpirl WorkloadProtectableItemResourceList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wpirl) + if err != nil { + return err + } + page.wpirl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *WorkloadProtectableItemResourceListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WorkloadProtectableItemResourceListPage) NotDone() bool { + return !page.wpirl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList { + return page.wpirl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource { + if page.wpirl.IsEmpty() { + return nil + } + return *page.wpirl.Value +} + +// Creates a new instance of the WorkloadProtectableItemResourceListPage type. +func NewWorkloadProtectableItemResourceListPage(getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage { + return WorkloadProtectableItemResourceListPage{fn: getNextPage} +} + +// YearlyRetentionSchedule yearly retention schedule. +type YearlyRetentionSchedule struct { + // RetentionScheduleFormatType - Retention schedule format for yearly retention policy. Possible values include: 'RetentionScheduleFormatInvalid', 'RetentionScheduleFormatDaily', 'RetentionScheduleFormatWeekly' + RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"` + // MonthsOfYear - List of months of year of yearly retention policy. + MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"` + // RetentionScheduleDaily - Daily retention format for yearly retention policy. + RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"` + // RetentionScheduleWeekly - Weekly retention format for yearly retention policy. + RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"` + // RetentionTimes - Retention times of retention policy. + RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"` + // RetentionDuration - Retention duration of retention Policy. + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/operation.go b/services/recoveryservices/mgmt/2019-05-13/backup/operation.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/operation.go rename to services/recoveryservices/mgmt/2019-05-13/backup/operation.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go new file mode 100644 index 000000000000..e82ace5af78d --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/operationresults.go @@ -0,0 +1,123 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type OperationResultsClient struct { + BaseClient +} + +// NewOperationResultsClient creates an instance of the OperationResultsClient client. +func NewOperationResultsClient(subscriptionID string) OperationResultsClient { + return NewOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationResultsClientWithBaseURI creates an instance of the OperationResultsClient client. +func NewOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) OperationResultsClient { + return OperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get provides the status of the delete operations such as deleting backed up item. Once the operation has started, +// the +// status code in the response would be Accepted. It will continue to be in this state till it reaches completion. On +// successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is +// part of the Location header of the operation response. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// operationID - operationID which represents the operation. +func (client OperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.OperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client OperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client OperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OperationResultsClient) GetResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/operations.go b/services/recoveryservices/mgmt/2019-05-13/backup/operations.go new file mode 100644 index 000000000000..53f59482812e --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/operations.go @@ -0,0 +1,147 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List returns the list of available operations. +func (client OperationsClient) List(ctx context.Context) (result ClientDiscoveryResponsePage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.cdr.Response.Response != nil { + sc = result.cdr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.cdr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.cdr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2016-08-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.RecoveryServices/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result ClientDiscoveryResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults ClientDiscoveryResponse) (result ClientDiscoveryResponse, err error) { + req, err := lastResults.clientDiscoveryResponsePreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result ClientDiscoveryResponseIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go b/services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go new file mode 100644 index 000000000000..b5c7ef6eebff --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/operationstatuses.go @@ -0,0 +1,123 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type OperationStatusesClient struct { + BaseClient +} + +// NewOperationStatusesClient creates an instance of the OperationStatusesClient client. +func NewOperationStatusesClient(subscriptionID string) OperationStatusesClient { + return NewOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationStatusesClientWithBaseURI creates an instance of the OperationStatusesClient client. +func NewOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) OperationStatusesClient { + return OperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress, +// completed +// or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations +// create jobs. This method returns the list of jobs when the operation is complete. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// operationID - operationID which represents the operation. +func (client OperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (result OperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationStatusesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationStatusesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.OperationStatusesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.OperationStatusesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client OperationStatusesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client OperationStatusesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client OperationStatusesClient) GetResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/policies.go b/services/recoveryservices/mgmt/2019-05-13/backup/policies.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/policies.go rename to services/recoveryservices/mgmt/2019-05-13/backup/policies.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go new file mode 100644 index 000000000000..0467090aa353 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectablecontainers.go @@ -0,0 +1,161 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectableContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectableContainersClient struct { + BaseClient +} + +// NewProtectableContainersClient creates an instance of the ProtectableContainersClient client. +func NewProtectableContainersClient(subscriptionID string) ProtectableContainersClient { + return NewProtectableContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectableContainersClientWithBaseURI creates an instance of the ProtectableContainersClient client. +func NewProtectableContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectableContainersClient { + return ProtectableContainersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists the containers that can be registered to Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +func (client ProtectableContainersClient) List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result ProtectableContainerResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainersClient.List") + defer func() { + sc := -1 + if result.pcrl.Response.Response != nil { + sc = result.pcrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, fabricName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pcrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "List", resp, "Failure sending request") + return + } + + result.pcrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectableContainersClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectableContainersClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectableContainersClient) ListResponder(resp *http.Response) (result ProtectableContainerResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectableContainersClient) listNextResults(ctx context.Context, lastResults ProtectableContainerResourceList) (result ProtectableContainerResourceList, err error) { + req, err := lastResults.protectableContainerResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableContainersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectableContainersClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result ProtectableContainerResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainersClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, fabricName, filter) + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go new file mode 100644 index 000000000000..18b8d7f3f683 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectableitems.go @@ -0,0 +1,165 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectableItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectableItemsClient struct { + BaseClient +} + +// NewProtectableItemsClient creates an instance of the ProtectableItemsClient client. +func NewProtectableItemsClient(subscriptionID string) ProtectableItemsClient { + return NewProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectableItemsClientWithBaseURI creates an instance of the ProtectableItemsClient client. +func NewProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectableItemsClient { + return ProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List provides a pageable list of protectable objects within your subscription according to the query filter and the +// pagination parameters. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client ProtectableItemsClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result WorkloadProtectableItemResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemsClient.List") + defer func() { + sc := -1 + if result.wpirl.Response.Response != nil { + sc = result.wpirl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wpirl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "List", resp, "Failure sending request") + return + } + + result.wpirl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectableItemsClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectableItemsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectableItemsClient) ListResponder(resp *http.Response) (result WorkloadProtectableItemResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectableItemsClient) listNextResults(ctx context.Context, lastResults WorkloadProtectableItemResourceList) (result WorkloadProtectableItemResourceList, err error) { + req, err := lastResults.workloadProtectableItemResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectableItemsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectableItemsClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result WorkloadProtectableItemResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableItemsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protecteditemoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationresults.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/protecteditemoperationresults.go rename to services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationresults.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go new file mode 100644 index 000000000000..5f5153a60b4f --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemoperationstatuses.go @@ -0,0 +1,130 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectedItemOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectedItemOperationStatusesClient struct { + BaseClient +} + +// NewProtectedItemOperationStatusesClient creates an instance of the ProtectedItemOperationStatusesClient client. +func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedItemOperationStatusesClient { + return NewProtectedItemOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient +// client. +func NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient { + return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress, +// completed +// or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some operations +// create jobs. This method returns the list of jobs associated with the operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// containerName - container name associated with the backup item. +// protectedItemName - backup item name whose details are to be fetched. +// operationID - operationID represents the operation whose status needs to be fetched. +func (client ProtectedItemOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result OperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemOperationStatusesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationStatusesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationStatusesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectedItemOperationStatusesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectedItemOperationStatusesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "operationId": autorest.Encode("path", operationID), + "protectedItemName": autorest.Encode("path", protectedItemName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectedItemOperationStatusesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectedItemOperationStatusesClient) GetResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protecteditems.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditems.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/protecteditems.go rename to services/recoveryservices/mgmt/2019-05-13/backup/protecteditems.go diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protecteditemsgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/protecteditemsgroup.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/protecteditemsgroup.go rename to services/recoveryservices/mgmt/2019-05-13/backup/protecteditemsgroup.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go new file mode 100644 index 000000000000..7509f1f533a5 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontaineroperationresults.go @@ -0,0 +1,126 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainerOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainerOperationResultsClient struct { + BaseClient +} + +// NewProtectionContainerOperationResultsClient creates an instance of the ProtectionContainerOperationResultsClient +// client. +func NewProtectionContainerOperationResultsClient(subscriptionID string) ProtectionContainerOperationResultsClient { + return NewProtectionContainerOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the +// ProtectionContainerOperationResultsClient client. +func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient { + return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches the result of any operation on the container. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// containerName - container name whose information should be fetched. +// operationID - operation ID which represents the operation whose result needs to be fetched. +func (client ProtectionContainerOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (result ProtectionContainerResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionContainerOperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainerOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionContainerOperationResultsClient) GetResponder(resp *http.Response) (result ProtectionContainerResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go new file mode 100644 index 000000000000..423b836635c3 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainerrefreshoperationresults.go @@ -0,0 +1,123 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainerRefreshOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainerRefreshOperationResultsClient struct { + BaseClient +} + +// NewProtectionContainerRefreshOperationResultsClient creates an instance of the +// ProtectionContainerRefreshOperationResultsClient client. +func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) ProtectionContainerRefreshOperationResultsClient { + return NewProtectionContainerRefreshOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the +// ProtectionContainerRefreshOperationResultsClient client. +func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient { + return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get provides the result of the refresh operation triggered by the BeginRefresh operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// operationID - operation ID associated with the operation whose result needs to be fetched. +func (client ProtectionContainerRefreshOperationResultsClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerRefreshOperationResultsClient.Get") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerRefreshOperationResultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerRefreshOperationResultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainerRefreshOperationResultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionContainerRefreshOperationResultsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainerRefreshOperationResultsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionContainerRefreshOperationResultsClient) GetResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go new file mode 100644 index 000000000000..60649b4cbfc0 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainers.go @@ -0,0 +1,458 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainersClient struct { + BaseClient +} + +// NewProtectionContainersClient creates an instance of the ProtectionContainersClient client. +func NewProtectionContainersClient(subscriptionID string) ProtectionContainersClient { + return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client. +func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient { + return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets details of the specific container registered to your Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - name of the fabric where the container belongs. +// containerName - name of the container whose details need to be fetched. +func (client ProtectionContainersClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result ProtectionContainerResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionContainersClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) GetResponder(resp *http.Response) (result ProtectionContainerResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Inquire this is an async operation and the results should be tracked using location header or Azure-async-url. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric Name associated with the container. +// containerName - name of the container in which inquiry needs to be triggered. +// filter - oData filter options. +func (client ProtectionContainersClient) Inquire(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Inquire") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.InquirePreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Inquire", nil, "Failure preparing request") + return + } + + resp, err := client.InquireSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Inquire", resp, "Failure sending request") + return + } + + result, err = client.InquireResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Inquire", resp, "Failure responding to request") + } + + return +} + +// InquirePreparer prepares the Inquire request. +func (client ProtectionContainersClient) InquirePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InquireSender sends the Inquire request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) InquireSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// InquireResponder handles the response to the Inquire request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) InquireResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Refresh discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is +// an +// asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated the container. +// filter - oData filter options. +func (client ProtectionContainersClient) Refresh(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Refresh") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RefreshPreparer(ctx, vaultName, resourceGroupName, fabricName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Refresh", nil, "Failure preparing request") + return + } + + resp, err := client.RefreshSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Refresh", resp, "Failure sending request") + return + } + + result, err = client.RefreshResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Refresh", resp, "Failure responding to request") + } + + return +} + +// RefreshPreparer prepares the Refresh request. +func (client ProtectionContainersClient) RefreshPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RefreshSender sends the Refresh request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) RefreshSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RefreshResponder handles the response to the Refresh request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) RefreshResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Register registers the container with Recovery Services vault. +// This is an asynchronous operation. To track the operation status, use location header to call get latest status of +// the operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// containerName - name of the container to be registered. +// parameters - request body for operation +func (client ProtectionContainersClient) Register(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource) (result ProtectionContainerResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Register") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RegisterPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Register", nil, "Failure preparing request") + return + } + + resp, err := client.RegisterSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Register", resp, "Failure sending request") + return + } + + result, err = client.RegisterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Register", resp, "Failure responding to request") + } + + return +} + +// RegisterPreparer prepares the Register request. +func (client ProtectionContainersClient) RegisterPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, parameters ProtectionContainerResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RegisterSender sends the Register request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) RegisterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// RegisterResponder handles the response to the Register request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) RegisterResponder(resp *http.Response) (result ProtectionContainerResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Unregister unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To +// determine +// whether the backend service has finished processing the request, call Get Container Operation Result API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - name of the fabric where the container belongs. +// containerName - name of the container which needs to be unregistered from the Recovery Services Vault. +func (client ProtectionContainersClient) Unregister(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersClient.Unregister") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UnregisterPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Unregister", nil, "Failure preparing request") + return + } + + resp, err := client.UnregisterSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Unregister", resp, "Failure sending request") + return + } + + result, err = client.UnregisterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersClient", "Unregister", resp, "Failure responding to request") + } + + return +} + +// UnregisterPreparer prepares the Unregister request. +func (client ProtectionContainersClient) UnregisterPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnregisterSender sends the Unregister request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersClient) UnregisterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UnregisterResponder handles the response to the Unregister request. The method always +// closes the http.Response Body. +func (client ProtectionContainersClient) UnregisterResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go new file mode 100644 index 000000000000..5895c5e0db01 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectioncontainersgroup.go @@ -0,0 +1,160 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionContainersGroupClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionContainersGroupClient struct { + BaseClient +} + +// NewProtectionContainersGroupClient creates an instance of the ProtectionContainersGroupClient client. +func NewProtectionContainersGroupClient(subscriptionID string) ProtectionContainersGroupClient { + return NewProtectionContainersGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionContainersGroupClientWithBaseURI creates an instance of the ProtectionContainersGroupClient client. +func NewProtectionContainersGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersGroupClient { + return ProtectionContainersGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists the containers registered to Recovery Services Vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +func (client ProtectionContainersGroupClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result ProtectionContainerResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersGroupClient.List") + defer func() { + sc := -1 + if result.pcrl.Response.Response != nil { + sc = result.pcrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pcrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "List", resp, "Failure sending request") + return + } + + result.pcrl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectionContainersGroupClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionContainersGroupClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectionContainersGroupClient) ListResponder(resp *http.Response) (result ProtectionContainerResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectionContainersGroupClient) listNextResults(ctx context.Context, lastResults ProtectionContainerResourceList) (result ProtectionContainerResourceList, err error) { + req, err := lastResults.protectionContainerResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionContainersGroupClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectionContainersGroupClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string) (result ProtectionContainerResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainersGroupClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter) + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go new file mode 100644 index 000000000000..b7bdac33115b --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintent.go @@ -0,0 +1,366 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionIntentClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionIntentClient struct { + BaseClient +} + +// NewProtectionIntentClient creates an instance of the ProtectionIntentClient client. +func NewProtectionIntentClient(subscriptionID string) ProtectionIntentClient { + return NewProtectionIntentClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionIntentClientWithBaseURI creates an instance of the ProtectionIntentClient client. +func NewProtectionIntentClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentClient { + return ProtectionIntentClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create Intent for Enabling backup of an item. This is a synchronous operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backup item. +// intentObjectName - intent object name. +// parameters - resource backed up item +func (client ProtectionIntentClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource) (result ProtectionIntentResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, fabricName, intentObjectName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ProtectionIntentClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string, parameters ProtectionIntentResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "intentObjectName": autorest.Encode("path", intentObjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) CreateOrUpdateResponder(resp *http.Response) (result ProtectionIntentResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete used to remove intent from an item +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the intent. +// intentObjectName - intent to be deleted. +func (client ProtectionIntentClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, vaultName, resourceGroupName, fabricName, intentObjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ProtectionIntentClient) DeletePreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "intentObjectName": autorest.Encode("path", intentObjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get provides the details of the protection intent up item. This is an asynchronous operation. To know the status of +// the operation, +// call the GetItemOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the backed up item. +// intentObjectName - backed up item name whose details are to be fetched. +func (client ProtectionIntentClient) Get(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (result ProtectionIntentResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, fabricName, intentObjectName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionIntentClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, intentObjectName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "intentObjectName": autorest.Encode("path", intentObjectName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) GetResponder(resp *http.Response) (result ProtectionIntentResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Validate sends the validate request. +// Parameters: +// azureRegion - azure region to hit Api +// parameters - enable backup validation request on Virtual Machine +func (client ProtectionIntentClient) Validate(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest) (result PreValidateEnableBackupResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentClient.Validate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ValidatePreparer(ctx, azureRegion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Validate", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Validate", resp, "Failure sending request") + return + } + + result, err = client.ValidateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentClient", "Validate", resp, "Failure responding to request") + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client ProtectionIntentClient) ValidatePreparer(ctx context.Context, azureRegion string, parameters PreValidateEnableBackupRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureRegion": autorest.Encode("path", azureRegion), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentClient) ValidateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client ProtectionIntentClient) ValidateResponder(resp *http.Response) (result PreValidateEnableBackupResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go new file mode 100644 index 000000000000..a94ebda293ae --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionintentgroup.go @@ -0,0 +1,164 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionIntentGroupClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionIntentGroupClient struct { + BaseClient +} + +// NewProtectionIntentGroupClient creates an instance of the ProtectionIntentGroupClient client. +func NewProtectionIntentGroupClient(subscriptionID string) ProtectionIntentGroupClient { + return NewProtectionIntentGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionIntentGroupClientWithBaseURI creates an instance of the ProtectionIntentGroupClient client. +func NewProtectionIntentGroupClientWithBaseURI(baseURI string, subscriptionID string) ProtectionIntentGroupClient { + return ProtectionIntentGroupClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List provides a pageable list of all intents that are present within a vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client ProtectionIntentGroupClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectionIntentResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentGroupClient.List") + defer func() { + sc := -1 + if result.pirl.Response.Response != nil { + sc = result.pirl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.pirl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "List", resp, "Failure sending request") + return + } + + result.pirl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ProtectionIntentGroupClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionIntentGroupClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ProtectionIntentGroupClient) ListResponder(resp *http.Response) (result ProtectionIntentResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ProtectionIntentGroupClient) listNextResults(ctx context.Context, lastResults ProtectionIntentResourceList) (result ProtectionIntentResourceList, err error) { + req, err := lastResults.protectionIntentResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionIntentGroupClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ProtectionIntentGroupClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectionIntentResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentGroupClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, filter, skipToken) + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go new file mode 100644 index 000000000000..83f2afa24f43 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicies.go @@ -0,0 +1,285 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionPoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionPoliciesClient struct { + BaseClient +} + +// NewProtectionPoliciesClient creates an instance of the ProtectionPoliciesClient client. +func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient { + return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client. +func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient { + return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can +// be fetched +// using GetPolicyOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy to be created. +// parameters - resource backup policy +func (client ProtectionPoliciesClient) CreateOrUpdate(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (result ProtectionPolicyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, vaultName, resourceGroupName, policyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ProtectionPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-05-13" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ProtectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ProtectionPolicyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status +// of the +// operation can be fetched using GetPolicyOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy to be deleted. +func (client ProtectionPoliciesClient) Delete(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, vaultName, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ProtectionPoliciesClient) DeletePreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ProtectionPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous +// operation. Status of the operation can be fetched using GetPolicyOperationResult API. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy information to be fetched. +func (client ProtectionPoliciesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (result ProtectionPolicyResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPoliciesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionPoliciesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2019-05-13" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionPoliciesClient) GetResponder(resp *http.Response) (result ProtectionPolicyResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicyoperationresults.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationresults.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/protectionpolicyoperationresults.go rename to services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationresults.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go new file mode 100644 index 000000000000..ac06686b3816 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/protectionpolicyoperationstatuses.go @@ -0,0 +1,127 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ProtectionPolicyOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ProtectionPolicyOperationStatusesClient struct { + BaseClient +} + +// NewProtectionPolicyOperationStatusesClient creates an instance of the ProtectionPolicyOperationStatusesClient +// client. +func NewProtectionPolicyOperationStatusesClient(subscriptionID string) ProtectionPolicyOperationStatusesClient { + return NewProtectionPolicyOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the +// ProtectionPolicyOperationStatusesClient client. +func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient { + return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get provides the status of the asynchronous operations like backup, restore. The status can be in progress, +// completed +// or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some operations +// create jobs. This method returns the list of jobs associated with operation. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// policyName - backup policy name whose operation's status needs to be fetched. +// operationID - operation ID which represents an operation whose status needs to be fetched. +func (client ProtectionPolicyOperationStatusesClient) Get(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (result OperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyOperationStatusesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName, policyName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationStatusesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationStatusesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ProtectionPolicyOperationStatusesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProtectionPolicyOperationStatusesClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string, policyName string, operationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "operationId": autorest.Encode("path", operationID), + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProtectionPolicyOperationStatusesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProtectionPolicyOperationStatusesClient) GetResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/recoverypoints.go b/services/recoveryservices/mgmt/2019-05-13/backup/recoverypoints.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/recoverypoints.go rename to services/recoveryservices/mgmt/2019-05-13/backup/recoverypoints.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go b/services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go new file mode 100644 index 000000000000..ef3d82a86cd9 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/resourcestorageconfigs.go @@ -0,0 +1,277 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ResourceStorageConfigsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type ResourceStorageConfigsClient struct { + BaseClient +} + +// NewResourceStorageConfigsClient creates an instance of the ResourceStorageConfigsClient client. +func NewResourceStorageConfigsClient(subscriptionID string) ResourceStorageConfigsClient { + return NewResourceStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceStorageConfigsClientWithBaseURI creates an instance of the ResourceStorageConfigsClient client. +func NewResourceStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) ResourceStorageConfigsClient { + return ResourceStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches resource storage config. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +func (client ResourceStorageConfigsClient) Get(ctx context.Context, vaultName string, resourceGroupName string) (result ResourceConfigResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceStorageConfigsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ResourceStorageConfigsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceStorageConfigsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ResourceStorageConfigsClient) GetResponder(resp *http.Response) (result ResourceConfigResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Patch updates vault storage model type. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// parameters - vault storage config request +func (client ResourceStorageConfigsClient) Patch(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceStorageConfigsClient.Patch") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PatchPreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Patch", nil, "Failure preparing request") + return + } + + resp, err := client.PatchSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Patch", resp, "Failure sending request") + return + } + + result, err = client.PatchResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Patch", resp, "Failure responding to request") + } + + return +} + +// PatchPreparer prepares the Patch request. +func (client ResourceStorageConfigsClient) PatchPreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PatchSender sends the Patch request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceStorageConfigsClient) PatchSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// PatchResponder handles the response to the Patch request. The method always +// closes the http.Response Body. +func (client ResourceStorageConfigsClient) PatchResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates vault storage model type. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// parameters - vault storage config request +func (client ResourceStorageConfigsClient) Update(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (result ResourceConfigResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceStorageConfigsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, vaultName, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.ResourceStorageConfigsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ResourceStorageConfigsClient) UpdatePreparer(ctx context.Context, vaultName string, resourceGroupName string, parameters ResourceConfigResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceStorageConfigsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ResourceStorageConfigsClient) UpdateResponder(resp *http.Response) (result ResourceConfigResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/resourcevaultconfigs.go b/services/recoveryservices/mgmt/2019-05-13/backup/resourcevaultconfigs.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/resourcevaultconfigs.go rename to services/recoveryservices/mgmt/2019-05-13/backup/resourcevaultconfigs.go diff --git a/services/recoveryservices/mgmt/2017-07-01/backup/restores.go b/services/recoveryservices/mgmt/2019-05-13/backup/restores.go similarity index 100% rename from services/recoveryservices/mgmt/2017-07-01/backup/restores.go rename to services/recoveryservices/mgmt/2019-05-13/backup/restores.go diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go b/services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go new file mode 100644 index 000000000000..281905c96c53 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/securitypins.go @@ -0,0 +1,118 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// SecurityPINsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type SecurityPINsClient struct { + BaseClient +} + +// NewSecurityPINsClient creates an instance of the SecurityPINsClient client. +func NewSecurityPINsClient(subscriptionID string) SecurityPINsClient { + return NewSecurityPINsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client. +func NewSecurityPINsClientWithBaseURI(baseURI string, subscriptionID string) SecurityPINsClient { + return SecurityPINsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get the security PIN. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +func (client SecurityPINsClient) Get(ctx context.Context, vaultName string, resourceGroupName string) (result TokenInformation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SecurityPINsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, vaultName, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.SecurityPINsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.SecurityPINsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.SecurityPINsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SecurityPINsClient) GetPreparer(ctx context.Context, vaultName string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SecurityPINsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SecurityPINsClient) GetResponder(resp *http.Response) (result TokenInformation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/status.go b/services/recoveryservices/mgmt/2019-05-13/backup/status.go new file mode 100644 index 000000000000..65843f448fc1 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/status.go @@ -0,0 +1,119 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// StatusClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type StatusClient struct { + BaseClient +} + +// NewStatusClient creates an instance of the StatusClient client. +func NewStatusClient(subscriptionID string) StatusClient { + return NewStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewStatusClientWithBaseURI creates an instance of the StatusClient client. +func NewStatusClientWithBaseURI(baseURI string, subscriptionID string) StatusClient { + return StatusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get sends the get request. +// Parameters: +// azureRegion - azure region to hit Api +// parameters - container Backup Status Request +func (client StatusClient) Get(ctx context.Context, azureRegion string, parameters StatusRequest) (result StatusResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/StatusClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, azureRegion, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.StatusClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.StatusClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.StatusClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client StatusClient) GetPreparer(ctx context.Context, azureRegion string, parameters StatusRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureRegion": autorest.Encode("path", azureRegion), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client StatusClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client StatusClient) GetResponder(resp *http.Response) (result StatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go b/services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go new file mode 100644 index 000000000000..f671a15223ae --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/usagesummaries.go @@ -0,0 +1,126 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// UsageSummariesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type UsageSummariesClient struct { + BaseClient +} + +// NewUsageSummariesClient creates an instance of the UsageSummariesClient client. +func NewUsageSummariesClient(subscriptionID string) UsageSummariesClient { + return NewUsageSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUsageSummariesClientWithBaseURI creates an instance of the UsageSummariesClient client. +func NewUsageSummariesClientWithBaseURI(baseURI string, subscriptionID string) UsageSummariesClient { + return UsageSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List fetches the backup management usage summaries of the vault. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client UsageSummariesClient) List(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (result ManagementUsageList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/UsageSummariesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.UsageSummariesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.UsageSummariesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.UsageSummariesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client UsageSummariesClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client UsageSummariesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client UsageSummariesClient) ListResponder(resp *http.Response) (result ManagementUsageList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/version.go b/services/recoveryservices/mgmt/2019-05-13/backup/version.go new file mode 100644 index 000000000000..e4b01e3731eb --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/version.go @@ -0,0 +1,30 @@ +package backup + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " backup/2019-05-13" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go b/services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go new file mode 100644 index 000000000000..8523e8ce4bb6 --- /dev/null +++ b/services/recoveryservices/mgmt/2019-05-13/backup/workloaditems.go @@ -0,0 +1,170 @@ +package backup + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// WorkloadItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service +type WorkloadItemsClient struct { + BaseClient +} + +// NewWorkloadItemsClient creates an instance of the WorkloadItemsClient client. +func NewWorkloadItemsClient(subscriptionID string) WorkloadItemsClient { + return NewWorkloadItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWorkloadItemsClientWithBaseURI creates an instance of the WorkloadItemsClient client. +func NewWorkloadItemsClientWithBaseURI(baseURI string, subscriptionID string) WorkloadItemsClient { + return WorkloadItemsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List provides a pageable list of workload item of a specific container according to the query filter and the +// pagination +// parameters. +// Parameters: +// vaultName - the name of the recovery services vault. +// resourceGroupName - the name of the resource group where the recovery services vault is present. +// fabricName - fabric name associated with the container. +// containerName - name of the container. +// filter - oData filter options. +// skipToken - skipToken Filter. +func (client WorkloadItemsClient) List(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result WorkloadItemResourceListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemsClient.List") + defer func() { + sc := -1 + if result.wirl.Response.Response != nil { + sc = result.wirl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, vaultName, resourceGroupName, fabricName, containerName, filter, skipToken) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wirl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "List", resp, "Failure sending request") + return + } + + result.wirl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client WorkloadItemsClient) ListPreparer(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerName": autorest.Encode("path", containerName), + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WorkloadItemsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WorkloadItemsClient) ListResponder(resp *http.Response) (result WorkloadItemResourceList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client WorkloadItemsClient) listNextResults(ctx context.Context, lastResults WorkloadItemResourceList) (result WorkloadItemResourceList, err error) { + req, err := lastResults.workloadItemResourceListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "backup.WorkloadItemsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WorkloadItemsClient) ListComplete(ctx context.Context, vaultName string, resourceGroupName string, fabricName string, containerName string, filter string, skipToken string) (result WorkloadItemResourceListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, vaultName, resourceGroupName, fabricName, containerName, filter, skipToken) + return +} diff --git a/services/relay/mgmt/2016-07-01/relay/hybridconnections.go b/services/relay/mgmt/2016-07-01/relay/hybridconnections.go index 2aef509b7b72..d2ffbb60bf4a 100644 --- a/services/relay/mgmt/2016-07-01/relay/hybridconnections.go +++ b/services/relay/mgmt/2016-07-01/relay/hybridconnections.go @@ -72,7 +72,7 @@ func (client HybridConnectionsClient) CreateOrUpdate(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "parameters.HybridConnectionProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("relay.HybridConnectionsClient", "CreateOrUpdate", err.Error()) diff --git a/services/relay/mgmt/2017-04-01/relay/hybridconnections.go b/services/relay/mgmt/2017-04-01/relay/hybridconnections.go index a31a8c8f8a34..5f6dcd71f73d 100644 --- a/services/relay/mgmt/2017-04-01/relay/hybridconnections.go +++ b/services/relay/mgmt/2017-04-01/relay/hybridconnections.go @@ -71,7 +71,7 @@ func (client HybridConnectionsClient) CreateOrUpdate(ctx context.Context, resour Constraints: []validation.Constraint{{Target: "parameters.HybridConnectionProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("relay.HybridConnectionsClient", "CreateOrUpdate", err.Error()) diff --git a/services/relay/mgmt/2017-04-01/relay/wcfrelays.go b/services/relay/mgmt/2017-04-01/relay/wcfrelays.go index 66c598a220d9..5daffc7f2597 100644 --- a/services/relay/mgmt/2017-04-01/relay/wcfrelays.go +++ b/services/relay/mgmt/2017-04-01/relay/wcfrelays.go @@ -71,7 +71,7 @@ func (client WCFRelaysClient) CreateOrUpdate(ctx context.Context, resourceGroupN Constraints: []validation.Constraint{{Target: "parameters.WcfRelayProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: int64(25), Chain: nil}, - {Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("relay.WCFRelaysClient", "CreateOrUpdate", err.Error()) diff --git a/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go b/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go index 54b30b70d7c8..af23f1420f5b 100644 --- a/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go +++ b/services/resourcegraph/mgmt/2019-04-01/resourcegraph/client.go @@ -74,10 +74,10 @@ func (client BaseClient) Resources(ctx context.Context, query QueryRequest) (res {Target: "query.Options", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "query.Options.Top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "query.Options.Top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "query.Options.Top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "query.Options.Top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "query.Options.Skip", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "query.Options.Skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "query.Options.Skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("resourcegraph.BaseClient", "Resources", err.Error()) } diff --git a/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go b/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go new file mode 100644 index 000000000000..45ad2453f0fb --- /dev/null +++ b/services/resources/mgmt/2019-07-01/managedapplications/applicationdefinitions.go @@ -0,0 +1,669 @@ +package managedapplications + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ApplicationDefinitionsClient is the ARM applications +type ApplicationDefinitionsClient struct { + BaseClient +} + +// NewApplicationDefinitionsClient creates an instance of the ApplicationDefinitionsClient client. +func NewApplicationDefinitionsClient(subscriptionID string) ApplicationDefinitionsClient { + return NewApplicationDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApplicationDefinitionsClientWithBaseURI creates an instance of the ApplicationDefinitionsClient client. +func NewApplicationDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationDefinitionsClient { + return ApplicationDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a new managed application definition. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationDefinitionName - the name of the managed application definition. +// parameters - parameters supplied to the create or update an managed application definition. +func (client ApplicationDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition) (result ApplicationDefinitionsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationDefinitionName, + Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.Authorizations", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationDefinitionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ApplicationDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters ApplicationDefinition) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationDefinitionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApplicationDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdateByID creates a new managed application definition. +// Parameters: +// applicationDefinitionID - the fully qualified ID of the managed application definition, including the +// managed application name and the managed application definition resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name} +// parameters - parameters supplied to the create or update a managed application definition. +func (client ApplicationDefinitionsClient) CreateOrUpdateByID(ctx context.Context, applicationDefinitionID string, parameters ApplicationDefinition) (result ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.CreateOrUpdateByID") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ApplicationDefinitionProperties.Authorizations", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", err.Error()) + } + + req, err := client.CreateOrUpdateByIDPreparer(ctx, applicationDefinitionID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateByIDSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "CreateOrUpdateByID", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request. +func (client ApplicationDefinitionsClient) CreateOrUpdateByIDPreparer(ctx context.Context, applicationDefinitionID string, parameters ApplicationDefinition) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationDefinitionId": applicationDefinitionID, + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationDefinitionsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateByIDResponder handles the response to the CreateOrUpdateByID request. The method always +// closes the http.Response Body. +func (client ApplicationDefinitionsClient) CreateOrUpdateByIDResponder(resp *http.Response) (result ApplicationDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the managed application definition. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationDefinitionName - the name of the managed application definition to delete. +func (client ApplicationDefinitionsClient) Delete(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result ApplicationDefinitionsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationDefinitionName, + Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, applicationDefinitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ApplicationDefinitionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationDefinitionsClient) DeleteSender(req *http.Request) (future ApplicationDefinitionsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationDefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteByID deletes the managed application definition. +// Parameters: +// applicationDefinitionID - the fully qualified ID of the managed application definition, including the +// managed application name and the managed application definition resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name} +func (client ApplicationDefinitionsClient) DeleteByID(ctx context.Context, applicationDefinitionID string) (result ApplicationDefinitionsDeleteByIDFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.DeleteByID") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeleteByIDPreparer(ctx, applicationDefinitionID) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "DeleteByID", nil, "Failure preparing request") + return + } + + result, err = client.DeleteByIDSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "DeleteByID", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteByIDPreparer prepares the DeleteByID request. +func (client ApplicationDefinitionsClient) DeleteByIDPreparer(ctx context.Context, applicationDefinitionID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationDefinitionId": applicationDefinitionID, + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteByIDSender sends the DeleteByID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationDefinitionsClient) DeleteByIDSender(req *http.Request) (future ApplicationDefinitionsDeleteByIDFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteByIDResponder handles the response to the DeleteByID request. The method always +// closes the http.Response Body. +func (client ApplicationDefinitionsClient) DeleteByIDResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the managed application definition. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationDefinitionName - the name of the managed application definition. +func (client ApplicationDefinitionsClient) Get(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result ApplicationDefinition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationDefinitionName, + Constraints: []validation.Constraint{{Target: "applicationDefinitionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationDefinitionName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, applicationDefinitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ApplicationDefinitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationDefinitionName": autorest.Encode("path", applicationDefinitionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationDefinitionsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationDefinitionsClient) GetResponder(resp *http.Response) (result ApplicationDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetByID gets the managed application definition. +// Parameters: +// applicationDefinitionID - the fully qualified ID of the managed application definition, including the +// managed application name and the managed application definition resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name} +func (client ApplicationDefinitionsClient) GetByID(ctx context.Context, applicationDefinitionID string) (result ApplicationDefinition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.GetByID") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetByIDPreparer(ctx, applicationDefinitionID) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "GetByID", nil, "Failure preparing request") + return + } + + resp, err := client.GetByIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "GetByID", resp, "Failure sending request") + return + } + + result, err = client.GetByIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "GetByID", resp, "Failure responding to request") + } + + return +} + +// GetByIDPreparer prepares the GetByID request. +func (client ApplicationDefinitionsClient) GetByIDPreparer(ctx context.Context, applicationDefinitionID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationDefinitionId": applicationDefinitionID, + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{applicationDefinitionId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetByIDSender sends the GetByID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationDefinitionsClient) GetByIDSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetByIDResponder handles the response to the GetByID request. The method always +// closes the http.Response Body. +func (client ApplicationDefinitionsClient) GetByIDResponder(resp *http.Response) (result ApplicationDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists the managed application definitions in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +func (client ApplicationDefinitionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ApplicationDefinitionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.adlr.Response.Response != nil { + sc = result.adlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.adlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.adlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ApplicationDefinitionsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationDefinitionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ApplicationDefinitionsClient) ListByResourceGroupResponder(resp *http.Response) (result ApplicationDefinitionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ApplicationDefinitionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ApplicationDefinitionListResult) (result ApplicationDefinitionListResult, err error) { + req, err := lastResults.applicationDefinitionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ApplicationDefinitionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} diff --git a/services/resources/mgmt/2019-07-01/managedapplications/applications.go b/services/resources/mgmt/2019-07-01/managedapplications/applications.go new file mode 100644 index 000000000000..a1d44086a040 --- /dev/null +++ b/services/resources/mgmt/2019-07-01/managedapplications/applications.go @@ -0,0 +1,1059 @@ +package managedapplications + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ApplicationsClient is the ARM applications +type ApplicationsClient struct { + BaseClient +} + +// NewApplicationsClient creates an instance of the ApplicationsClient client. +func NewApplicationsClient(subscriptionID string) ApplicationsClient { + return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. +func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { + return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a new managed application. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationName - the name of the managed application. +// parameters - parameters supplied to the create or update a managed application. +func (client ApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationName string, parameters Application) (result ApplicationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationName, + Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ApplicationProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.ManagedResourceGroupID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Plan", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Plan.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Plan.Publisher", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Plan.Product", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Plan.Version", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Kind", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, applicationName string, parameters Application) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationName": autorest.Encode("path", applicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) CreateOrUpdateResponder(resp *http.Response) (result Application, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdateByID creates a new managed application. +// Parameters: +// applicationID - the fully qualified ID of the managed application, including the managed application name +// and the managed application resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} +// parameters - parameters supplied to the create or update a managed application. +func (client ApplicationsClient) CreateOrUpdateByID(ctx context.Context, applicationID string, parameters Application) (result ApplicationsCreateOrUpdateByIDFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.CreateOrUpdateByID") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ApplicationProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ApplicationProperties.ManagedResourceGroupID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Plan", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Plan.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Plan.Publisher", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Plan.Product", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Plan.Version", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.Kind", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Kind", Name: validation.Pattern, Rule: `^[-\w\._,\(\)]+$`, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationsClient", "CreateOrUpdateByID", err.Error()) + } + + req, err := client.CreateOrUpdateByIDPreparer(ctx, applicationID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdateByID", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateByIDSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "CreateOrUpdateByID", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request. +func (client ApplicationsClient) CreateOrUpdateByIDPreparer(ctx context.Context, applicationID string, parameters Application) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{applicationId}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) CreateOrUpdateByIDSender(req *http.Request) (future ApplicationsCreateOrUpdateByIDFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateByIDResponder handles the response to the CreateOrUpdateByID request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) CreateOrUpdateByIDResponder(resp *http.Response) (result Application, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the managed application. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationName - the name of the managed application. +func (client ApplicationsClient) Delete(ctx context.Context, resourceGroupName string, applicationName string) (result ApplicationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationName, + Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, applicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ApplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, applicationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationName": autorest.Encode("path", applicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) DeleteSender(req *http.Request) (future ApplicationsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteByID deletes the managed application. +// Parameters: +// applicationID - the fully qualified ID of the managed application, including the managed application name +// and the managed application resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} +func (client ApplicationsClient) DeleteByID(ctx context.Context, applicationID string) (result ApplicationsDeleteByIDFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.DeleteByID") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeleteByIDPreparer(ctx, applicationID) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "DeleteByID", nil, "Failure preparing request") + return + } + + result, err = client.DeleteByIDSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "DeleteByID", result.Response(), "Failure sending request") + return + } + + return +} + +// DeleteByIDPreparer prepares the DeleteByID request. +func (client ApplicationsClient) DeleteByIDPreparer(ctx context.Context, applicationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{applicationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteByIDSender sends the DeleteByID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) DeleteByIDSender(req *http.Request) (future ApplicationsDeleteByIDFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteByIDResponder handles the response to the DeleteByID request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) DeleteByIDResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the managed application. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationName - the name of the managed application. +func (client ApplicationsClient) Get(ctx context.Context, resourceGroupName string, applicationName string) (result Application, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationName, + Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, applicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ApplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, applicationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationName": autorest.Encode("path", applicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) GetResponder(resp *http.Response) (result Application, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetByID gets the managed application. +// Parameters: +// applicationID - the fully qualified ID of the managed application, including the managed application name +// and the managed application resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} +func (client ApplicationsClient) GetByID(ctx context.Context, applicationID string) (result Application, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.GetByID") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetByIDPreparer(ctx, applicationID) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "GetByID", nil, "Failure preparing request") + return + } + + resp, err := client.GetByIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "GetByID", resp, "Failure sending request") + return + } + + result, err = client.GetByIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "GetByID", resp, "Failure responding to request") + } + + return +} + +// GetByIDPreparer prepares the GetByID request. +func (client ApplicationsClient) GetByIDPreparer(ctx context.Context, applicationID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{applicationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetByIDSender sends the GetByID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) GetByIDSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetByIDResponder handles the response to the GetByID request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) GetByIDResponder(resp *http.Response) (result Application, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup gets all the applications within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +func (client ApplicationsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ApplicationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.alr.Response.Response != nil { + sc = result.alr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.alr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.alr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ApplicationsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) ListByResourceGroupResponder(resp *http.Response) (result ApplicationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ApplicationsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ApplicationListResult) (result ApplicationListResult, err error) { + req, err := lastResults.applicationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ApplicationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// ListBySubscription gets all the applications within a subscription. +func (client ApplicationsClient) ListBySubscription(ctx context.Context) (result ApplicationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListBySubscription") + defer func() { + sc := -1 + if result.alr.Response.Response != nil { + sc = result.alr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.alr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.alr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client ApplicationsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applications", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) ListBySubscriptionResponder(resp *http.Response) (result ApplicationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client ApplicationsClient) listBySubscriptionNextResults(ctx context.Context, lastResults ApplicationListResult) (result ApplicationListResult, err error) { + req, err := lastResults.applicationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApplicationsClient) ListBySubscriptionComplete(ctx context.Context) (result ApplicationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListBySubscription") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBySubscription(ctx) + return +} + +// RefreshPermissions refresh Permissions for application. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationName - the name of the managed application. +func (client ApplicationsClient) RefreshPermissions(ctx context.Context, resourceGroupName string, applicationName string) (result ApplicationsRefreshPermissionsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.RefreshPermissions") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationName, + Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationsClient", "RefreshPermissions", err.Error()) + } + + req, err := client.RefreshPermissionsPreparer(ctx, resourceGroupName, applicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "RefreshPermissions", nil, "Failure preparing request") + return + } + + result, err = client.RefreshPermissionsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "RefreshPermissions", result.Response(), "Failure sending request") + return + } + + return +} + +// RefreshPermissionsPreparer prepares the RefreshPermissions request. +func (client ApplicationsClient) RefreshPermissionsPreparer(ctx context.Context, resourceGroupName string, applicationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationName": autorest.Encode("path", applicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}/refreshPermissions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RefreshPermissionsSender sends the RefreshPermissions request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) RefreshPermissionsSender(req *http.Request) (future ApplicationsRefreshPermissionsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// RefreshPermissionsResponder handles the response to the RefreshPermissions request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) RefreshPermissionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates an existing managed application. The only value that can be updated via PATCH currently is the tags. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// applicationName - the name of the managed application. +// parameters - parameters supplied to update an existing managed application. +func (client ApplicationsClient) Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *Application) (result Application, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: applicationName, + Constraints: []validation.Constraint{{Target: "applicationName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "applicationName", Name: validation.MinLength, Rule: 3, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.ApplicationsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, applicationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, applicationName string, parameters *Application) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationName": autorest.Encode("path", applicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) UpdateResponder(resp *http.Response) (result Application, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateByID updates an existing managed application. The only value that can be updated via PATCH currently is the +// tags. +// Parameters: +// applicationID - the fully qualified ID of the managed application, including the managed application name +// and the managed application resource type. Use the format, +// /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name} +// parameters - parameters supplied to update an existing managed application. +func (client ApplicationsClient) UpdateByID(ctx context.Context, applicationID string, parameters *Application) (result Application, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.UpdateByID") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateByIDPreparer(ctx, applicationID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "UpdateByID", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateByIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "UpdateByID", resp, "Failure sending request") + return + } + + result, err = client.UpdateByIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsClient", "UpdateByID", resp, "Failure responding to request") + } + + return +} + +// UpdateByIDPreparer prepares the UpdateByID request. +func (client ApplicationsClient) UpdateByIDPreparer(ctx context.Context, applicationID string, parameters *Application) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{applicationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateByIDSender sends the UpdateByID request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationsClient) UpdateByIDSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateByIDResponder handles the response to the UpdateByID request. The method always +// closes the http.Response Body. +func (client ApplicationsClient) UpdateByIDResponder(resp *http.Response) (result Application, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/resources/mgmt/2019-07-01/managedapplications/client.go b/services/resources/mgmt/2019-07-01/managedapplications/client.go new file mode 100644 index 000000000000..601dbe63445d --- /dev/null +++ b/services/resources/mgmt/2019-07-01/managedapplications/client.go @@ -0,0 +1,161 @@ +// Package managedapplications implements the Azure ARM Managedapplications service API version 2019-07-01. +// +// ARM applications +package managedapplications + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +const ( + // DefaultBaseURI is the default URI used for the service Managedapplications + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Managedapplications. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} + +// ListOperations lists all of the available Microsoft.Solutions REST API operations. +func (client BaseClient) ListOperations(ctx context.Context) (result OperationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListOperations") + defer func() { + sc := -1 + if result.olr.Response.Response != nil { + sc = result.olr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listOperationsNextResults + req, err := client.ListOperationsPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.BaseClient", "ListOperations", nil, "Failure preparing request") + return + } + + resp, err := client.ListOperationsSender(req) + if err != nil { + result.olr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.BaseClient", "ListOperations", resp, "Failure sending request") + return + } + + result.olr, err = client.ListOperationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.BaseClient", "ListOperations", resp, "Failure responding to request") + } + + return +} + +// ListOperationsPreparer prepares the ListOperations request. +func (client BaseClient) ListOperationsPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Solutions/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListOperationsSender sends the ListOperations request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ListOperationsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListOperationsResponder handles the response to the ListOperations request. The method always +// closes the http.Response Body. +func (client BaseClient) ListOperationsResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listOperationsNextResults retrieves the next set of results, if any. +func (client BaseClient) listOperationsNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.operationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "managedapplications.BaseClient", "listOperationsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListOperationsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "managedapplications.BaseClient", "listOperationsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListOperationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.BaseClient", "listOperationsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListOperationsComplete enumerates all values, automatically crossing page boundaries as required. +func (client BaseClient) ListOperationsComplete(ctx context.Context) (result OperationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListOperations") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListOperations(ctx) + return +} diff --git a/services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go b/services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go new file mode 100644 index 000000000000..1aaa66e65611 --- /dev/null +++ b/services/resources/mgmt/2019-07-01/managedapplications/jitrequests.go @@ -0,0 +1,551 @@ +package managedapplications + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// JitRequestsClient is the ARM applications +type JitRequestsClient struct { + BaseClient +} + +// NewJitRequestsClient creates an instance of the JitRequestsClient client. +func NewJitRequestsClient(subscriptionID string) JitRequestsClient { + return NewJitRequestsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewJitRequestsClientWithBaseURI creates an instance of the JitRequestsClient client. +func NewJitRequestsClientWithBaseURI(baseURI string, subscriptionID string) JitRequestsClient { + return JitRequestsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the JIT request. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// jitRequestName - the name of the JIT request. +// parameters - parameters supplied to the update JIT request. +func (client JitRequestsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, jitRequestName string, parameters JitRequestDefinition) (result JitRequestsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JitRequestsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.JitRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.JitRequestProperties.ApplicationResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.JitRequestProperties.JitAuthorizationPolicies", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.JitRequestProperties.JitSchedulingPolicy", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.JitRequestProperties.JitSchedulingPolicy.Duration", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.JitRequestProperties.JitSchedulingPolicy.StartTime", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("managedapplications.JitRequestsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, jitRequestName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client JitRequestsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, jitRequestName string, parameters JitRequestDefinition) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jitRequestName": autorest.Encode("path", jitRequestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client JitRequestsClient) CreateOrUpdateSender(req *http.Request) (future JitRequestsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client JitRequestsClient) CreateOrUpdateResponder(resp *http.Response) (result JitRequestDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the JIT request. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// jitRequestName - the name of the JIT request. +func (client JitRequestsClient) Delete(ctx context.Context, resourceGroupName string, jitRequestName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JitRequestsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.JitRequestsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, jitRequestName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client JitRequestsClient) DeletePreparer(ctx context.Context, resourceGroupName string, jitRequestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jitRequestName": autorest.Encode("path", jitRequestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client JitRequestsClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client JitRequestsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the JIT request. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// jitRequestName - the name of the JIT request. +func (client JitRequestsClient) Get(ctx context.Context, resourceGroupName string, jitRequestName string) (result JitRequestDefinition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JitRequestsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.JitRequestsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, jitRequestName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client JitRequestsClient) GetPreparer(ctx context.Context, resourceGroupName string, jitRequestName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jitRequestName": autorest.Encode("path", jitRequestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client JitRequestsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client JitRequestsClient) GetResponder(resp *http.Response) (result JitRequestDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup retrieves all JIT requests within the resource group. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +func (client JitRequestsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result JitRequestDefinitionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JitRequestsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.JitRequestsClient", "ListByResourceGroup", err.Error()) + } + + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client JitRequestsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client JitRequestsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client JitRequestsClient) ListByResourceGroupResponder(resp *http.Response) (result JitRequestDefinitionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription retrieves all JIT requests within the subscription. +func (client JitRequestsClient) ListBySubscription(ctx context.Context) (result JitRequestDefinitionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JitRequestsClient.ListBySubscription") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client JitRequestsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/jitRequests", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client JitRequestsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client JitRequestsClient) ListBySubscriptionResponder(resp *http.Response) (result JitRequestDefinitionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates the JIT request. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// jitRequestName - the name of the JIT request. +// parameters - parameters supplied to the update JIT request. +func (client JitRequestsClient) Update(ctx context.Context, resourceGroupName string, jitRequestName string, parameters JitRequestPatchable) (result JitRequestDefinition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/JitRequestsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("managedapplications.JitRequestsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, jitRequestName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client JitRequestsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, jitRequestName string, parameters JitRequestPatchable) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "jitRequestName": autorest.Encode("path", jitRequestName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client JitRequestsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client JitRequestsClient) UpdateResponder(resp *http.Response) (result JitRequestDefinition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go b/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go new file mode 100644 index 000000000000..79f0e561fc7a --- /dev/null +++ b/services/resources/mgmt/2019-07-01/managedapplications/managedapplicationsapi/interfaces.go @@ -0,0 +1,73 @@ +package managedapplicationsapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications" + "github.com/Azure/go-autorest/autorest" +) + +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + ListOperations(ctx context.Context) (result managedapplications.OperationListResultPage, err error) +} + +var _ BaseClientAPI = (*managedapplications.BaseClient)(nil) + +// ApplicationsClientAPI contains the set of methods on the ApplicationsClient type. +type ApplicationsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationName string, parameters managedapplications.Application) (result managedapplications.ApplicationsCreateOrUpdateFuture, err error) + CreateOrUpdateByID(ctx context.Context, applicationID string, parameters managedapplications.Application) (result managedapplications.ApplicationsCreateOrUpdateByIDFuture, err error) + Delete(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.ApplicationsDeleteFuture, err error) + DeleteByID(ctx context.Context, applicationID string) (result managedapplications.ApplicationsDeleteByIDFuture, err error) + Get(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.Application, err error) + GetByID(ctx context.Context, applicationID string) (result managedapplications.Application, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationListResultPage, err error) + ListBySubscription(ctx context.Context) (result managedapplications.ApplicationListResultPage, err error) + RefreshPermissions(ctx context.Context, resourceGroupName string, applicationName string) (result managedapplications.ApplicationsRefreshPermissionsFuture, err error) + Update(ctx context.Context, resourceGroupName string, applicationName string, parameters *managedapplications.Application) (result managedapplications.Application, err error) + UpdateByID(ctx context.Context, applicationID string, parameters *managedapplications.Application) (result managedapplications.Application, err error) +} + +var _ ApplicationsClientAPI = (*managedapplications.ApplicationsClient)(nil) + +// ApplicationDefinitionsClientAPI contains the set of methods on the ApplicationDefinitionsClient type. +type ApplicationDefinitionsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationDefinitionName string, parameters managedapplications.ApplicationDefinition) (result managedapplications.ApplicationDefinitionsCreateOrUpdateFuture, err error) + CreateOrUpdateByID(ctx context.Context, applicationDefinitionID string, parameters managedapplications.ApplicationDefinition) (result managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture, err error) + Delete(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinitionsDeleteFuture, err error) + DeleteByID(ctx context.Context, applicationDefinitionID string) (result managedapplications.ApplicationDefinitionsDeleteByIDFuture, err error) + Get(ctx context.Context, resourceGroupName string, applicationDefinitionName string) (result managedapplications.ApplicationDefinition, err error) + GetByID(ctx context.Context, applicationDefinitionID string) (result managedapplications.ApplicationDefinition, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.ApplicationDefinitionListResultPage, err error) +} + +var _ ApplicationDefinitionsClientAPI = (*managedapplications.ApplicationDefinitionsClient)(nil) + +// JitRequestsClientAPI contains the set of methods on the JitRequestsClient type. +type JitRequestsClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, jitRequestName string, parameters managedapplications.JitRequestDefinition) (result managedapplications.JitRequestsCreateOrUpdateFuture, err error) + Delete(ctx context.Context, resourceGroupName string, jitRequestName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, jitRequestName string) (result managedapplications.JitRequestDefinition, err error) + ListByResourceGroup(ctx context.Context, resourceGroupName string) (result managedapplications.JitRequestDefinitionListResult, err error) + ListBySubscription(ctx context.Context) (result managedapplications.JitRequestDefinitionListResult, err error) + Update(ctx context.Context, resourceGroupName string, jitRequestName string, parameters managedapplications.JitRequestPatchable) (result managedapplications.JitRequestDefinition, err error) +} + +var _ JitRequestsClientAPI = (*managedapplications.JitRequestsClient)(nil) diff --git a/services/resources/mgmt/2019-07-01/managedapplications/models.go b/services/resources/mgmt/2019-07-01/managedapplications/models.go new file mode 100644 index 000000000000..ce42db6f5606 --- /dev/null +++ b/services/resources/mgmt/2019-07-01/managedapplications/models.go @@ -0,0 +1,1729 @@ +package managedapplications + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications" + +// ApplicationArtifactType enumerates the values for application artifact type. +type ApplicationArtifactType string + +const ( + // Custom ... + Custom ApplicationArtifactType = "Custom" + // Template ... + Template ApplicationArtifactType = "Template" +) + +// PossibleApplicationArtifactTypeValues returns an array of possible values for the ApplicationArtifactType const type. +func PossibleApplicationArtifactTypeValues() []ApplicationArtifactType { + return []ApplicationArtifactType{Custom, Template} +} + +// ApplicationLockLevel enumerates the values for application lock level. +type ApplicationLockLevel string + +const ( + // CanNotDelete ... + CanNotDelete ApplicationLockLevel = "CanNotDelete" + // None ... + None ApplicationLockLevel = "None" + // ReadOnly ... + ReadOnly ApplicationLockLevel = "ReadOnly" +) + +// PossibleApplicationLockLevelValues returns an array of possible values for the ApplicationLockLevel const type. +func PossibleApplicationLockLevelValues() []ApplicationLockLevel { + return []ApplicationLockLevel{CanNotDelete, None, ReadOnly} +} + +// JitRequestState enumerates the values for jit request state. +type JitRequestState string + +const ( + // Approved ... + Approved JitRequestState = "Approved" + // Canceled ... + Canceled JitRequestState = "Canceled" + // Denied ... + Denied JitRequestState = "Denied" + // Expired ... + Expired JitRequestState = "Expired" + // Failed ... + Failed JitRequestState = "Failed" + // NotSpecified ... + NotSpecified JitRequestState = "NotSpecified" + // Pending ... + Pending JitRequestState = "Pending" + // Timeout ... + Timeout JitRequestState = "Timeout" +) + +// PossibleJitRequestStateValues returns an array of possible values for the JitRequestState const type. +func PossibleJitRequestStateValues() []JitRequestState { + return []JitRequestState{Approved, Canceled, Denied, Expired, Failed, NotSpecified, Pending, Timeout} +} + +// JitSchedulingType enumerates the values for jit scheduling type. +type JitSchedulingType string + +const ( + // JitSchedulingTypeNotSpecified ... + JitSchedulingTypeNotSpecified JitSchedulingType = "NotSpecified" + // JitSchedulingTypeOnce ... + JitSchedulingTypeOnce JitSchedulingType = "Once" + // JitSchedulingTypeRecurring ... + JitSchedulingTypeRecurring JitSchedulingType = "Recurring" +) + +// PossibleJitSchedulingTypeValues returns an array of possible values for the JitSchedulingType const type. +func PossibleJitSchedulingTypeValues() []JitSchedulingType { + return []JitSchedulingType{JitSchedulingTypeNotSpecified, JitSchedulingTypeOnce, JitSchedulingTypeRecurring} +} + +// ProvisioningState enumerates the values for provisioning state. +type ProvisioningState string + +const ( + // ProvisioningStateAccepted ... + ProvisioningStateAccepted ProvisioningState = "Accepted" + // ProvisioningStateCanceled ... + ProvisioningStateCanceled ProvisioningState = "Canceled" + // ProvisioningStateCreated ... + ProvisioningStateCreated ProvisioningState = "Created" + // ProvisioningStateCreating ... + ProvisioningStateCreating ProvisioningState = "Creating" + // ProvisioningStateDeleted ... + ProvisioningStateDeleted ProvisioningState = "Deleted" + // ProvisioningStateDeleting ... + ProvisioningStateDeleting ProvisioningState = "Deleting" + // ProvisioningStateFailed ... + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateReady ... + ProvisioningStateReady ProvisioningState = "Ready" + // ProvisioningStateRunning ... + ProvisioningStateRunning ProvisioningState = "Running" + // ProvisioningStateSucceeded ... + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + // ProvisioningStateUpdating ... + ProvisioningStateUpdating ProvisioningState = "Updating" +) + +// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. +func PossibleProvisioningStateValues() []ProvisioningState { + return []ProvisioningState{ProvisioningStateAccepted, ProvisioningStateCanceled, ProvisioningStateCreated, ProvisioningStateCreating, ProvisioningStateDeleted, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateReady, ProvisioningStateRunning, ProvisioningStateSucceeded, ProvisioningStateUpdating} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{SystemAssigned} +} + +// Application information about managed application. +type Application struct { + autorest.Response `json:"-"` + // ApplicationProperties - The managed application properties. + *ApplicationProperties `json:"properties,omitempty"` + // Plan - The plan information. + Plan *Plan `json:"plan,omitempty"` + // Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. + Kind *string `json:"kind,omitempty"` + // ManagedBy - ID of the resource that manages this resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Sku - The SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Application. +func (a Application) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if a.ApplicationProperties != nil { + objectMap["properties"] = a.ApplicationProperties + } + if a.Plan != nil { + objectMap["plan"] = a.Plan + } + if a.Kind != nil { + objectMap["kind"] = a.Kind + } + if a.ManagedBy != nil { + objectMap["managedBy"] = a.ManagedBy + } + if a.Sku != nil { + objectMap["sku"] = a.Sku + } + if a.Identity != nil { + objectMap["identity"] = a.Identity + } + if a.Location != nil { + objectMap["location"] = a.Location + } + if a.Tags != nil { + objectMap["tags"] = a.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for Application struct. +func (a *Application) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationProperties ApplicationProperties + err = json.Unmarshal(*v, &applicationProperties) + if err != nil { + return err + } + a.ApplicationProperties = &applicationProperties + } + case "plan": + if v != nil { + var plan Plan + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + a.Plan = &plan + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + a.Kind = &kind + } + case "managedBy": + if v != nil { + var managedBy string + err = json.Unmarshal(*v, &managedBy) + if err != nil { + return err + } + a.ManagedBy = &managedBy + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + a.Sku = &sku + } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + a.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + a.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + a.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + a.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + a.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + a.Tags = tags + } + } + } + + return nil +} + +// ApplicationArtifact managed application artifact. +type ApplicationArtifact struct { + // Name - The managed application artifact name. + Name *string `json:"name,omitempty"` + // URI - The managed application artifact blob uri. + URI *string `json:"uri,omitempty"` + // Type - The managed application artifact type. Possible values include: 'Template', 'Custom' + Type ApplicationArtifactType `json:"type,omitempty"` +} + +// ApplicationClientDetails the application client details to track the entity creating/updating the +// managed app resource. +type ApplicationClientDetails struct { + // Oid - The client Oid. + Oid *string `json:"oid,omitempty"` + // Puid - The client Puid + Puid *string `json:"puid,omitempty"` + // ApplicationID - The client application Id. + ApplicationID *string `json:"applicationId,omitempty"` +} + +// ApplicationDefinition information about managed application definition. +type ApplicationDefinition struct { + autorest.Response `json:"-"` + // ApplicationDefinitionProperties - The managed application definition properties. + *ApplicationDefinitionProperties `json:"properties,omitempty"` + // ManagedBy - ID of the resource that manages this resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Sku - The SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ApplicationDefinition. +func (ad ApplicationDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ad.ApplicationDefinitionProperties != nil { + objectMap["properties"] = ad.ApplicationDefinitionProperties + } + if ad.ManagedBy != nil { + objectMap["managedBy"] = ad.ManagedBy + } + if ad.Sku != nil { + objectMap["sku"] = ad.Sku + } + if ad.Identity != nil { + objectMap["identity"] = ad.Identity + } + if ad.Location != nil { + objectMap["location"] = ad.Location + } + if ad.Tags != nil { + objectMap["tags"] = ad.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationDefinition struct. +func (ad *ApplicationDefinition) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationDefinitionProperties ApplicationDefinitionProperties + err = json.Unmarshal(*v, &applicationDefinitionProperties) + if err != nil { + return err + } + ad.ApplicationDefinitionProperties = &applicationDefinitionProperties + } + case "managedBy": + if v != nil { + var managedBy string + err = json.Unmarshal(*v, &managedBy) + if err != nil { + return err + } + ad.ManagedBy = &managedBy + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + ad.Sku = &sku + } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ad.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ad.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ad.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ad.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ad.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ad.Tags = tags + } + } + } + + return nil +} + +// ApplicationDefinitionListResult list of managed application definitions. +type ApplicationDefinitionListResult struct { + autorest.Response `json:"-"` + // Value - The array of managed application definitions. + Value *[]ApplicationDefinition `json:"value,omitempty"` + // NextLink - The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationDefinitionListResultIterator provides access to a complete listing of ApplicationDefinition +// values. +type ApplicationDefinitionListResultIterator struct { + i int + page ApplicationDefinitionListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ApplicationDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ApplicationDefinitionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationDefinitionListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ApplicationDefinitionListResultIterator) Response() ApplicationDefinitionListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ApplicationDefinitionListResultIterator) Value() ApplicationDefinition { + if !iter.page.NotDone() { + return ApplicationDefinition{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationDefinitionListResultIterator type. +func NewApplicationDefinitionListResultIterator(page ApplicationDefinitionListResultPage) ApplicationDefinitionListResultIterator { + return ApplicationDefinitionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (adlr ApplicationDefinitionListResult) IsEmpty() bool { + return adlr.Value == nil || len(*adlr.Value) == 0 +} + +// applicationDefinitionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (adlr ApplicationDefinitionListResult) applicationDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) { + if adlr.NextLink == nil || len(to.String(adlr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(adlr.NextLink))) +} + +// ApplicationDefinitionListResultPage contains a page of ApplicationDefinition values. +type ApplicationDefinitionListResultPage struct { + fn func(context.Context, ApplicationDefinitionListResult) (ApplicationDefinitionListResult, error) + adlr ApplicationDefinitionListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ApplicationDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationDefinitionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.adlr) + if err != nil { + return err + } + page.adlr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ApplicationDefinitionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationDefinitionListResultPage) NotDone() bool { + return !page.adlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationDefinitionListResultPage) Response() ApplicationDefinitionListResult { + return page.adlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationDefinitionListResultPage) Values() []ApplicationDefinition { + if page.adlr.IsEmpty() { + return nil + } + return *page.adlr.Value +} + +// Creates a new instance of the ApplicationDefinitionListResultPage type. +func NewApplicationDefinitionListResultPage(getNextPage func(context.Context, ApplicationDefinitionListResult) (ApplicationDefinitionListResult, error)) ApplicationDefinitionListResultPage { + return ApplicationDefinitionListResultPage{fn: getNextPage} +} + +// ApplicationDefinitionProperties the managed application definition properties. +type ApplicationDefinitionProperties struct { + // LockLevel - The managed application lock level. Possible values include: 'CanNotDelete', 'ReadOnly', 'None' + LockLevel ApplicationLockLevel `json:"lockLevel,omitempty"` + // DisplayName - The managed application definition display name. + DisplayName *string `json:"displayName,omitempty"` + // IsEnabled - A value indicating whether the package is enabled or not. + IsEnabled *string `json:"isEnabled,omitempty"` + // Authorizations - The managed application provider authorizations. + Authorizations *[]ApplicationProviderAuthorization `json:"authorizations,omitempty"` + // Artifacts - The collection of managed application artifacts. The portal will use the files specified as artifacts to construct the user experience of creating a managed application from a managed application definition. + Artifacts *[]ApplicationArtifact `json:"artifacts,omitempty"` + // Description - The managed application definition description. + Description *string `json:"description,omitempty"` + // PackageFileURI - The managed application definition package file Uri. Use this element + PackageFileURI *string `json:"packageFileUri,omitempty"` + // MainTemplate - The inline main template json which has resources to be provisioned. It can be a JObject or well-formed JSON string. + MainTemplate interface{} `json:"mainTemplate,omitempty"` + // CreateUIDefinition - The createUiDefinition json for the backing template with Microsoft.Solutions/applications resource. It can be a JObject or well-formed JSON string. + CreateUIDefinition interface{} `json:"createUiDefinition,omitempty"` +} + +// ApplicationDefinitionsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ApplicationDefinitionsCreateOrUpdateByIDFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationDefinitionsCreateOrUpdateByIDFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent { + ad, err = client.CreateOrUpdateByIDResponder(ad.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateByIDFuture", "Result", ad.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationDefinitionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationDefinitionsCreateOrUpdateFuture) Result(client ApplicationDefinitionsClient) (ad ApplicationDefinition, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ad.Response.Response, err = future.GetResult(sender); err == nil && ad.Response.Response.StatusCode != http.StatusNoContent { + ad, err = client.CreateOrUpdateResponder(ad.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsCreateOrUpdateFuture", "Result", ad.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationDefinitionsDeleteByIDFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationDefinitionsDeleteByIDFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationDefinitionsDeleteByIDFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteByIDFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteByIDFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationDefinitionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationDefinitionsDeleteFuture) Result(client ApplicationDefinitionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationDefinitionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationListResult list of managed applications. +type ApplicationListResult struct { + autorest.Response `json:"-"` + // Value - The array of managed applications. + Value *[]Application `json:"value,omitempty"` + // NextLink - The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationListResultIterator provides access to a complete listing of Application values. +type ApplicationListResultIterator struct { + i int + page ApplicationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ApplicationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ApplicationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApplicationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ApplicationListResultIterator) Response() ApplicationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ApplicationListResultIterator) Value() Application { + if !iter.page.NotDone() { + return Application{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApplicationListResultIterator type. +func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator { + return ApplicationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (alr ApplicationListResult) IsEmpty() bool { + return alr.Value == nil || len(*alr.Value) == 0 +} + +// applicationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (alr ApplicationListResult) applicationListResultPreparer(ctx context.Context) (*http.Request, error) { + if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(alr.NextLink))) +} + +// ApplicationListResultPage contains a page of Application values. +type ApplicationListResultPage struct { + fn func(context.Context, ApplicationListResult) (ApplicationListResult, error) + alr ApplicationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ApplicationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.alr) + if err != nil { + return err + } + page.alr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ApplicationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApplicationListResultPage) NotDone() bool { + return !page.alr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApplicationListResultPage) Response() ApplicationListResult { + return page.alr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApplicationListResultPage) Values() []Application { + if page.alr.IsEmpty() { + return nil + } + return *page.alr.Value +} + +// Creates a new instance of the ApplicationListResultPage type. +func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage { + return ApplicationListResultPage{fn: getNextPage} +} + +// ApplicationPatchable information about managed application. +type ApplicationPatchable struct { + // ApplicationPropertiesPatchable - The managed application properties. + *ApplicationPropertiesPatchable `json:"properties,omitempty"` + // Plan - The plan information. + Plan *PlanPatchable `json:"plan,omitempty"` + // Kind - The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. + Kind *string `json:"kind,omitempty"` + // ManagedBy - ID of the resource that manages this resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Sku - The SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ApplicationPatchable. +func (ap ApplicationPatchable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.ApplicationPropertiesPatchable != nil { + objectMap["properties"] = ap.ApplicationPropertiesPatchable + } + if ap.Plan != nil { + objectMap["plan"] = ap.Plan + } + if ap.Kind != nil { + objectMap["kind"] = ap.Kind + } + if ap.ManagedBy != nil { + objectMap["managedBy"] = ap.ManagedBy + } + if ap.Sku != nil { + objectMap["sku"] = ap.Sku + } + if ap.Identity != nil { + objectMap["identity"] = ap.Identity + } + if ap.Location != nil { + objectMap["location"] = ap.Location + } + if ap.Tags != nil { + objectMap["tags"] = ap.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationPatchable struct. +func (ap *ApplicationPatchable) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationPropertiesPatchable ApplicationPropertiesPatchable + err = json.Unmarshal(*v, &applicationPropertiesPatchable) + if err != nil { + return err + } + ap.ApplicationPropertiesPatchable = &applicationPropertiesPatchable + } + case "plan": + if v != nil { + var plan PlanPatchable + err = json.Unmarshal(*v, &plan) + if err != nil { + return err + } + ap.Plan = &plan + } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ap.Kind = &kind + } + case "managedBy": + if v != nil { + var managedBy string + err = json.Unmarshal(*v, &managedBy) + if err != nil { + return err + } + ap.ManagedBy = &managedBy + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + ap.Sku = &sku + } + case "identity": + if v != nil { + var identity Identity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ap.Identity = &identity + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ap.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ap.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ap.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ap.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ap.Tags = tags + } + } + } + + return nil +} + +// ApplicationProperties the managed application properties. +type ApplicationProperties struct { + // ManagedResourceGroupID - The managed resource group Id. + ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"` + // ApplicationDefinitionID - The fully qualified path of managed application definition Id. + ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"` + // Parameters - Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string. + Parameters interface{} `json:"parameters,omitempty"` + // Outputs - READ-ONLY; Name and value pairs that define the managed application outputs. + Outputs interface{} `json:"outputs,omitempty"` + // ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ApplicationPropertiesPatchable the managed application properties. +type ApplicationPropertiesPatchable struct { + // ManagedResourceGroupID - The managed resource group Id. + ManagedResourceGroupID *string `json:"managedResourceGroupId,omitempty"` + // ApplicationDefinitionID - The fully qualified path of managed application definition Id. + ApplicationDefinitionID *string `json:"applicationDefinitionId,omitempty"` + // Parameters - Name and value pairs that define the managed application parameters. It can be a JObject or a well formed JSON string. + Parameters interface{} `json:"parameters,omitempty"` + // Outputs - READ-ONLY; Name and value pairs that define the managed application outputs. + Outputs interface{} `json:"outputs,omitempty"` + // ProvisioningState - READ-ONLY; The managed application provisioning state. Possible values include: 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// ApplicationProviderAuthorization the managed application provider authorization. +type ApplicationProviderAuthorization struct { + // PrincipalID - The provider's principal identifier. This is the identity that the provider will use to call ARM to manage the managed application resources. + PrincipalID *string `json:"principalId,omitempty"` + // RoleDefinitionID - The provider's role definition identifier. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. + RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` +} + +// ApplicationsCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationsCreateOrUpdateByIDFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationsCreateOrUpdateByIDFuture) Result(client ApplicationsClient) (a Application, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateByIDFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent { + a, err = client.CreateOrUpdateByIDResponder(a.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateByIDFuture", "Result", a.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationsCreateOrUpdateFuture) Result(client ApplicationsClient) (a Application, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if a.Response.Response, err = future.GetResult(sender); err == nil && a.Response.Response.StatusCode != http.StatusNoContent { + a, err = client.CreateOrUpdateResponder(a.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsCreateOrUpdateFuture", "Result", a.Response.Response, "Failure responding to request") + } + } + return +} + +// ApplicationsDeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ApplicationsDeleteByIDFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationsDeleteByIDFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteByIDFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteByIDFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ApplicationsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ApplicationsRefreshPermissionsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationsRefreshPermissionsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationsRefreshPermissionsFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.ApplicationsRefreshPermissionsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.ApplicationsRefreshPermissionsFuture") + return + } + ar.Response = future.Response() + return +} + +// ErrorResponse error response indicates managed application is not able to process the incoming request. +// The reason is provided in the error message. +type ErrorResponse struct { + // HTTPStatus - Http status code. + HTTPStatus *string `json:"httpStatus,omitempty"` + // ErrorCode - Error code. + ErrorCode *string `json:"errorCode,omitempty"` + // ErrorMessage - Error message indicating why the operation failed. + ErrorMessage *string `json:"errorMessage,omitempty"` +} + +// GenericResource resource information. +type GenericResource struct { + // ManagedBy - ID of the resource that manages this resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Sku - The SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GenericResource. +func (gr GenericResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gr.ManagedBy != nil { + objectMap["managedBy"] = gr.ManagedBy + } + if gr.Sku != nil { + objectMap["sku"] = gr.Sku + } + if gr.Identity != nil { + objectMap["identity"] = gr.Identity + } + if gr.Location != nil { + objectMap["location"] = gr.Location + } + if gr.Tags != nil { + objectMap["tags"] = gr.Tags + } + return json.Marshal(objectMap) +} + +// Identity identity for the resource. +type Identity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'SystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// JitAuthorizationPolicies the JIT authorization policies. +type JitAuthorizationPolicies struct { + // PrincipalID - The the principal id that will be granted JIT access. + PrincipalID *string `json:"principalId,omitempty"` + // RoleDefinitionID - The role definition id that will be granted to the Principal. + RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` +} + +// JitRequestDefinition information about JIT request definition. +type JitRequestDefinition struct { + autorest.Response `json:"-"` + // JitRequestProperties - The JIT request properties. + *JitRequestProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for JitRequestDefinition. +func (jrd JitRequestDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if jrd.JitRequestProperties != nil { + objectMap["properties"] = jrd.JitRequestProperties + } + if jrd.Location != nil { + objectMap["location"] = jrd.Location + } + if jrd.Tags != nil { + objectMap["tags"] = jrd.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for JitRequestDefinition struct. +func (jrd *JitRequestDefinition) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var jitRequestProperties JitRequestProperties + err = json.Unmarshal(*v, &jitRequestProperties) + if err != nil { + return err + } + jrd.JitRequestProperties = &jitRequestProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + jrd.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + jrd.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + jrd.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + jrd.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + jrd.Tags = tags + } + } + } + + return nil +} + +// JitRequestDefinitionListResult list of JIT requests. +type JitRequestDefinitionListResult struct { + autorest.Response `json:"-"` + // Value - The array of Jit request definition. + Value *[]JitRequestDefinition `json:"value,omitempty"` + // NextLink - The URL to use for getting the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// JitRequestPatchable information about JIT request. +type JitRequestPatchable struct { + // Tags - Jit request tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for JitRequestPatchable. +func (jrp JitRequestPatchable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if jrp.Tags != nil { + objectMap["tags"] = jrp.Tags + } + return json.Marshal(objectMap) +} + +// JitRequestProperties information about JIT request properties +type JitRequestProperties struct { + // ApplicationResourceID - The parent application id. + ApplicationResourceID *string `json:"applicationResourceId,omitempty"` + // PublisherTenantID - READ-ONLY; The publisher tenant id. + PublisherTenantID *string `json:"publisherTenantId,omitempty"` + // JitAuthorizationPolicies - The JIT authorization policies. + JitAuthorizationPolicies *[]JitAuthorizationPolicies `json:"jitAuthorizationPolicies,omitempty"` + // JitSchedulingPolicy - The JIT request properties. + JitSchedulingPolicy *JitSchedulingPolicy `json:"jitSchedulingPolicy,omitempty"` + // ProvisioningState - READ-ONLY; The JIT request provisioning state. Possible values include: 'ProvisioningStateAccepted', 'ProvisioningStateRunning', 'ProvisioningStateReady', 'ProvisioningStateCreating', 'ProvisioningStateCreated', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateCanceled', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // JitRequestState - READ-ONLY; The JIT request state. Possible values include: 'NotSpecified', 'Pending', 'Approved', 'Denied', 'Failed', 'Canceled', 'Expired', 'Timeout' + JitRequestState JitRequestState `json:"jitRequestState,omitempty"` + // CreatedBy - READ-ONLY; The client entity that created the JIT request. + CreatedBy *ApplicationClientDetails `json:"createdBy,omitempty"` + // UpdatedBy - READ-ONLY; The client entity that last updated the JIT request. + UpdatedBy *ApplicationClientDetails `json:"updatedBy,omitempty"` +} + +// JitRequestsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type JitRequestsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *JitRequestsCreateOrUpdateFuture) Result(client JitRequestsClient) (jrd JitRequestDefinition, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("managedapplications.JitRequestsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if jrd.Response.Response, err = future.GetResult(sender); err == nil && jrd.Response.Response.StatusCode != http.StatusNoContent { + jrd, err = client.CreateOrUpdateResponder(jrd.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "managedapplications.JitRequestsCreateOrUpdateFuture", "Result", jrd.Response.Response, "Failure responding to request") + } + } + return +} + +// JitSchedulingPolicy the JIT scheduling policies. +type JitSchedulingPolicy struct { + // Type - The type of JIT schedule. Possible values include: 'JitSchedulingTypeNotSpecified', 'JitSchedulingTypeOnce', 'JitSchedulingTypeRecurring' + Type JitSchedulingType `json:"type,omitempty"` + Duration *string `json:"duration,omitempty"` + // StartTime - The start time of the request. + StartTime *date.Time `json:"startTime,omitempty"` +} + +// Operation microsoft.Solutions operation +type Operation struct { + // Name - Operation name: {provider}/{resource}/{operation} + Name *string `json:"name,omitempty"` + // Display - The object that represents the operation. + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay the object that represents the operation. +type OperationDisplay struct { + // Provider - Service provider: Microsoft.Solutions + Provider *string `json:"provider,omitempty"` + // Resource - Resource on which the operation is performed: Application, JitRequest, etc. + Resource *string `json:"resource,omitempty"` + // Operation - Operation type: Read, write, delete, etc. + Operation *string `json:"operation,omitempty"` +} + +// OperationListResult result of the request to list Microsoft.Solutions operations. It contains a list of +// operations and a URL link to get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + // Value - List of Microsoft.Solutions operations. + Value *[]Operation `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultIterator provides access to a complete listing of Operation values. +type OperationListResultIterator struct { + i int + page OperationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OperationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OperationListResultIterator) Response() OperationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OperationListResultIterator) Value() Operation { + if !iter.page.NotDone() { + return Operation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (olr OperationListResult) IsEmpty() bool { + return olr.Value == nil || len(*olr.Value) == 0 +} + +// operationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(olr.NextLink))) +} + +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationListResultPage) Response() OperationListResult { + return page.olr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { + return nil + } + return *page.olr.Value +} + +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} +} + +// Plan plan for the managed application. +type Plan struct { + // Name - The plan name. + Name *string `json:"name,omitempty"` + // Publisher - The publisher ID. + Publisher *string `json:"publisher,omitempty"` + // Product - The product code. + Product *string `json:"product,omitempty"` + // PromotionCode - The promotion code. + PromotionCode *string `json:"promotionCode,omitempty"` + // Version - The plan's version. + Version *string `json:"version,omitempty"` +} + +// PlanPatchable plan for the managed application. +type PlanPatchable struct { + // Name - The plan name. + Name *string `json:"name,omitempty"` + // Publisher - The publisher ID. + Publisher *string `json:"publisher,omitempty"` + // Product - The product code. + Product *string `json:"product,omitempty"` + // PromotionCode - The promotion code. + PromotionCode *string `json:"promotionCode,omitempty"` + // Version - The plan's version. + Version *string `json:"version,omitempty"` +} + +// Resource resource information. +type Resource struct { + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + return json.Marshal(objectMap) +} + +// Sku SKU for the resource. +type Sku struct { + // Name - The SKU name. + Name *string `json:"name,omitempty"` + // Tier - The SKU tier. + Tier *string `json:"tier,omitempty"` + // Size - The SKU size. + Size *string `json:"size,omitempty"` + // Family - The SKU family. + Family *string `json:"family,omitempty"` + // Model - The SKU model. + Model *string `json:"model,omitempty"` + // Capacity - The SKU capacity. + Capacity *int32 `json:"capacity,omitempty"` +} diff --git a/services/resources/mgmt/2019-07-01/managedapplications/version.go b/services/resources/mgmt/2019-07-01/managedapplications/version.go new file mode 100644 index 000000000000..82a5e4deb451 --- /dev/null +++ b/services/resources/mgmt/2019-07-01/managedapplications/version.go @@ -0,0 +1,30 @@ +package managedapplications + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " managedapplications/2019-07-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go b/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go index 1942cd84b0de..6a1489d7b092 100644 --- a/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go +++ b/services/scheduler/mgmt/2016-03-01/scheduler/jobs.go @@ -305,7 +305,7 @@ func (client JobsClient) List(ctx context.Context, resourceGroupName string, job {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("scheduler.JobsClient", "List", err.Error()) } @@ -442,7 +442,7 @@ func (client JobsClient) ListJobHistory(ctx context.Context, resourceGroupName s {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("scheduler.JobsClient", "ListJobHistory", err.Error()) } diff --git a/services/search/mgmt/2015-08-19/search/services.go b/services/search/mgmt/2015-08-19/search/services.go index c3db3b9dffbf..518521c4c01f 100644 --- a/services/search/mgmt/2015-08-19/search/services.go +++ b/services/search/mgmt/2015-08-19/search/services.go @@ -161,11 +161,11 @@ func (client ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa Constraints: []validation.Constraint{{Target: "service.ServiceProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "service.ServiceProperties.ReplicaCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "service.ServiceProperties.ReplicaCount", Name: validation.InclusiveMaximum, Rule: int64(12), Chain: nil}, - {Target: "service.ServiceProperties.ReplicaCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "service.ServiceProperties.ReplicaCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, {Target: "service.ServiceProperties.PartitionCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "service.ServiceProperties.PartitionCount", Name: validation.InclusiveMaximum, Rule: int64(12), Chain: nil}, - {Target: "service.ServiceProperties.PartitionCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "service.ServiceProperties.PartitionCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("search.ServicesClient", "CreateOrUpdate", err.Error()) diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/queues.go b/services/servicebus/mgmt/2017-04-01/servicebus/queues.go index 47ead511723f..2c0c1c04b696 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/queues.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/queues.go @@ -767,12 +767,12 @@ func (client QueuesClient) ListByNamespace(ctx context.Context, resourceGroupNam {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.QueuesClient", "ListByNamespace", err.Error()) } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/rules.go b/services/servicebus/mgmt/2017-04-01/servicebus/rules.go index 4b12b65da8fe..52138da6134b 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/rules.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/rules.go @@ -80,7 +80,7 @@ func (client RulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName Chain: []validation.Constraint{{Target: "parameters.Ruleproperties.SQLFilter", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Ruleproperties.SQLFilter.CompatibilityLevel", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Ruleproperties.SQLFilter.CompatibilityLevel", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil}, - {Target: "parameters.Ruleproperties.SQLFilter.CompatibilityLevel", Name: validation.InclusiveMinimum, Rule: 20, Chain: nil}, + {Target: "parameters.Ruleproperties.SQLFilter.CompatibilityLevel", Name: validation.InclusiveMinimum, Rule: int64(20), Chain: nil}, }}, }}, }}}}}); err != nil { @@ -391,12 +391,12 @@ func (client RulesClient) ListBySubscriptions(ctx context.Context, resourceGroup {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.RulesClient", "ListBySubscriptions", err.Error()) } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go b/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go index 53af17568e26..118d6679eccb 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/subscriptions.go @@ -363,12 +363,12 @@ func (client SubscriptionsClient) ListByTopic(ctx context.Context, resourceGroup {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.SubscriptionsClient", "ListByTopic", err.Error()) } diff --git a/services/servicebus/mgmt/2017-04-01/servicebus/topics.go b/services/servicebus/mgmt/2017-04-01/servicebus/topics.go index 9078b6c2c7b7..7d625a497fbf 100644 --- a/services/servicebus/mgmt/2017-04-01/servicebus/topics.go +++ b/services/servicebus/mgmt/2017-04-01/servicebus/topics.go @@ -767,12 +767,12 @@ func (client TopicsClient) ListByNamespace(ctx context.Context, resourceGroupNam {TargetValue: skip, Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "skip", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: top, Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, - {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicebus.TopicsClient", "ListByNamespace", err.Error()) } diff --git a/services/servicefabric/6.2/servicefabric/client.go b/services/servicefabric/6.2/servicefabric/client.go index 80de0ef4f289..71be58854679 100644 --- a/services/servicefabric/6.2/servicefabric/client.go +++ b/services/servicefabric/6.2/servicefabric/client.go @@ -87,7 +87,7 @@ func (client BaseClient) BackupPartition(ctx context.Context, partitionID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "BackupPartition", err.Error()) } @@ -209,7 +209,7 @@ func (client BaseClient) CancelOperation(ctx context.Context, operationID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CancelOperation", err.Error()) } @@ -378,7 +378,7 @@ func (client BaseClient) CommitImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CommitImageStoreUploadSession", err.Error()) } @@ -469,7 +469,7 @@ func (client BaseClient) CopyImageStoreContent(ctx context.Context, imageStoreCo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CopyImageStoreContent", err.Error()) } @@ -560,14 +560,14 @@ func (client BaseClient) CreateApplication(ctx context.Context, applicationDescr {Target: "applicationDescription.TypeVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "applicationDescription.ApplicationCapacity", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateApplication", err.Error()) } @@ -658,14 +658,14 @@ func (client BaseClient) CreateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateBackupPolicy", err.Error()) } @@ -758,7 +758,7 @@ func (client BaseClient) CreateComposeDeployment(ctx context.Context, createComp {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateComposeDeployment", err.Error()) } @@ -848,7 +848,7 @@ func (client BaseClient) CreateName(ctx context.Context, nameDescription NameDes {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateName", err.Error()) } @@ -1036,7 +1036,7 @@ func (client BaseClient) CreateService(ctx context.Context, applicationID string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateService", err.Error()) } @@ -1140,7 +1140,7 @@ func (client BaseClient) CreateServiceFromTemplate(ctx context.Context, applicat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateServiceFromTemplate", err.Error()) } @@ -1244,7 +1244,7 @@ func (client BaseClient) DeleteApplication(ctx context.Context, applicationID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteApplication", err.Error()) } @@ -1339,7 +1339,7 @@ func (client BaseClient) DeleteBackupPolicy(ctx context.Context, backupPolicyNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteBackupPolicy", err.Error()) } @@ -1430,7 +1430,7 @@ func (client BaseClient) DeleteImageStoreContent(ctx context.Context, contentPat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreContent", err.Error()) } @@ -1522,7 +1522,7 @@ func (client BaseClient) DeleteImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreUploadSession", err.Error()) } @@ -1610,7 +1610,7 @@ func (client BaseClient) DeleteName(ctx context.Context, nameID string, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteName", err.Error()) } @@ -1702,7 +1702,7 @@ func (client BaseClient) DeleteProperty(ctx context.Context, nameID string, prop {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteProperty", err.Error()) } @@ -1881,7 +1881,7 @@ func (client BaseClient) DeleteService(ctx context.Context, serviceID string, fo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteService", err.Error()) } @@ -1984,7 +1984,7 @@ func (client BaseClient) DeployServicePackageToNode(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeployServicePackageToNode", err.Error()) } @@ -2080,7 +2080,7 @@ func (client BaseClient) DisableApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableApplicationBackup", err.Error()) } @@ -2176,7 +2176,7 @@ func (client BaseClient) DisableNode(ctx context.Context, nodeName string, deact {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableNode", err.Error()) } @@ -2271,7 +2271,7 @@ func (client BaseClient) DisablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisablePartitionBackup", err.Error()) } @@ -2368,7 +2368,7 @@ func (client BaseClient) DisableServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableServiceBackup", err.Error()) } @@ -2467,7 +2467,7 @@ func (client BaseClient) EnableApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableApplicationBackup", err.Error()) } @@ -2561,7 +2561,7 @@ func (client BaseClient) EnableNode(ctx context.Context, nodeName string, timeou {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableNode", err.Error()) } @@ -2658,7 +2658,7 @@ func (client BaseClient) EnablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnablePartitionBackup", err.Error()) } @@ -2762,7 +2762,7 @@ func (client BaseClient) EnableServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableServiceBackup", err.Error()) } @@ -2934,7 +2934,7 @@ func (client BaseClient) GetAadMetadata(ctx context.Context, timeout *int64) (re {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAadMetadata", err.Error()) } @@ -3031,11 +3031,11 @@ func (client BaseClient) GetAllEntitiesBackedUpByPolicy(ctx context.Context, bac if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", err.Error()) } @@ -3148,11 +3148,11 @@ func (client BaseClient) GetApplicationBackupConfigurationInfo(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", err.Error()) } @@ -3276,11 +3276,11 @@ func (client BaseClient) GetApplicationBackupList(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupList", err.Error()) } @@ -3401,7 +3401,7 @@ func (client BaseClient) GetApplicationEventList(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationEventList", err.Error()) } @@ -3561,7 +3561,7 @@ func (client BaseClient) GetApplicationHealth(ctx context.Context, applicationID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealth", err.Error()) } @@ -3735,7 +3735,7 @@ func (client BaseClient) GetApplicationHealthUsingPolicy(ctx context.Context, ap {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", err.Error()) } @@ -3859,7 +3859,7 @@ func (client BaseClient) GetApplicationInfo(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfo", err.Error()) } @@ -3978,11 +3978,11 @@ func (client BaseClient) GetApplicationInfoList(ctx context.Context, application if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfoList", err.Error()) } @@ -4097,7 +4097,7 @@ func (client BaseClient) GetApplicationLoadInfo(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationLoadInfo", err.Error()) } @@ -4190,7 +4190,7 @@ func (client BaseClient) GetApplicationManifest(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationManifest", err.Error()) } @@ -4287,7 +4287,7 @@ func (client BaseClient) GetApplicationNameInfo(ctx context.Context, serviceID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationNameInfo", err.Error()) } @@ -4385,7 +4385,7 @@ func (client BaseClient) GetApplicationsEventList(ctx context.Context, startTime {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationsEventList", err.Error()) } @@ -4507,11 +4507,11 @@ func (client BaseClient) GetApplicationTypeInfoList(ctx context.Context, applica if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoList", err.Error()) } @@ -4637,11 +4637,11 @@ func (client BaseClient) GetApplicationTypeInfoListByName(ctx context.Context, a if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoListByName", err.Error()) } @@ -4753,7 +4753,7 @@ func (client BaseClient) GetApplicationUpgrade(ctx context.Context, applicationI {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationUpgrade", err.Error()) } @@ -4844,7 +4844,7 @@ func (client BaseClient) GetBackupPolicyByName(ctx context.Context, backupPolicy {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyByName", err.Error()) } @@ -4943,11 +4943,11 @@ func (client BaseClient) GetBackupPolicyList(ctx context.Context, continuationTo if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyList", err.Error()) } @@ -5054,11 +5054,11 @@ func (client BaseClient) GetBackupsFromBackupLocation(ctx context.Context, getBa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: getBackupByStorageQueryDescription, Constraints: []validation.Constraint{{Target: "getBackupByStorageQueryDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}, {Target: "getBackupByStorageQueryDescription.BackupEntity", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -5157,7 +5157,7 @@ func (client BaseClient) GetChaos(ctx context.Context, timeout *int64) (result C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaos", err.Error()) } @@ -5264,11 +5264,11 @@ func (client BaseClient) GetChaosEvents(ctx context.Context, continuationToken s if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaosEvents", err.Error()) } @@ -5440,7 +5440,7 @@ func (client BaseClient) GetClusterConfiguration(ctx context.Context, configurat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfiguration", err.Error()) } @@ -5528,7 +5528,7 @@ func (client BaseClient) GetClusterConfigurationUpgradeStatus(ctx context.Contex {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", err.Error()) } @@ -5622,7 +5622,7 @@ func (client BaseClient) GetClusterEventList(ctx context.Context, startTimeUtc s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterEventList", err.Error()) } @@ -5784,7 +5784,7 @@ func (client BaseClient) GetClusterHealth(ctx context.Context, nodesHealthStateF {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealth", err.Error()) } @@ -5898,7 +5898,7 @@ func (client BaseClient) GetClusterHealthChunk(ctx context.Context, timeout *int {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunk", err.Error()) } @@ -6006,7 +6006,7 @@ func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFilters(ctx {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", err.Error()) } @@ -6171,7 +6171,7 @@ func (client BaseClient) GetClusterHealthUsingPolicy(ctx context.Context, nodesH {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthUsingPolicy", err.Error()) } @@ -6297,7 +6297,7 @@ func (client BaseClient) GetClusterManifest(ctx context.Context, timeout *int64) {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterManifest", err.Error()) } @@ -6384,7 +6384,7 @@ func (client BaseClient) GetClusterUpgradeProgress(ctx context.Context, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterUpgradeProgress", err.Error()) } @@ -6473,7 +6473,7 @@ func (client BaseClient) GetComposeDeploymentStatus(ctx context.Context, deploym {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatus", err.Error()) } @@ -6575,11 +6575,11 @@ func (client BaseClient) GetComposeDeploymentStatusList(ctx context.Context, con if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatusList", err.Error()) } @@ -6675,7 +6675,7 @@ func (client BaseClient) GetComposeDeploymentUpgradeProgress(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", err.Error()) } @@ -6778,7 +6778,7 @@ func (client BaseClient) GetContainerLogsDeployedOnNode(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", err.Error()) } @@ -6887,7 +6887,7 @@ func (client BaseClient) GetContainersEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainersEventList", err.Error()) } @@ -6985,7 +6985,7 @@ func (client BaseClient) GetCorrelatedEventList(ctx context.Context, eventInstan {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetCorrelatedEventList", err.Error()) } @@ -7083,7 +7083,7 @@ func (client BaseClient) GetDataLossProgress(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDataLossProgress", err.Error()) } @@ -7220,7 +7220,7 @@ func (client BaseClient) GetDeployedApplicationHealth(ctx context.Context, nodeN {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealth", err.Error()) } @@ -7378,7 +7378,7 @@ func (client BaseClient) GetDeployedApplicationHealthUsingPolicy(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", err.Error()) } @@ -7504,7 +7504,7 @@ func (client BaseClient) GetDeployedApplicationInfo(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfo", err.Error()) } @@ -7620,11 +7620,11 @@ func (client BaseClient) GetDeployedApplicationInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfoList", err.Error()) } @@ -7737,7 +7737,7 @@ func (client BaseClient) GetDeployedCodePackageInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedCodePackageInfoList", err.Error()) } @@ -7858,7 +7858,7 @@ func (client BaseClient) GetDeployedServicePackageHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealth", err.Error()) } @@ -7986,7 +7986,7 @@ func (client BaseClient) GetDeployedServicePackageHealthUsingPolicy(ctx context. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", err.Error()) } @@ -8095,7 +8095,7 @@ func (client BaseClient) GetDeployedServicePackageInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoList", err.Error()) } @@ -8195,7 +8195,7 @@ func (client BaseClient) GetDeployedServicePackageInfoListByName(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", err.Error()) } @@ -8292,7 +8292,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", err.Error()) } @@ -8388,7 +8388,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionID(ctx co {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", err.Error()) } @@ -8491,7 +8491,7 @@ func (client BaseClient) GetDeployedServiceReplicaInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", err.Error()) } @@ -8601,7 +8601,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoByName(ctx context.Context, n {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", err.Error()) } @@ -8707,7 +8707,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", err.Error()) } @@ -8815,7 +8815,7 @@ func (client BaseClient) GetFaultOperationList(ctx context.Context, typeFilter i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetFaultOperationList", err.Error()) } @@ -8905,7 +8905,7 @@ func (client BaseClient) GetImageStoreContent(ctx context.Context, contentPath s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreContent", err.Error()) } @@ -8995,7 +8995,7 @@ func (client BaseClient) GetImageStoreRootContent(ctx context.Context, timeout * {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreRootContent", err.Error()) } @@ -9084,7 +9084,7 @@ func (client BaseClient) GetImageStoreUploadSessionByID(ctx context.Context, ses {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByID", err.Error()) } @@ -9173,7 +9173,7 @@ func (client BaseClient) GetImageStoreUploadSessionByPath(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", err.Error()) } @@ -9264,7 +9264,7 @@ func (client BaseClient) GetNameExistsInfo(ctx context.Context, nameID string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNameExistsInfo", err.Error()) } @@ -9362,7 +9362,7 @@ func (client BaseClient) GetNodeEventList(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeEventList", err.Error()) } @@ -9481,7 +9481,7 @@ func (client BaseClient) GetNodeHealth(ctx context.Context, nodeName string, eve {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealth", err.Error()) } @@ -9597,7 +9597,7 @@ func (client BaseClient) GetNodeHealthUsingPolicy(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealthUsingPolicy", err.Error()) } @@ -9699,7 +9699,7 @@ func (client BaseClient) GetNodeInfo(ctx context.Context, nodeName string, timeo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfo", err.Error()) } @@ -9797,7 +9797,7 @@ func (client BaseClient) GetNodeInfoList(ctx context.Context, continuationToken {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfoList", err.Error()) } @@ -9893,7 +9893,7 @@ func (client BaseClient) GetNodeLoadInfo(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeLoadInfo", err.Error()) } @@ -9991,7 +9991,7 @@ func (client BaseClient) GetNodesEventList(ctx context.Context, startTimeUtc str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodesEventList", err.Error()) } @@ -10092,7 +10092,7 @@ func (client BaseClient) GetNodeTransitionProgress(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeTransitionProgress", err.Error()) } @@ -10185,7 +10185,7 @@ func (client BaseClient) GetPartitionBackupConfigurationInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", err.Error()) } @@ -10286,7 +10286,7 @@ func (client BaseClient) GetPartitionBackupList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupList", err.Error()) } @@ -10389,7 +10389,7 @@ func (client BaseClient) GetPartitionBackupProgress(ctx context.Context, partiti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupProgress", err.Error()) } @@ -10488,7 +10488,7 @@ func (client BaseClient) GetPartitionEventList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionEventList", err.Error()) } @@ -10627,7 +10627,7 @@ func (client BaseClient) GetPartitionHealth(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealth", err.Error()) } @@ -10778,7 +10778,7 @@ func (client BaseClient) GetPartitionHealthUsingPolicy(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", err.Error()) } @@ -10891,7 +10891,7 @@ func (client BaseClient) GetPartitionInfo(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfo", err.Error()) } @@ -10993,7 +10993,7 @@ func (client BaseClient) GetPartitionInfoList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfoList", err.Error()) } @@ -11089,7 +11089,7 @@ func (client BaseClient) GetPartitionLoadInformation(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionLoadInformation", err.Error()) } @@ -11189,7 +11189,7 @@ func (client BaseClient) GetPartitionReplicaEventList(ctx context.Context, parti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicaEventList", err.Error()) } @@ -11300,7 +11300,7 @@ func (client BaseClient) GetPartitionReplicasEventList(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicasEventList", err.Error()) } @@ -11410,7 +11410,7 @@ func (client BaseClient) GetPartitionRestartProgress(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestartProgress", err.Error()) } @@ -11504,7 +11504,7 @@ func (client BaseClient) GetPartitionRestoreProgress(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestoreProgress", err.Error()) } @@ -11602,7 +11602,7 @@ func (client BaseClient) GetPartitionsEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionsEventList", err.Error()) } @@ -11702,7 +11702,7 @@ func (client BaseClient) GetPropertyInfo(ctx context.Context, nameID string, pro {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfo", err.Error()) } @@ -11803,7 +11803,7 @@ func (client BaseClient) GetPropertyInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfoList", err.Error()) } @@ -11904,7 +11904,7 @@ func (client BaseClient) GetProvisionedFabricCodeVersionInfoList(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", err.Error()) } @@ -11996,7 +11996,7 @@ func (client BaseClient) GetProvisionedFabricConfigVersionInfoList(ctx context.C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", err.Error()) } @@ -12094,7 +12094,7 @@ func (client BaseClient) GetQuorumLossProgress(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetQuorumLossProgress", err.Error()) } @@ -12294,7 +12294,7 @@ func (client BaseClient) GetReplicaHealth(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealth", err.Error()) } @@ -12417,7 +12417,7 @@ func (client BaseClient) GetReplicaHealthUsingPolicy(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", err.Error()) } @@ -12521,7 +12521,7 @@ func (client BaseClient) GetReplicaInfo(ctx context.Context, partitionID uuid.UU {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfo", err.Error()) } @@ -12619,7 +12619,7 @@ func (client BaseClient) GetReplicaInfoList(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfoList", err.Error()) } @@ -12727,11 +12727,11 @@ func (client BaseClient) GetServiceBackupConfigurationInfo(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", err.Error()) } @@ -12855,11 +12855,11 @@ func (client BaseClient) GetServiceBackupList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupList", err.Error()) } @@ -12973,7 +12973,7 @@ func (client BaseClient) GetServiceDescription(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceDescription", err.Error()) } @@ -13076,7 +13076,7 @@ func (client BaseClient) GetServiceEventList(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceEventList", err.Error()) } @@ -13221,7 +13221,7 @@ func (client BaseClient) GetServiceHealth(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealth", err.Error()) } @@ -13377,7 +13377,7 @@ func (client BaseClient) GetServiceHealthUsingPolicy(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealthUsingPolicy", err.Error()) } @@ -13498,7 +13498,7 @@ func (client BaseClient) GetServiceInfo(ctx context.Context, applicationID strin {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfo", err.Error()) } @@ -13601,7 +13601,7 @@ func (client BaseClient) GetServiceInfoList(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfoList", err.Error()) } @@ -13702,7 +13702,7 @@ func (client BaseClient) GetServiceManifest(ctx context.Context, applicationType {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceManifest", err.Error()) } @@ -13796,7 +13796,7 @@ func (client BaseClient) GetServiceNameInfo(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceNameInfo", err.Error()) } @@ -13894,7 +13894,7 @@ func (client BaseClient) GetServicesEventList(ctx context.Context, startTimeUtc {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServicesEventList", err.Error()) } @@ -13996,7 +13996,7 @@ func (client BaseClient) GetServiceTypeInfoByName(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoByName", err.Error()) } @@ -14092,7 +14092,7 @@ func (client BaseClient) GetServiceTypeInfoList(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoList", err.Error()) } @@ -14192,7 +14192,7 @@ func (client BaseClient) GetSubNameInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetSubNameInfoList", err.Error()) } @@ -14291,7 +14291,7 @@ func (client BaseClient) GetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", err.Error()) } @@ -14390,7 +14390,7 @@ func (client BaseClient) InvokeContainerAPI(ctx context.Context, nodeName string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: containerAPIRequestBody, Constraints: []validation.Constraint{{Target: "containerAPIRequestBody.URIPath", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -14499,7 +14499,7 @@ func (client BaseClient) InvokeInfrastructureCommand(ctx context.Context, comman {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureCommand", err.Error()) } @@ -14600,7 +14600,7 @@ func (client BaseClient) InvokeInfrastructureQuery(ctx context.Context, command {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureQuery", err.Error()) } @@ -14693,7 +14693,7 @@ func (client BaseClient) PostChaosSchedule(ctx context.Context, chaosSchedule Ch if err := validation.Validate([]validation.Validation{ {TargetValue: chaosSchedule, Constraints: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PostChaosSchedule", err.Error()) } @@ -14781,7 +14781,7 @@ func (client BaseClient) ProvisionApplicationType(ctx context.Context, provision {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionApplicationType", err.Error()) } @@ -14869,7 +14869,7 @@ func (client BaseClient) ProvisionCluster(ctx context.Context, provisionFabricDe {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionCluster", err.Error()) } @@ -14961,7 +14961,7 @@ func (client BaseClient) PutProperty(ctx context.Context, nameID string, propert {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PutProperty", err.Error()) } @@ -15055,7 +15055,7 @@ func (client BaseClient) RecoverAllPartitions(ctx context.Context, timeout *int6 {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverAllPartitions", err.Error()) } @@ -15143,7 +15143,7 @@ func (client BaseClient) RecoverPartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverPartition", err.Error()) } @@ -15239,7 +15239,7 @@ func (client BaseClient) RecoverServicePartitions(ctx context.Context, serviceID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverServicePartitions", err.Error()) } @@ -15330,7 +15330,7 @@ func (client BaseClient) RecoverSystemPartitions(ctx context.Context, timeout *i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverSystemPartitions", err.Error()) } @@ -15416,7 +15416,7 @@ func (client BaseClient) RemoveComposeDeployment(ctx context.Context, deployment {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveComposeDeployment", err.Error()) } @@ -15511,7 +15511,7 @@ func (client BaseClient) RemoveNodeState(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveNodeState", err.Error()) } @@ -15611,7 +15611,7 @@ func (client BaseClient) RemoveReplica(ctx context.Context, nodeName string, par {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveReplica", err.Error()) } @@ -15733,7 +15733,7 @@ func (client BaseClient) ReportApplicationHealth(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportApplicationHealth", err.Error()) } @@ -15852,7 +15852,7 @@ func (client BaseClient) ReportClusterHealth(ctx context.Context, healthInformat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportClusterHealth", err.Error()) } @@ -15973,7 +15973,7 @@ func (client BaseClient) ReportDeployedApplicationHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedApplicationHealth", err.Error()) } @@ -16101,7 +16101,7 @@ func (client BaseClient) ReportDeployedServicePackageHealth(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedServicePackageHealth", err.Error()) } @@ -16223,7 +16223,7 @@ func (client BaseClient) ReportNodeHealth(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportNodeHealth", err.Error()) } @@ -16343,7 +16343,7 @@ func (client BaseClient) ReportPartitionHealth(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportPartitionHealth", err.Error()) } @@ -16466,7 +16466,7 @@ func (client BaseClient) ReportReplicaHealth(ctx context.Context, partitionID uu {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportReplicaHealth", err.Error()) } @@ -16592,7 +16592,7 @@ func (client BaseClient) ReportServiceHealth(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportServiceHealth", err.Error()) } @@ -16689,7 +16689,7 @@ func (client BaseClient) ResetPartitionLoad(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResetPartitionLoad", err.Error()) } @@ -16795,7 +16795,7 @@ func (client BaseClient) ResolveService(ctx context.Context, serviceID string, p {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResolveService", err.Error()) } @@ -16907,7 +16907,7 @@ func (client BaseClient) RestartDeployedCodePackage(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartDeployedCodePackage", err.Error()) } @@ -17004,7 +17004,7 @@ func (client BaseClient) RestartNode(ctx context.Context, nodeName string, resta {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartNode", err.Error()) } @@ -17100,7 +17100,7 @@ func (client BaseClient) RestartReplica(ctx context.Context, nodeName string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartReplica", err.Error()) } @@ -17206,7 +17206,7 @@ func (client BaseClient) RestorePartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestorePartition", err.Error()) } @@ -17308,7 +17308,7 @@ func (client BaseClient) ResumeApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationBackup", err.Error()) } @@ -17407,7 +17407,7 @@ func (client BaseClient) ResumeApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationUpgrade", err.Error()) } @@ -17502,7 +17502,7 @@ func (client BaseClient) ResumeClusterUpgrade(ctx context.Context, resumeCluster {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeClusterUpgrade", err.Error()) } @@ -17591,7 +17591,7 @@ func (client BaseClient) ResumePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumePartitionBackup", err.Error()) } @@ -17686,7 +17686,7 @@ func (client BaseClient) ResumeServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeServiceBackup", err.Error()) } @@ -17783,7 +17783,7 @@ func (client BaseClient) RollbackApplicationUpgrade(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackApplicationUpgrade", err.Error()) } @@ -17872,7 +17872,7 @@ func (client BaseClient) RollbackClusterUpgrade(ctx context.Context, timeout *in {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackClusterUpgrade", err.Error()) } @@ -17959,7 +17959,7 @@ func (client BaseClient) SetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", err.Error()) } @@ -18058,7 +18058,7 @@ func (client BaseClient) StartApplicationUpgrade(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartApplicationUpgrade", err.Error()) } @@ -18154,24 +18154,24 @@ func (client BaseClient) StartChaos(ctx context.Context, chaosParameters ChaosPa {TargetValue: chaosParameters, Constraints: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartChaos", err.Error()) } @@ -18262,7 +18262,7 @@ func (client BaseClient) StartClusterConfigurationUpgrade(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterConfigurationUpgrade", err.Error()) } @@ -18352,17 +18352,17 @@ func (client BaseClient) StartClusterUpgrade(ctx context.Context, startClusterUp Constraints: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterUpgrade", err.Error()) } @@ -18455,7 +18455,7 @@ func (client BaseClient) StartComposeDeploymentUpgrade(ctx context.Context, depl {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartComposeDeploymentUpgrade", err.Error()) } @@ -18571,7 +18571,7 @@ func (client BaseClient) StartDataLoss(ctx context.Context, serviceID string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartDataLoss", err.Error()) } @@ -18673,11 +18673,11 @@ func (client BaseClient) StartNodeTransition(ctx context.Context, nodeName strin } if err := validation.Validate([]validation.Validation{ {TargetValue: stopDurationInSeconds, - Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartNodeTransition", err.Error()) } @@ -18783,7 +18783,7 @@ func (client BaseClient) StartPartitionRestart(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartPartitionRestart", err.Error()) } @@ -18894,7 +18894,7 @@ func (client BaseClient) StartQuorumLoss(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartQuorumLoss", err.Error()) } @@ -18990,7 +18990,7 @@ func (client BaseClient) StopChaos(ctx context.Context, timeout *int64) (result {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StopChaos", err.Error()) } @@ -19077,7 +19077,7 @@ func (client BaseClient) SubmitPropertyBatch(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SubmitPropertyBatch", err.Error()) } @@ -19176,7 +19176,7 @@ func (client BaseClient) SuspendApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendApplicationBackup", err.Error()) } @@ -19267,7 +19267,7 @@ func (client BaseClient) SuspendPartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendPartitionBackup", err.Error()) } @@ -19363,7 +19363,7 @@ func (client BaseClient) SuspendServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendServiceBackup", err.Error()) } @@ -19459,7 +19459,7 @@ func (client BaseClient) UnprovisionApplicationType(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionApplicationType", err.Error()) } @@ -19552,7 +19552,7 @@ func (client BaseClient) UnprovisionCluster(ctx context.Context, unprovisionFabr {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionCluster", err.Error()) } @@ -19649,7 +19649,7 @@ func (client BaseClient) UpdateApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateApplicationUpgrade", err.Error()) } @@ -19744,14 +19744,14 @@ func (client BaseClient) UpdateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateBackupPolicy", err.Error()) } @@ -19844,17 +19844,17 @@ func (client BaseClient) UpdateClusterUpgrade(ctx context.Context, updateCluster Constraints: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateClusterUpgrade", err.Error()) } @@ -20111,7 +20111,7 @@ func (client BaseClient) UpdateService(ctx context.Context, serviceID string, se {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateService", err.Error()) } @@ -20209,7 +20209,7 @@ func (client BaseClient) UploadFile(ctx context.Context, contentPath string, tim {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFile", err.Error()) } @@ -20311,7 +20311,7 @@ func (client BaseClient) UploadFileChunk(ctx context.Context, contentPath string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFileChunk", err.Error()) } diff --git a/services/servicefabric/6.3/servicefabric/client.go b/services/servicefabric/6.3/servicefabric/client.go index 9172c25bcca5..d8904d5b4cf5 100644 --- a/services/servicefabric/6.3/servicefabric/client.go +++ b/services/servicefabric/6.3/servicefabric/client.go @@ -87,7 +87,7 @@ func (client BaseClient) BackupPartition(ctx context.Context, partitionID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "BackupPartition", err.Error()) } @@ -205,7 +205,7 @@ func (client BaseClient) CancelOperation(ctx context.Context, operationID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CancelOperation", err.Error()) } @@ -374,7 +374,7 @@ func (client BaseClient) CommitImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CommitImageStoreUploadSession", err.Error()) } @@ -465,7 +465,7 @@ func (client BaseClient) CopyImageStoreContent(ctx context.Context, imageStoreCo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CopyImageStoreContent", err.Error()) } @@ -556,14 +556,14 @@ func (client BaseClient) CreateApplication(ctx context.Context, applicationDescr {Target: "applicationDescription.TypeVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "applicationDescription.ApplicationCapacity", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateApplication", err.Error()) } @@ -738,14 +738,14 @@ func (client BaseClient) CreateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateBackupPolicy", err.Error()) } @@ -838,7 +838,7 @@ func (client BaseClient) CreateComposeDeployment(ctx context.Context, createComp {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateComposeDeployment", err.Error()) } @@ -928,7 +928,7 @@ func (client BaseClient) CreateName(ctx context.Context, nameDescription NameDes {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateName", err.Error()) } @@ -1116,7 +1116,7 @@ func (client BaseClient) CreateService(ctx context.Context, applicationID string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateService", err.Error()) } @@ -1220,7 +1220,7 @@ func (client BaseClient) CreateServiceFromTemplate(ctx context.Context, applicat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateServiceFromTemplate", err.Error()) } @@ -1413,7 +1413,7 @@ func (client BaseClient) DeleteApplication(ctx context.Context, applicationID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteApplication", err.Error()) } @@ -1581,7 +1581,7 @@ func (client BaseClient) DeleteBackupPolicy(ctx context.Context, backupPolicyNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteBackupPolicy", err.Error()) } @@ -1672,7 +1672,7 @@ func (client BaseClient) DeleteImageStoreContent(ctx context.Context, contentPat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreContent", err.Error()) } @@ -1764,7 +1764,7 @@ func (client BaseClient) DeleteImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreUploadSession", err.Error()) } @@ -1852,7 +1852,7 @@ func (client BaseClient) DeleteName(ctx context.Context, nameID string, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteName", err.Error()) } @@ -1944,7 +1944,7 @@ func (client BaseClient) DeleteProperty(ctx context.Context, nameID string, prop {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteProperty", err.Error()) } @@ -2122,7 +2122,7 @@ func (client BaseClient) DeleteService(ctx context.Context, serviceID string, fo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteService", err.Error()) } @@ -2298,7 +2298,7 @@ func (client BaseClient) DeployServicePackageToNode(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeployServicePackageToNode", err.Error()) } @@ -2394,7 +2394,7 @@ func (client BaseClient) DisableApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableApplicationBackup", err.Error()) } @@ -2490,7 +2490,7 @@ func (client BaseClient) DisableNode(ctx context.Context, nodeName string, deact {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableNode", err.Error()) } @@ -2585,7 +2585,7 @@ func (client BaseClient) DisablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisablePartitionBackup", err.Error()) } @@ -2682,7 +2682,7 @@ func (client BaseClient) DisableServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableServiceBackup", err.Error()) } @@ -2781,7 +2781,7 @@ func (client BaseClient) EnableApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableApplicationBackup", err.Error()) } @@ -2875,7 +2875,7 @@ func (client BaseClient) EnableNode(ctx context.Context, nodeName string, timeou {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableNode", err.Error()) } @@ -2972,7 +2972,7 @@ func (client BaseClient) EnablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnablePartitionBackup", err.Error()) } @@ -3076,7 +3076,7 @@ func (client BaseClient) EnableServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableServiceBackup", err.Error()) } @@ -3248,7 +3248,7 @@ func (client BaseClient) GetAadMetadata(ctx context.Context, timeout *int64) (re {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAadMetadata", err.Error()) } @@ -3345,11 +3345,11 @@ func (client BaseClient) GetAllEntitiesBackedUpByPolicy(ctx context.Context, bac if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", err.Error()) } @@ -3462,11 +3462,11 @@ func (client BaseClient) GetApplicationBackupConfigurationInfo(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", err.Error()) } @@ -3590,11 +3590,11 @@ func (client BaseClient) GetApplicationBackupList(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupList", err.Error()) } @@ -3715,7 +3715,7 @@ func (client BaseClient) GetApplicationEventList(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationEventList", err.Error()) } @@ -3875,7 +3875,7 @@ func (client BaseClient) GetApplicationHealth(ctx context.Context, applicationID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealth", err.Error()) } @@ -4049,7 +4049,7 @@ func (client BaseClient) GetApplicationHealthUsingPolicy(ctx context.Context, ap {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", err.Error()) } @@ -4173,7 +4173,7 @@ func (client BaseClient) GetApplicationInfo(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfo", err.Error()) } @@ -4292,11 +4292,11 @@ func (client BaseClient) GetApplicationInfoList(ctx context.Context, application if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfoList", err.Error()) } @@ -4411,7 +4411,7 @@ func (client BaseClient) GetApplicationLoadInfo(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationLoadInfo", err.Error()) } @@ -4503,7 +4503,7 @@ func (client BaseClient) GetApplicationManifest(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationManifest", err.Error()) } @@ -4600,7 +4600,7 @@ func (client BaseClient) GetApplicationNameInfo(ctx context.Context, serviceID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationNameInfo", err.Error()) } @@ -4773,7 +4773,7 @@ func (client BaseClient) GetApplicationsEventList(ctx context.Context, startTime {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationsEventList", err.Error()) } @@ -4895,11 +4895,11 @@ func (client BaseClient) GetApplicationTypeInfoList(ctx context.Context, applica if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoList", err.Error()) } @@ -5025,11 +5025,11 @@ func (client BaseClient) GetApplicationTypeInfoListByName(ctx context.Context, a if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoListByName", err.Error()) } @@ -5141,7 +5141,7 @@ func (client BaseClient) GetApplicationUpgrade(ctx context.Context, applicationI {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationUpgrade", err.Error()) } @@ -5232,7 +5232,7 @@ func (client BaseClient) GetBackupPolicyByName(ctx context.Context, backupPolicy {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyByName", err.Error()) } @@ -5331,11 +5331,11 @@ func (client BaseClient) GetBackupPolicyList(ctx context.Context, continuationTo if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyList", err.Error()) } @@ -5442,11 +5442,11 @@ func (client BaseClient) GetBackupsFromBackupLocation(ctx context.Context, getBa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: getBackupByStorageQueryDescription, Constraints: []validation.Constraint{{Target: "getBackupByStorageQueryDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}, {Target: "getBackupByStorageQueryDescription.BackupEntity", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -5545,7 +5545,7 @@ func (client BaseClient) GetChaos(ctx context.Context, timeout *int64) (result C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaos", err.Error()) } @@ -5652,11 +5652,11 @@ func (client BaseClient) GetChaosEvents(ctx context.Context, continuationToken s if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaosEvents", err.Error()) } @@ -5757,7 +5757,7 @@ func (client BaseClient) GetChaosSchedule(ctx context.Context, timeout *int64) ( {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaosSchedule", err.Error()) } @@ -5846,7 +5846,7 @@ func (client BaseClient) GetClusterConfiguration(ctx context.Context, configurat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfiguration", err.Error()) } @@ -5934,7 +5934,7 @@ func (client BaseClient) GetClusterConfigurationUpgradeStatus(ctx context.Contex {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", err.Error()) } @@ -6028,7 +6028,7 @@ func (client BaseClient) GetClusterEventList(ctx context.Context, startTimeUtc s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterEventList", err.Error()) } @@ -6189,7 +6189,7 @@ func (client BaseClient) GetClusterHealth(ctx context.Context, nodesHealthStateF {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealth", err.Error()) } @@ -6303,7 +6303,7 @@ func (client BaseClient) GetClusterHealthChunk(ctx context.Context, timeout *int {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunk", err.Error()) } @@ -6411,7 +6411,7 @@ func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFilters(ctx {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", err.Error()) } @@ -6575,7 +6575,7 @@ func (client BaseClient) GetClusterHealthUsingPolicy(ctx context.Context, nodesH {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthUsingPolicy", err.Error()) } @@ -6701,7 +6701,7 @@ func (client BaseClient) GetClusterManifest(ctx context.Context, timeout *int64) {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterManifest", err.Error()) } @@ -6788,7 +6788,7 @@ func (client BaseClient) GetClusterUpgradeProgress(ctx context.Context, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterUpgradeProgress", err.Error()) } @@ -6877,7 +6877,7 @@ func (client BaseClient) GetComposeDeploymentStatus(ctx context.Context, deploym {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatus", err.Error()) } @@ -6979,11 +6979,11 @@ func (client BaseClient) GetComposeDeploymentStatusList(ctx context.Context, con if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatusList", err.Error()) } @@ -7079,7 +7079,7 @@ func (client BaseClient) GetComposeDeploymentUpgradeProgress(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", err.Error()) } @@ -7182,7 +7182,7 @@ func (client BaseClient) GetContainerLogsDeployedOnNode(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", err.Error()) } @@ -7291,7 +7291,7 @@ func (client BaseClient) GetContainersEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainersEventList", err.Error()) } @@ -7389,7 +7389,7 @@ func (client BaseClient) GetCorrelatedEventList(ctx context.Context, eventInstan {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetCorrelatedEventList", err.Error()) } @@ -7487,7 +7487,7 @@ func (client BaseClient) GetDataLossProgress(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDataLossProgress", err.Error()) } @@ -7624,7 +7624,7 @@ func (client BaseClient) GetDeployedApplicationHealth(ctx context.Context, nodeN {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealth", err.Error()) } @@ -7782,7 +7782,7 @@ func (client BaseClient) GetDeployedApplicationHealthUsingPolicy(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", err.Error()) } @@ -7907,7 +7907,7 @@ func (client BaseClient) GetDeployedApplicationInfo(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfo", err.Error()) } @@ -8023,11 +8023,11 @@ func (client BaseClient) GetDeployedApplicationInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfoList", err.Error()) } @@ -8140,7 +8140,7 @@ func (client BaseClient) GetDeployedCodePackageInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedCodePackageInfoList", err.Error()) } @@ -8261,7 +8261,7 @@ func (client BaseClient) GetDeployedServicePackageHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealth", err.Error()) } @@ -8389,7 +8389,7 @@ func (client BaseClient) GetDeployedServicePackageHealthUsingPolicy(ctx context. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", err.Error()) } @@ -8498,7 +8498,7 @@ func (client BaseClient) GetDeployedServicePackageInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoList", err.Error()) } @@ -8598,7 +8598,7 @@ func (client BaseClient) GetDeployedServicePackageInfoListByName(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", err.Error()) } @@ -8695,7 +8695,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", err.Error()) } @@ -8791,7 +8791,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionID(ctx co {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", err.Error()) } @@ -8894,7 +8894,7 @@ func (client BaseClient) GetDeployedServiceReplicaInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", err.Error()) } @@ -9004,7 +9004,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoByName(ctx context.Context, n {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", err.Error()) } @@ -9110,7 +9110,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", err.Error()) } @@ -9220,7 +9220,7 @@ func (client BaseClient) GetFaultOperationList(ctx context.Context, typeFilter i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetFaultOperationList", err.Error()) } @@ -9310,7 +9310,7 @@ func (client BaseClient) GetImageStoreContent(ctx context.Context, contentPath s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreContent", err.Error()) } @@ -9400,7 +9400,7 @@ func (client BaseClient) GetImageStoreRootContent(ctx context.Context, timeout * {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreRootContent", err.Error()) } @@ -9489,7 +9489,7 @@ func (client BaseClient) GetImageStoreUploadSessionByID(ctx context.Context, ses {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByID", err.Error()) } @@ -9578,7 +9578,7 @@ func (client BaseClient) GetImageStoreUploadSessionByPath(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", err.Error()) } @@ -9669,7 +9669,7 @@ func (client BaseClient) GetNameExistsInfo(ctx context.Context, nameID string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNameExistsInfo", err.Error()) } @@ -9767,7 +9767,7 @@ func (client BaseClient) GetNodeEventList(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeEventList", err.Error()) } @@ -9886,7 +9886,7 @@ func (client BaseClient) GetNodeHealth(ctx context.Context, nodeName string, eve {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealth", err.Error()) } @@ -10002,7 +10002,7 @@ func (client BaseClient) GetNodeHealthUsingPolicy(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealthUsingPolicy", err.Error()) } @@ -10103,7 +10103,7 @@ func (client BaseClient) GetNodeInfo(ctx context.Context, nodeName string, timeo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfo", err.Error()) } @@ -10204,11 +10204,11 @@ func (client BaseClient) GetNodeInfoList(ctx context.Context, continuationToken if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfoList", err.Error()) } @@ -10309,7 +10309,7 @@ func (client BaseClient) GetNodeLoadInfo(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeLoadInfo", err.Error()) } @@ -10407,7 +10407,7 @@ func (client BaseClient) GetNodesEventList(ctx context.Context, startTimeUtc str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodesEventList", err.Error()) } @@ -10508,7 +10508,7 @@ func (client BaseClient) GetNodeTransitionProgress(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeTransitionProgress", err.Error()) } @@ -10601,7 +10601,7 @@ func (client BaseClient) GetPartitionBackupConfigurationInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", err.Error()) } @@ -10702,7 +10702,7 @@ func (client BaseClient) GetPartitionBackupList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupList", err.Error()) } @@ -10805,7 +10805,7 @@ func (client BaseClient) GetPartitionBackupProgress(ctx context.Context, partiti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupProgress", err.Error()) } @@ -10904,7 +10904,7 @@ func (client BaseClient) GetPartitionEventList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionEventList", err.Error()) } @@ -11042,7 +11042,7 @@ func (client BaseClient) GetPartitionHealth(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealth", err.Error()) } @@ -11193,7 +11193,7 @@ func (client BaseClient) GetPartitionHealthUsingPolicy(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", err.Error()) } @@ -11306,7 +11306,7 @@ func (client BaseClient) GetPartitionInfo(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfo", err.Error()) } @@ -11407,7 +11407,7 @@ func (client BaseClient) GetPartitionInfoList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfoList", err.Error()) } @@ -11503,7 +11503,7 @@ func (client BaseClient) GetPartitionLoadInformation(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionLoadInformation", err.Error()) } @@ -11603,7 +11603,7 @@ func (client BaseClient) GetPartitionReplicaEventList(ctx context.Context, parti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicaEventList", err.Error()) } @@ -11714,7 +11714,7 @@ func (client BaseClient) GetPartitionReplicasEventList(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicasEventList", err.Error()) } @@ -11824,7 +11824,7 @@ func (client BaseClient) GetPartitionRestartProgress(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestartProgress", err.Error()) } @@ -11918,7 +11918,7 @@ func (client BaseClient) GetPartitionRestoreProgress(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestoreProgress", err.Error()) } @@ -12016,7 +12016,7 @@ func (client BaseClient) GetPartitionsEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionsEventList", err.Error()) } @@ -12116,7 +12116,7 @@ func (client BaseClient) GetPropertyInfo(ctx context.Context, nameID string, pro {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfo", err.Error()) } @@ -12217,7 +12217,7 @@ func (client BaseClient) GetPropertyInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfoList", err.Error()) } @@ -12318,7 +12318,7 @@ func (client BaseClient) GetProvisionedFabricCodeVersionInfoList(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", err.Error()) } @@ -12410,7 +12410,7 @@ func (client BaseClient) GetProvisionedFabricConfigVersionInfoList(ctx context.C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", err.Error()) } @@ -12508,7 +12508,7 @@ func (client BaseClient) GetQuorumLossProgress(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetQuorumLossProgress", err.Error()) } @@ -12788,7 +12788,7 @@ func (client BaseClient) GetReplicaHealth(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealth", err.Error()) } @@ -12911,7 +12911,7 @@ func (client BaseClient) GetReplicaHealthUsingPolicy(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", err.Error()) } @@ -13015,7 +13015,7 @@ func (client BaseClient) GetReplicaInfo(ctx context.Context, partitionID uuid.UU {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfo", err.Error()) } @@ -13113,7 +13113,7 @@ func (client BaseClient) GetReplicaInfoList(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfoList", err.Error()) } @@ -13374,11 +13374,11 @@ func (client BaseClient) GetServiceBackupConfigurationInfo(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", err.Error()) } @@ -13502,11 +13502,11 @@ func (client BaseClient) GetServiceBackupList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupList", err.Error()) } @@ -13620,7 +13620,7 @@ func (client BaseClient) GetServiceDescription(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceDescription", err.Error()) } @@ -13723,7 +13723,7 @@ func (client BaseClient) GetServiceEventList(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceEventList", err.Error()) } @@ -13868,7 +13868,7 @@ func (client BaseClient) GetServiceHealth(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealth", err.Error()) } @@ -14024,7 +14024,7 @@ func (client BaseClient) GetServiceHealthUsingPolicy(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealthUsingPolicy", err.Error()) } @@ -14145,7 +14145,7 @@ func (client BaseClient) GetServiceInfo(ctx context.Context, applicationID strin {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfo", err.Error()) } @@ -14248,7 +14248,7 @@ func (client BaseClient) GetServiceInfoList(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfoList", err.Error()) } @@ -14349,7 +14349,7 @@ func (client BaseClient) GetServiceManifest(ctx context.Context, applicationType {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceManifest", err.Error()) } @@ -14443,7 +14443,7 @@ func (client BaseClient) GetServiceNameInfo(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceNameInfo", err.Error()) } @@ -14615,7 +14615,7 @@ func (client BaseClient) GetServicesEventList(ctx context.Context, startTimeUtc {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServicesEventList", err.Error()) } @@ -14717,7 +14717,7 @@ func (client BaseClient) GetServiceTypeInfoByName(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoByName", err.Error()) } @@ -14813,7 +14813,7 @@ func (client BaseClient) GetServiceTypeInfoList(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoList", err.Error()) } @@ -14913,7 +14913,7 @@ func (client BaseClient) GetSubNameInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetSubNameInfoList", err.Error()) } @@ -15012,7 +15012,7 @@ func (client BaseClient) GetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", err.Error()) } @@ -15186,7 +15186,7 @@ func (client BaseClient) InvokeContainerAPI(ctx context.Context, nodeName string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: containerAPIRequestBody, Constraints: []validation.Constraint{{Target: "containerAPIRequestBody.URIPath", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -15295,7 +15295,7 @@ func (client BaseClient) InvokeInfrastructureCommand(ctx context.Context, comman {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureCommand", err.Error()) } @@ -15396,7 +15396,7 @@ func (client BaseClient) InvokeInfrastructureQuery(ctx context.Context, command {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureQuery", err.Error()) } @@ -15491,11 +15491,11 @@ func (client BaseClient) PostChaosSchedule(ctx context.Context, chaosSchedule Ch {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: chaosSchedule, Constraints: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PostChaosSchedule", err.Error()) } @@ -15588,7 +15588,7 @@ func (client BaseClient) ProvisionApplicationType(ctx context.Context, provision {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionApplicationType", err.Error()) } @@ -15676,7 +15676,7 @@ func (client BaseClient) ProvisionCluster(ctx context.Context, provisionFabricDe {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionCluster", err.Error()) } @@ -15768,7 +15768,7 @@ func (client BaseClient) PutProperty(ctx context.Context, nameID string, propert {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PutProperty", err.Error()) } @@ -15860,7 +15860,7 @@ func (client BaseClient) RecoverAllPartitions(ctx context.Context, timeout *int6 {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverAllPartitions", err.Error()) } @@ -15947,7 +15947,7 @@ func (client BaseClient) RecoverPartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverPartition", err.Error()) } @@ -16043,7 +16043,7 @@ func (client BaseClient) RecoverServicePartitions(ctx context.Context, serviceID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverServicePartitions", err.Error()) } @@ -16134,7 +16134,7 @@ func (client BaseClient) RecoverSystemPartitions(ctx context.Context, timeout *i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverSystemPartitions", err.Error()) } @@ -16220,7 +16220,7 @@ func (client BaseClient) RemoveComposeDeployment(ctx context.Context, deployment {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveComposeDeployment", err.Error()) } @@ -16314,7 +16314,7 @@ func (client BaseClient) RemoveNodeState(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveNodeState", err.Error()) } @@ -16414,7 +16414,7 @@ func (client BaseClient) RemoveReplica(ctx context.Context, nodeName string, par {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveReplica", err.Error()) } @@ -16536,7 +16536,7 @@ func (client BaseClient) ReportApplicationHealth(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportApplicationHealth", err.Error()) } @@ -16655,7 +16655,7 @@ func (client BaseClient) ReportClusterHealth(ctx context.Context, healthInformat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportClusterHealth", err.Error()) } @@ -16776,7 +16776,7 @@ func (client BaseClient) ReportDeployedApplicationHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedApplicationHealth", err.Error()) } @@ -16904,7 +16904,7 @@ func (client BaseClient) ReportDeployedServicePackageHealth(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedServicePackageHealth", err.Error()) } @@ -17026,7 +17026,7 @@ func (client BaseClient) ReportNodeHealth(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportNodeHealth", err.Error()) } @@ -17146,7 +17146,7 @@ func (client BaseClient) ReportPartitionHealth(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportPartitionHealth", err.Error()) } @@ -17269,7 +17269,7 @@ func (client BaseClient) ReportReplicaHealth(ctx context.Context, partitionID uu {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportReplicaHealth", err.Error()) } @@ -17395,7 +17395,7 @@ func (client BaseClient) ReportServiceHealth(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportServiceHealth", err.Error()) } @@ -17492,7 +17492,7 @@ func (client BaseClient) ResetPartitionLoad(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResetPartitionLoad", err.Error()) } @@ -17598,7 +17598,7 @@ func (client BaseClient) ResolveService(ctx context.Context, serviceID string, p {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResolveService", err.Error()) } @@ -17710,7 +17710,7 @@ func (client BaseClient) RestartDeployedCodePackage(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartDeployedCodePackage", err.Error()) } @@ -17807,7 +17807,7 @@ func (client BaseClient) RestartNode(ctx context.Context, nodeName string, resta {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartNode", err.Error()) } @@ -17903,7 +17903,7 @@ func (client BaseClient) RestartReplica(ctx context.Context, nodeName string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartReplica", err.Error()) } @@ -18009,7 +18009,7 @@ func (client BaseClient) RestorePartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestorePartition", err.Error()) } @@ -18111,7 +18111,7 @@ func (client BaseClient) ResumeApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationBackup", err.Error()) } @@ -18210,7 +18210,7 @@ func (client BaseClient) ResumeApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationUpgrade", err.Error()) } @@ -18305,7 +18305,7 @@ func (client BaseClient) ResumeClusterUpgrade(ctx context.Context, resumeCluster {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeClusterUpgrade", err.Error()) } @@ -18394,7 +18394,7 @@ func (client BaseClient) ResumePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumePartitionBackup", err.Error()) } @@ -18489,7 +18489,7 @@ func (client BaseClient) ResumeServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeServiceBackup", err.Error()) } @@ -18586,7 +18586,7 @@ func (client BaseClient) RollbackApplicationUpgrade(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackApplicationUpgrade", err.Error()) } @@ -18675,7 +18675,7 @@ func (client BaseClient) RollbackClusterUpgrade(ctx context.Context, timeout *in {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackClusterUpgrade", err.Error()) } @@ -18762,7 +18762,7 @@ func (client BaseClient) SetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", err.Error()) } @@ -18861,7 +18861,7 @@ func (client BaseClient) StartApplicationUpgrade(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartApplicationUpgrade", err.Error()) } @@ -18957,24 +18957,24 @@ func (client BaseClient) StartChaos(ctx context.Context, chaosParameters ChaosPa {TargetValue: chaosParameters, Constraints: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartChaos", err.Error()) } @@ -19065,7 +19065,7 @@ func (client BaseClient) StartClusterConfigurationUpgrade(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterConfigurationUpgrade", err.Error()) } @@ -19155,17 +19155,17 @@ func (client BaseClient) StartClusterUpgrade(ctx context.Context, startClusterUp Constraints: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterUpgrade", err.Error()) } @@ -19258,7 +19258,7 @@ func (client BaseClient) StartComposeDeploymentUpgrade(ctx context.Context, depl {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartComposeDeploymentUpgrade", err.Error()) } @@ -19375,7 +19375,7 @@ func (client BaseClient) StartDataLoss(ctx context.Context, serviceID string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartDataLoss", err.Error()) } @@ -19477,11 +19477,11 @@ func (client BaseClient) StartNodeTransition(ctx context.Context, nodeName strin } if err := validation.Validate([]validation.Validation{ {TargetValue: stopDurationInSeconds, - Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartNodeTransition", err.Error()) } @@ -19587,7 +19587,7 @@ func (client BaseClient) StartPartitionRestart(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartPartitionRestart", err.Error()) } @@ -19697,7 +19697,7 @@ func (client BaseClient) StartQuorumLoss(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartQuorumLoss", err.Error()) } @@ -19793,7 +19793,7 @@ func (client BaseClient) StopChaos(ctx context.Context, timeout *int64) (result {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StopChaos", err.Error()) } @@ -19880,7 +19880,7 @@ func (client BaseClient) SubmitPropertyBatch(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SubmitPropertyBatch", err.Error()) } @@ -19979,7 +19979,7 @@ func (client BaseClient) SuspendApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendApplicationBackup", err.Error()) } @@ -20070,7 +20070,7 @@ func (client BaseClient) SuspendPartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendPartitionBackup", err.Error()) } @@ -20166,7 +20166,7 @@ func (client BaseClient) SuspendServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendServiceBackup", err.Error()) } @@ -20262,7 +20262,7 @@ func (client BaseClient) UnprovisionApplicationType(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionApplicationType", err.Error()) } @@ -20354,7 +20354,7 @@ func (client BaseClient) UnprovisionCluster(ctx context.Context, unprovisionFabr {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionCluster", err.Error()) } @@ -20451,7 +20451,7 @@ func (client BaseClient) UpdateApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateApplicationUpgrade", err.Error()) } @@ -20546,14 +20546,14 @@ func (client BaseClient) UpdateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateBackupPolicy", err.Error()) } @@ -20646,17 +20646,17 @@ func (client BaseClient) UpdateClusterUpgrade(ctx context.Context, updateCluster Constraints: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateClusterUpgrade", err.Error()) } @@ -20913,7 +20913,7 @@ func (client BaseClient) UpdateService(ctx context.Context, serviceID string, se {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateService", err.Error()) } @@ -21011,7 +21011,7 @@ func (client BaseClient) UploadFile(ctx context.Context, contentPath string, tim {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFile", err.Error()) } @@ -21113,7 +21113,7 @@ func (client BaseClient) UploadFileChunk(ctx context.Context, contentPath string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFileChunk", err.Error()) } diff --git a/services/servicefabric/6.4/servicefabric/client.go b/services/servicefabric/6.4/servicefabric/client.go index 0623b2cd6e4f..ea95e17d7d30 100644 --- a/services/servicefabric/6.4/servicefabric/client.go +++ b/services/servicefabric/6.4/servicefabric/client.go @@ -87,7 +87,7 @@ func (client BaseClient) BackupPartition(ctx context.Context, partitionID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "BackupPartition", err.Error()) } @@ -205,7 +205,7 @@ func (client BaseClient) CancelOperation(ctx context.Context, operationID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CancelOperation", err.Error()) } @@ -374,7 +374,7 @@ func (client BaseClient) CommitImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CommitImageStoreUploadSession", err.Error()) } @@ -465,7 +465,7 @@ func (client BaseClient) CopyImageStoreContent(ctx context.Context, imageStoreCo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CopyImageStoreContent", err.Error()) } @@ -556,14 +556,14 @@ func (client BaseClient) CreateApplication(ctx context.Context, applicationDescr {Target: "applicationDescription.TypeVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "applicationDescription.ApplicationCapacity", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateApplication", err.Error()) } @@ -654,14 +654,14 @@ func (client BaseClient) CreateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateBackupPolicy", err.Error()) } @@ -754,7 +754,7 @@ func (client BaseClient) CreateComposeDeployment(ctx context.Context, createComp {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateComposeDeployment", err.Error()) } @@ -844,7 +844,7 @@ func (client BaseClient) CreateName(ctx context.Context, nameDescription NameDes {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateName", err.Error()) } @@ -1032,7 +1032,7 @@ func (client BaseClient) CreateService(ctx context.Context, applicationID string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateService", err.Error()) } @@ -1136,7 +1136,7 @@ func (client BaseClient) CreateServiceFromTemplate(ctx context.Context, applicat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateServiceFromTemplate", err.Error()) } @@ -1239,7 +1239,7 @@ func (client BaseClient) DeleteApplication(ctx context.Context, applicationID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteApplication", err.Error()) } @@ -1334,7 +1334,7 @@ func (client BaseClient) DeleteBackupPolicy(ctx context.Context, backupPolicyNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteBackupPolicy", err.Error()) } @@ -1425,7 +1425,7 @@ func (client BaseClient) DeleteImageStoreContent(ctx context.Context, contentPat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreContent", err.Error()) } @@ -1517,7 +1517,7 @@ func (client BaseClient) DeleteImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreUploadSession", err.Error()) } @@ -1605,7 +1605,7 @@ func (client BaseClient) DeleteName(ctx context.Context, nameID string, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteName", err.Error()) } @@ -1697,7 +1697,7 @@ func (client BaseClient) DeleteProperty(ctx context.Context, nameID string, prop {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteProperty", err.Error()) } @@ -1875,7 +1875,7 @@ func (client BaseClient) DeleteService(ctx context.Context, serviceID string, fo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteService", err.Error()) } @@ -1978,7 +1978,7 @@ func (client BaseClient) DeployServicePackageToNode(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeployServicePackageToNode", err.Error()) } @@ -2075,7 +2075,7 @@ func (client BaseClient) DisableApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: disableBackupDescription, Constraints: []validation.Constraint{{Target: "disableBackupDescription", Name: validation.Null, Rule: false, @@ -2179,7 +2179,7 @@ func (client BaseClient) DisableNode(ctx context.Context, nodeName string, deact {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableNode", err.Error()) } @@ -2278,7 +2278,7 @@ func (client BaseClient) DisablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisablePartitionBackup", err.Error()) } @@ -2384,7 +2384,7 @@ func (client BaseClient) DisableServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableServiceBackup", err.Error()) } @@ -2488,7 +2488,7 @@ func (client BaseClient) EnableApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableApplicationBackup", err.Error()) } @@ -2582,7 +2582,7 @@ func (client BaseClient) EnableNode(ctx context.Context, nodeName string, timeou {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableNode", err.Error()) } @@ -2679,7 +2679,7 @@ func (client BaseClient) EnablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnablePartitionBackup", err.Error()) } @@ -2783,7 +2783,7 @@ func (client BaseClient) EnableServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableServiceBackup", err.Error()) } @@ -2955,7 +2955,7 @@ func (client BaseClient) GetAadMetadata(ctx context.Context, timeout *int64) (re {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAadMetadata", err.Error()) } @@ -3052,11 +3052,11 @@ func (client BaseClient) GetAllEntitiesBackedUpByPolicy(ctx context.Context, bac if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", err.Error()) } @@ -3169,11 +3169,11 @@ func (client BaseClient) GetApplicationBackupConfigurationInfo(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", err.Error()) } @@ -3297,11 +3297,11 @@ func (client BaseClient) GetApplicationBackupList(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupList", err.Error()) } @@ -3422,7 +3422,7 @@ func (client BaseClient) GetApplicationEventList(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationEventList", err.Error()) } @@ -3582,7 +3582,7 @@ func (client BaseClient) GetApplicationHealth(ctx context.Context, applicationID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealth", err.Error()) } @@ -3756,7 +3756,7 @@ func (client BaseClient) GetApplicationHealthUsingPolicy(ctx context.Context, ap {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", err.Error()) } @@ -3880,7 +3880,7 @@ func (client BaseClient) GetApplicationInfo(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfo", err.Error()) } @@ -3999,11 +3999,11 @@ func (client BaseClient) GetApplicationInfoList(ctx context.Context, application if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfoList", err.Error()) } @@ -4118,7 +4118,7 @@ func (client BaseClient) GetApplicationLoadInfo(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationLoadInfo", err.Error()) } @@ -4210,7 +4210,7 @@ func (client BaseClient) GetApplicationManifest(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationManifest", err.Error()) } @@ -4307,7 +4307,7 @@ func (client BaseClient) GetApplicationNameInfo(ctx context.Context, serviceID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationNameInfo", err.Error()) } @@ -4405,7 +4405,7 @@ func (client BaseClient) GetApplicationsEventList(ctx context.Context, startTime {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationsEventList", err.Error()) } @@ -4527,11 +4527,11 @@ func (client BaseClient) GetApplicationTypeInfoList(ctx context.Context, applica if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoList", err.Error()) } @@ -4657,11 +4657,11 @@ func (client BaseClient) GetApplicationTypeInfoListByName(ctx context.Context, a if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoListByName", err.Error()) } @@ -4773,7 +4773,7 @@ func (client BaseClient) GetApplicationUpgrade(ctx context.Context, applicationI {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationUpgrade", err.Error()) } @@ -4864,7 +4864,7 @@ func (client BaseClient) GetBackupPolicyByName(ctx context.Context, backupPolicy {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyByName", err.Error()) } @@ -4963,11 +4963,11 @@ func (client BaseClient) GetBackupPolicyList(ctx context.Context, continuationTo if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyList", err.Error()) } @@ -5074,11 +5074,11 @@ func (client BaseClient) GetBackupsFromBackupLocation(ctx context.Context, getBa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: getBackupByStorageQueryDescription, Constraints: []validation.Constraint{{Target: "getBackupByStorageQueryDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}, {Target: "getBackupByStorageQueryDescription.BackupEntity", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -5177,7 +5177,7 @@ func (client BaseClient) GetChaos(ctx context.Context, timeout *int64) (result C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaos", err.Error()) } @@ -5284,11 +5284,11 @@ func (client BaseClient) GetChaosEvents(ctx context.Context, continuationToken s if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaosEvents", err.Error()) } @@ -5389,7 +5389,7 @@ func (client BaseClient) GetChaosSchedule(ctx context.Context, timeout *int64) ( {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaosSchedule", err.Error()) } @@ -5478,7 +5478,7 @@ func (client BaseClient) GetClusterConfiguration(ctx context.Context, configurat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfiguration", err.Error()) } @@ -5566,7 +5566,7 @@ func (client BaseClient) GetClusterConfigurationUpgradeStatus(ctx context.Contex {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", err.Error()) } @@ -5660,7 +5660,7 @@ func (client BaseClient) GetClusterEventList(ctx context.Context, startTimeUtc s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterEventList", err.Error()) } @@ -5821,7 +5821,7 @@ func (client BaseClient) GetClusterHealth(ctx context.Context, nodesHealthStateF {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealth", err.Error()) } @@ -5935,7 +5935,7 @@ func (client BaseClient) GetClusterHealthChunk(ctx context.Context, timeout *int {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunk", err.Error()) } @@ -6043,7 +6043,7 @@ func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFilters(ctx {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", err.Error()) } @@ -6207,7 +6207,7 @@ func (client BaseClient) GetClusterHealthUsingPolicy(ctx context.Context, nodesH {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthUsingPolicy", err.Error()) } @@ -6333,7 +6333,7 @@ func (client BaseClient) GetClusterManifest(ctx context.Context, timeout *int64) {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterManifest", err.Error()) } @@ -6420,7 +6420,7 @@ func (client BaseClient) GetClusterUpgradeProgress(ctx context.Context, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterUpgradeProgress", err.Error()) } @@ -6507,7 +6507,7 @@ func (client BaseClient) GetClusterVersion(ctx context.Context, timeout *int64) {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterVersion", err.Error()) } @@ -6596,7 +6596,7 @@ func (client BaseClient) GetComposeDeploymentStatus(ctx context.Context, deploym {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatus", err.Error()) } @@ -6698,11 +6698,11 @@ func (client BaseClient) GetComposeDeploymentStatusList(ctx context.Context, con if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatusList", err.Error()) } @@ -6798,7 +6798,7 @@ func (client BaseClient) GetComposeDeploymentUpgradeProgress(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", err.Error()) } @@ -6901,7 +6901,7 @@ func (client BaseClient) GetContainerLogsDeployedOnNode(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", err.Error()) } @@ -7010,7 +7010,7 @@ func (client BaseClient) GetContainersEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainersEventList", err.Error()) } @@ -7108,7 +7108,7 @@ func (client BaseClient) GetCorrelatedEventList(ctx context.Context, eventInstan {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetCorrelatedEventList", err.Error()) } @@ -7206,7 +7206,7 @@ func (client BaseClient) GetDataLossProgress(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDataLossProgress", err.Error()) } @@ -7343,7 +7343,7 @@ func (client BaseClient) GetDeployedApplicationHealth(ctx context.Context, nodeN {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealth", err.Error()) } @@ -7501,7 +7501,7 @@ func (client BaseClient) GetDeployedApplicationHealthUsingPolicy(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", err.Error()) } @@ -7626,7 +7626,7 @@ func (client BaseClient) GetDeployedApplicationInfo(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfo", err.Error()) } @@ -7742,11 +7742,11 @@ func (client BaseClient) GetDeployedApplicationInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfoList", err.Error()) } @@ -7859,7 +7859,7 @@ func (client BaseClient) GetDeployedCodePackageInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedCodePackageInfoList", err.Error()) } @@ -7980,7 +7980,7 @@ func (client BaseClient) GetDeployedServicePackageHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealth", err.Error()) } @@ -8108,7 +8108,7 @@ func (client BaseClient) GetDeployedServicePackageHealthUsingPolicy(ctx context. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", err.Error()) } @@ -8217,7 +8217,7 @@ func (client BaseClient) GetDeployedServicePackageInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoList", err.Error()) } @@ -8317,7 +8317,7 @@ func (client BaseClient) GetDeployedServicePackageInfoListByName(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", err.Error()) } @@ -8414,7 +8414,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", err.Error()) } @@ -8510,7 +8510,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionID(ctx co {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", err.Error()) } @@ -8613,7 +8613,7 @@ func (client BaseClient) GetDeployedServiceReplicaInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", err.Error()) } @@ -8723,7 +8723,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoByName(ctx context.Context, n {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", err.Error()) } @@ -8829,7 +8829,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", err.Error()) } @@ -8939,7 +8939,7 @@ func (client BaseClient) GetFaultOperationList(ctx context.Context, typeFilter i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetFaultOperationList", err.Error()) } @@ -9029,7 +9029,7 @@ func (client BaseClient) GetImageStoreContent(ctx context.Context, contentPath s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreContent", err.Error()) } @@ -9119,7 +9119,7 @@ func (client BaseClient) GetImageStoreRootContent(ctx context.Context, timeout * {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreRootContent", err.Error()) } @@ -9208,7 +9208,7 @@ func (client BaseClient) GetImageStoreUploadSessionByID(ctx context.Context, ses {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByID", err.Error()) } @@ -9297,7 +9297,7 @@ func (client BaseClient) GetImageStoreUploadSessionByPath(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", err.Error()) } @@ -9388,7 +9388,7 @@ func (client BaseClient) GetNameExistsInfo(ctx context.Context, nameID string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNameExistsInfo", err.Error()) } @@ -9486,7 +9486,7 @@ func (client BaseClient) GetNodeEventList(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeEventList", err.Error()) } @@ -9605,7 +9605,7 @@ func (client BaseClient) GetNodeHealth(ctx context.Context, nodeName string, eve {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealth", err.Error()) } @@ -9721,7 +9721,7 @@ func (client BaseClient) GetNodeHealthUsingPolicy(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealthUsingPolicy", err.Error()) } @@ -9822,7 +9822,7 @@ func (client BaseClient) GetNodeInfo(ctx context.Context, nodeName string, timeo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfo", err.Error()) } @@ -9923,11 +9923,11 @@ func (client BaseClient) GetNodeInfoList(ctx context.Context, continuationToken if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfoList", err.Error()) } @@ -10028,7 +10028,7 @@ func (client BaseClient) GetNodeLoadInfo(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeLoadInfo", err.Error()) } @@ -10126,7 +10126,7 @@ func (client BaseClient) GetNodesEventList(ctx context.Context, startTimeUtc str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodesEventList", err.Error()) } @@ -10227,7 +10227,7 @@ func (client BaseClient) GetNodeTransitionProgress(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeTransitionProgress", err.Error()) } @@ -10320,7 +10320,7 @@ func (client BaseClient) GetPartitionBackupConfigurationInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", err.Error()) } @@ -10421,7 +10421,7 @@ func (client BaseClient) GetPartitionBackupList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupList", err.Error()) } @@ -10524,7 +10524,7 @@ func (client BaseClient) GetPartitionBackupProgress(ctx context.Context, partiti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupProgress", err.Error()) } @@ -10623,7 +10623,7 @@ func (client BaseClient) GetPartitionEventList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionEventList", err.Error()) } @@ -10761,7 +10761,7 @@ func (client BaseClient) GetPartitionHealth(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealth", err.Error()) } @@ -10912,7 +10912,7 @@ func (client BaseClient) GetPartitionHealthUsingPolicy(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", err.Error()) } @@ -11025,7 +11025,7 @@ func (client BaseClient) GetPartitionInfo(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfo", err.Error()) } @@ -11126,7 +11126,7 @@ func (client BaseClient) GetPartitionInfoList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfoList", err.Error()) } @@ -11222,7 +11222,7 @@ func (client BaseClient) GetPartitionLoadInformation(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionLoadInformation", err.Error()) } @@ -11322,7 +11322,7 @@ func (client BaseClient) GetPartitionReplicaEventList(ctx context.Context, parti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicaEventList", err.Error()) } @@ -11433,7 +11433,7 @@ func (client BaseClient) GetPartitionReplicasEventList(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicasEventList", err.Error()) } @@ -11543,7 +11543,7 @@ func (client BaseClient) GetPartitionRestartProgress(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestartProgress", err.Error()) } @@ -11637,7 +11637,7 @@ func (client BaseClient) GetPartitionRestoreProgress(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestoreProgress", err.Error()) } @@ -11735,7 +11735,7 @@ func (client BaseClient) GetPartitionsEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionsEventList", err.Error()) } @@ -11835,7 +11835,7 @@ func (client BaseClient) GetPropertyInfo(ctx context.Context, nameID string, pro {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfo", err.Error()) } @@ -11936,7 +11936,7 @@ func (client BaseClient) GetPropertyInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfoList", err.Error()) } @@ -12037,7 +12037,7 @@ func (client BaseClient) GetProvisionedFabricCodeVersionInfoList(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", err.Error()) } @@ -12129,7 +12129,7 @@ func (client BaseClient) GetProvisionedFabricConfigVersionInfoList(ctx context.C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", err.Error()) } @@ -12227,7 +12227,7 @@ func (client BaseClient) GetQuorumLossProgress(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetQuorumLossProgress", err.Error()) } @@ -12428,7 +12428,7 @@ func (client BaseClient) GetReplicaHealth(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealth", err.Error()) } @@ -12551,7 +12551,7 @@ func (client BaseClient) GetReplicaHealthUsingPolicy(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", err.Error()) } @@ -12655,7 +12655,7 @@ func (client BaseClient) GetReplicaInfo(ctx context.Context, partitionID uuid.UU {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfo", err.Error()) } @@ -12753,7 +12753,7 @@ func (client BaseClient) GetReplicaInfoList(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfoList", err.Error()) } @@ -12861,11 +12861,11 @@ func (client BaseClient) GetServiceBackupConfigurationInfo(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", err.Error()) } @@ -12989,11 +12989,11 @@ func (client BaseClient) GetServiceBackupList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupList", err.Error()) } @@ -13107,7 +13107,7 @@ func (client BaseClient) GetServiceDescription(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceDescription", err.Error()) } @@ -13210,7 +13210,7 @@ func (client BaseClient) GetServiceEventList(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceEventList", err.Error()) } @@ -13355,7 +13355,7 @@ func (client BaseClient) GetServiceHealth(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealth", err.Error()) } @@ -13511,7 +13511,7 @@ func (client BaseClient) GetServiceHealthUsingPolicy(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealthUsingPolicy", err.Error()) } @@ -13632,7 +13632,7 @@ func (client BaseClient) GetServiceInfo(ctx context.Context, applicationID strin {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfo", err.Error()) } @@ -13735,7 +13735,7 @@ func (client BaseClient) GetServiceInfoList(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfoList", err.Error()) } @@ -13836,7 +13836,7 @@ func (client BaseClient) GetServiceManifest(ctx context.Context, applicationType {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceManifest", err.Error()) } @@ -13930,7 +13930,7 @@ func (client BaseClient) GetServiceNameInfo(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceNameInfo", err.Error()) } @@ -14028,7 +14028,7 @@ func (client BaseClient) GetServicesEventList(ctx context.Context, startTimeUtc {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServicesEventList", err.Error()) } @@ -14130,7 +14130,7 @@ func (client BaseClient) GetServiceTypeInfoByName(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoByName", err.Error()) } @@ -14226,7 +14226,7 @@ func (client BaseClient) GetServiceTypeInfoList(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoList", err.Error()) } @@ -14326,7 +14326,7 @@ func (client BaseClient) GetSubNameInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetSubNameInfoList", err.Error()) } @@ -14425,7 +14425,7 @@ func (client BaseClient) GetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", err.Error()) } @@ -14524,7 +14524,7 @@ func (client BaseClient) InvokeContainerAPI(ctx context.Context, nodeName string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: containerAPIRequestBody, Constraints: []validation.Constraint{{Target: "containerAPIRequestBody.URIPath", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -14633,7 +14633,7 @@ func (client BaseClient) InvokeInfrastructureCommand(ctx context.Context, comman {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureCommand", err.Error()) } @@ -14734,7 +14734,7 @@ func (client BaseClient) InvokeInfrastructureQuery(ctx context.Context, command {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureQuery", err.Error()) } @@ -14829,11 +14829,11 @@ func (client BaseClient) PostChaosSchedule(ctx context.Context, chaosSchedule Ch {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: chaosSchedule, Constraints: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PostChaosSchedule", err.Error()) } @@ -14926,7 +14926,7 @@ func (client BaseClient) ProvisionApplicationType(ctx context.Context, provision {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionApplicationType", err.Error()) } @@ -15014,7 +15014,7 @@ func (client BaseClient) ProvisionCluster(ctx context.Context, provisionFabricDe {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionCluster", err.Error()) } @@ -15106,7 +15106,7 @@ func (client BaseClient) PutProperty(ctx context.Context, nameID string, propert {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PutProperty", err.Error()) } @@ -15198,7 +15198,7 @@ func (client BaseClient) RecoverAllPartitions(ctx context.Context, timeout *int6 {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverAllPartitions", err.Error()) } @@ -15285,7 +15285,7 @@ func (client BaseClient) RecoverPartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverPartition", err.Error()) } @@ -15381,7 +15381,7 @@ func (client BaseClient) RecoverServicePartitions(ctx context.Context, serviceID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverServicePartitions", err.Error()) } @@ -15472,7 +15472,7 @@ func (client BaseClient) RecoverSystemPartitions(ctx context.Context, timeout *i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverSystemPartitions", err.Error()) } @@ -15558,7 +15558,7 @@ func (client BaseClient) RemoveComposeDeployment(ctx context.Context, deployment {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveComposeDeployment", err.Error()) } @@ -15652,7 +15652,7 @@ func (client BaseClient) RemoveNodeState(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveNodeState", err.Error()) } @@ -15752,7 +15752,7 @@ func (client BaseClient) RemoveReplica(ctx context.Context, nodeName string, par {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveReplica", err.Error()) } @@ -15874,7 +15874,7 @@ func (client BaseClient) ReportApplicationHealth(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportApplicationHealth", err.Error()) } @@ -15993,7 +15993,7 @@ func (client BaseClient) ReportClusterHealth(ctx context.Context, healthInformat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportClusterHealth", err.Error()) } @@ -16114,7 +16114,7 @@ func (client BaseClient) ReportDeployedApplicationHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedApplicationHealth", err.Error()) } @@ -16242,7 +16242,7 @@ func (client BaseClient) ReportDeployedServicePackageHealth(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedServicePackageHealth", err.Error()) } @@ -16364,7 +16364,7 @@ func (client BaseClient) ReportNodeHealth(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportNodeHealth", err.Error()) } @@ -16484,7 +16484,7 @@ func (client BaseClient) ReportPartitionHealth(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportPartitionHealth", err.Error()) } @@ -16607,7 +16607,7 @@ func (client BaseClient) ReportReplicaHealth(ctx context.Context, partitionID uu {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportReplicaHealth", err.Error()) } @@ -16733,7 +16733,7 @@ func (client BaseClient) ReportServiceHealth(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportServiceHealth", err.Error()) } @@ -16830,7 +16830,7 @@ func (client BaseClient) ResetPartitionLoad(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResetPartitionLoad", err.Error()) } @@ -16940,7 +16940,7 @@ func (client BaseClient) ResolveService(ctx context.Context, serviceID string, p {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResolveService", err.Error()) } @@ -17052,7 +17052,7 @@ func (client BaseClient) RestartDeployedCodePackage(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartDeployedCodePackage", err.Error()) } @@ -17149,7 +17149,7 @@ func (client BaseClient) RestartNode(ctx context.Context, nodeName string, resta {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartNode", err.Error()) } @@ -17245,7 +17245,7 @@ func (client BaseClient) RestartReplica(ctx context.Context, nodeName string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartReplica", err.Error()) } @@ -17351,7 +17351,7 @@ func (client BaseClient) RestorePartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestorePartition", err.Error()) } @@ -17453,7 +17453,7 @@ func (client BaseClient) ResumeApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationBackup", err.Error()) } @@ -17552,7 +17552,7 @@ func (client BaseClient) ResumeApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationUpgrade", err.Error()) } @@ -17647,7 +17647,7 @@ func (client BaseClient) ResumeClusterUpgrade(ctx context.Context, resumeCluster {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeClusterUpgrade", err.Error()) } @@ -17736,7 +17736,7 @@ func (client BaseClient) ResumePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumePartitionBackup", err.Error()) } @@ -17831,7 +17831,7 @@ func (client BaseClient) ResumeServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeServiceBackup", err.Error()) } @@ -17928,7 +17928,7 @@ func (client BaseClient) RollbackApplicationUpgrade(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackApplicationUpgrade", err.Error()) } @@ -18017,7 +18017,7 @@ func (client BaseClient) RollbackClusterUpgrade(ctx context.Context, timeout *in {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackClusterUpgrade", err.Error()) } @@ -18104,7 +18104,7 @@ func (client BaseClient) SetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", err.Error()) } @@ -18203,7 +18203,7 @@ func (client BaseClient) StartApplicationUpgrade(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartApplicationUpgrade", err.Error()) } @@ -18299,24 +18299,24 @@ func (client BaseClient) StartChaos(ctx context.Context, chaosParameters ChaosPa {TargetValue: chaosParameters, Constraints: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartChaos", err.Error()) } @@ -18407,7 +18407,7 @@ func (client BaseClient) StartClusterConfigurationUpgrade(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterConfigurationUpgrade", err.Error()) } @@ -18497,17 +18497,17 @@ func (client BaseClient) StartClusterUpgrade(ctx context.Context, startClusterUp Constraints: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterUpgrade", err.Error()) } @@ -18600,7 +18600,7 @@ func (client BaseClient) StartComposeDeploymentUpgrade(ctx context.Context, depl {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartComposeDeploymentUpgrade", err.Error()) } @@ -18717,7 +18717,7 @@ func (client BaseClient) StartDataLoss(ctx context.Context, serviceID string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartDataLoss", err.Error()) } @@ -18819,11 +18819,11 @@ func (client BaseClient) StartNodeTransition(ctx context.Context, nodeName strin } if err := validation.Validate([]validation.Validation{ {TargetValue: stopDurationInSeconds, - Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartNodeTransition", err.Error()) } @@ -18929,7 +18929,7 @@ func (client BaseClient) StartPartitionRestart(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartPartitionRestart", err.Error()) } @@ -19039,7 +19039,7 @@ func (client BaseClient) StartQuorumLoss(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartQuorumLoss", err.Error()) } @@ -19133,7 +19133,7 @@ func (client BaseClient) StartRollbackComposeDeploymentUpgrade(ctx context.Conte {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartRollbackComposeDeploymentUpgrade", err.Error()) } @@ -19225,7 +19225,7 @@ func (client BaseClient) StopChaos(ctx context.Context, timeout *int64) (result {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StopChaos", err.Error()) } @@ -19312,7 +19312,7 @@ func (client BaseClient) SubmitPropertyBatch(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SubmitPropertyBatch", err.Error()) } @@ -19411,7 +19411,7 @@ func (client BaseClient) SuspendApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendApplicationBackup", err.Error()) } @@ -19502,7 +19502,7 @@ func (client BaseClient) SuspendPartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendPartitionBackup", err.Error()) } @@ -19598,7 +19598,7 @@ func (client BaseClient) SuspendServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendServiceBackup", err.Error()) } @@ -19694,7 +19694,7 @@ func (client BaseClient) UnprovisionApplicationType(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionApplicationType", err.Error()) } @@ -19786,7 +19786,7 @@ func (client BaseClient) UnprovisionCluster(ctx context.Context, unprovisionFabr {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionCluster", err.Error()) } @@ -19883,7 +19883,7 @@ func (client BaseClient) UpdateApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateApplicationUpgrade", err.Error()) } @@ -19978,14 +19978,14 @@ func (client BaseClient) UpdateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateBackupPolicy", err.Error()) } @@ -20078,17 +20078,17 @@ func (client BaseClient) UpdateClusterUpgrade(ctx context.Context, updateCluster Constraints: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateClusterUpgrade", err.Error()) } @@ -20345,7 +20345,7 @@ func (client BaseClient) UpdateService(ctx context.Context, serviceID string, se {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateService", err.Error()) } @@ -20443,7 +20443,7 @@ func (client BaseClient) UploadFile(ctx context.Context, contentPath string, tim {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFile", err.Error()) } @@ -20545,7 +20545,7 @@ func (client BaseClient) UploadFileChunk(ctx context.Context, contentPath string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFileChunk", err.Error()) } diff --git a/services/servicefabric/6.5/servicefabric/client.go b/services/servicefabric/6.5/servicefabric/client.go index 8cff821b98aa..2fb607b3e12a 100644 --- a/services/servicefabric/6.5/servicefabric/client.go +++ b/services/servicefabric/6.5/servicefabric/client.go @@ -87,7 +87,7 @@ func (client BaseClient) BackupPartition(ctx context.Context, partitionID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "BackupPartition", err.Error()) } @@ -205,7 +205,7 @@ func (client BaseClient) CancelOperation(ctx context.Context, operationID uuid.U {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CancelOperation", err.Error()) } @@ -374,7 +374,7 @@ func (client BaseClient) CommitImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CommitImageStoreUploadSession", err.Error()) } @@ -465,7 +465,7 @@ func (client BaseClient) CopyImageStoreContent(ctx context.Context, imageStoreCo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CopyImageStoreContent", err.Error()) } @@ -556,14 +556,14 @@ func (client BaseClient) CreateApplication(ctx context.Context, applicationDescr {Target: "applicationDescription.TypeVersion", Name: validation.Null, Rule: true, Chain: nil}, {Target: "applicationDescription.ApplicationCapacity", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateApplication", err.Error()) } @@ -654,14 +654,14 @@ func (client BaseClient) CreateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateBackupPolicy", err.Error()) } @@ -754,7 +754,7 @@ func (client BaseClient) CreateComposeDeployment(ctx context.Context, createComp {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateComposeDeployment", err.Error()) } @@ -844,7 +844,7 @@ func (client BaseClient) CreateName(ctx context.Context, nameDescription NameDes {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateName", err.Error()) } @@ -1032,7 +1032,7 @@ func (client BaseClient) CreateService(ctx context.Context, applicationID string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateService", err.Error()) } @@ -1136,7 +1136,7 @@ func (client BaseClient) CreateServiceFromTemplate(ctx context.Context, applicat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "CreateServiceFromTemplate", err.Error()) } @@ -1239,7 +1239,7 @@ func (client BaseClient) DeleteApplication(ctx context.Context, applicationID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteApplication", err.Error()) } @@ -1334,7 +1334,7 @@ func (client BaseClient) DeleteBackupPolicy(ctx context.Context, backupPolicyNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteBackupPolicy", err.Error()) } @@ -1425,7 +1425,7 @@ func (client BaseClient) DeleteImageStoreContent(ctx context.Context, contentPat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreContent", err.Error()) } @@ -1517,7 +1517,7 @@ func (client BaseClient) DeleteImageStoreUploadSession(ctx context.Context, sess {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreUploadSession", err.Error()) } @@ -1605,7 +1605,7 @@ func (client BaseClient) DeleteName(ctx context.Context, nameID string, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteName", err.Error()) } @@ -1697,7 +1697,7 @@ func (client BaseClient) DeleteProperty(ctx context.Context, nameID string, prop {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteProperty", err.Error()) } @@ -1875,7 +1875,7 @@ func (client BaseClient) DeleteService(ctx context.Context, serviceID string, fo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeleteService", err.Error()) } @@ -1978,7 +1978,7 @@ func (client BaseClient) DeployServicePackageToNode(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DeployServicePackageToNode", err.Error()) } @@ -2075,7 +2075,7 @@ func (client BaseClient) DisableApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: disableBackupDescription, Constraints: []validation.Constraint{{Target: "disableBackupDescription", Name: validation.Null, Rule: false, @@ -2179,7 +2179,7 @@ func (client BaseClient) DisableNode(ctx context.Context, nodeName string, deact {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableNode", err.Error()) } @@ -2278,7 +2278,7 @@ func (client BaseClient) DisablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisablePartitionBackup", err.Error()) } @@ -2384,7 +2384,7 @@ func (client BaseClient) DisableServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "DisableServiceBackup", err.Error()) } @@ -2488,7 +2488,7 @@ func (client BaseClient) EnableApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableApplicationBackup", err.Error()) } @@ -2582,7 +2582,7 @@ func (client BaseClient) EnableNode(ctx context.Context, nodeName string, timeou {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableNode", err.Error()) } @@ -2679,7 +2679,7 @@ func (client BaseClient) EnablePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnablePartitionBackup", err.Error()) } @@ -2783,7 +2783,7 @@ func (client BaseClient) EnableServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "EnableServiceBackup", err.Error()) } @@ -2955,7 +2955,7 @@ func (client BaseClient) GetAadMetadata(ctx context.Context, timeout *int64) (re {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAadMetadata", err.Error()) } @@ -3052,11 +3052,11 @@ func (client BaseClient) GetAllEntitiesBackedUpByPolicy(ctx context.Context, bac if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", err.Error()) } @@ -3169,11 +3169,11 @@ func (client BaseClient) GetApplicationBackupConfigurationInfo(ctx context.Conte if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", err.Error()) } @@ -3297,11 +3297,11 @@ func (client BaseClient) GetApplicationBackupList(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupList", err.Error()) } @@ -3422,7 +3422,7 @@ func (client BaseClient) GetApplicationEventList(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationEventList", err.Error()) } @@ -3582,7 +3582,7 @@ func (client BaseClient) GetApplicationHealth(ctx context.Context, applicationID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealth", err.Error()) } @@ -3756,7 +3756,7 @@ func (client BaseClient) GetApplicationHealthUsingPolicy(ctx context.Context, ap {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", err.Error()) } @@ -3880,7 +3880,7 @@ func (client BaseClient) GetApplicationInfo(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfo", err.Error()) } @@ -3999,11 +3999,11 @@ func (client BaseClient) GetApplicationInfoList(ctx context.Context, application if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfoList", err.Error()) } @@ -4118,7 +4118,7 @@ func (client BaseClient) GetApplicationLoadInfo(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationLoadInfo", err.Error()) } @@ -4210,7 +4210,7 @@ func (client BaseClient) GetApplicationManifest(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationManifest", err.Error()) } @@ -4307,7 +4307,7 @@ func (client BaseClient) GetApplicationNameInfo(ctx context.Context, serviceID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationNameInfo", err.Error()) } @@ -4405,7 +4405,7 @@ func (client BaseClient) GetApplicationsEventList(ctx context.Context, startTime {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationsEventList", err.Error()) } @@ -4527,11 +4527,11 @@ func (client BaseClient) GetApplicationTypeInfoList(ctx context.Context, applica if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoList", err.Error()) } @@ -4657,11 +4657,11 @@ func (client BaseClient) GetApplicationTypeInfoListByName(ctx context.Context, a if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoListByName", err.Error()) } @@ -4773,7 +4773,7 @@ func (client BaseClient) GetApplicationUpgrade(ctx context.Context, applicationI {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetApplicationUpgrade", err.Error()) } @@ -4864,7 +4864,7 @@ func (client BaseClient) GetBackupPolicyByName(ctx context.Context, backupPolicy {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyByName", err.Error()) } @@ -4963,11 +4963,11 @@ func (client BaseClient) GetBackupPolicyList(ctx context.Context, continuationTo if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyList", err.Error()) } @@ -5074,11 +5074,11 @@ func (client BaseClient) GetBackupsFromBackupLocation(ctx context.Context, getBa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: getBackupByStorageQueryDescription, Constraints: []validation.Constraint{{Target: "getBackupByStorageQueryDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}, {Target: "getBackupByStorageQueryDescription.BackupEntity", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -5177,7 +5177,7 @@ func (client BaseClient) GetChaos(ctx context.Context, timeout *int64) (result C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaos", err.Error()) } @@ -5284,11 +5284,11 @@ func (client BaseClient) GetChaosEvents(ctx context.Context, continuationToken s if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaosEvents", err.Error()) } @@ -5389,7 +5389,7 @@ func (client BaseClient) GetChaosSchedule(ctx context.Context, timeout *int64) ( {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetChaosSchedule", err.Error()) } @@ -5478,7 +5478,7 @@ func (client BaseClient) GetClusterConfiguration(ctx context.Context, configurat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfiguration", err.Error()) } @@ -5566,7 +5566,7 @@ func (client BaseClient) GetClusterConfigurationUpgradeStatus(ctx context.Contex {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", err.Error()) } @@ -5660,7 +5660,7 @@ func (client BaseClient) GetClusterEventList(ctx context.Context, startTimeUtc s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterEventList", err.Error()) } @@ -5821,7 +5821,7 @@ func (client BaseClient) GetClusterHealth(ctx context.Context, nodesHealthStateF {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealth", err.Error()) } @@ -5935,7 +5935,7 @@ func (client BaseClient) GetClusterHealthChunk(ctx context.Context, timeout *int {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunk", err.Error()) } @@ -6043,7 +6043,7 @@ func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFilters(ctx {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", err.Error()) } @@ -6207,7 +6207,7 @@ func (client BaseClient) GetClusterHealthUsingPolicy(ctx context.Context, nodesH {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthUsingPolicy", err.Error()) } @@ -6324,7 +6324,7 @@ func (client BaseClient) GetClusterLoad(ctx context.Context, timeout *int64) (re {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterLoad", err.Error()) } @@ -6420,7 +6420,7 @@ func (client BaseClient) GetClusterManifest(ctx context.Context, timeout *int64) {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterManifest", err.Error()) } @@ -6507,7 +6507,7 @@ func (client BaseClient) GetClusterUpgradeProgress(ctx context.Context, timeout {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterUpgradeProgress", err.Error()) } @@ -6594,7 +6594,7 @@ func (client BaseClient) GetClusterVersion(ctx context.Context, timeout *int64) {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetClusterVersion", err.Error()) } @@ -6683,7 +6683,7 @@ func (client BaseClient) GetComposeDeploymentStatus(ctx context.Context, deploym {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatus", err.Error()) } @@ -6785,11 +6785,11 @@ func (client BaseClient) GetComposeDeploymentStatusList(ctx context.Context, con if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatusList", err.Error()) } @@ -6885,7 +6885,7 @@ func (client BaseClient) GetComposeDeploymentUpgradeProgress(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", err.Error()) } @@ -6988,7 +6988,7 @@ func (client BaseClient) GetContainerLogsDeployedOnNode(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", err.Error()) } @@ -7097,7 +7097,7 @@ func (client BaseClient) GetContainersEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetContainersEventList", err.Error()) } @@ -7195,7 +7195,7 @@ func (client BaseClient) GetCorrelatedEventList(ctx context.Context, eventInstan {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetCorrelatedEventList", err.Error()) } @@ -7293,7 +7293,7 @@ func (client BaseClient) GetDataLossProgress(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDataLossProgress", err.Error()) } @@ -7430,7 +7430,7 @@ func (client BaseClient) GetDeployedApplicationHealth(ctx context.Context, nodeN {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealth", err.Error()) } @@ -7588,7 +7588,7 @@ func (client BaseClient) GetDeployedApplicationHealthUsingPolicy(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", err.Error()) } @@ -7713,7 +7713,7 @@ func (client BaseClient) GetDeployedApplicationInfo(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfo", err.Error()) } @@ -7829,11 +7829,11 @@ func (client BaseClient) GetDeployedApplicationInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfoList", err.Error()) } @@ -7946,7 +7946,7 @@ func (client BaseClient) GetDeployedCodePackageInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedCodePackageInfoList", err.Error()) } @@ -8067,7 +8067,7 @@ func (client BaseClient) GetDeployedServicePackageHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealth", err.Error()) } @@ -8195,7 +8195,7 @@ func (client BaseClient) GetDeployedServicePackageHealthUsingPolicy(ctx context. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", err.Error()) } @@ -8304,7 +8304,7 @@ func (client BaseClient) GetDeployedServicePackageInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoList", err.Error()) } @@ -8404,7 +8404,7 @@ func (client BaseClient) GetDeployedServicePackageInfoListByName(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", err.Error()) } @@ -8501,7 +8501,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", err.Error()) } @@ -8597,7 +8597,7 @@ func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionID(ctx co {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", err.Error()) } @@ -8700,7 +8700,7 @@ func (client BaseClient) GetDeployedServiceReplicaInfoList(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", err.Error()) } @@ -8810,7 +8810,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoByName(ctx context.Context, n {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", err.Error()) } @@ -8916,7 +8916,7 @@ func (client BaseClient) GetDeployedServiceTypeInfoList(ctx context.Context, nod {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", err.Error()) } @@ -9026,7 +9026,7 @@ func (client BaseClient) GetFaultOperationList(ctx context.Context, typeFilter i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetFaultOperationList", err.Error()) } @@ -9116,7 +9116,7 @@ func (client BaseClient) GetImageStoreContent(ctx context.Context, contentPath s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreContent", err.Error()) } @@ -9208,7 +9208,7 @@ func (client BaseClient) GetImageStoreFolderSize(ctx context.Context, contentPat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreFolderSize", err.Error()) } @@ -9298,7 +9298,7 @@ func (client BaseClient) GetImageStoreRootContent(ctx context.Context, timeout * {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreRootContent", err.Error()) } @@ -9384,7 +9384,7 @@ func (client BaseClient) GetImageStoreRootFolderSize(ctx context.Context, timeou {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreRootFolderSize", err.Error()) } @@ -9473,7 +9473,7 @@ func (client BaseClient) GetImageStoreUploadSessionByID(ctx context.Context, ses {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByID", err.Error()) } @@ -9562,7 +9562,7 @@ func (client BaseClient) GetImageStoreUploadSessionByPath(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", err.Error()) } @@ -9653,7 +9653,7 @@ func (client BaseClient) GetNameExistsInfo(ctx context.Context, nameID string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNameExistsInfo", err.Error()) } @@ -9751,7 +9751,7 @@ func (client BaseClient) GetNodeEventList(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeEventList", err.Error()) } @@ -9870,7 +9870,7 @@ func (client BaseClient) GetNodeHealth(ctx context.Context, nodeName string, eve {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealth", err.Error()) } @@ -9986,7 +9986,7 @@ func (client BaseClient) GetNodeHealthUsingPolicy(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealthUsingPolicy", err.Error()) } @@ -10087,7 +10087,7 @@ func (client BaseClient) GetNodeInfo(ctx context.Context, nodeName string, timeo {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfo", err.Error()) } @@ -10188,11 +10188,11 @@ func (client BaseClient) GetNodeInfoList(ctx context.Context, continuationToken if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfoList", err.Error()) } @@ -10293,7 +10293,7 @@ func (client BaseClient) GetNodeLoadInfo(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeLoadInfo", err.Error()) } @@ -10391,7 +10391,7 @@ func (client BaseClient) GetNodesEventList(ctx context.Context, startTimeUtc str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodesEventList", err.Error()) } @@ -10492,7 +10492,7 @@ func (client BaseClient) GetNodeTransitionProgress(ctx context.Context, nodeName {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetNodeTransitionProgress", err.Error()) } @@ -10585,7 +10585,7 @@ func (client BaseClient) GetPartitionBackupConfigurationInfo(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", err.Error()) } @@ -10686,7 +10686,7 @@ func (client BaseClient) GetPartitionBackupList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupList", err.Error()) } @@ -10789,7 +10789,7 @@ func (client BaseClient) GetPartitionBackupProgress(ctx context.Context, partiti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupProgress", err.Error()) } @@ -10888,7 +10888,7 @@ func (client BaseClient) GetPartitionEventList(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionEventList", err.Error()) } @@ -11026,7 +11026,7 @@ func (client BaseClient) GetPartitionHealth(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealth", err.Error()) } @@ -11177,7 +11177,7 @@ func (client BaseClient) GetPartitionHealthUsingPolicy(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", err.Error()) } @@ -11290,7 +11290,7 @@ func (client BaseClient) GetPartitionInfo(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfo", err.Error()) } @@ -11391,7 +11391,7 @@ func (client BaseClient) GetPartitionInfoList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfoList", err.Error()) } @@ -11487,7 +11487,7 @@ func (client BaseClient) GetPartitionLoadInformation(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionLoadInformation", err.Error()) } @@ -11587,7 +11587,7 @@ func (client BaseClient) GetPartitionReplicaEventList(ctx context.Context, parti {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicaEventList", err.Error()) } @@ -11698,7 +11698,7 @@ func (client BaseClient) GetPartitionReplicasEventList(ctx context.Context, part {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicasEventList", err.Error()) } @@ -11808,7 +11808,7 @@ func (client BaseClient) GetPartitionRestartProgress(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestartProgress", err.Error()) } @@ -11902,7 +11902,7 @@ func (client BaseClient) GetPartitionRestoreProgress(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestoreProgress", err.Error()) } @@ -12000,7 +12000,7 @@ func (client BaseClient) GetPartitionsEventList(ctx context.Context, startTimeUt {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPartitionsEventList", err.Error()) } @@ -12100,7 +12100,7 @@ func (client BaseClient) GetPropertyInfo(ctx context.Context, nameID string, pro {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfo", err.Error()) } @@ -12201,7 +12201,7 @@ func (client BaseClient) GetPropertyInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfoList", err.Error()) } @@ -12302,7 +12302,7 @@ func (client BaseClient) GetProvisionedFabricCodeVersionInfoList(ctx context.Con {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", err.Error()) } @@ -12394,7 +12394,7 @@ func (client BaseClient) GetProvisionedFabricConfigVersionInfoList(ctx context.C {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", err.Error()) } @@ -12492,7 +12492,7 @@ func (client BaseClient) GetQuorumLossProgress(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetQuorumLossProgress", err.Error()) } @@ -12693,7 +12693,7 @@ func (client BaseClient) GetReplicaHealth(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealth", err.Error()) } @@ -12816,7 +12816,7 @@ func (client BaseClient) GetReplicaHealthUsingPolicy(ctx context.Context, partit {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", err.Error()) } @@ -12920,7 +12920,7 @@ func (client BaseClient) GetReplicaInfo(ctx context.Context, partitionID uuid.UU {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfo", err.Error()) } @@ -13018,7 +13018,7 @@ func (client BaseClient) GetReplicaInfoList(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfoList", err.Error()) } @@ -13126,11 +13126,11 @@ func (client BaseClient) GetServiceBackupConfigurationInfo(ctx context.Context, if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", err.Error()) } @@ -13254,11 +13254,11 @@ func (client BaseClient) GetServiceBackupList(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupList", err.Error()) } @@ -13372,7 +13372,7 @@ func (client BaseClient) GetServiceDescription(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceDescription", err.Error()) } @@ -13475,7 +13475,7 @@ func (client BaseClient) GetServiceEventList(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceEventList", err.Error()) } @@ -13620,7 +13620,7 @@ func (client BaseClient) GetServiceHealth(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealth", err.Error()) } @@ -13776,7 +13776,7 @@ func (client BaseClient) GetServiceHealthUsingPolicy(ctx context.Context, servic {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealthUsingPolicy", err.Error()) } @@ -13897,7 +13897,7 @@ func (client BaseClient) GetServiceInfo(ctx context.Context, applicationID strin {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfo", err.Error()) } @@ -14000,7 +14000,7 @@ func (client BaseClient) GetServiceInfoList(ctx context.Context, applicationID s {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfoList", err.Error()) } @@ -14101,7 +14101,7 @@ func (client BaseClient) GetServiceManifest(ctx context.Context, applicationType {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceManifest", err.Error()) } @@ -14195,7 +14195,7 @@ func (client BaseClient) GetServiceNameInfo(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceNameInfo", err.Error()) } @@ -14293,7 +14293,7 @@ func (client BaseClient) GetServicesEventList(ctx context.Context, startTimeUtc {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServicesEventList", err.Error()) } @@ -14395,7 +14395,7 @@ func (client BaseClient) GetServiceTypeInfoByName(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoByName", err.Error()) } @@ -14491,7 +14491,7 @@ func (client BaseClient) GetServiceTypeInfoList(ctx context.Context, application {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoList", err.Error()) } @@ -14591,7 +14591,7 @@ func (client BaseClient) GetSubNameInfoList(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetSubNameInfoList", err.Error()) } @@ -14701,7 +14701,7 @@ func (client BaseClient) GetUnplacedReplicaInformation(ctx context.Context, serv {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetUnplacedReplicaInformation", err.Error()) } @@ -14800,7 +14800,7 @@ func (client BaseClient) GetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", err.Error()) } @@ -14899,7 +14899,7 @@ func (client BaseClient) InvokeContainerAPI(ctx context.Context, nodeName string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: containerAPIRequestBody, Constraints: []validation.Constraint{{Target: "containerAPIRequestBody.URIPath", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -15008,7 +15008,7 @@ func (client BaseClient) InvokeInfrastructureCommand(ctx context.Context, comman {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureCommand", err.Error()) } @@ -15109,7 +15109,7 @@ func (client BaseClient) InvokeInfrastructureQuery(ctx context.Context, command {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureQuery", err.Error()) } @@ -15208,7 +15208,7 @@ func (client BaseClient) MovePrimaryReplica(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "MovePrimaryReplica", err.Error()) } @@ -15317,7 +15317,7 @@ func (client BaseClient) MoveSecondaryReplica(ctx context.Context, partitionID u {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "MoveSecondaryReplica", err.Error()) } @@ -15420,11 +15420,11 @@ func (client BaseClient) PostChaosSchedule(ctx context.Context, chaosSchedule Ch {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}, {TargetValue: chaosSchedule, Constraints: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PostChaosSchedule", err.Error()) } @@ -15517,7 +15517,7 @@ func (client BaseClient) ProvisionApplicationType(ctx context.Context, provision {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionApplicationType", err.Error()) } @@ -15605,7 +15605,7 @@ func (client BaseClient) ProvisionCluster(ctx context.Context, provisionFabricDe {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ProvisionCluster", err.Error()) } @@ -15697,7 +15697,7 @@ func (client BaseClient) PutProperty(ctx context.Context, nameID string, propert {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "PutProperty", err.Error()) } @@ -15789,7 +15789,7 @@ func (client BaseClient) RecoverAllPartitions(ctx context.Context, timeout *int6 {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverAllPartitions", err.Error()) } @@ -15876,7 +15876,7 @@ func (client BaseClient) RecoverPartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverPartition", err.Error()) } @@ -15972,7 +15972,7 @@ func (client BaseClient) RecoverServicePartitions(ctx context.Context, serviceID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverServicePartitions", err.Error()) } @@ -16063,7 +16063,7 @@ func (client BaseClient) RecoverSystemPartitions(ctx context.Context, timeout *i {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RecoverSystemPartitions", err.Error()) } @@ -16149,7 +16149,7 @@ func (client BaseClient) RemoveComposeDeployment(ctx context.Context, deployment {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveComposeDeployment", err.Error()) } @@ -16250,7 +16250,7 @@ func (client BaseClient) RemoveNodeState(ctx context.Context, nodeName string, t {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveNodeState", err.Error()) } @@ -16350,7 +16350,7 @@ func (client BaseClient) RemoveReplica(ctx context.Context, nodeName string, par {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RemoveReplica", err.Error()) } @@ -16472,7 +16472,7 @@ func (client BaseClient) ReportApplicationHealth(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportApplicationHealth", err.Error()) } @@ -16591,7 +16591,7 @@ func (client BaseClient) ReportClusterHealth(ctx context.Context, healthInformat {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportClusterHealth", err.Error()) } @@ -16712,7 +16712,7 @@ func (client BaseClient) ReportDeployedApplicationHealth(ctx context.Context, no {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedApplicationHealth", err.Error()) } @@ -16840,7 +16840,7 @@ func (client BaseClient) ReportDeployedServicePackageHealth(ctx context.Context, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedServicePackageHealth", err.Error()) } @@ -16962,7 +16962,7 @@ func (client BaseClient) ReportNodeHealth(ctx context.Context, nodeName string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportNodeHealth", err.Error()) } @@ -17082,7 +17082,7 @@ func (client BaseClient) ReportPartitionHealth(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportPartitionHealth", err.Error()) } @@ -17205,7 +17205,7 @@ func (client BaseClient) ReportReplicaHealth(ctx context.Context, partitionID uu {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportReplicaHealth", err.Error()) } @@ -17331,7 +17331,7 @@ func (client BaseClient) ReportServiceHealth(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ReportServiceHealth", err.Error()) } @@ -17428,7 +17428,7 @@ func (client BaseClient) ResetPartitionLoad(ctx context.Context, partitionID uui {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResetPartitionLoad", err.Error()) } @@ -17538,7 +17538,7 @@ func (client BaseClient) ResolveService(ctx context.Context, serviceID string, p {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResolveService", err.Error()) } @@ -17650,7 +17650,7 @@ func (client BaseClient) RestartDeployedCodePackage(ctx context.Context, nodeNam {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartDeployedCodePackage", err.Error()) } @@ -17747,7 +17747,7 @@ func (client BaseClient) RestartNode(ctx context.Context, nodeName string, resta {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartNode", err.Error()) } @@ -17843,7 +17843,7 @@ func (client BaseClient) RestartReplica(ctx context.Context, nodeName string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestartReplica", err.Error()) } @@ -17949,7 +17949,7 @@ func (client BaseClient) RestorePartition(ctx context.Context, partitionID uuid. {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RestorePartition", err.Error()) } @@ -18051,7 +18051,7 @@ func (client BaseClient) ResumeApplicationBackup(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationBackup", err.Error()) } @@ -18150,7 +18150,7 @@ func (client BaseClient) ResumeApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationUpgrade", err.Error()) } @@ -18245,7 +18245,7 @@ func (client BaseClient) ResumeClusterUpgrade(ctx context.Context, resumeCluster {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeClusterUpgrade", err.Error()) } @@ -18334,7 +18334,7 @@ func (client BaseClient) ResumePartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumePartitionBackup", err.Error()) } @@ -18429,7 +18429,7 @@ func (client BaseClient) ResumeServiceBackup(ctx context.Context, serviceID stri {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ResumeServiceBackup", err.Error()) } @@ -18526,7 +18526,7 @@ func (client BaseClient) RollbackApplicationUpgrade(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackApplicationUpgrade", err.Error()) } @@ -18615,7 +18615,7 @@ func (client BaseClient) RollbackClusterUpgrade(ctx context.Context, timeout *in {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "RollbackClusterUpgrade", err.Error()) } @@ -18702,7 +18702,7 @@ func (client BaseClient) SetUpgradeOrchestrationServiceState(ctx context.Context {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", err.Error()) } @@ -18800,7 +18800,7 @@ func (client BaseClient) StartApplicationUpgrade(ctx context.Context, applicatio {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartApplicationUpgrade", err.Error()) } @@ -18896,24 +18896,24 @@ func (client BaseClient) StartChaos(ctx context.Context, chaosParameters ChaosPa {TargetValue: chaosParameters, Constraints: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartChaos", err.Error()) } @@ -19004,7 +19004,7 @@ func (client BaseClient) StartClusterConfigurationUpgrade(ctx context.Context, c {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterConfigurationUpgrade", err.Error()) } @@ -19094,17 +19094,17 @@ func (client BaseClient) StartClusterUpgrade(ctx context.Context, startClusterUp Constraints: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartClusterUpgrade", err.Error()) } @@ -19197,7 +19197,7 @@ func (client BaseClient) StartComposeDeploymentUpgrade(ctx context.Context, depl {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartComposeDeploymentUpgrade", err.Error()) } @@ -19314,7 +19314,7 @@ func (client BaseClient) StartDataLoss(ctx context.Context, serviceID string, pa {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartDataLoss", err.Error()) } @@ -19416,11 +19416,11 @@ func (client BaseClient) StartNodeTransition(ctx context.Context, nodeName strin } if err := validation.Validate([]validation.Validation{ {TargetValue: stopDurationInSeconds, - Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartNodeTransition", err.Error()) } @@ -19526,7 +19526,7 @@ func (client BaseClient) StartPartitionRestart(ctx context.Context, serviceID st {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartPartitionRestart", err.Error()) } @@ -19636,7 +19636,7 @@ func (client BaseClient) StartQuorumLoss(ctx context.Context, serviceID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartQuorumLoss", err.Error()) } @@ -19730,7 +19730,7 @@ func (client BaseClient) StartRollbackComposeDeploymentUpgrade(ctx context.Conte {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StartRollbackComposeDeploymentUpgrade", err.Error()) } @@ -19822,7 +19822,7 @@ func (client BaseClient) StopChaos(ctx context.Context, timeout *int64) (result {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "StopChaos", err.Error()) } @@ -19909,7 +19909,7 @@ func (client BaseClient) SubmitPropertyBatch(ctx context.Context, nameID string, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SubmitPropertyBatch", err.Error()) } @@ -20008,7 +20008,7 @@ func (client BaseClient) SuspendApplicationBackup(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendApplicationBackup", err.Error()) } @@ -20099,7 +20099,7 @@ func (client BaseClient) SuspendPartitionBackup(ctx context.Context, partitionID {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendPartitionBackup", err.Error()) } @@ -20195,7 +20195,7 @@ func (client BaseClient) SuspendServiceBackup(ctx context.Context, serviceID str {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "SuspendServiceBackup", err.Error()) } @@ -20287,7 +20287,7 @@ func (client BaseClient) ToggleVerboseServicePlacementHealthReporting(ctx contex {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "ToggleVerboseServicePlacementHealthReporting", err.Error()) } @@ -20380,7 +20380,7 @@ func (client BaseClient) UnprovisionApplicationType(ctx context.Context, applica {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionApplicationType", err.Error()) } @@ -20472,7 +20472,7 @@ func (client BaseClient) UnprovisionCluster(ctx context.Context, unprovisionFabr {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UnprovisionCluster", err.Error()) } @@ -20569,7 +20569,7 @@ func (client BaseClient) UpdateApplicationUpgrade(ctx context.Context, applicati {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateApplicationUpgrade", err.Error()) } @@ -20664,14 +20664,14 @@ func (client BaseClient) UpdateBackupPolicy(ctx context.Context, backupPolicyDes {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, - {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateBackupPolicy", err.Error()) } @@ -20764,17 +20764,17 @@ func (client BaseClient) UpdateClusterUpgrade(ctx context.Context, updateCluster Constraints: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateClusterUpgrade", err.Error()) } @@ -21031,7 +21031,7 @@ func (client BaseClient) UpdateService(ctx context.Context, serviceID string, se {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UpdateService", err.Error()) } @@ -21129,7 +21129,7 @@ func (client BaseClient) UploadFile(ctx context.Context, contentPath string, tim {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFile", err.Error()) } @@ -21231,7 +21231,7 @@ func (client BaseClient) UploadFileChunk(ctx context.Context, contentPath string {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}}}}); err != nil { return result, validation.NewError("servicefabric.BaseClient", "UploadFileChunk", err.Error()) } diff --git a/services/servicefabric/7.0/servicefabric/client.go b/services/servicefabric/7.0/servicefabric/client.go new file mode 100644 index 000000000000..7f8595f21b2e --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/client.go @@ -0,0 +1,21671 @@ +// Package servicefabric implements the Azure ARM Servicefabric service API version 7.0.0.42. +// +// Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services. +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "github.com/satori/go.uuid" + "net/http" +) + +const ( + // DefaultBaseURI is the default URI used for the service Servicefabric + DefaultBaseURI = "http://localhost:19080" +) + +// BaseClient is the base client for Servicefabric. +type BaseClient struct { + autorest.Client + BaseURI string +} + +// New creates an instance of the BaseClient client. +func New() BaseClient { + return NewWithBaseURI(DefaultBaseURI) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + } +} + +// AddConfigurationParameterOverrides this api allows adding all existing configuration overrides on the specified +// node. +// Parameters: +// nodeName - the name of the node. +// configParameterOverrideList - description for adding list of configuration overrides. +// force - force adding configuration overrides on specified nodes. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) AddConfigurationParameterOverrides(ctx context.Context, nodeName string, configParameterOverrideList []ConfigParameterOverride, force *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.AddConfigurationParameterOverrides") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: configParameterOverrideList, + Constraints: []validation.Constraint{{Target: "configParameterOverrideList", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "AddConfigurationParameterOverrides", err.Error()) + } + + req, err := client.AddConfigurationParameterOverridesPreparer(ctx, nodeName, configParameterOverrideList, force, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "AddConfigurationParameterOverrides", nil, "Failure preparing request") + return + } + + resp, err := client.AddConfigurationParameterOverridesSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "AddConfigurationParameterOverrides", resp, "Failure sending request") + return + } + + result, err = client.AddConfigurationParameterOverridesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "AddConfigurationParameterOverrides", resp, "Failure responding to request") + } + + return +} + +// AddConfigurationParameterOverridesPreparer prepares the AddConfigurationParameterOverrides request. +func (client BaseClient) AddConfigurationParameterOverridesPreparer(ctx context.Context, nodeName string, configParameterOverrideList []ConfigParameterOverride, force *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "7.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if force != nil { + queryParameters["Force"] = autorest.Encode("query", *force) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/AddConfigurationParameterOverrides", pathParameters), + autorest.WithJSON(configParameterOverrideList), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AddConfigurationParameterOverridesSender sends the AddConfigurationParameterOverrides request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) AddConfigurationParameterOverridesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// AddConfigurationParameterOverridesResponder handles the response to the AddConfigurationParameterOverrides request. The method always +// closes the http.Response Body. +func (client BaseClient) AddConfigurationParameterOverridesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// BackupPartition creates a backup of the stateful persisted partition's state. In case the partition is already being +// periodically backed up, then by default the new backup is created at the same backup storage. One can also override +// the same by specifying the backup storage details as part of the request body. Once the backup is initiated, its +// progress can be tracked using the GetBackupProgress operation. +// In case, the operation times out, specify a greater backup timeout value in the query parameter. +// Parameters: +// partitionID - the identity of the partition. +// backupPartitionDescription - describes the parameters to backup the partition now. If not present, backup +// operation uses default parameters from the backup policy current associated with this partition. +// backupTimeout - specifies the maximum amount of time, in minutes, to wait for the backup operation to +// complete. Post that, the operation completes with timeout error. However, in certain corner cases it could +// be that though the operation returns back timeout, the backup actually goes through. In case of timeout +// error, its recommended to invoke this operation again with a greater timeout value. The default value for +// the same is 10 minutes. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) BackupPartition(ctx context.Context, partitionID uuid.UUID, backupPartitionDescription *BackupPartitionDescription, backupTimeout *int32, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.BackupPartition") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "BackupPartition", err.Error()) + } + + req, err := client.BackupPartitionPreparer(ctx, partitionID, backupPartitionDescription, backupTimeout, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "BackupPartition", nil, "Failure preparing request") + return + } + + resp, err := client.BackupPartitionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "BackupPartition", resp, "Failure sending request") + return + } + + result, err = client.BackupPartitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "BackupPartition", resp, "Failure responding to request") + } + + return +} + +// BackupPartitionPreparer prepares the BackupPartition request. +func (client BaseClient) BackupPartitionPreparer(ctx context.Context, partitionID uuid.UUID, backupPartitionDescription *BackupPartitionDescription, backupTimeout *int32, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if backupTimeout != nil { + queryParameters["BackupTimeout"] = autorest.Encode("query", *backupTimeout) + } else { + queryParameters["BackupTimeout"] = autorest.Encode("query", 10) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/Backup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if backupPartitionDescription != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(backupPartitionDescription)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// BackupPartitionSender sends the BackupPartition request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) BackupPartitionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// BackupPartitionResponder handles the response to the BackupPartition request. The method always +// closes the http.Response Body. +func (client BaseClient) BackupPartitionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// CancelOperation the following APIs start fault operations that may be cancelled by using CancelOperation: +// StartDataLoss, StartQuorumLoss, StartPartitionRestart, StartNodeTransition. +// +// If force is false, then the specified user-induced operation will be gracefully stopped and cleaned up. If force is +// true, the command will be aborted, and some internal state +// may be left behind. Specifying force as true should be used with care. Calling this API with force set to true is +// not allowed until this API has already +// been called on the same test command with force set to false first, or unless the test command already has an +// OperationState of OperationState.RollingBack. +// Clarification: OperationState.RollingBack means that the system will be/is cleaning up internal system state caused +// by executing the command. It will not restore data if the +// test command was to cause data loss. For example, if you call StartDataLoss then call this API, the system will +// only clean up internal state from running the command. +// It will not restore the target partition's data, if the command progressed far enough to cause data loss. +// +// Important note: if this API is invoked with force==true, internal state may be left behind. +// Parameters: +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// force - indicates whether to gracefully roll back and clean up internal system state modified by executing +// the user-induced operation. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CancelOperation(ctx context.Context, operationID uuid.UUID, force bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CancelOperation") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CancelOperation", err.Error()) + } + + req, err := client.CancelOperationPreparer(ctx, operationID, force, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CancelOperation", nil, "Failure preparing request") + return + } + + resp, err := client.CancelOperationSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CancelOperation", resp, "Failure sending request") + return + } + + result, err = client.CancelOperationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CancelOperation", resp, "Failure responding to request") + } + + return +} + +// CancelOperationPreparer prepares the CancelOperation request. +func (client BaseClient) CancelOperationPreparer(ctx context.Context, operationID uuid.UUID, force bool, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "Force": autorest.Encode("query", force), + "OperationId": autorest.Encode("query", operationID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Faults/$/Cancel"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CancelOperationSender sends the CancelOperation request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CancelOperationSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CancelOperationResponder handles the response to the CancelOperation request. The method always +// closes the http.Response Body. +func (client BaseClient) CancelOperationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// CancelRepairTask this API supports the Service Fabric platform; it is not meant to be used directly from your code. +// Parameters: +// repairTaskCancelDescription - describes the repair task to be cancelled. +func (client BaseClient) CancelRepairTask(ctx context.Context, repairTaskCancelDescription RepairTaskCancelDescription) (result RepairTaskUpdateInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CancelRepairTask") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: repairTaskCancelDescription, + Constraints: []validation.Constraint{{Target: "repairTaskCancelDescription.TaskID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CancelRepairTask", err.Error()) + } + + req, err := client.CancelRepairTaskPreparer(ctx, repairTaskCancelDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CancelRepairTask", nil, "Failure preparing request") + return + } + + resp, err := client.CancelRepairTaskSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CancelRepairTask", resp, "Failure sending request") + return + } + + result, err = client.CancelRepairTaskResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CancelRepairTask", resp, "Failure responding to request") + } + + return +} + +// CancelRepairTaskPreparer prepares the CancelRepairTask request. +func (client BaseClient) CancelRepairTaskPreparer(ctx context.Context, repairTaskCancelDescription RepairTaskCancelDescription) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/CancelRepairTask"), + autorest.WithJSON(repairTaskCancelDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CancelRepairTaskSender sends the CancelRepairTask request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CancelRepairTaskSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CancelRepairTaskResponder handles the response to the CancelRepairTask request. The method always +// closes the http.Response Body. +func (client BaseClient) CancelRepairTaskResponder(resp *http.Response) (result RepairTaskUpdateInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CommitImageStoreUploadSession when all file chunks have been uploaded, the upload session needs to be committed +// explicitly to complete the upload. Image store preserves the upload session until the expiration time, which is 30 +// minutes after the last chunk received. +// Parameters: +// sessionID - a GUID generated by the user for a file uploading. It identifies an image store upload session +// which keeps track of all file chunks until it is committed. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CommitImageStoreUploadSession(ctx context.Context, sessionID uuid.UUID, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CommitImageStoreUploadSession") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CommitImageStoreUploadSession", err.Error()) + } + + req, err := client.CommitImageStoreUploadSessionPreparer(ctx, sessionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CommitImageStoreUploadSession", nil, "Failure preparing request") + return + } + + resp, err := client.CommitImageStoreUploadSessionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CommitImageStoreUploadSession", resp, "Failure sending request") + return + } + + result, err = client.CommitImageStoreUploadSessionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CommitImageStoreUploadSession", resp, "Failure responding to request") + } + + return +} + +// CommitImageStoreUploadSessionPreparer prepares the CommitImageStoreUploadSession request. +func (client BaseClient) CommitImageStoreUploadSessionPreparer(ctx context.Context, sessionID uuid.UUID, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "session-id": autorest.Encode("query", sessionID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ImageStore/$/CommitUploadSession"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CommitImageStoreUploadSessionSender sends the CommitImageStoreUploadSession request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CommitImageStoreUploadSessionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CommitImageStoreUploadSessionResponder handles the response to the CommitImageStoreUploadSession request. The method always +// closes the http.Response Body. +func (client BaseClient) CommitImageStoreUploadSessionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// CopyImageStoreContent copies the image store content from the source image store relative path to the destination +// image store relative path. +// Parameters: +// imageStoreCopyDescription - describes the copy description for the image store. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CopyImageStoreContent(ctx context.Context, imageStoreCopyDescription ImageStoreCopyDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CopyImageStoreContent") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: imageStoreCopyDescription, + Constraints: []validation.Constraint{{Target: "imageStoreCopyDescription.RemoteSource", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "imageStoreCopyDescription.RemoteDestination", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CopyImageStoreContent", err.Error()) + } + + req, err := client.CopyImageStoreContentPreparer(ctx, imageStoreCopyDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CopyImageStoreContent", nil, "Failure preparing request") + return + } + + resp, err := client.CopyImageStoreContentSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CopyImageStoreContent", resp, "Failure sending request") + return + } + + result, err = client.CopyImageStoreContentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CopyImageStoreContent", resp, "Failure responding to request") + } + + return +} + +// CopyImageStoreContentPreparer prepares the CopyImageStoreContent request. +func (client BaseClient) CopyImageStoreContentPreparer(ctx context.Context, imageStoreCopyDescription ImageStoreCopyDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ImageStore/$/Copy"), + autorest.WithJSON(imageStoreCopyDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CopyImageStoreContentSender sends the CopyImageStoreContent request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CopyImageStoreContentSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CopyImageStoreContentResponder handles the response to the CopyImageStoreContent request. The method always +// closes the http.Response Body. +func (client BaseClient) CopyImageStoreContentResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateApplication creates a Service Fabric application using the specified description. +// Parameters: +// applicationDescription - description for creating an application. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CreateApplication(ctx context.Context, applicationDescription ApplicationDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateApplication") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: applicationDescription, + Constraints: []validation.Constraint{{Target: "applicationDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "applicationDescription.TypeName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "applicationDescription.TypeVersion", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "applicationDescription.ApplicationCapacity", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MinimumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + {Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "applicationDescription.ApplicationCapacity.MaximumNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + }}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CreateApplication", err.Error()) + } + + req, err := client.CreateApplicationPreparer(ctx, applicationDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateApplication", nil, "Failure preparing request") + return + } + + resp, err := client.CreateApplicationSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateApplication", resp, "Failure sending request") + return + } + + result, err = client.CreateApplicationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateApplication", resp, "Failure responding to request") + } + + return +} + +// CreateApplicationPreparer prepares the CreateApplication request. +func (client BaseClient) CreateApplicationPreparer(ctx context.Context, applicationDescription ApplicationDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Applications/$/Create"), + autorest.WithJSON(applicationDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateApplicationSender sends the CreateApplication request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateApplicationSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateApplicationResponder handles the response to the CreateApplication request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateApplicationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateBackupPolicy creates a backup policy which can be associated later with a Service Fabric application, service +// or a partition for periodic backup. +// Parameters: +// backupPolicyDescription - describes the backup policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CreateBackupPolicy(ctx context.Context, backupPolicyDescription BackupPolicyDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateBackupPolicy") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: backupPolicyDescription, + Constraints: []validation.Constraint{{Target: "backupPolicyDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CreateBackupPolicy", err.Error()) + } + + req, err := client.CreateBackupPolicyPreparer(ctx, backupPolicyDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateBackupPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.CreateBackupPolicySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateBackupPolicy", resp, "Failure sending request") + return + } + + result, err = client.CreateBackupPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateBackupPolicy", resp, "Failure responding to request") + } + + return +} + +// CreateBackupPolicyPreparer prepares the CreateBackupPolicy request. +func (client BaseClient) CreateBackupPolicyPreparer(ctx context.Context, backupPolicyDescription BackupPolicyDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/BackupRestore/BackupPolicies/$/Create"), + autorest.WithJSON(backupPolicyDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateBackupPolicySender sends the CreateBackupPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateBackupPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateBackupPolicyResponder handles the response to the CreateBackupPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateBackupPolicyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateComposeDeployment compose is a file format that describes multi-container applications. This API allows +// deploying container based applications defined in compose format in a Service Fabric cluster. Once the deployment is +// created, its status can be tracked via the `GetComposeDeploymentStatus` API. +// Parameters: +// createComposeDeploymentDescription - describes the compose deployment that needs to be created. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CreateComposeDeployment(ctx context.Context, createComposeDeploymentDescription CreateComposeDeploymentDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateComposeDeployment") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: createComposeDeploymentDescription, + Constraints: []validation.Constraint{{Target: "createComposeDeploymentDescription.DeploymentName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "createComposeDeploymentDescription.ComposeFileContent", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CreateComposeDeployment", err.Error()) + } + + req, err := client.CreateComposeDeploymentPreparer(ctx, createComposeDeploymentDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateComposeDeployment", nil, "Failure preparing request") + return + } + + resp, err := client.CreateComposeDeploymentSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateComposeDeployment", resp, "Failure sending request") + return + } + + result, err = client.CreateComposeDeploymentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateComposeDeployment", resp, "Failure responding to request") + } + + return +} + +// CreateComposeDeploymentPreparer prepares the CreateComposeDeployment request. +func (client BaseClient) CreateComposeDeploymentPreparer(ctx context.Context, createComposeDeploymentDescription CreateComposeDeploymentDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ComposeDeployments/$/Create"), + autorest.WithJSON(createComposeDeploymentDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateComposeDeploymentSender sends the CreateComposeDeployment request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateComposeDeploymentSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateComposeDeploymentResponder handles the response to the CreateComposeDeployment request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateComposeDeploymentResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateName creates the specified Service Fabric name. +// Parameters: +// nameDescription - describes the Service Fabric name to be created. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CreateName(ctx context.Context, nameDescription NameDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateName") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: nameDescription, + Constraints: []validation.Constraint{{Target: "nameDescription.Name", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CreateName", err.Error()) + } + + req, err := client.CreateNamePreparer(ctx, nameDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateName", nil, "Failure preparing request") + return + } + + resp, err := client.CreateNameSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateName", resp, "Failure sending request") + return + } + + result, err = client.CreateNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateName", resp, "Failure responding to request") + } + + return +} + +// CreateNamePreparer prepares the CreateName request. +func (client BaseClient) CreateNamePreparer(ctx context.Context, nameDescription NameDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Names/$/Create"), + autorest.WithJSON(nameDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateNameSender sends the CreateName request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateNameSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateNameResponder handles the response to the CreateName request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateNameResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateRepairTask for clusters that have the Repair Manager Service configured, +// this API provides a way to create repair tasks that run automatically or manually. +// For repair tasks that run automatically, an appropriate repair executor +// must be running for each repair action to run automatically. +// These are currently only available in specially-configured Azure Cloud Services. +// +// To create a manual repair task, provide the set of impacted node names and the +// expected impact. When the state of the created repair task changes to approved, +// you can safely perform repair actions on those nodes. +// +// This API supports the Service Fabric platform; it is not meant to be used directly from your code. +// Parameters: +// repairTask - describes the repair task to be created or updated. +func (client BaseClient) CreateRepairTask(ctx context.Context, repairTask RepairTask) (result RepairTaskUpdateInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateRepairTask") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: repairTask, + Constraints: []validation.Constraint{{Target: "repairTask.TaskID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "repairTask.Action", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CreateRepairTask", err.Error()) + } + + req, err := client.CreateRepairTaskPreparer(ctx, repairTask) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateRepairTask", nil, "Failure preparing request") + return + } + + resp, err := client.CreateRepairTaskSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateRepairTask", resp, "Failure sending request") + return + } + + result, err = client.CreateRepairTaskResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateRepairTask", resp, "Failure responding to request") + } + + return +} + +// CreateRepairTaskPreparer prepares the CreateRepairTask request. +func (client BaseClient) CreateRepairTaskPreparer(ctx context.Context, repairTask RepairTask) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/CreateRepairTask"), + autorest.WithJSON(repairTask), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateRepairTaskSender sends the CreateRepairTask request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateRepairTaskSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateRepairTaskResponder handles the response to the CreateRepairTask request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateRepairTaskResponder(resp *http.Response) (result RepairTaskUpdateInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateService this api allows creating a new Service Fabric stateless or stateful service under a specified Service +// Fabric application. The description for creating the service includes partitioning information and optional +// properties for placement and load balancing. Some of the properties can later be modified using `UpdateService` API. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceDescription - the information necessary to create a service. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CreateService(ctx context.Context, applicationID string, serviceDescription BasicServiceDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateService") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceDescription, + Constraints: []validation.Constraint{{Target: "serviceDescription.ServiceName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "serviceDescription.ServiceTypeName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "serviceDescription.PartitionDescription", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CreateService", err.Error()) + } + + req, err := client.CreateServicePreparer(ctx, applicationID, serviceDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateService", nil, "Failure preparing request") + return + } + + resp, err := client.CreateServiceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateService", resp, "Failure sending request") + return + } + + result, err = client.CreateServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateService", resp, "Failure responding to request") + } + + return +} + +// CreateServicePreparer prepares the CreateService request. +func (client BaseClient) CreateServicePreparer(ctx context.Context, applicationID string, serviceDescription BasicServiceDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetServices/$/Create", pathParameters), + autorest.WithJSON(serviceDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateServiceSender sends the CreateService request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateServiceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateServiceResponder handles the response to the CreateService request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateServiceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateServiceFromTemplate creates a Service Fabric service from the service template defined in the application +// manifest. A service template contains the properties that will be same for the service instance of the same type. +// The API allows overriding the properties that are usually different for different services of the same service type. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceFromTemplateDescription - describes the service that needs to be created from the template defined in +// the application manifest. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) CreateServiceFromTemplate(ctx context.Context, applicationID string, serviceFromTemplateDescription ServiceFromTemplateDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateServiceFromTemplate") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceFromTemplateDescription, + Constraints: []validation.Constraint{{Target: "serviceFromTemplateDescription.ApplicationName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "serviceFromTemplateDescription.ServiceName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "serviceFromTemplateDescription.ServiceTypeName", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "CreateServiceFromTemplate", err.Error()) + } + + req, err := client.CreateServiceFromTemplatePreparer(ctx, applicationID, serviceFromTemplateDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateServiceFromTemplate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateServiceFromTemplateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateServiceFromTemplate", resp, "Failure sending request") + return + } + + result, err = client.CreateServiceFromTemplateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "CreateServiceFromTemplate", resp, "Failure responding to request") + } + + return +} + +// CreateServiceFromTemplatePreparer prepares the CreateServiceFromTemplate request. +func (client BaseClient) CreateServiceFromTemplatePreparer(ctx context.Context, applicationID string, serviceFromTemplateDescription ServiceFromTemplateDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetServices/$/CreateFromTemplate", pathParameters), + autorest.WithJSON(serviceFromTemplateDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateServiceFromTemplateSender sends the CreateServiceFromTemplate request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) CreateServiceFromTemplateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateServiceFromTemplateResponder handles the response to the CreateServiceFromTemplate request. The method always +// closes the http.Response Body. +func (client BaseClient) CreateServiceFromTemplateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteApplication an application must be created before it can be deleted. Deleting an application will delete all +// services that are part of that application. By default, Service Fabric will try to close service replicas in a +// graceful manner and then delete the service. However, if a service is having issues closing the replica gracefully, +// the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to skip the graceful close +// sequence and forcefully delete the application and all of its services. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// forceRemove - remove a Service Fabric application or service forcefully without going through the graceful +// shutdown sequence. This parameter can be used to forcefully delete an application or service for which +// delete is timing out due to issues in the service code that prevents graceful close of replicas. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeleteApplication(ctx context.Context, applicationID string, forceRemove *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteApplication") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteApplication", err.Error()) + } + + req, err := client.DeleteApplicationPreparer(ctx, applicationID, forceRemove, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteApplication", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteApplicationSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteApplication", resp, "Failure sending request") + return + } + + result, err = client.DeleteApplicationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteApplication", resp, "Failure responding to request") + } + + return +} + +// DeleteApplicationPreparer prepares the DeleteApplication request. +func (client BaseClient) DeleteApplicationPreparer(ctx context.Context, applicationID string, forceRemove *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if forceRemove != nil { + queryParameters["ForceRemove"] = autorest.Encode("query", *forceRemove) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/Delete", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteApplicationSender sends the DeleteApplication request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteApplicationSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteApplicationResponder handles the response to the DeleteApplication request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteApplicationResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteBackupPolicy deletes an existing backup policy. A backup policy must be created before it can be deleted. A +// currently active backup policy, associated with any Service Fabric application, service or partition, cannot be +// deleted without first deleting the mapping. +// Parameters: +// backupPolicyName - the name of the backup policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeleteBackupPolicy(ctx context.Context, backupPolicyName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteBackupPolicy") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteBackupPolicy", err.Error()) + } + + req, err := client.DeleteBackupPolicyPreparer(ctx, backupPolicyName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteBackupPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteBackupPolicySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteBackupPolicy", resp, "Failure sending request") + return + } + + result, err = client.DeleteBackupPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteBackupPolicy", resp, "Failure responding to request") + } + + return +} + +// DeleteBackupPolicyPreparer prepares the DeleteBackupPolicy request. +func (client BaseClient) DeleteBackupPolicyPreparer(ctx context.Context, backupPolicyName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupPolicyName": autorest.Encode("path", backupPolicyName), + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/BackupRestore/BackupPolicies/{backupPolicyName}/$/Delete", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteBackupPolicySender sends the DeleteBackupPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteBackupPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteBackupPolicyResponder handles the response to the DeleteBackupPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteBackupPolicyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteImageStoreContent deletes existing image store content being found within the given image store relative path. +// This command can be used to delete uploaded application packages once they are provisioned. +// Parameters: +// contentPath - relative path to file or folder in the image store from its root. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeleteImageStoreContent(ctx context.Context, contentPath string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteImageStoreContent") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreContent", err.Error()) + } + + req, err := client.DeleteImageStoreContentPreparer(ctx, contentPath, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteImageStoreContent", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteImageStoreContentSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteImageStoreContent", resp, "Failure sending request") + return + } + + result, err = client.DeleteImageStoreContentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteImageStoreContent", resp, "Failure responding to request") + } + + return +} + +// DeleteImageStoreContentPreparer prepares the DeleteImageStoreContent request. +func (client BaseClient) DeleteImageStoreContentPreparer(ctx context.Context, contentPath string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "contentPath": autorest.Encode("path", contentPath), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ImageStore/{contentPath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteImageStoreContentSender sends the DeleteImageStoreContent request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteImageStoreContentSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteImageStoreContentResponder handles the response to the DeleteImageStoreContent request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteImageStoreContentResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteImageStoreUploadSession the DELETE request will cause the existing upload session to expire and remove any +// previously uploaded file chunks. +// Parameters: +// sessionID - a GUID generated by the user for a file uploading. It identifies an image store upload session +// which keeps track of all file chunks until it is committed. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeleteImageStoreUploadSession(ctx context.Context, sessionID uuid.UUID, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteImageStoreUploadSession") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteImageStoreUploadSession", err.Error()) + } + + req, err := client.DeleteImageStoreUploadSessionPreparer(ctx, sessionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteImageStoreUploadSession", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteImageStoreUploadSessionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteImageStoreUploadSession", resp, "Failure sending request") + return + } + + result, err = client.DeleteImageStoreUploadSessionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteImageStoreUploadSession", resp, "Failure responding to request") + } + + return +} + +// DeleteImageStoreUploadSessionPreparer prepares the DeleteImageStoreUploadSession request. +func (client BaseClient) DeleteImageStoreUploadSessionPreparer(ctx context.Context, sessionID uuid.UUID, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "session-id": autorest.Encode("query", sessionID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ImageStore/$/DeleteUploadSession"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteImageStoreUploadSessionSender sends the DeleteImageStoreUploadSession request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteImageStoreUploadSessionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteImageStoreUploadSessionResponder handles the response to the DeleteImageStoreUploadSession request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteImageStoreUploadSessionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteName deletes the specified Service Fabric name. A name must be created before it can be deleted. Deleting a +// name with child properties will fail. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeleteName(ctx context.Context, nameID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteName") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteName", err.Error()) + } + + req, err := client.DeleteNamePreparer(ctx, nameID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteName", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteNameSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteName", resp, "Failure sending request") + return + } + + result, err = client.DeleteNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteName", resp, "Failure responding to request") + } + + return +} + +// DeleteNamePreparer prepares the DeleteName request. +func (client BaseClient) DeleteNamePreparer(ctx context.Context, nameID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteNameSender sends the DeleteName request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteNameSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteNameResponder handles the response to the DeleteName request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteNameResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteProperty deletes the specified Service Fabric property under a given name. A property must be created before +// it can be deleted. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// propertyName - specifies the name of the property to get. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeleteProperty(ctx context.Context, nameID string, propertyName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteProperty") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteProperty", err.Error()) + } + + req, err := client.DeletePropertyPreparer(ctx, nameID, propertyName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteProperty", nil, "Failure preparing request") + return + } + + resp, err := client.DeletePropertySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteProperty", resp, "Failure sending request") + return + } + + result, err = client.DeletePropertyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteProperty", resp, "Failure responding to request") + } + + return +} + +// DeletePropertyPreparer prepares the DeleteProperty request. +func (client BaseClient) DeletePropertyPreparer(ctx context.Context, nameID string, propertyName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "PropertyName": autorest.Encode("query", propertyName), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}/$/GetProperty", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeletePropertySender sends the DeleteProperty request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeletePropertySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeletePropertyResponder handles the response to the DeleteProperty request. The method always +// closes the http.Response Body. +func (client BaseClient) DeletePropertyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteRepairTask this API supports the Service Fabric platform; it is not meant to be used directly from your code. +// Parameters: +// repairTaskDeleteDescription - describes the repair task to be deleted. +func (client BaseClient) DeleteRepairTask(ctx context.Context, repairTaskDeleteDescription RepairTaskDeleteDescription) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteRepairTask") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: repairTaskDeleteDescription, + Constraints: []validation.Constraint{{Target: "repairTaskDeleteDescription.TaskID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteRepairTask", err.Error()) + } + + req, err := client.DeleteRepairTaskPreparer(ctx, repairTaskDeleteDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteRepairTask", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteRepairTaskSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteRepairTask", resp, "Failure sending request") + return + } + + result, err = client.DeleteRepairTaskResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteRepairTask", resp, "Failure responding to request") + } + + return +} + +// DeleteRepairTaskPreparer prepares the DeleteRepairTask request. +func (client BaseClient) DeleteRepairTaskPreparer(ctx context.Context, repairTaskDeleteDescription RepairTaskDeleteDescription) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/DeleteRepairTask"), + autorest.WithJSON(repairTaskDeleteDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteRepairTaskSender sends the DeleteRepairTask request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteRepairTaskSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteRepairTaskResponder handles the response to the DeleteRepairTask request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteRepairTaskResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteService a service must be created before it can be deleted. By default, Service Fabric will try to close +// service replicas in a graceful manner and then delete the service. However, if the service is having issues closing +// the replica gracefully, the delete operation may take a long time or get stuck. Use the optional ForceRemove flag to +// skip the graceful close sequence and forcefully delete the service. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// forceRemove - remove a Service Fabric application or service forcefully without going through the graceful +// shutdown sequence. This parameter can be used to forcefully delete an application or service for which +// delete is timing out due to issues in the service code that prevents graceful close of replicas. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeleteService(ctx context.Context, serviceID string, forceRemove *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteService") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeleteService", err.Error()) + } + + req, err := client.DeleteServicePreparer(ctx, serviceID, forceRemove, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteService", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteServiceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteService", resp, "Failure sending request") + return + } + + result, err = client.DeleteServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeleteService", resp, "Failure responding to request") + } + + return +} + +// DeleteServicePreparer prepares the DeleteService request. +func (client BaseClient) DeleteServicePreparer(ctx context.Context, serviceID string, forceRemove *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if forceRemove != nil { + queryParameters["ForceRemove"] = autorest.Encode("query", *forceRemove) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/Delete", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteServiceSender sends the DeleteService request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeleteServiceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteServiceResponder handles the response to the DeleteService request. The method always +// closes the http.Response Body. +func (client BaseClient) DeleteServiceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeployServicePackageToNode this API provides a way to download code packages including the container images on a +// specific node outside of the normal application deployment and upgrade path. This is useful for the large code +// packages and container images to be present on the node before the actual application deployment and upgrade, thus +// significantly reducing the total time required for the deployment or upgrade. +// Parameters: +// nodeName - the name of the node. +// deployServicePackageToNodeDescription - describes information for deploying a service package to a Service +// Fabric node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DeployServicePackageToNode(ctx context.Context, nodeName string, deployServicePackageToNodeDescription DeployServicePackageToNodeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeployServicePackageToNode") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: deployServicePackageToNodeDescription, + Constraints: []validation.Constraint{{Target: "deployServicePackageToNodeDescription.ServiceManifestName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "deployServicePackageToNodeDescription.ApplicationTypeName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "deployServicePackageToNodeDescription.ApplicationTypeVersion", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "deployServicePackageToNodeDescription.NodeName", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DeployServicePackageToNode", err.Error()) + } + + req, err := client.DeployServicePackageToNodePreparer(ctx, nodeName, deployServicePackageToNodeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeployServicePackageToNode", nil, "Failure preparing request") + return + } + + resp, err := client.DeployServicePackageToNodeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeployServicePackageToNode", resp, "Failure sending request") + return + } + + result, err = client.DeployServicePackageToNodeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DeployServicePackageToNode", resp, "Failure responding to request") + } + + return +} + +// DeployServicePackageToNodePreparer prepares the DeployServicePackageToNode request. +func (client BaseClient) DeployServicePackageToNodePreparer(ctx context.Context, nodeName string, deployServicePackageToNodeDescription DeployServicePackageToNodeDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/DeployServicePackage", pathParameters), + autorest.WithJSON(deployServicePackageToNodeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeployServicePackageToNodeSender sends the DeployServicePackageToNode request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DeployServicePackageToNodeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeployServicePackageToNodeResponder handles the response to the DeployServicePackageToNode request. The method always +// closes the http.Response Body. +func (client BaseClient) DeployServicePackageToNodeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisableApplicationBackup disables periodic backup of Service Fabric application which was previously enabled. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// disableBackupDescription - specifies the parameters to disable backup for any backup entity. +func (client BaseClient) DisableApplicationBackup(ctx context.Context, applicationID string, timeout *int64, disableBackupDescription *DisableBackupDescription) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DisableApplicationBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}, + {TargetValue: disableBackupDescription, + Constraints: []validation.Constraint{{Target: "disableBackupDescription", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disableBackupDescription.CleanBackup", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DisableApplicationBackup", err.Error()) + } + + req, err := client.DisableApplicationBackupPreparer(ctx, applicationID, timeout, disableBackupDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableApplicationBackup", nil, "Failure preparing request") + return + } + + resp, err := client.DisableApplicationBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableApplicationBackup", resp, "Failure sending request") + return + } + + result, err = client.DisableApplicationBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableApplicationBackup", resp, "Failure responding to request") + } + + return +} + +// DisableApplicationBackupPreparer prepares the DisableApplicationBackup request. +func (client BaseClient) DisableApplicationBackupPreparer(ctx context.Context, applicationID string, timeout *int64, disableBackupDescription *DisableBackupDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/DisableBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if disableBackupDescription != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(disableBackupDescription)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisableApplicationBackupSender sends the DisableApplicationBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DisableApplicationBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DisableApplicationBackupResponder handles the response to the DisableApplicationBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) DisableApplicationBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisableNode deactivate a Service Fabric cluster node with the specified deactivation intent. Once the deactivation +// is in progress, the deactivation intent can be increased, but not decreased (for example, a node that is deactivated +// with the Pause intent can be deactivated further with Restart, but not the other way around. Nodes may be +// reactivated using the Activate a node operation any time after they are deactivated. If the deactivation is not +// complete, this will cancel the deactivation. A node that goes down and comes back up while deactivated will still +// need to be reactivated before services will be placed on that node. +// Parameters: +// nodeName - the name of the node. +// deactivationIntentDescription - describes the intent or reason for deactivating the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DisableNode(ctx context.Context, nodeName string, deactivationIntentDescription DeactivationIntentDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DisableNode") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DisableNode", err.Error()) + } + + req, err := client.DisableNodePreparer(ctx, nodeName, deactivationIntentDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableNode", nil, "Failure preparing request") + return + } + + resp, err := client.DisableNodeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableNode", resp, "Failure sending request") + return + } + + result, err = client.DisableNodeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableNode", resp, "Failure responding to request") + } + + return +} + +// DisableNodePreparer prepares the DisableNode request. +func (client BaseClient) DisableNodePreparer(ctx context.Context, nodeName string, deactivationIntentDescription DeactivationIntentDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/Deactivate", pathParameters), + autorest.WithJSON(deactivationIntentDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisableNodeSender sends the DisableNode request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DisableNodeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DisableNodeResponder handles the response to the DisableNode request. The method always +// closes the http.Response Body. +func (client BaseClient) DisableNodeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisablePartitionBackup disables periodic backup of partition which was previously enabled. Backup must be explicitly +// enabled before it can be disabled. +// In case the backup is enabled for the Service Fabric application or service, which this partition is part of, this +// partition would continue to be periodically backed up as per the policy mapped at the higher level entity. +// Parameters: +// partitionID - the identity of the partition. +// disableBackupDescription - specifies the parameters to disable backup for any backup entity. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DisablePartitionBackup(ctx context.Context, partitionID uuid.UUID, disableBackupDescription *DisableBackupDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DisablePartitionBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: disableBackupDescription, + Constraints: []validation.Constraint{{Target: "disableBackupDescription", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disableBackupDescription.CleanBackup", Name: validation.Null, Rule: true, Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DisablePartitionBackup", err.Error()) + } + + req, err := client.DisablePartitionBackupPreparer(ctx, partitionID, disableBackupDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisablePartitionBackup", nil, "Failure preparing request") + return + } + + resp, err := client.DisablePartitionBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisablePartitionBackup", resp, "Failure sending request") + return + } + + result, err = client.DisablePartitionBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisablePartitionBackup", resp, "Failure responding to request") + } + + return +} + +// DisablePartitionBackupPreparer prepares the DisablePartitionBackup request. +func (client BaseClient) DisablePartitionBackupPreparer(ctx context.Context, partitionID uuid.UUID, disableBackupDescription *DisableBackupDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/DisableBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if disableBackupDescription != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(disableBackupDescription)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisablePartitionBackupSender sends the DisablePartitionBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DisablePartitionBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DisablePartitionBackupResponder handles the response to the DisablePartitionBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) DisablePartitionBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// DisableServiceBackup disables periodic backup of Service Fabric service which was previously enabled. Backup must be +// explicitly enabled before it can be disabled. +// In case the backup is enabled for the Service Fabric application, which this service is part of, this service would +// continue to be periodically backed up as per the policy mapped at the application level. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// disableBackupDescription - specifies the parameters to disable backup for any backup entity. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) DisableServiceBackup(ctx context.Context, serviceID string, disableBackupDescription *DisableBackupDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DisableServiceBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: disableBackupDescription, + Constraints: []validation.Constraint{{Target: "disableBackupDescription", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disableBackupDescription.CleanBackup", Name: validation.Null, Rule: true, Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "DisableServiceBackup", err.Error()) + } + + req, err := client.DisableServiceBackupPreparer(ctx, serviceID, disableBackupDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableServiceBackup", nil, "Failure preparing request") + return + } + + resp, err := client.DisableServiceBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableServiceBackup", resp, "Failure sending request") + return + } + + result, err = client.DisableServiceBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "DisableServiceBackup", resp, "Failure responding to request") + } + + return +} + +// DisableServiceBackupPreparer prepares the DisableServiceBackup request. +func (client BaseClient) DisableServiceBackupPreparer(ctx context.Context, serviceID string, disableBackupDescription *DisableBackupDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/DisableBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if disableBackupDescription != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(disableBackupDescription)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisableServiceBackupSender sends the DisableServiceBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) DisableServiceBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DisableServiceBackupResponder handles the response to the DisableServiceBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) DisableServiceBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnableApplicationBackup enables periodic backup of stateful partitions which are part of this Service Fabric +// application. Each partition is backed up individually as per the specified backup policy description. +// Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// enableBackupDescription - specifies the parameters for enabling backup. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) EnableApplicationBackup(ctx context.Context, applicationID string, enableBackupDescription EnableBackupDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.EnableApplicationBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: enableBackupDescription, + Constraints: []validation.Constraint{{Target: "enableBackupDescription.BackupPolicyName", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "EnableApplicationBackup", err.Error()) + } + + req, err := client.EnableApplicationBackupPreparer(ctx, applicationID, enableBackupDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableApplicationBackup", nil, "Failure preparing request") + return + } + + resp, err := client.EnableApplicationBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableApplicationBackup", resp, "Failure sending request") + return + } + + result, err = client.EnableApplicationBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableApplicationBackup", resp, "Failure responding to request") + } + + return +} + +// EnableApplicationBackupPreparer prepares the EnableApplicationBackup request. +func (client BaseClient) EnableApplicationBackupPreparer(ctx context.Context, applicationID string, enableBackupDescription EnableBackupDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/EnableBackup", pathParameters), + autorest.WithJSON(enableBackupDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnableApplicationBackupSender sends the EnableApplicationBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) EnableApplicationBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// EnableApplicationBackupResponder handles the response to the EnableApplicationBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) EnableApplicationBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnableNode activates a Service Fabric cluster node that is currently deactivated. Once activated, the node will +// again become a viable target for placing new replicas, and any deactivated replicas remaining on the node will be +// reactivated. +// Parameters: +// nodeName - the name of the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) EnableNode(ctx context.Context, nodeName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.EnableNode") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "EnableNode", err.Error()) + } + + req, err := client.EnableNodePreparer(ctx, nodeName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableNode", nil, "Failure preparing request") + return + } + + resp, err := client.EnableNodeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableNode", resp, "Failure sending request") + return + } + + result, err = client.EnableNodeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableNode", resp, "Failure responding to request") + } + + return +} + +// EnableNodePreparer prepares the EnableNode request. +func (client BaseClient) EnableNodePreparer(ctx context.Context, nodeName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/Activate", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnableNodeSender sends the EnableNode request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) EnableNodeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// EnableNodeResponder handles the response to the EnableNode request. The method always +// closes the http.Response Body. +func (client BaseClient) EnableNodeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnablePartitionBackup enables periodic backup of stateful persisted partition. Each partition is backed up as per +// the specified backup policy description. In case the application or service, which is partition is part of, is +// already enabled for backup then this operation would override the policy being used to take the periodic backup of +// this partition. +// Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup. +// Parameters: +// partitionID - the identity of the partition. +// enableBackupDescription - specifies the parameters for enabling backup. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) EnablePartitionBackup(ctx context.Context, partitionID uuid.UUID, enableBackupDescription EnableBackupDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.EnablePartitionBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: enableBackupDescription, + Constraints: []validation.Constraint{{Target: "enableBackupDescription.BackupPolicyName", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "EnablePartitionBackup", err.Error()) + } + + req, err := client.EnablePartitionBackupPreparer(ctx, partitionID, enableBackupDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnablePartitionBackup", nil, "Failure preparing request") + return + } + + resp, err := client.EnablePartitionBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnablePartitionBackup", resp, "Failure sending request") + return + } + + result, err = client.EnablePartitionBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnablePartitionBackup", resp, "Failure responding to request") + } + + return +} + +// EnablePartitionBackupPreparer prepares the EnablePartitionBackup request. +func (client BaseClient) EnablePartitionBackupPreparer(ctx context.Context, partitionID uuid.UUID, enableBackupDescription EnableBackupDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/EnableBackup", pathParameters), + autorest.WithJSON(enableBackupDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnablePartitionBackupSender sends the EnablePartitionBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) EnablePartitionBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// EnablePartitionBackupResponder handles the response to the EnablePartitionBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) EnablePartitionBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnableServiceBackup enables periodic backup of stateful partitions which are part of this Service Fabric service. +// Each partition is backed up individually as per the specified backup policy description. In case the application, +// which the service is part of, is already enabled for backup then this operation would override the policy being used +// to take the periodic backup for this service and its partitions (unless explicitly overridden at the partition +// level). +// Note only C# based Reliable Actor and Reliable Stateful services are currently supported for periodic backup. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// enableBackupDescription - specifies the parameters for enabling backup. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) EnableServiceBackup(ctx context.Context, serviceID string, enableBackupDescription EnableBackupDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.EnableServiceBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: enableBackupDescription, + Constraints: []validation.Constraint{{Target: "enableBackupDescription.BackupPolicyName", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "EnableServiceBackup", err.Error()) + } + + req, err := client.EnableServiceBackupPreparer(ctx, serviceID, enableBackupDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableServiceBackup", nil, "Failure preparing request") + return + } + + resp, err := client.EnableServiceBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableServiceBackup", resp, "Failure sending request") + return + } + + result, err = client.EnableServiceBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "EnableServiceBackup", resp, "Failure responding to request") + } + + return +} + +// EnableServiceBackupPreparer prepares the EnableServiceBackup request. +func (client BaseClient) EnableServiceBackupPreparer(ctx context.Context, serviceID string, enableBackupDescription EnableBackupDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/EnableBackup", pathParameters), + autorest.WithJSON(enableBackupDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnableServiceBackupSender sends the EnableServiceBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) EnableServiceBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// EnableServiceBackupResponder handles the response to the EnableServiceBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) EnableServiceBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ForceApproveRepairTask this API supports the Service Fabric platform; it is not meant to be used directly from your +// code. +// Parameters: +// repairTaskApproveDescription - describes the repair task to be approved. +func (client BaseClient) ForceApproveRepairTask(ctx context.Context, repairTaskApproveDescription RepairTaskApproveDescription) (result RepairTaskUpdateInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ForceApproveRepairTask") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: repairTaskApproveDescription, + Constraints: []validation.Constraint{{Target: "repairTaskApproveDescription.TaskID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ForceApproveRepairTask", err.Error()) + } + + req, err := client.ForceApproveRepairTaskPreparer(ctx, repairTaskApproveDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ForceApproveRepairTask", nil, "Failure preparing request") + return + } + + resp, err := client.ForceApproveRepairTaskSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ForceApproveRepairTask", resp, "Failure sending request") + return + } + + result, err = client.ForceApproveRepairTaskResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ForceApproveRepairTask", resp, "Failure responding to request") + } + + return +} + +// ForceApproveRepairTaskPreparer prepares the ForceApproveRepairTask request. +func (client BaseClient) ForceApproveRepairTaskPreparer(ctx context.Context, repairTaskApproveDescription RepairTaskApproveDescription) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/ForceApproveRepairTask"), + autorest.WithJSON(repairTaskApproveDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ForceApproveRepairTaskSender sends the ForceApproveRepairTask request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ForceApproveRepairTaskSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ForceApproveRepairTaskResponder handles the response to the ForceApproveRepairTask request. The method always +// closes the http.Response Body. +func (client BaseClient) ForceApproveRepairTaskResponder(resp *http.Response) (result RepairTaskUpdateInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAadMetadata gets the Azure Active Directory metadata used for secured connection to cluster. +// This API is not supposed to be called separately. It provides information needed to set up an Azure Active Directory +// secured connection with a Service Fabric cluster. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetAadMetadata(ctx context.Context, timeout *int64) (result AadMetadataObject, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetAadMetadata") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetAadMetadata", err.Error()) + } + + req, err := client.GetAadMetadataPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetAadMetadata", nil, "Failure preparing request") + return + } + + resp, err := client.GetAadMetadataSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetAadMetadata", resp, "Failure sending request") + return + } + + result, err = client.GetAadMetadataResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetAadMetadata", resp, "Failure responding to request") + } + + return +} + +// GetAadMetadataPreparer prepares the GetAadMetadata request. +func (client BaseClient) GetAadMetadataPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetAadMetadata"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAadMetadataSender sends the GetAadMetadata request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetAadMetadataSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAadMetadataResponder handles the response to the GetAadMetadata request. The method always +// closes the http.Response Body. +func (client BaseClient) GetAadMetadataResponder(resp *http.Response) (result AadMetadataObject, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetAllEntitiesBackedUpByPolicy returns a list of Service Fabric application, service or partition which are +// associated with this backup policy. +// Parameters: +// backupPolicyName - the name of the backup policy. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetAllEntitiesBackedUpByPolicy(ctx context.Context, backupPolicyName string, continuationToken string, maxResults *int64, timeout *int64) (result PagedBackupEntityList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetAllEntitiesBackedUpByPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", err.Error()) + } + + req, err := client.GetAllEntitiesBackedUpByPolicyPreparer(ctx, backupPolicyName, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetAllEntitiesBackedUpByPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetAllEntitiesBackedUpByPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetAllEntitiesBackedUpByPolicy", resp, "Failure responding to request") + } + + return +} + +// GetAllEntitiesBackedUpByPolicyPreparer prepares the GetAllEntitiesBackedUpByPolicy request. +func (client BaseClient) GetAllEntitiesBackedUpByPolicyPreparer(ctx context.Context, backupPolicyName string, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupPolicyName": autorest.Encode("path", backupPolicyName), + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetAllEntitiesBackedUpByPolicySender sends the GetAllEntitiesBackedUpByPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetAllEntitiesBackedUpByPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetAllEntitiesBackedUpByPolicyResponder handles the response to the GetAllEntitiesBackedUpByPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetAllEntitiesBackedUpByPolicyResponder(resp *http.Response) (result PagedBackupEntityList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationBackupConfigurationInfo gets the Service Fabric backup configuration information for the application +// and the services and partitions under this application. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationBackupConfigurationInfo(ctx context.Context, applicationID string, continuationToken string, maxResults *int64, timeout *int64) (result PagedBackupConfigurationInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationBackupConfigurationInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", err.Error()) + } + + req, err := client.GetApplicationBackupConfigurationInfoPreparer(ctx, applicationID, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationBackupConfigurationInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationBackupConfigurationInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationBackupConfigurationInfo", resp, "Failure responding to request") + } + + return +} + +// GetApplicationBackupConfigurationInfoPreparer prepares the GetApplicationBackupConfigurationInfo request. +func (client BaseClient) GetApplicationBackupConfigurationInfoPreparer(ctx context.Context, applicationID string, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetBackupConfigurationInfo", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationBackupConfigurationInfoSender sends the GetApplicationBackupConfigurationInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationBackupConfigurationInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationBackupConfigurationInfoResponder handles the response to the GetApplicationBackupConfigurationInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationBackupConfigurationInfoResponder(resp *http.Response) (result PagedBackupConfigurationInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationBackupList returns a list of backups available for every partition in this Service Fabric application. +// The server enumerates all the backups available at the backup location configured in the backup policy. It also +// allows filtering of the result based on start and end datetime or just fetching the latest available backup for +// every partition. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// latest - specifies whether to get only the most recent backup available for a partition for the specified +// time range. +// startDateTimeFilter - specify the start date time from which to enumerate backups, in datetime format. The +// date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups +// from the beginning are enumerated. +// endDateTimeFilter - specify the end date time till which to enumerate backups, in datetime format. The date +// time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is +// done till the most recent backup. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +func (client BaseClient) GetApplicationBackupList(ctx context.Context, applicationID string, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time, continuationToken string, maxResults *int64) (result PagedBackupInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationBackupList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}, + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationBackupList", err.Error()) + } + + req, err := client.GetApplicationBackupListPreparer(ctx, applicationID, timeout, latest, startDateTimeFilter, endDateTimeFilter, continuationToken, maxResults) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationBackupList", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationBackupListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationBackupList", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationBackupListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationBackupList", resp, "Failure responding to request") + } + + return +} + +// GetApplicationBackupListPreparer prepares the GetApplicationBackupList request. +func (client BaseClient) GetApplicationBackupListPreparer(ctx context.Context, applicationID string, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time, continuationToken string, maxResults *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if latest != nil { + queryParameters["Latest"] = autorest.Encode("query", *latest) + } else { + queryParameters["Latest"] = autorest.Encode("query", false) + } + if startDateTimeFilter != nil { + queryParameters["StartDateTimeFilter"] = autorest.Encode("query", *startDateTimeFilter) + } + if endDateTimeFilter != nil { + queryParameters["EndDateTimeFilter"] = autorest.Encode("query", *endDateTimeFilter) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetBackups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationBackupListSender sends the GetApplicationBackupList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationBackupListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationBackupListResponder handles the response to the GetApplicationBackupList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationBackupListResponder(resp *http.Response) (result PagedBackupInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationEventList the response is list of ApplicationEvent objects. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetApplicationEventList(ctx context.Context, applicationID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListApplicationEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationEventList", err.Error()) + } + + req, err := client.GetApplicationEventListPreparer(ctx, applicationID, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationEventList", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationEventList", resp, "Failure responding to request") + } + + return +} + +// GetApplicationEventListPreparer prepares the GetApplicationEventList request. +func (client BaseClient) GetApplicationEventListPreparer(ctx context.Context, applicationID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/EventsStore/Applications/{applicationId}/$/Events", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationEventListSender sends the GetApplicationEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationEventListResponder handles the response to the GetApplicationEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationEventListResponder(resp *http.Response) (result ListApplicationEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationHealth returns the heath state of the service fabric application. The response reports either Ok, +// Error or Warning health state. If the entity is not found in the health store, it will return Error. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// deployedApplicationsHealthStateFilter - allows filtering of the deployed applications health state objects +// returned in the result of application health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. Only +// deployed applications that match the filter will be returned. +// All deployed applications are used to evaluate the aggregated health state. If not specified, all entries +// are returned. +// The state values are flag-based enumeration, so the value could be a combination of these values, obtained +// using bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of deployed applications with HealthState value of +// OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// servicesHealthStateFilter - allows filtering of the services health state objects returned in the result of +// services health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. +// Only services that match the filter are returned. All services are used to evaluate the aggregated health +// state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, +// obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services +// with HealthState value of OK (2) and Warning (4) will be returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationHealth(ctx context.Context, applicationID string, eventsHealthStateFilter *int32, deployedApplicationsHealthStateFilter *int32, servicesHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result ApplicationHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealth", err.Error()) + } + + req, err := client.GetApplicationHealthPreparer(ctx, applicationID, eventsHealthStateFilter, deployedApplicationsHealthStateFilter, servicesHealthStateFilter, excludeHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationHealth", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationHealth", resp, "Failure responding to request") + } + + return +} + +// GetApplicationHealthPreparer prepares the GetApplicationHealth request. +func (client BaseClient) GetApplicationHealthPreparer(ctx context.Context, applicationID string, eventsHealthStateFilter *int32, deployedApplicationsHealthStateFilter *int32, servicesHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if deployedApplicationsHealthStateFilter != nil { + queryParameters["DeployedApplicationsHealthStateFilter"] = autorest.Encode("query", *deployedApplicationsHealthStateFilter) + } else { + queryParameters["DeployedApplicationsHealthStateFilter"] = autorest.Encode("query", 0) + } + if servicesHealthStateFilter != nil { + queryParameters["ServicesHealthStateFilter"] = autorest.Encode("query", *servicesHealthStateFilter) + } else { + queryParameters["ServicesHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationHealthSender sends the GetApplicationHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationHealthResponder handles the response to the GetApplicationHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationHealthResponder(resp *http.Response) (result ApplicationHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationHealthUsingPolicy gets the health of a Service Fabric application. Use EventsHealthStateFilter to +// filter the collection of health events reported on the node based on the health state. Use ClusterHealthPolicies to +// override the health policies used to evaluate the health. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// deployedApplicationsHealthStateFilter - allows filtering of the deployed applications health state objects +// returned in the result of application health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. Only +// deployed applications that match the filter will be returned. +// All deployed applications are used to evaluate the aggregated health state. If not specified, all entries +// are returned. +// The state values are flag-based enumeration, so the value could be a combination of these values, obtained +// using bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of deployed applications with HealthState value of +// OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// servicesHealthStateFilter - allows filtering of the services health state objects returned in the result of +// services health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. +// Only services that match the filter are returned. All services are used to evaluate the aggregated health +// state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, +// obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services +// with HealthState value of OK (2) and Warning (4) will be returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// applicationHealthPolicy - describes the health policies used to evaluate the health of an application or one +// of its children. +// If not present, the health evaluation uses the health policy from application manifest or the default health +// policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationHealthUsingPolicy(ctx context.Context, applicationID string, eventsHealthStateFilter *int32, deployedApplicationsHealthStateFilter *int32, servicesHealthStateFilter *int32, excludeHealthStatistics *bool, applicationHealthPolicy *ApplicationHealthPolicy, timeout *int64) (result ApplicationHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", err.Error()) + } + + req, err := client.GetApplicationHealthUsingPolicyPreparer(ctx, applicationID, eventsHealthStateFilter, deployedApplicationsHealthStateFilter, servicesHealthStateFilter, excludeHealthStatistics, applicationHealthPolicy, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetApplicationHealthUsingPolicyPreparer prepares the GetApplicationHealthUsingPolicy request. +func (client BaseClient) GetApplicationHealthUsingPolicyPreparer(ctx context.Context, applicationID string, eventsHealthStateFilter *int32, deployedApplicationsHealthStateFilter *int32, servicesHealthStateFilter *int32, excludeHealthStatistics *bool, applicationHealthPolicy *ApplicationHealthPolicy, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if deployedApplicationsHealthStateFilter != nil { + queryParameters["DeployedApplicationsHealthStateFilter"] = autorest.Encode("query", *deployedApplicationsHealthStateFilter) + } else { + queryParameters["DeployedApplicationsHealthStateFilter"] = autorest.Encode("query", 0) + } + if servicesHealthStateFilter != nil { + queryParameters["ServicesHealthStateFilter"] = autorest.Encode("query", *servicesHealthStateFilter) + } else { + queryParameters["ServicesHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if applicationHealthPolicy != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(applicationHealthPolicy)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationHealthUsingPolicySender sends the GetApplicationHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationHealthUsingPolicyResponder handles the response to the GetApplicationHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationHealthUsingPolicyResponder(resp *http.Response) (result ApplicationHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationInfo returns the information about the application that was created or in the process of being created +// in the Service Fabric cluster and whose name matches the one specified as the parameter. The response includes the +// name, type, status, parameters, and other details about the application. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// excludeApplicationParameters - the flag that specifies whether application parameters will be excluded from +// the result. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationInfo(ctx context.Context, applicationID string, excludeApplicationParameters *bool, timeout *int64) (result ApplicationInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfo", err.Error()) + } + + req, err := client.GetApplicationInfoPreparer(ctx, applicationID, excludeApplicationParameters, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationInfo", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationInfo", resp, "Failure responding to request") + } + + return +} + +// GetApplicationInfoPreparer prepares the GetApplicationInfo request. +func (client BaseClient) GetApplicationInfoPreparer(ctx context.Context, applicationID string, excludeApplicationParameters *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if excludeApplicationParameters != nil { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", *excludeApplicationParameters) + } else { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationInfoSender sends the GetApplicationInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationInfoResponder handles the response to the GetApplicationInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationInfoResponder(resp *http.Response) (result ApplicationInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationInfoList gets the information about the applications that were created or in the process of being +// created in the Service Fabric cluster and match the specified filters. The response includes the name, type, status, +// parameters, and other details about the application. If the applications do not fit in a page, one page of results +// is returned as well as a continuation token, which can be used to get the next page. Filters ApplicationTypeName and +// ApplicationDefinitionKindFilter cannot be specified at the same time. +// Parameters: +// applicationDefinitionKindFilter - used to filter on ApplicationDefinitionKind, which is the mechanism used +// to define a Service Fabric application. +// - Default - Default value, which performs the same function as selecting "All". The value is 0. +// - All - Filter that matches input with any ApplicationDefinitionKind value. The value is 65535. +// - ServiceFabricApplicationDescription - Filter that matches input with ApplicationDefinitionKind value +// ServiceFabricApplicationDescription. The value is 1. +// - Compose - Filter that matches input with ApplicationDefinitionKind value Compose. The value is 2. +// applicationTypeName - the application type name used to filter the applications to query for. This value +// should not contain the application type version. +// excludeApplicationParameters - the flag that specifies whether application parameters will be excluded from +// the result. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationInfoList(ctx context.Context, applicationDefinitionKindFilter *int32, applicationTypeName string, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (result PagedApplicationInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationInfoList", err.Error()) + } + + req, err := client.GetApplicationInfoListPreparer(ctx, applicationDefinitionKindFilter, applicationTypeName, excludeApplicationParameters, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationInfoList", resp, "Failure responding to request") + } + + return +} + +// GetApplicationInfoListPreparer prepares the GetApplicationInfoList request. +func (client BaseClient) GetApplicationInfoListPreparer(ctx context.Context, applicationDefinitionKindFilter *int32, applicationTypeName string, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + const APIVersion = "6.1" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if applicationDefinitionKindFilter != nil { + queryParameters["ApplicationDefinitionKindFilter"] = autorest.Encode("query", *applicationDefinitionKindFilter) + } else { + queryParameters["ApplicationDefinitionKindFilter"] = autorest.Encode("query", 0) + } + if len(applicationTypeName) > 0 { + queryParameters["ApplicationTypeName"] = autorest.Encode("query", applicationTypeName) + } + if excludeApplicationParameters != nil { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", *excludeApplicationParameters) + } else { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", false) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Applications"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationInfoListSender sends the GetApplicationInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationInfoListResponder handles the response to the GetApplicationInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationInfoListResponder(resp *http.Response) (result PagedApplicationInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationLoadInfo returns the load information about the application that was created or in the process of +// being created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response +// includes the name, minimum nodes, maximum nodes, the number of nodes the application is occupying currently, and +// application load metric information about the application. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationLoadInfo(ctx context.Context, applicationID string, timeout *int64) (result ApplicationLoadInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationLoadInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationLoadInfo", err.Error()) + } + + req, err := client.GetApplicationLoadInfoPreparer(ctx, applicationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationLoadInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationLoadInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationLoadInfo", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationLoadInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationLoadInfo", resp, "Failure responding to request") + } + + return +} + +// GetApplicationLoadInfoPreparer prepares the GetApplicationLoadInfo request. +func (client BaseClient) GetApplicationLoadInfoPreparer(ctx context.Context, applicationID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetLoadInformation", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationLoadInfoSender sends the GetApplicationLoadInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationLoadInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationLoadInfoResponder handles the response to the GetApplicationLoadInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationLoadInfoResponder(resp *http.Response) (result ApplicationLoadInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationManifest the response contains the application manifest XML as a string. +// Parameters: +// applicationTypeName - the name of the application type. +// applicationTypeVersion - the version of the application type. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationManifest(ctx context.Context, applicationTypeName string, applicationTypeVersion string, timeout *int64) (result ApplicationTypeManifest, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationManifest") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationManifest", err.Error()) + } + + req, err := client.GetApplicationManifestPreparer(ctx, applicationTypeName, applicationTypeVersion, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationManifest", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationManifestSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationManifest", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationManifestResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationManifest", resp, "Failure responding to request") + } + + return +} + +// GetApplicationManifestPreparer prepares the GetApplicationManifest request. +func (client BaseClient) GetApplicationManifestPreparer(ctx context.Context, applicationTypeName string, applicationTypeVersion string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationTypeName": autorest.Encode("path", applicationTypeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "ApplicationTypeVersion": autorest.Encode("query", applicationTypeVersion), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ApplicationTypes/{applicationTypeName}/$/GetApplicationManifest", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationManifestSender sends the GetApplicationManifest request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationManifestSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationManifestResponder handles the response to the GetApplicationManifest request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationManifestResponder(resp *http.Response) (result ApplicationTypeManifest, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationNameInfo gets the name of the application for the specified service. A 404 +// FABRIC_E_SERVICE_DOES_NOT_EXIST error is returned if a service with the provided service ID does not exist. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationNameInfo(ctx context.Context, serviceID string, timeout *int64) (result ApplicationNameInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationNameInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationNameInfo", err.Error()) + } + + req, err := client.GetApplicationNameInfoPreparer(ctx, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationNameInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationNameInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationNameInfo", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationNameInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationNameInfo", resp, "Failure responding to request") + } + + return +} + +// GetApplicationNameInfoPreparer prepares the GetApplicationNameInfo request. +func (client BaseClient) GetApplicationNameInfoPreparer(ctx context.Context, serviceID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetApplicationName", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationNameInfoSender sends the GetApplicationNameInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationNameInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationNameInfoResponder handles the response to the GetApplicationNameInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationNameInfoResponder(resp *http.Response) (result ApplicationNameInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationsEventList the response is list of ApplicationEvent objects. +// Parameters: +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetApplicationsEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListApplicationEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationsEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationsEventList", err.Error()) + } + + req, err := client.GetApplicationsEventListPreparer(ctx, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationsEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationsEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationsEventList", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationsEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationsEventList", resp, "Failure responding to request") + } + + return +} + +// GetApplicationsEventListPreparer prepares the GetApplicationsEventList request. +func (client BaseClient) GetApplicationsEventListPreparer(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/EventsStore/Applications/Events"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationsEventListSender sends the GetApplicationsEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationsEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationsEventListResponder handles the response to the GetApplicationsEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationsEventListResponder(resp *http.Response) (result ListApplicationEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationTypeInfoList returns the information about the application types that are provisioned or in the +// process of being provisioned in the Service Fabric cluster. Each version of an application type is returned as one +// application type. The response includes the name, version, status, and other details about the application type. +// This is a paged query, meaning that if not all of the application types fit in a page, one page of results is +// returned as well as a continuation token, which can be used to get the next page. For example, if there are 10 +// application types but a page only fits the first three application types, or if max results is set to 3, then three +// is returned. To access the rest of the results, retrieve subsequent pages by using the returned continuation token +// in the next query. An empty continuation token is returned if there are no subsequent pages. +// Parameters: +// applicationTypeDefinitionKindFilter - used to filter on ApplicationTypeDefinitionKind which is the mechanism +// used to define a Service Fabric application type. +// - Default - Default value, which performs the same function as selecting "All". The value is 0. +// - All - Filter that matches input with any ApplicationTypeDefinitionKind value. The value is 65535. +// - ServiceFabricApplicationPackage - Filter that matches input with ApplicationTypeDefinitionKind value +// ServiceFabricApplicationPackage. The value is 1. +// - Compose - Filter that matches input with ApplicationTypeDefinitionKind value Compose. The value is 2. +// excludeApplicationParameters - the flag that specifies whether application parameters will be excluded from +// the result. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationTypeInfoList(ctx context.Context, applicationTypeDefinitionKindFilter *int32, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (result PagedApplicationTypeInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationTypeInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoList", err.Error()) + } + + req, err := client.GetApplicationTypeInfoListPreparer(ctx, applicationTypeDefinitionKindFilter, excludeApplicationParameters, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationTypeInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationTypeInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationTypeInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationTypeInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationTypeInfoList", resp, "Failure responding to request") + } + + return +} + +// GetApplicationTypeInfoListPreparer prepares the GetApplicationTypeInfoList request. +func (client BaseClient) GetApplicationTypeInfoListPreparer(ctx context.Context, applicationTypeDefinitionKindFilter *int32, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if applicationTypeDefinitionKindFilter != nil { + queryParameters["ApplicationTypeDefinitionKindFilter"] = autorest.Encode("query", *applicationTypeDefinitionKindFilter) + } else { + queryParameters["ApplicationTypeDefinitionKindFilter"] = autorest.Encode("query", 0) + } + if excludeApplicationParameters != nil { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", *excludeApplicationParameters) + } else { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", false) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ApplicationTypes"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationTypeInfoListSender sends the GetApplicationTypeInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationTypeInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationTypeInfoListResponder handles the response to the GetApplicationTypeInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationTypeInfoListResponder(resp *http.Response) (result PagedApplicationTypeInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationTypeInfoListByName returns the information about the application types that are provisioned or in the +// process of being provisioned in the Service Fabric cluster. These results are of application types whose name match +// exactly the one specified as the parameter, and which comply with the given query parameters. All versions of the +// application type matching the application type name are returned, with each version returned as one application +// type. The response includes the name, version, status, and other details about the application type. This is a paged +// query, meaning that if not all of the application types fit in a page, one page of results is returned as well as a +// continuation token, which can be used to get the next page. For example, if there are 10 application types but a +// page only fits the first three application types, or if max results is set to 3, then three is returned. To access +// the rest of the results, retrieve subsequent pages by using the returned continuation token in the next query. An +// empty continuation token is returned if there are no subsequent pages. +// Parameters: +// applicationTypeName - the name of the application type. +// applicationTypeVersion - the version of the application type. +// excludeApplicationParameters - the flag that specifies whether application parameters will be excluded from +// the result. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationTypeInfoListByName(ctx context.Context, applicationTypeName string, applicationTypeVersion string, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (result PagedApplicationTypeInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationTypeInfoListByName") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationTypeInfoListByName", err.Error()) + } + + req, err := client.GetApplicationTypeInfoListByNamePreparer(ctx, applicationTypeName, applicationTypeVersion, excludeApplicationParameters, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationTypeInfoListByName", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationTypeInfoListByNameSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationTypeInfoListByName", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationTypeInfoListByNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationTypeInfoListByName", resp, "Failure responding to request") + } + + return +} + +// GetApplicationTypeInfoListByNamePreparer prepares the GetApplicationTypeInfoListByName request. +func (client BaseClient) GetApplicationTypeInfoListByNamePreparer(ctx context.Context, applicationTypeName string, applicationTypeVersion string, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationTypeName": autorest.Encode("path", applicationTypeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(applicationTypeVersion) > 0 { + queryParameters["ApplicationTypeVersion"] = autorest.Encode("query", applicationTypeVersion) + } + if excludeApplicationParameters != nil { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", *excludeApplicationParameters) + } else { + queryParameters["ExcludeApplicationParameters"] = autorest.Encode("query", false) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ApplicationTypes/{applicationTypeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationTypeInfoListByNameSender sends the GetApplicationTypeInfoListByName request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationTypeInfoListByNameSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationTypeInfoListByNameResponder handles the response to the GetApplicationTypeInfoListByName request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationTypeInfoListByNameResponder(resp *http.Response) (result PagedApplicationTypeInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetApplicationUpgrade returns information about the state of the latest application upgrade along with details to +// aid debugging application health issues. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetApplicationUpgrade(ctx context.Context, applicationID string, timeout *int64) (result ApplicationUpgradeProgressInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetApplicationUpgrade") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetApplicationUpgrade", err.Error()) + } + + req, err := client.GetApplicationUpgradePreparer(ctx, applicationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.GetApplicationUpgradeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationUpgrade", resp, "Failure sending request") + return + } + + result, err = client.GetApplicationUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetApplicationUpgrade", resp, "Failure responding to request") + } + + return +} + +// GetApplicationUpgradePreparer prepares the GetApplicationUpgrade request. +func (client BaseClient) GetApplicationUpgradePreparer(ctx context.Context, applicationID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetUpgradeProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetApplicationUpgradeSender sends the GetApplicationUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetApplicationUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetApplicationUpgradeResponder handles the response to the GetApplicationUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) GetApplicationUpgradeResponder(resp *http.Response) (result ApplicationUpgradeProgressInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetBackupPolicyByName gets a particular backup policy identified by {backupPolicyName} +// Parameters: +// backupPolicyName - the name of the backup policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetBackupPolicyByName(ctx context.Context, backupPolicyName string, timeout *int64) (result BackupPolicyDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetBackupPolicyByName") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyByName", err.Error()) + } + + req, err := client.GetBackupPolicyByNamePreparer(ctx, backupPolicyName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupPolicyByName", nil, "Failure preparing request") + return + } + + resp, err := client.GetBackupPolicyByNameSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupPolicyByName", resp, "Failure sending request") + return + } + + result, err = client.GetBackupPolicyByNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupPolicyByName", resp, "Failure responding to request") + } + + return +} + +// GetBackupPolicyByNamePreparer prepares the GetBackupPolicyByName request. +func (client BaseClient) GetBackupPolicyByNamePreparer(ctx context.Context, backupPolicyName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupPolicyName": autorest.Encode("path", backupPolicyName), + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/BackupRestore/BackupPolicies/{backupPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBackupPolicyByNameSender sends the GetBackupPolicyByName request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetBackupPolicyByNameSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetBackupPolicyByNameResponder handles the response to the GetBackupPolicyByName request. The method always +// closes the http.Response Body. +func (client BaseClient) GetBackupPolicyByNameResponder(resp *http.Response) (result BackupPolicyDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetBackupPolicyList get a list of all the backup policies configured. +// Parameters: +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetBackupPolicyList(ctx context.Context, continuationToken string, maxResults *int64, timeout *int64) (result PagedBackupPolicyDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetBackupPolicyList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetBackupPolicyList", err.Error()) + } + + req, err := client.GetBackupPolicyListPreparer(ctx, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupPolicyList", nil, "Failure preparing request") + return + } + + resp, err := client.GetBackupPolicyListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupPolicyList", resp, "Failure sending request") + return + } + + result, err = client.GetBackupPolicyListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupPolicyList", resp, "Failure responding to request") + } + + return +} + +// GetBackupPolicyListPreparer prepares the GetBackupPolicyList request. +func (client BaseClient) GetBackupPolicyListPreparer(ctx context.Context, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/BackupRestore/BackupPolicies"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBackupPolicyListSender sends the GetBackupPolicyList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetBackupPolicyListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetBackupPolicyListResponder handles the response to the GetBackupPolicyList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetBackupPolicyListResponder(resp *http.Response) (result PagedBackupPolicyDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetBackupsFromBackupLocation gets the list of backups available for the specified backed up entity (Application, +// Service or Partition) at the specified backup location (FileShare or Azure Blob Storage). +// Parameters: +// getBackupByStorageQueryDescription - describes the filters and backup storage details to be used for +// enumerating backups. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +func (client BaseClient) GetBackupsFromBackupLocation(ctx context.Context, getBackupByStorageQueryDescription GetBackupByStorageQueryDescription, timeout *int64, continuationToken string, maxResults *int64) (result PagedBackupInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetBackupsFromBackupLocation") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}, + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: getBackupByStorageQueryDescription, + Constraints: []validation.Constraint{{Target: "getBackupByStorageQueryDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "getBackupByStorageQueryDescription.BackupEntity", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetBackupsFromBackupLocation", err.Error()) + } + + req, err := client.GetBackupsFromBackupLocationPreparer(ctx, getBackupByStorageQueryDescription, timeout, continuationToken, maxResults) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupsFromBackupLocation", nil, "Failure preparing request") + return + } + + resp, err := client.GetBackupsFromBackupLocationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupsFromBackupLocation", resp, "Failure sending request") + return + } + + result, err = client.GetBackupsFromBackupLocationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetBackupsFromBackupLocation", resp, "Failure responding to request") + } + + return +} + +// GetBackupsFromBackupLocationPreparer prepares the GetBackupsFromBackupLocation request. +func (client BaseClient) GetBackupsFromBackupLocationPreparer(ctx context.Context, getBackupByStorageQueryDescription GetBackupByStorageQueryDescription, timeout *int64, continuationToken string, maxResults *int64) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/BackupRestore/$/GetBackups"), + autorest.WithJSON(getBackupByStorageQueryDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetBackupsFromBackupLocationSender sends the GetBackupsFromBackupLocation request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetBackupsFromBackupLocationSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetBackupsFromBackupLocationResponder handles the response to the GetBackupsFromBackupLocation request. The method always +// closes the http.Response Body. +func (client BaseClient) GetBackupsFromBackupLocationResponder(resp *http.Response) (result PagedBackupInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetChaos get the status of Chaos indicating whether or not Chaos is running, the Chaos parameters used for running +// Chaos and the status of the Chaos Schedule. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetChaos(ctx context.Context, timeout *int64) (result Chaos, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetChaos") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetChaos", err.Error()) + } + + req, err := client.GetChaosPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaos", nil, "Failure preparing request") + return + } + + resp, err := client.GetChaosSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaos", resp, "Failure sending request") + return + } + + result, err = client.GetChaosResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaos", resp, "Failure responding to request") + } + + return +} + +// GetChaosPreparer prepares the GetChaos request. +func (client BaseClient) GetChaosPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Tools/Chaos"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetChaosSender sends the GetChaos request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetChaosSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetChaosResponder handles the response to the GetChaos request. The method always +// closes the http.Response Body. +func (client BaseClient) GetChaosResponder(resp *http.Response) (result Chaos, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetChaosEvents to get the next segment of the Chaos events, you can specify the ContinuationToken. To get the start +// of a new segment of Chaos events, you can specify the time range +// through StartTimeUtc and EndTimeUtc. You cannot specify both the ContinuationToken and the time range in the same +// call. +// When there are more than 100 Chaos events, the Chaos events are returned in multiple segments where a segment +// contains no more than 100 Chaos events and to get the next segment you make a call to this API with the continuation +// token. +// Parameters: +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// startTimeUtc - the Windows file time representing the start time of the time range for which a Chaos report +// is to be generated. Consult [DateTime.ToFileTimeUtc +// Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. +// endTimeUtc - the Windows file time representing the end time of the time range for which a Chaos report is +// to be generated. Consult [DateTime.ToFileTimeUtc +// Method](https://msdn.microsoft.com/library/system.datetime.tofiletimeutc(v=vs.110).aspx) for details. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetChaosEvents(ctx context.Context, continuationToken string, startTimeUtc string, endTimeUtc string, maxResults *int64, timeout *int64) (result ChaosEventsSegment, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetChaosEvents") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetChaosEvents", err.Error()) + } + + req, err := client.GetChaosEventsPreparer(ctx, continuationToken, startTimeUtc, endTimeUtc, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaosEvents", nil, "Failure preparing request") + return + } + + resp, err := client.GetChaosEventsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaosEvents", resp, "Failure sending request") + return + } + + result, err = client.GetChaosEventsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaosEvents", resp, "Failure responding to request") + } + + return +} + +// GetChaosEventsPreparer prepares the GetChaosEvents request. +func (client BaseClient) GetChaosEventsPreparer(ctx context.Context, continuationToken string, startTimeUtc string, endTimeUtc string, maxResults *int64, timeout *int64) (*http.Request, error) { + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if len(startTimeUtc) > 0 { + queryParameters["StartTimeUtc"] = autorest.Encode("query", startTimeUtc) + } + if len(endTimeUtc) > 0 { + queryParameters["EndTimeUtc"] = autorest.Encode("query", endTimeUtc) + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Tools/Chaos/Events"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetChaosEventsSender sends the GetChaosEvents request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetChaosEventsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetChaosEventsResponder handles the response to the GetChaosEvents request. The method always +// closes the http.Response Body. +func (client BaseClient) GetChaosEventsResponder(resp *http.Response) (result ChaosEventsSegment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetChaosSchedule gets the version of the Chaos Schedule in use and the Chaos Schedule that defines when and how to +// run Chaos. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetChaosSchedule(ctx context.Context, timeout *int64) (result ChaosScheduleDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetChaosSchedule") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetChaosSchedule", err.Error()) + } + + req, err := client.GetChaosSchedulePreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaosSchedule", nil, "Failure preparing request") + return + } + + resp, err := client.GetChaosScheduleSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaosSchedule", resp, "Failure sending request") + return + } + + result, err = client.GetChaosScheduleResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetChaosSchedule", resp, "Failure responding to request") + } + + return +} + +// GetChaosSchedulePreparer prepares the GetChaosSchedule request. +func (client BaseClient) GetChaosSchedulePreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Tools/Chaos/Schedule"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetChaosScheduleSender sends the GetChaosSchedule request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetChaosScheduleSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetChaosScheduleResponder handles the response to the GetChaosSchedule request. The method always +// closes the http.Response Body. +func (client BaseClient) GetChaosScheduleResponder(resp *http.Response) (result ChaosScheduleDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterConfiguration the cluster configuration contains properties of the cluster that include different node +// types on the cluster, +// security configurations, fault, and upgrade domain topologies, etc. +// Parameters: +// configurationAPIVersion - the API version of the Standalone cluster json configuration. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterConfiguration(ctx context.Context, configurationAPIVersion string, timeout *int64) (result ClusterConfiguration, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterConfiguration") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfiguration", err.Error()) + } + + req, err := client.GetClusterConfigurationPreparer(ctx, configurationAPIVersion, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterConfiguration", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterConfigurationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterConfiguration", resp, "Failure sending request") + return + } + + result, err = client.GetClusterConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterConfiguration", resp, "Failure responding to request") + } + + return +} + +// GetClusterConfigurationPreparer prepares the GetClusterConfiguration request. +func (client BaseClient) GetClusterConfigurationPreparer(ctx context.Context, configurationAPIVersion string, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "ConfigurationApiVersion": autorest.Encode("query", configurationAPIVersion), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterConfiguration"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterConfigurationSender sends the GetClusterConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterConfigurationSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterConfigurationResponder handles the response to the GetClusterConfiguration request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterConfigurationResponder(resp *http.Response) (result ClusterConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterConfigurationUpgradeStatus get the cluster configuration upgrade status details of a Service Fabric +// standalone cluster. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterConfigurationUpgradeStatus(ctx context.Context, timeout *int64) (result ClusterConfigurationUpgradeStatusInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterConfigurationUpgradeStatus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", err.Error()) + } + + req, err := client.GetClusterConfigurationUpgradeStatusPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterConfigurationUpgradeStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", resp, "Failure sending request") + return + } + + result, err = client.GetClusterConfigurationUpgradeStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterConfigurationUpgradeStatus", resp, "Failure responding to request") + } + + return +} + +// GetClusterConfigurationUpgradeStatusPreparer prepares the GetClusterConfigurationUpgradeStatus request. +func (client BaseClient) GetClusterConfigurationUpgradeStatusPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterConfigurationUpgradeStatus"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterConfigurationUpgradeStatusSender sends the GetClusterConfigurationUpgradeStatus request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterConfigurationUpgradeStatusSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterConfigurationUpgradeStatusResponder handles the response to the GetClusterConfigurationUpgradeStatus request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterConfigurationUpgradeStatusResponder(resp *http.Response) (result ClusterConfigurationUpgradeStatusInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterEventList the response is list of ClusterEvent objects. +// Parameters: +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetClusterEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListClusterEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterEventList", err.Error()) + } + + req, err := client.GetClusterEventListPreparer(ctx, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterEventList", resp, "Failure sending request") + return + } + + result, err = client.GetClusterEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterEventList", resp, "Failure responding to request") + } + + return +} + +// GetClusterEventListPreparer prepares the GetClusterEventList request. +func (client BaseClient) GetClusterEventListPreparer(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/EventsStore/Cluster/Events"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterEventListSender sends the GetClusterEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterEventListResponder handles the response to the GetClusterEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterEventListResponder(resp *http.Response) (result ListClusterEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterHealth use EventsHealthStateFilter to filter the collection of health events reported on the cluster based +// on the health state. +// Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and +// applications returned based on their aggregated health state. +// Parameters: +// nodesHealthStateFilter - allows filtering of the node health state objects returned in the result of cluster +// health query +// based on their health state. The possible values for this parameter include integer value of one of the +// following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the +// aggregated health state. +// If not specified, all entries are returned. +// The state values are flag-based enumeration, so the value could be a combination of these values obtained +// using bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and +// Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// applicationsHealthStateFilter - allows filtering of the application health state objects returned in the +// result of cluster health +// query based on their health state. +// The possible values for this parameter include integer value obtained from members or bitwise operations +// on members of HealthStateFilter enumeration. Only applications that match the filter are returned. +// All applications are used to evaluate the aggregated health state. If not specified, all entries are +// returned. +// The state values are flag-based enumeration, so the value could be a combination of these values obtained +// using bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) +// and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// includeSystemApplicationHealthStatistics - indicates whether the health statistics should include the +// fabric:/System application health statistics. False by default. +// If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that +// belong to the fabric:/System application. +// Otherwise, the query result includes health statistics only for user applications. +// The health statistics must be included in the query result for this parameter to be applied. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterHealth(ctx context.Context, nodesHealthStateFilter *int32, applicationsHealthStateFilter *int32, eventsHealthStateFilter *int32, excludeHealthStatistics *bool, includeSystemApplicationHealthStatistics *bool, timeout *int64) (result ClusterHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealth", err.Error()) + } + + req, err := client.GetClusterHealthPreparer(ctx, nodesHealthStateFilter, applicationsHealthStateFilter, eventsHealthStateFilter, excludeHealthStatistics, includeSystemApplicationHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealth", resp, "Failure sending request") + return + } + + result, err = client.GetClusterHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealth", resp, "Failure responding to request") + } + + return +} + +// GetClusterHealthPreparer prepares the GetClusterHealth request. +func (client BaseClient) GetClusterHealthPreparer(ctx context.Context, nodesHealthStateFilter *int32, applicationsHealthStateFilter *int32, eventsHealthStateFilter *int32, excludeHealthStatistics *bool, includeSystemApplicationHealthStatistics *bool, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if nodesHealthStateFilter != nil { + queryParameters["NodesHealthStateFilter"] = autorest.Encode("query", *nodesHealthStateFilter) + } else { + queryParameters["NodesHealthStateFilter"] = autorest.Encode("query", 0) + } + if applicationsHealthStateFilter != nil { + queryParameters["ApplicationsHealthStateFilter"] = autorest.Encode("query", *applicationsHealthStateFilter) + } else { + queryParameters["ApplicationsHealthStateFilter"] = autorest.Encode("query", 0) + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if includeSystemApplicationHealthStatistics != nil { + queryParameters["IncludeSystemApplicationHealthStatistics"] = autorest.Encode("query", *includeSystemApplicationHealthStatistics) + } else { + queryParameters["IncludeSystemApplicationHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterHealth"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterHealthSender sends the GetClusterHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterHealthResponder handles the response to the GetClusterHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterHealthResponder(resp *http.Response) (result ClusterHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterHealthChunk gets the health of a Service Fabric cluster using health chunks. Includes the aggregated +// health state of the cluster, but none of the cluster entities. +// To expand the cluster health and get the health state of all or some of the entities, use the POST URI and specify +// the cluster health chunk query description. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterHealthChunk(ctx context.Context, timeout *int64) (result ClusterHealthChunk, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterHealthChunk") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunk", err.Error()) + } + + req, err := client.GetClusterHealthChunkPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthChunk", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterHealthChunkSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthChunk", resp, "Failure sending request") + return + } + + result, err = client.GetClusterHealthChunkResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthChunk", resp, "Failure responding to request") + } + + return +} + +// GetClusterHealthChunkPreparer prepares the GetClusterHealthChunk request. +func (client BaseClient) GetClusterHealthChunkPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterHealthChunk"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterHealthChunkSender sends the GetClusterHealthChunk request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterHealthChunkSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterHealthChunkResponder handles the response to the GetClusterHealthChunk request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterHealthChunkResponder(resp *http.Response) (result ClusterHealthChunk, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterHealthChunkUsingPolicyAndAdvancedFilters gets the health of a Service Fabric cluster using health chunks. +// The health evaluation is done based on the input cluster health chunk query description. +// The query description allows users to specify health policies for evaluating the cluster and its children. +// Users can specify very flexible filters to select which cluster entities to return. The selection can be done based +// on the entities health state and based on the hierarchy. +// The query can return multi-level children of the entities based on the specified filters. For example, it can return +// one application with a specified name, and for this application, return +// only services that are in Error or Warning, and all partitions and replicas for one of these services. +// Parameters: +// clusterHealthChunkQueryDescription - describes the cluster and application health policies used to evaluate +// the cluster health and the filters to select which cluster entities to be returned. +// If the cluster health policy is present, it is used to evaluate the cluster events and the cluster nodes. If +// not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the +// default cluster health policy. +// By default, each application is evaluated using its specific application health policy, defined in the +// application manifest, or the default health policy, if no policy is defined in manifest. +// If the application health policy map is specified, and it has an entry for an application, the specified +// application health policy +// is used to evaluate the application health. +// Users can specify very flexible filters to select which cluster entities to include in response. The +// selection can be done based on the entities health state and based on the hierarchy. +// The query can return multi-level children of the entities based on the specified filters. For example, it +// can return one application with a specified name, and for this application, return +// only services that are in Error or Warning, and all partitions and replicas for one of these services. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFilters(ctx context.Context, clusterHealthChunkQueryDescription *ClusterHealthChunkQueryDescription, timeout *int64) (result ClusterHealthChunk, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterHealthChunkUsingPolicyAndAdvancedFilters") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", err.Error()) + } + + req, err := client.GetClusterHealthChunkUsingPolicyAndAdvancedFiltersPreparer(ctx, clusterHealthChunkQueryDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterHealthChunkUsingPolicyAndAdvancedFiltersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", resp, "Failure sending request") + return + } + + result, err = client.GetClusterHealthChunkUsingPolicyAndAdvancedFiltersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthChunkUsingPolicyAndAdvancedFilters", resp, "Failure responding to request") + } + + return +} + +// GetClusterHealthChunkUsingPolicyAndAdvancedFiltersPreparer prepares the GetClusterHealthChunkUsingPolicyAndAdvancedFilters request. +func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFiltersPreparer(ctx context.Context, clusterHealthChunkQueryDescription *ClusterHealthChunkQueryDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterHealthChunk"), + autorest.WithQueryParameters(queryParameters)) + if clusterHealthChunkQueryDescription != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(clusterHealthChunkQueryDescription)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterHealthChunkUsingPolicyAndAdvancedFiltersSender sends the GetClusterHealthChunkUsingPolicyAndAdvancedFilters request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFiltersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterHealthChunkUsingPolicyAndAdvancedFiltersResponder handles the response to the GetClusterHealthChunkUsingPolicyAndAdvancedFilters request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterHealthChunkUsingPolicyAndAdvancedFiltersResponder(resp *http.Response) (result ClusterHealthChunk, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterHealthUsingPolicy use EventsHealthStateFilter to filter the collection of health events reported on the +// cluster based on the health state. +// Similarly, use NodesHealthStateFilter and ApplicationsHealthStateFilter to filter the collection of nodes and +// applications returned based on their aggregated health state. +// Use ClusterHealthPolicies to override the health policies used to evaluate the health. +// Parameters: +// nodesHealthStateFilter - allows filtering of the node health state objects returned in the result of cluster +// health query +// based on their health state. The possible values for this parameter include integer value of one of the +// following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the +// aggregated health state. +// If not specified, all entries are returned. +// The state values are flag-based enumeration, so the value could be a combination of these values obtained +// using bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of nodes with HealthState value of OK (2) and +// Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// applicationsHealthStateFilter - allows filtering of the application health state objects returned in the +// result of cluster health +// query based on their health state. +// The possible values for this parameter include integer value obtained from members or bitwise operations +// on members of HealthStateFilter enumeration. Only applications that match the filter are returned. +// All applications are used to evaluate the aggregated health state. If not specified, all entries are +// returned. +// The state values are flag-based enumeration, so the value could be a combination of these values obtained +// using bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of applications with HealthState value of OK (2) +// and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// includeSystemApplicationHealthStatistics - indicates whether the health statistics should include the +// fabric:/System application health statistics. False by default. +// If IncludeSystemApplicationHealthStatistics is set to true, the health statistics include the entities that +// belong to the fabric:/System application. +// Otherwise, the query result includes health statistics only for user applications. +// The health statistics must be included in the query result for this parameter to be applied. +// clusterHealthPolicies - describes the health policies used to evaluate the cluster health. +// If not present, the health evaluation uses the cluster health policy defined in the cluster manifest or the +// default cluster health policy. +// By default, each application is evaluated using its specific application health policy, defined in the +// application manifest, or the default health policy, if no policy is defined in manifest. +// If the application health policy map is specified, and it has an entry for an application, the specified +// application health policy +// is used to evaluate the application health. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterHealthUsingPolicy(ctx context.Context, nodesHealthStateFilter *int32, applicationsHealthStateFilter *int32, eventsHealthStateFilter *int32, excludeHealthStatistics *bool, includeSystemApplicationHealthStatistics *bool, clusterHealthPolicies *ClusterHealthPolicies, timeout *int64) (result ClusterHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterHealthUsingPolicy", err.Error()) + } + + req, err := client.GetClusterHealthUsingPolicyPreparer(ctx, nodesHealthStateFilter, applicationsHealthStateFilter, eventsHealthStateFilter, excludeHealthStatistics, includeSystemApplicationHealthStatistics, clusterHealthPolicies, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetClusterHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetClusterHealthUsingPolicyPreparer prepares the GetClusterHealthUsingPolicy request. +func (client BaseClient) GetClusterHealthUsingPolicyPreparer(ctx context.Context, nodesHealthStateFilter *int32, applicationsHealthStateFilter *int32, eventsHealthStateFilter *int32, excludeHealthStatistics *bool, includeSystemApplicationHealthStatistics *bool, clusterHealthPolicies *ClusterHealthPolicies, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if nodesHealthStateFilter != nil { + queryParameters["NodesHealthStateFilter"] = autorest.Encode("query", *nodesHealthStateFilter) + } else { + queryParameters["NodesHealthStateFilter"] = autorest.Encode("query", 0) + } + if applicationsHealthStateFilter != nil { + queryParameters["ApplicationsHealthStateFilter"] = autorest.Encode("query", *applicationsHealthStateFilter) + } else { + queryParameters["ApplicationsHealthStateFilter"] = autorest.Encode("query", 0) + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if includeSystemApplicationHealthStatistics != nil { + queryParameters["IncludeSystemApplicationHealthStatistics"] = autorest.Encode("query", *includeSystemApplicationHealthStatistics) + } else { + queryParameters["IncludeSystemApplicationHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterHealth"), + autorest.WithQueryParameters(queryParameters)) + if clusterHealthPolicies != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(clusterHealthPolicies)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterHealthUsingPolicySender sends the GetClusterHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterHealthUsingPolicyResponder handles the response to the GetClusterHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterHealthUsingPolicyResponder(resp *http.Response) (result ClusterHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterLoad retrieves the load information of a Service Fabric cluster for all the metrics that have load or +// capacity defined. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterLoad(ctx context.Context, timeout *int64) (result ClusterLoadInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterLoad") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterLoad", err.Error()) + } + + req, err := client.GetClusterLoadPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterLoad", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterLoadSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterLoad", resp, "Failure sending request") + return + } + + result, err = client.GetClusterLoadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterLoad", resp, "Failure responding to request") + } + + return +} + +// GetClusterLoadPreparer prepares the GetClusterLoad request. +func (client BaseClient) GetClusterLoadPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetLoadInformation"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterLoadSender sends the GetClusterLoad request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterLoadSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterLoadResponder handles the response to the GetClusterLoad request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterLoadResponder(resp *http.Response) (result ClusterLoadInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterManifest get the Service Fabric cluster manifest. The cluster manifest contains properties of the cluster +// that include different node types on the cluster, +// security configurations, fault, and upgrade domain topologies, etc. +// +// These properties are specified as part of the ClusterConfig.JSON file while deploying a stand-alone cluster. +// However, most of the information in the cluster manifest +// is generated internally by service fabric during cluster deployment in other deployment scenarios (e.g. when using +// Azure portal). +// +// The contents of the cluster manifest are for informational purposes only and users are not expected to take a +// dependency on the format of the file contents or its interpretation. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterManifest(ctx context.Context, timeout *int64) (result ClusterManifest, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterManifest") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterManifest", err.Error()) + } + + req, err := client.GetClusterManifestPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterManifest", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterManifestSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterManifest", resp, "Failure sending request") + return + } + + result, err = client.GetClusterManifestResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterManifest", resp, "Failure responding to request") + } + + return +} + +// GetClusterManifestPreparer prepares the GetClusterManifest request. +func (client BaseClient) GetClusterManifestPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterManifest"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterManifestSender sends the GetClusterManifest request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterManifestSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterManifestResponder handles the response to the GetClusterManifest request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterManifestResponder(resp *http.Response) (result ClusterManifest, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterUpgradeProgress gets the current progress of the ongoing cluster upgrade. If no upgrade is currently in +// progress, get the last state of the previous cluster upgrade. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterUpgradeProgress(ctx context.Context, timeout *int64) (result ClusterUpgradeProgressObject, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterUpgradeProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterUpgradeProgress", err.Error()) + } + + req, err := client.GetClusterUpgradeProgressPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterUpgradeProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterUpgradeProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterUpgradeProgress", resp, "Failure sending request") + return + } + + result, err = client.GetClusterUpgradeProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterUpgradeProgress", resp, "Failure responding to request") + } + + return +} + +// GetClusterUpgradeProgressPreparer prepares the GetClusterUpgradeProgress request. +func (client BaseClient) GetClusterUpgradeProgressPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetUpgradeProgress"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterUpgradeProgressSender sends the GetClusterUpgradeProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterUpgradeProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterUpgradeProgressResponder handles the response to the GetClusterUpgradeProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterUpgradeProgressResponder(resp *http.Response) (result ClusterUpgradeProgressObject, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetClusterVersion if a cluster upgrade is happening, then this API will return the lowest (older) version of the +// current and target cluster runtime versions. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetClusterVersion(ctx context.Context, timeout *int64) (result ClusterVersion, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetClusterVersion") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetClusterVersion", err.Error()) + } + + req, err := client.GetClusterVersionPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterVersion", nil, "Failure preparing request") + return + } + + resp, err := client.GetClusterVersionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterVersion", resp, "Failure sending request") + return + } + + result, err = client.GetClusterVersionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetClusterVersion", resp, "Failure responding to request") + } + + return +} + +// GetClusterVersionPreparer prepares the GetClusterVersion request. +func (client BaseClient) GetClusterVersionPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetClusterVersion"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetClusterVersionSender sends the GetClusterVersion request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetClusterVersionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetClusterVersionResponder handles the response to the GetClusterVersion request. The method always +// closes the http.Response Body. +func (client BaseClient) GetClusterVersionResponder(resp *http.Response) (result ClusterVersion, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetComposeDeploymentStatus returns the status of the compose deployment that was created or in the process of being +// created in the Service Fabric cluster and whose name matches the one specified as the parameter. The response +// includes the name, status, and other details about the deployment. +// Parameters: +// deploymentName - the identity of the deployment. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetComposeDeploymentStatus(ctx context.Context, deploymentName string, timeout *int64) (result ComposeDeploymentStatusInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetComposeDeploymentStatus") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatus", err.Error()) + } + + req, err := client.GetComposeDeploymentStatusPreparer(ctx, deploymentName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetComposeDeploymentStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentStatus", resp, "Failure sending request") + return + } + + result, err = client.GetComposeDeploymentStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentStatus", resp, "Failure responding to request") + } + + return +} + +// GetComposeDeploymentStatusPreparer prepares the GetComposeDeploymentStatus request. +func (client BaseClient) GetComposeDeploymentStatusPreparer(ctx context.Context, deploymentName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": deploymentName, + } + + const APIVersion = "6.0-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ComposeDeployments/{deploymentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetComposeDeploymentStatusSender sends the GetComposeDeploymentStatus request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetComposeDeploymentStatusSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetComposeDeploymentStatusResponder handles the response to the GetComposeDeploymentStatus request. The method always +// closes the http.Response Body. +func (client BaseClient) GetComposeDeploymentStatusResponder(resp *http.Response) (result ComposeDeploymentStatusInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetComposeDeploymentStatusList gets the status about the compose deployments that were created or in the process of +// being created in the Service Fabric cluster. The response includes the name, status, and other details about the +// compose deployments. If the list of deployments do not fit in a page, one page of results is returned as well as a +// continuation token, which can be used to get the next page. +// Parameters: +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetComposeDeploymentStatusList(ctx context.Context, continuationToken string, maxResults *int64, timeout *int64) (result PagedComposeDeploymentStatusInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetComposeDeploymentStatusList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentStatusList", err.Error()) + } + + req, err := client.GetComposeDeploymentStatusListPreparer(ctx, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentStatusList", nil, "Failure preparing request") + return + } + + resp, err := client.GetComposeDeploymentStatusListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentStatusList", resp, "Failure sending request") + return + } + + result, err = client.GetComposeDeploymentStatusListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentStatusList", resp, "Failure responding to request") + } + + return +} + +// GetComposeDeploymentStatusListPreparer prepares the GetComposeDeploymentStatusList request. +func (client BaseClient) GetComposeDeploymentStatusListPreparer(ctx context.Context, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ComposeDeployments"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetComposeDeploymentStatusListSender sends the GetComposeDeploymentStatusList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetComposeDeploymentStatusListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetComposeDeploymentStatusListResponder handles the response to the GetComposeDeploymentStatusList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetComposeDeploymentStatusListResponder(resp *http.Response) (result PagedComposeDeploymentStatusInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetComposeDeploymentUpgradeProgress returns the information about the state of the compose deployment upgrade along +// with details to aid debugging application health issues. +// Parameters: +// deploymentName - the identity of the deployment. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetComposeDeploymentUpgradeProgress(ctx context.Context, deploymentName string, timeout *int64) (result ComposeDeploymentUpgradeProgressInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetComposeDeploymentUpgradeProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", err.Error()) + } + + req, err := client.GetComposeDeploymentUpgradeProgressPreparer(ctx, deploymentName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetComposeDeploymentUpgradeProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", resp, "Failure sending request") + return + } + + result, err = client.GetComposeDeploymentUpgradeProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetComposeDeploymentUpgradeProgress", resp, "Failure responding to request") + } + + return +} + +// GetComposeDeploymentUpgradeProgressPreparer prepares the GetComposeDeploymentUpgradeProgress request. +func (client BaseClient) GetComposeDeploymentUpgradeProgressPreparer(ctx context.Context, deploymentName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": deploymentName, + } + + const APIVersion = "6.0-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ComposeDeployments/{deploymentName}/$/GetUpgradeProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetComposeDeploymentUpgradeProgressSender sends the GetComposeDeploymentUpgradeProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetComposeDeploymentUpgradeProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetComposeDeploymentUpgradeProgressResponder handles the response to the GetComposeDeploymentUpgradeProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetComposeDeploymentUpgradeProgressResponder(resp *http.Response) (result ComposeDeploymentUpgradeProgressInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetConfigurationOverrides this api allows getting all existing configuration overrides on the specified node. +// Parameters: +// nodeName - the name of the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetConfigurationOverrides(ctx context.Context, nodeName string, timeout *int64) (result ListConfigParameterOverride, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetConfigurationOverrides") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetConfigurationOverrides", err.Error()) + } + + req, err := client.GetConfigurationOverridesPreparer(ctx, nodeName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetConfigurationOverrides", nil, "Failure preparing request") + return + } + + resp, err := client.GetConfigurationOverridesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetConfigurationOverrides", resp, "Failure sending request") + return + } + + result, err = client.GetConfigurationOverridesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetConfigurationOverrides", resp, "Failure responding to request") + } + + return +} + +// GetConfigurationOverridesPreparer prepares the GetConfigurationOverrides request. +func (client BaseClient) GetConfigurationOverridesPreparer(ctx context.Context, nodeName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "7.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetConfigurationOverrides", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetConfigurationOverridesSender sends the GetConfigurationOverrides request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetConfigurationOverridesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetConfigurationOverridesResponder handles the response to the GetConfigurationOverrides request. The method always +// closes the http.Response Body. +func (client BaseClient) GetConfigurationOverridesResponder(resp *http.Response) (result ListConfigParameterOverride, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetContainerLogsDeployedOnNode gets the container logs for container deployed on a Service Fabric node for the given +// code package. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceManifestName - the name of a service manifest registered as part of an application type in a Service +// Fabric cluster. +// codePackageName - the name of code package specified in service manifest registered as part of an +// application type in a Service Fabric cluster. +// tail - number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. +// previous - specifies whether to get container logs from exited/dead containers of the code package instance. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetContainerLogsDeployedOnNode(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, tail string, previous *bool, timeout *int64) (result ContainerLogs, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetContainerLogsDeployedOnNode") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", err.Error()) + } + + req, err := client.GetContainerLogsDeployedOnNodePreparer(ctx, nodeName, applicationID, serviceManifestName, codePackageName, tail, previous, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", nil, "Failure preparing request") + return + } + + resp, err := client.GetContainerLogsDeployedOnNodeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", resp, "Failure sending request") + return + } + + result, err = client.GetContainerLogsDeployedOnNodeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetContainerLogsDeployedOnNode", resp, "Failure responding to request") + } + + return +} + +// GetContainerLogsDeployedOnNodePreparer prepares the GetContainerLogsDeployedOnNode request. +func (client BaseClient) GetContainerLogsDeployedOnNodePreparer(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, tail string, previous *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "CodePackageName": autorest.Encode("query", codePackageName), + "ServiceManifestName": autorest.Encode("query", serviceManifestName), + } + if len(tail) > 0 { + queryParameters["Tail"] = autorest.Encode("query", tail) + } + if previous != nil { + queryParameters["Previous"] = autorest.Encode("query", *previous) + } else { + queryParameters["Previous"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerLogs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetContainerLogsDeployedOnNodeSender sends the GetContainerLogsDeployedOnNode request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetContainerLogsDeployedOnNodeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetContainerLogsDeployedOnNodeResponder handles the response to the GetContainerLogsDeployedOnNode request. The method always +// closes the http.Response Body. +func (client BaseClient) GetContainerLogsDeployedOnNodeResponder(resp *http.Response) (result ContainerLogs, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetContainersEventList the response is list of ContainerInstanceEvent objects. +// Parameters: +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetContainersEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListContainerInstanceEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetContainersEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetContainersEventList", err.Error()) + } + + req, err := client.GetContainersEventListPreparer(ctx, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetContainersEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetContainersEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetContainersEventList", resp, "Failure sending request") + return + } + + result, err = client.GetContainersEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetContainersEventList", resp, "Failure responding to request") + } + + return +} + +// GetContainersEventListPreparer prepares the GetContainersEventList request. +func (client BaseClient) GetContainersEventListPreparer(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + const APIVersion = "6.2-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/EventsStore/Containers/Events"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetContainersEventListSender sends the GetContainersEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetContainersEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetContainersEventListResponder handles the response to the GetContainersEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetContainersEventListResponder(resp *http.Response) (result ListContainerInstanceEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCorrelatedEventList the response is list of FabricEvents. +// Parameters: +// eventInstanceID - the EventInstanceId. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetCorrelatedEventList(ctx context.Context, eventInstanceID string, timeout *int64) (result ListFabricEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCorrelatedEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetCorrelatedEventList", err.Error()) + } + + req, err := client.GetCorrelatedEventListPreparer(ctx, eventInstanceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetCorrelatedEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetCorrelatedEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetCorrelatedEventList", resp, "Failure sending request") + return + } + + result, err = client.GetCorrelatedEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetCorrelatedEventList", resp, "Failure responding to request") + } + + return +} + +// GetCorrelatedEventListPreparer prepares the GetCorrelatedEventList request. +func (client BaseClient) GetCorrelatedEventListPreparer(ctx context.Context, eventInstanceID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "eventInstanceId": autorest.Encode("path", eventInstanceID), + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/EventsStore/CorrelatedEvents/{eventInstanceId}/$/Events", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCorrelatedEventListSender sends the GetCorrelatedEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetCorrelatedEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetCorrelatedEventListResponder handles the response to the GetCorrelatedEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetCorrelatedEventListResponder(resp *http.Response) (result ListFabricEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDataLossProgress gets the progress of a data loss operation started with StartDataLoss, using the OperationId. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionID - the identity of the partition. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDataLossProgress(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (result PartitionDataLossProgress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDataLossProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDataLossProgress", err.Error()) + } + + req, err := client.GetDataLossProgressPreparer(ctx, serviceID, partitionID, operationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDataLossProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetDataLossProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDataLossProgress", resp, "Failure sending request") + return + } + + result, err = client.GetDataLossProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDataLossProgress", resp, "Failure responding to request") + } + + return +} + +// GetDataLossProgressPreparer prepares the GetDataLossProgress request. +func (client BaseClient) GetDataLossProgressPreparer(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "OperationId": autorest.Encode("query", operationID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetDataLossProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDataLossProgressSender sends the GetDataLossProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDataLossProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDataLossProgressResponder handles the response to the GetDataLossProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDataLossProgressResponder(resp *http.Response) (result PartitionDataLossProgress, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedApplicationHealth gets the information about health of an application deployed on a Service Fabric node. +// Use EventsHealthStateFilter to optionally filter for the collection of HealthEvent objects reported on the deployed +// application based on health state. Use DeployedServicePackagesHealthStateFilter to optionally filter for +// DeployedServicePackageHealth children based on health state. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// deployedServicePackagesHealthStateFilter - allows filtering of the deployed service package health state +// objects returned in the result of deployed application health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. +// Only deployed service packages that match the filter are returned. All deployed service packages are used to +// evaluate the aggregated health state of the deployed application. +// If not specified, all entries are returned. +// The state values are flag-based enumeration, so the value can be a combination of these values, obtained +// using the bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of service packages with HealthState value of OK +// (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedApplicationHealth(ctx context.Context, nodeName string, applicationID string, eventsHealthStateFilter *int32, deployedServicePackagesHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result DeployedApplicationHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedApplicationHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealth", err.Error()) + } + + req, err := client.GetDeployedApplicationHealthPreparer(ctx, nodeName, applicationID, eventsHealthStateFilter, deployedServicePackagesHealthStateFilter, excludeHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedApplicationHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationHealth", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedApplicationHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationHealth", resp, "Failure responding to request") + } + + return +} + +// GetDeployedApplicationHealthPreparer prepares the GetDeployedApplicationHealth request. +func (client BaseClient) GetDeployedApplicationHealthPreparer(ctx context.Context, nodeName string, applicationID string, eventsHealthStateFilter *int32, deployedServicePackagesHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if deployedServicePackagesHealthStateFilter != nil { + queryParameters["DeployedServicePackagesHealthStateFilter"] = autorest.Encode("query", *deployedServicePackagesHealthStateFilter) + } else { + queryParameters["DeployedServicePackagesHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedApplicationHealthSender sends the GetDeployedApplicationHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedApplicationHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedApplicationHealthResponder handles the response to the GetDeployedApplicationHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedApplicationHealthResponder(resp *http.Response) (result DeployedApplicationHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedApplicationHealthUsingPolicy gets the information about health of an application deployed on a Service +// Fabric node using the specified policy. Use EventsHealthStateFilter to optionally filter for the collection of +// HealthEvent objects reported on the deployed application based on health state. Use +// DeployedServicePackagesHealthStateFilter to optionally filter for DeployedServicePackageHealth children based on +// health state. Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. +// This API only uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored +// while evaluating the health of the deployed application. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// deployedServicePackagesHealthStateFilter - allows filtering of the deployed service package health state +// objects returned in the result of deployed application health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. +// Only deployed service packages that match the filter are returned. All deployed service packages are used to +// evaluate the aggregated health state of the deployed application. +// If not specified, all entries are returned. +// The state values are flag-based enumeration, so the value can be a combination of these values, obtained +// using the bitwise 'OR' operator. +// For example, if the provided value is 6 then health state of service packages with HealthState value of OK +// (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// applicationHealthPolicy - describes the health policies used to evaluate the health of an application or one +// of its children. +// If not present, the health evaluation uses the health policy from application manifest or the default health +// policy. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedApplicationHealthUsingPolicy(ctx context.Context, nodeName string, applicationID string, eventsHealthStateFilter *int32, deployedServicePackagesHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (result DeployedApplicationHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedApplicationHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", err.Error()) + } + + req, err := client.GetDeployedApplicationHealthUsingPolicyPreparer(ctx, nodeName, applicationID, eventsHealthStateFilter, deployedServicePackagesHealthStateFilter, applicationHealthPolicy, excludeHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedApplicationHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedApplicationHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetDeployedApplicationHealthUsingPolicyPreparer prepares the GetDeployedApplicationHealthUsingPolicy request. +func (client BaseClient) GetDeployedApplicationHealthUsingPolicyPreparer(ctx context.Context, nodeName string, applicationID string, eventsHealthStateFilter *int32, deployedServicePackagesHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if deployedServicePackagesHealthStateFilter != nil { + queryParameters["DeployedServicePackagesHealthStateFilter"] = autorest.Encode("query", *deployedServicePackagesHealthStateFilter) + } else { + queryParameters["DeployedServicePackagesHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if applicationHealthPolicy != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(applicationHealthPolicy)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedApplicationHealthUsingPolicySender sends the GetDeployedApplicationHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedApplicationHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedApplicationHealthUsingPolicyResponder handles the response to the GetDeployedApplicationHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedApplicationHealthUsingPolicyResponder(resp *http.Response) (result DeployedApplicationHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedApplicationInfo this query returns system application information if the application ID provided is for +// system application. Results encompass deployed applications in active, activating, and downloading states. This +// query requires that the node name corresponds to a node on the cluster. The query fails if the provided node name +// does not point to any active Service Fabric nodes on the cluster. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// includeHealthState - include the health state of an entity. +// If this parameter is false or not specified, then the health state returned is "Unknown". +// When set to true, the query goes in parallel to the node and the health system service before the results +// are merged. +// As a result, the query is more expensive and may take a longer time. +func (client BaseClient) GetDeployedApplicationInfo(ctx context.Context, nodeName string, applicationID string, timeout *int64, includeHealthState *bool) (result DeployedApplicationInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedApplicationInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfo", err.Error()) + } + + req, err := client.GetDeployedApplicationInfoPreparer(ctx, nodeName, applicationID, timeout, includeHealthState) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedApplicationInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationInfo", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedApplicationInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationInfo", resp, "Failure responding to request") + } + + return +} + +// GetDeployedApplicationInfoPreparer prepares the GetDeployedApplicationInfo request. +func (client BaseClient) GetDeployedApplicationInfoPreparer(ctx context.Context, nodeName string, applicationID string, timeout *int64, includeHealthState *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.1" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if includeHealthState != nil { + queryParameters["IncludeHealthState"] = autorest.Encode("query", *includeHealthState) + } else { + queryParameters["IncludeHealthState"] = autorest.Encode("query", false) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedApplicationInfoSender sends the GetDeployedApplicationInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedApplicationInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedApplicationInfoResponder handles the response to the GetDeployedApplicationInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedApplicationInfoResponder(resp *http.Response) (result DeployedApplicationInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedApplicationInfoList gets the list of applications deployed on a Service Fabric node. The results do not +// include information about deployed system applications unless explicitly queried for by ID. Results encompass +// deployed applications in active, activating, and downloading states. This query requires that the node name +// corresponds to a node on the cluster. The query fails if the provided node name does not point to any active Service +// Fabric nodes on the cluster. +// Parameters: +// nodeName - the name of the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// includeHealthState - include the health state of an entity. +// If this parameter is false or not specified, then the health state returned is "Unknown". +// When set to true, the query goes in parallel to the node and the health system service before the results +// are merged. +// As a result, the query is more expensive and may take a longer time. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +func (client BaseClient) GetDeployedApplicationInfoList(ctx context.Context, nodeName string, timeout *int64, includeHealthState *bool, continuationToken string, maxResults *int64) (result PagedDeployedApplicationInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedApplicationInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}, + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedApplicationInfoList", err.Error()) + } + + req, err := client.GetDeployedApplicationInfoListPreparer(ctx, nodeName, timeout, includeHealthState, continuationToken, maxResults) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedApplicationInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedApplicationInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedApplicationInfoList", resp, "Failure responding to request") + } + + return +} + +// GetDeployedApplicationInfoListPreparer prepares the GetDeployedApplicationInfoList request. +func (client BaseClient) GetDeployedApplicationInfoListPreparer(ctx context.Context, nodeName string, timeout *int64, includeHealthState *bool, continuationToken string, maxResults *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.1" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if includeHealthState != nil { + queryParameters["IncludeHealthState"] = autorest.Encode("query", *includeHealthState) + } else { + queryParameters["IncludeHealthState"] = autorest.Encode("query", false) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedApplicationInfoListSender sends the GetDeployedApplicationInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedApplicationInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedApplicationInfoListResponder handles the response to the GetDeployedApplicationInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedApplicationInfoListResponder(resp *http.Response) (result PagedDeployedApplicationInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedCodePackageInfoList gets the list of code packages deployed on a Service Fabric node for the given +// application. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceManifestName - the name of a service manifest registered as part of an application type in a Service +// Fabric cluster. +// codePackageName - the name of code package specified in service manifest registered as part of an +// application type in a Service Fabric cluster. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedCodePackageInfoList(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, timeout *int64) (result ListDeployedCodePackageInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedCodePackageInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedCodePackageInfoList", err.Error()) + } + + req, err := client.GetDeployedCodePackageInfoListPreparer(ctx, nodeName, applicationID, serviceManifestName, codePackageName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedCodePackageInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedCodePackageInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedCodePackageInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedCodePackageInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedCodePackageInfoList", resp, "Failure responding to request") + } + + return +} + +// GetDeployedCodePackageInfoListPreparer prepares the GetDeployedCodePackageInfoList request. +func (client BaseClient) GetDeployedCodePackageInfoListPreparer(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(serviceManifestName) > 0 { + queryParameters["ServiceManifestName"] = autorest.Encode("query", serviceManifestName) + } + if len(codePackageName) > 0 { + queryParameters["CodePackageName"] = autorest.Encode("query", codePackageName) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedCodePackageInfoListSender sends the GetDeployedCodePackageInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedCodePackageInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedCodePackageInfoListResponder handles the response to the GetDeployedCodePackageInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedCodePackageInfoListResponder(resp *http.Response) (result ListDeployedCodePackageInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServicePackageHealth gets the information about health of a service package for a specific application +// deployed on a Service Fabric node. Use EventsHealthStateFilter to optionally filter for the collection of +// HealthEvent objects reported on the deployed service package based on health state. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// servicePackageName - the name of the service package. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServicePackageHealth(ctx context.Context, nodeName string, applicationID string, servicePackageName string, eventsHealthStateFilter *int32, timeout *int64) (result DeployedServicePackageHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServicePackageHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealth", err.Error()) + } + + req, err := client.GetDeployedServicePackageHealthPreparer(ctx, nodeName, applicationID, servicePackageName, eventsHealthStateFilter, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServicePackageHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageHealth", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServicePackageHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageHealth", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServicePackageHealthPreparer prepares the GetDeployedServicePackageHealth request. +func (client BaseClient) GetDeployedServicePackageHealthPreparer(ctx context.Context, nodeName string, applicationID string, servicePackageName string, eventsHealthStateFilter *int32, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + "servicePackageName": servicePackageName, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServicePackageHealthSender sends the GetDeployedServicePackageHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServicePackageHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServicePackageHealthResponder handles the response to the GetDeployedServicePackageHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServicePackageHealthResponder(resp *http.Response) (result DeployedServicePackageHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServicePackageHealthUsingPolicy gets the information about health of a service package for a specific +// application deployed on a Service Fabric node. using the specified policy. Use EventsHealthStateFilter to optionally +// filter for the collection of HealthEvent objects reported on the deployed service package based on health state. Use +// ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only uses +// 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while evaluating +// the health of the deployed service package. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// servicePackageName - the name of the service package. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// applicationHealthPolicy - describes the health policies used to evaluate the health of an application or one +// of its children. +// If not present, the health evaluation uses the health policy from application manifest or the default health +// policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServicePackageHealthUsingPolicy(ctx context.Context, nodeName string, applicationID string, servicePackageName string, eventsHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, timeout *int64) (result DeployedServicePackageHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServicePackageHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", err.Error()) + } + + req, err := client.GetDeployedServicePackageHealthUsingPolicyPreparer(ctx, nodeName, applicationID, servicePackageName, eventsHealthStateFilter, applicationHealthPolicy, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServicePackageHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServicePackageHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServicePackageHealthUsingPolicyPreparer prepares the GetDeployedServicePackageHealthUsingPolicy request. +func (client BaseClient) GetDeployedServicePackageHealthUsingPolicyPreparer(ctx context.Context, nodeName string, applicationID string, servicePackageName string, eventsHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + "servicePackageName": servicePackageName, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if applicationHealthPolicy != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(applicationHealthPolicy)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServicePackageHealthUsingPolicySender sends the GetDeployedServicePackageHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServicePackageHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServicePackageHealthUsingPolicyResponder handles the response to the GetDeployedServicePackageHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServicePackageHealthUsingPolicyResponder(resp *http.Response) (result DeployedServicePackageHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServicePackageInfoList returns the information about the service packages deployed on a Service Fabric +// node for the given application. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServicePackageInfoList(ctx context.Context, nodeName string, applicationID string, timeout *int64) (result ListDeployedServicePackageInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServicePackageInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoList", err.Error()) + } + + req, err := client.GetDeployedServicePackageInfoListPreparer(ctx, nodeName, applicationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServicePackageInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServicePackageInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageInfoList", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServicePackageInfoListPreparer prepares the GetDeployedServicePackageInfoList request. +func (client BaseClient) GetDeployedServicePackageInfoListPreparer(ctx context.Context, nodeName string, applicationID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServicePackageInfoListSender sends the GetDeployedServicePackageInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServicePackageInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServicePackageInfoListResponder handles the response to the GetDeployedServicePackageInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServicePackageInfoListResponder(resp *http.Response) (result ListDeployedServicePackageInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServicePackageInfoListByName returns the information about the service packages deployed on a Service +// Fabric node for the given application. These results are of service packages whose name match exactly the service +// package name specified as the parameter. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// servicePackageName - the name of the service package. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServicePackageInfoListByName(ctx context.Context, nodeName string, applicationID string, servicePackageName string, timeout *int64) (result ListDeployedServicePackageInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServicePackageInfoListByName") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", err.Error()) + } + + req, err := client.GetDeployedServicePackageInfoListByNamePreparer(ctx, nodeName, applicationID, servicePackageName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServicePackageInfoListByNameSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServicePackageInfoListByNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServicePackageInfoListByName", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServicePackageInfoListByNamePreparer prepares the GetDeployedServicePackageInfoListByName request. +func (client BaseClient) GetDeployedServicePackageInfoListByNamePreparer(ctx context.Context, nodeName string, applicationID string, servicePackageName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + "servicePackageName": servicePackageName, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServicePackageInfoListByNameSender sends the GetDeployedServicePackageInfoListByName request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServicePackageInfoListByNameSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServicePackageInfoListByNameResponder handles the response to the GetDeployedServicePackageInfoListByName request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServicePackageInfoListByNameResponder(resp *http.Response) (result ListDeployedServicePackageInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServiceReplicaDetailInfo gets the details of the replica deployed on a Service Fabric node. The +// information includes service kind, service name, current service operation, current service operation start date +// time, partition ID, replica/instance ID, reported load, and other information. +// Parameters: +// nodeName - the name of the node. +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServiceReplicaDetailInfo(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, timeout *int64) (result DeployedServiceReplicaDetailInfoModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServiceReplicaDetailInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", err.Error()) + } + + req, err := client.GetDeployedServiceReplicaDetailInfoPreparer(ctx, nodeName, partitionID, replicaID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServiceReplicaDetailInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServiceReplicaDetailInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfo", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServiceReplicaDetailInfoPreparer prepares the GetDeployedServiceReplicaDetailInfo request. +func (client BaseClient) GetDeployedServiceReplicaDetailInfoPreparer(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetDetail", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServiceReplicaDetailInfoSender sends the GetDeployedServiceReplicaDetailInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServiceReplicaDetailInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServiceReplicaDetailInfoResponder handles the response to the GetDeployedServiceReplicaDetailInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServiceReplicaDetailInfoResponder(resp *http.Response) (result DeployedServiceReplicaDetailInfoModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServiceReplicaDetailInfoByPartitionID gets the details of the replica deployed on a Service Fabric node. +// The information includes service kind, service name, current service operation, current service operation start date +// time, partition ID, replica/instance ID, reported load, and other information. +// Parameters: +// nodeName - the name of the node. +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionID(ctx context.Context, nodeName string, partitionID uuid.UUID, timeout *int64) (result DeployedServiceReplicaDetailInfoModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServiceReplicaDetailInfoByPartitionID") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", err.Error()) + } + + req, err := client.GetDeployedServiceReplicaDetailInfoByPartitionIDPreparer(ctx, nodeName, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServiceReplicaDetailInfoByPartitionIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServiceReplicaDetailInfoByPartitionIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaDetailInfoByPartitionID", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServiceReplicaDetailInfoByPartitionIDPreparer prepares the GetDeployedServiceReplicaDetailInfoByPartitionID request. +func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionIDPreparer(ctx context.Context, nodeName string, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServiceReplicaDetailInfoByPartitionIDSender sends the GetDeployedServiceReplicaDetailInfoByPartitionID request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionIDSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServiceReplicaDetailInfoByPartitionIDResponder handles the response to the GetDeployedServiceReplicaDetailInfoByPartitionID request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServiceReplicaDetailInfoByPartitionIDResponder(resp *http.Response) (result DeployedServiceReplicaDetailInfoModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServiceReplicaInfoList gets the list containing the information about replicas deployed on a Service +// Fabric node. The information include partition ID, replica ID, status of the replica, name of the service, name of +// the service type, and other information. Use PartitionId or ServiceManifestName query parameters to return +// information about the deployed replicas matching the specified values for those parameters. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// partitionID - the identity of the partition. +// serviceManifestName - the name of a service manifest registered as part of an application type in a Service +// Fabric cluster. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServiceReplicaInfoList(ctx context.Context, nodeName string, applicationID string, partitionID *uuid.UUID, serviceManifestName string, timeout *int64) (result ListDeployedServiceReplicaInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServiceReplicaInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", err.Error()) + } + + req, err := client.GetDeployedServiceReplicaInfoListPreparer(ctx, nodeName, applicationID, partitionID, serviceManifestName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServiceReplicaInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServiceReplicaInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceReplicaInfoList", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServiceReplicaInfoListPreparer prepares the GetDeployedServiceReplicaInfoList request. +func (client BaseClient) GetDeployedServiceReplicaInfoListPreparer(ctx context.Context, nodeName string, applicationID string, partitionID *uuid.UUID, serviceManifestName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if partitionID != nil { + queryParameters["PartitionId"] = autorest.Encode("query", *partitionID) + } + if len(serviceManifestName) > 0 { + queryParameters["ServiceManifestName"] = autorest.Encode("query", serviceManifestName) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetReplicas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServiceReplicaInfoListSender sends the GetDeployedServiceReplicaInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServiceReplicaInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServiceReplicaInfoListResponder handles the response to the GetDeployedServiceReplicaInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServiceReplicaInfoListResponder(resp *http.Response) (result ListDeployedServiceReplicaInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServiceTypeInfoByName gets the list containing the information about a specific service type from the +// applications deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its +// registration status, the code package that registered it and activation ID of the service package. Each entry +// represents one activation of a service type, differentiated by the activation ID. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceTypeName - specifies the name of a Service Fabric service type. +// serviceManifestName - the name of the service manifest to filter the list of deployed service type +// information. If specified, the response will only contain the information about service types that are +// defined in this service manifest. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServiceTypeInfoByName(ctx context.Context, nodeName string, applicationID string, serviceTypeName string, serviceManifestName string, timeout *int64) (result ListDeployedServiceTypeInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServiceTypeInfoByName") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", err.Error()) + } + + req, err := client.GetDeployedServiceTypeInfoByNamePreparer(ctx, nodeName, applicationID, serviceTypeName, serviceManifestName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServiceTypeInfoByNameSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServiceTypeInfoByNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceTypeInfoByName", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServiceTypeInfoByNamePreparer prepares the GetDeployedServiceTypeInfoByName request. +func (client BaseClient) GetDeployedServiceTypeInfoByNamePreparer(ctx context.Context, nodeName string, applicationID string, serviceTypeName string, serviceManifestName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + "serviceTypeName": serviceTypeName, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(serviceManifestName) > 0 { + queryParameters["ServiceManifestName"] = autorest.Encode("query", serviceManifestName) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes/{serviceTypeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServiceTypeInfoByNameSender sends the GetDeployedServiceTypeInfoByName request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServiceTypeInfoByNameSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServiceTypeInfoByNameResponder handles the response to the GetDeployedServiceTypeInfoByName request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServiceTypeInfoByNameResponder(resp *http.Response) (result ListDeployedServiceTypeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployedServiceTypeInfoList gets the list containing the information about service types from the applications +// deployed on a node in a Service Fabric cluster. The response includes the name of the service type, its registration +// status, the code package that registered it and activation ID of the service package. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceManifestName - the name of the service manifest to filter the list of deployed service type +// information. If specified, the response will only contain the information about service types that are +// defined in this service manifest. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetDeployedServiceTypeInfoList(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, timeout *int64) (result ListDeployedServiceTypeInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeployedServiceTypeInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", err.Error()) + } + + req, err := client.GetDeployedServiceTypeInfoListPreparer(ctx, nodeName, applicationID, serviceManifestName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeployedServiceTypeInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetDeployedServiceTypeInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetDeployedServiceTypeInfoList", resp, "Failure responding to request") + } + + return +} + +// GetDeployedServiceTypeInfoListPreparer prepares the GetDeployedServiceTypeInfoList request. +func (client BaseClient) GetDeployedServiceTypeInfoListPreparer(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(serviceManifestName) > 0 { + queryParameters["ServiceManifestName"] = autorest.Encode("query", serviceManifestName) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServiceTypes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetDeployedServiceTypeInfoListSender sends the GetDeployedServiceTypeInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetDeployedServiceTypeInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetDeployedServiceTypeInfoListResponder handles the response to the GetDeployedServiceTypeInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetDeployedServiceTypeInfoListResponder(resp *http.Response) (result ListDeployedServiceTypeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFaultOperationList gets the list of user-induced fault operations filtered by provided input. +// Parameters: +// typeFilter - used to filter on OperationType for user-induced operations. +// +// - 65535 - select all +// - 1 - select PartitionDataLoss. +// - 2 - select PartitionQuorumLoss. +// - 4 - select PartitionRestart. +// - 8 - select NodeTransition. +// stateFilter - used to filter on OperationState's for user-induced operations. +// +// - 65535 - select All +// - 1 - select Running +// - 2 - select RollingBack +// - 8 - select Completed +// - 16 - select Faulted +// - 32 - select Cancelled +// - 64 - select ForceCancelled +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetFaultOperationList(ctx context.Context, typeFilter int32, stateFilter int32, timeout *int64) (result ListOperationStatus, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetFaultOperationList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetFaultOperationList", err.Error()) + } + + req, err := client.GetFaultOperationListPreparer(ctx, typeFilter, stateFilter, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetFaultOperationList", nil, "Failure preparing request") + return + } + + resp, err := client.GetFaultOperationListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetFaultOperationList", resp, "Failure sending request") + return + } + + result, err = client.GetFaultOperationListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetFaultOperationList", resp, "Failure responding to request") + } + + return +} + +// GetFaultOperationListPreparer prepares the GetFaultOperationList request. +func (client BaseClient) GetFaultOperationListPreparer(ctx context.Context, typeFilter int32, stateFilter int32, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "StateFilter": autorest.Encode("query", stateFilter), + "TypeFilter": autorest.Encode("query", typeFilter), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Faults/"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetFaultOperationListSender sends the GetFaultOperationList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetFaultOperationListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetFaultOperationListResponder handles the response to the GetFaultOperationList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetFaultOperationListResponder(resp *http.Response) (result ListOperationStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetImageStoreContent returns the information about the image store content at the specified contentPath. The +// contentPath is relative to the root of the image store. +// Parameters: +// contentPath - relative path to file or folder in the image store from its root. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetImageStoreContent(ctx context.Context, contentPath string, timeout *int64) (result ImageStoreContent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetImageStoreContent") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreContent", err.Error()) + } + + req, err := client.GetImageStoreContentPreparer(ctx, contentPath, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreContent", nil, "Failure preparing request") + return + } + + resp, err := client.GetImageStoreContentSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreContent", resp, "Failure sending request") + return + } + + result, err = client.GetImageStoreContentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreContent", resp, "Failure responding to request") + } + + return +} + +// GetImageStoreContentPreparer prepares the GetImageStoreContent request. +func (client BaseClient) GetImageStoreContentPreparer(ctx context.Context, contentPath string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "contentPath": autorest.Encode("path", contentPath), + } + + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ImageStore/{contentPath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetImageStoreContentSender sends the GetImageStoreContent request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetImageStoreContentSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetImageStoreContentResponder handles the response to the GetImageStoreContent request. The method always +// closes the http.Response Body. +func (client BaseClient) GetImageStoreContentResponder(resp *http.Response) (result ImageStoreContent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetImageStoreFolderSize gets the total size of file under a image store folder, specified by contentPath. The +// contentPath is relative to the root of the image store. +// Parameters: +// contentPath - relative path to file or folder in the image store from its root. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetImageStoreFolderSize(ctx context.Context, contentPath string, timeout *int64) (result FolderSizeInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetImageStoreFolderSize") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreFolderSize", err.Error()) + } + + req, err := client.GetImageStoreFolderSizePreparer(ctx, contentPath, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreFolderSize", nil, "Failure preparing request") + return + } + + resp, err := client.GetImageStoreFolderSizeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreFolderSize", resp, "Failure sending request") + return + } + + result, err = client.GetImageStoreFolderSizeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreFolderSize", resp, "Failure responding to request") + } + + return +} + +// GetImageStoreFolderSizePreparer prepares the GetImageStoreFolderSize request. +func (client BaseClient) GetImageStoreFolderSizePreparer(ctx context.Context, contentPath string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "contentPath": autorest.Encode("path", contentPath), + } + + const APIVersion = "6.5" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ImageStore/{contentPath}/$/FolderSize", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetImageStoreFolderSizeSender sends the GetImageStoreFolderSize request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetImageStoreFolderSizeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetImageStoreFolderSizeResponder handles the response to the GetImageStoreFolderSize request. The method always +// closes the http.Response Body. +func (client BaseClient) GetImageStoreFolderSizeResponder(resp *http.Response) (result FolderSizeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetImageStoreInfo returns information about the primary ImageStore replica, such as disk capacity and available disk +// space at the node it is on, and several categories of the ImageStore's file system usage. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetImageStoreInfo(ctx context.Context, timeout *int64) (result ImageStoreInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetImageStoreInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreInfo", err.Error()) + } + + req, err := client.GetImageStoreInfoPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetImageStoreInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreInfo", resp, "Failure sending request") + return + } + + result, err = client.GetImageStoreInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreInfo", resp, "Failure responding to request") + } + + return +} + +// GetImageStoreInfoPreparer prepares the GetImageStoreInfo request. +func (client BaseClient) GetImageStoreInfoPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.5" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ImageStore/$/Info"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetImageStoreInfoSender sends the GetImageStoreInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetImageStoreInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetImageStoreInfoResponder handles the response to the GetImageStoreInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetImageStoreInfoResponder(resp *http.Response) (result ImageStoreInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetImageStoreRootContent returns the information about the image store content at the root of the image store. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetImageStoreRootContent(ctx context.Context, timeout *int64) (result ImageStoreContent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetImageStoreRootContent") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreRootContent", err.Error()) + } + + req, err := client.GetImageStoreRootContentPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreRootContent", nil, "Failure preparing request") + return + } + + resp, err := client.GetImageStoreRootContentSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreRootContent", resp, "Failure sending request") + return + } + + result, err = client.GetImageStoreRootContentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreRootContent", resp, "Failure responding to request") + } + + return +} + +// GetImageStoreRootContentPreparer prepares the GetImageStoreRootContent request. +func (client BaseClient) GetImageStoreRootContentPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ImageStore"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetImageStoreRootContentSender sends the GetImageStoreRootContent request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetImageStoreRootContentSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetImageStoreRootContentResponder handles the response to the GetImageStoreRootContent request. The method always +// closes the http.Response Body. +func (client BaseClient) GetImageStoreRootContentResponder(resp *http.Response) (result ImageStoreContent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetImageStoreRootFolderSize returns the total size of files at the root and children folders in image store. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetImageStoreRootFolderSize(ctx context.Context, timeout *int64) (result FolderSizeInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetImageStoreRootFolderSize") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreRootFolderSize", err.Error()) + } + + req, err := client.GetImageStoreRootFolderSizePreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreRootFolderSize", nil, "Failure preparing request") + return + } + + resp, err := client.GetImageStoreRootFolderSizeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreRootFolderSize", resp, "Failure sending request") + return + } + + result, err = client.GetImageStoreRootFolderSizeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreRootFolderSize", resp, "Failure responding to request") + } + + return +} + +// GetImageStoreRootFolderSizePreparer prepares the GetImageStoreRootFolderSize request. +func (client BaseClient) GetImageStoreRootFolderSizePreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.5" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ImageStore/$/FolderSize"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetImageStoreRootFolderSizeSender sends the GetImageStoreRootFolderSize request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetImageStoreRootFolderSizeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetImageStoreRootFolderSizeResponder handles the response to the GetImageStoreRootFolderSize request. The method always +// closes the http.Response Body. +func (client BaseClient) GetImageStoreRootFolderSizeResponder(resp *http.Response) (result FolderSizeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetImageStoreUploadSessionByID gets the image store upload session identified by the given ID. User can query the +// upload session at any time during uploading. +// Parameters: +// sessionID - a GUID generated by the user for a file uploading. It identifies an image store upload session +// which keeps track of all file chunks until it is committed. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetImageStoreUploadSessionByID(ctx context.Context, sessionID uuid.UUID, timeout *int64) (result UploadSession, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetImageStoreUploadSessionByID") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByID", err.Error()) + } + + req, err := client.GetImageStoreUploadSessionByIDPreparer(ctx, sessionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreUploadSessionByID", nil, "Failure preparing request") + return + } + + resp, err := client.GetImageStoreUploadSessionByIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreUploadSessionByID", resp, "Failure sending request") + return + } + + result, err = client.GetImageStoreUploadSessionByIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreUploadSessionByID", resp, "Failure responding to request") + } + + return +} + +// GetImageStoreUploadSessionByIDPreparer prepares the GetImageStoreUploadSessionByID request. +func (client BaseClient) GetImageStoreUploadSessionByIDPreparer(ctx context.Context, sessionID uuid.UUID, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "session-id": autorest.Encode("query", sessionID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ImageStore/$/GetUploadSession"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetImageStoreUploadSessionByIDSender sends the GetImageStoreUploadSessionByID request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetImageStoreUploadSessionByIDSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetImageStoreUploadSessionByIDResponder handles the response to the GetImageStoreUploadSessionByID request. The method always +// closes the http.Response Body. +func (client BaseClient) GetImageStoreUploadSessionByIDResponder(resp *http.Response) (result UploadSession, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetImageStoreUploadSessionByPath gets the image store upload session associated with the given image store relative +// path. User can query the upload session at any time during uploading. +// Parameters: +// contentPath - relative path to file or folder in the image store from its root. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetImageStoreUploadSessionByPath(ctx context.Context, contentPath string, timeout *int64) (result UploadSession, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetImageStoreUploadSessionByPath") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", err.Error()) + } + + req, err := client.GetImageStoreUploadSessionByPathPreparer(ctx, contentPath, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", nil, "Failure preparing request") + return + } + + resp, err := client.GetImageStoreUploadSessionByPathSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", resp, "Failure sending request") + return + } + + result, err = client.GetImageStoreUploadSessionByPathResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetImageStoreUploadSessionByPath", resp, "Failure responding to request") + } + + return +} + +// GetImageStoreUploadSessionByPathPreparer prepares the GetImageStoreUploadSessionByPath request. +func (client BaseClient) GetImageStoreUploadSessionByPathPreparer(ctx context.Context, contentPath string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "contentPath": autorest.Encode("path", contentPath), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ImageStore/{contentPath}/$/GetUploadSession", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetImageStoreUploadSessionByPathSender sends the GetImageStoreUploadSessionByPath request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetImageStoreUploadSessionByPathSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetImageStoreUploadSessionByPathResponder handles the response to the GetImageStoreUploadSessionByPath request. The method always +// closes the http.Response Body. +func (client BaseClient) GetImageStoreUploadSessionByPathResponder(resp *http.Response) (result UploadSession, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNameExistsInfo returns whether the specified Service Fabric name exists. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetNameExistsInfo(ctx context.Context, nameID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNameExistsInfo") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNameExistsInfo", err.Error()) + } + + req, err := client.GetNameExistsInfoPreparer(ctx, nameID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNameExistsInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetNameExistsInfoSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNameExistsInfo", resp, "Failure sending request") + return + } + + result, err = client.GetNameExistsInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNameExistsInfo", resp, "Failure responding to request") + } + + return +} + +// GetNameExistsInfoPreparer prepares the GetNameExistsInfo request. +func (client BaseClient) GetNameExistsInfoPreparer(ctx context.Context, nameID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNameExistsInfoSender sends the GetNameExistsInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNameExistsInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNameExistsInfoResponder handles the response to the GetNameExistsInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNameExistsInfoResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// GetNodeEventList the response is list of NodeEvent objects. +// Parameters: +// nodeName - the name of the node. +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetNodeEventList(ctx context.Context, nodeName string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListNodeEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodeEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodeEventList", err.Error()) + } + + req, err := client.GetNodeEventListPreparer(ctx, nodeName, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodeEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeEventList", resp, "Failure sending request") + return + } + + result, err = client.GetNodeEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeEventList", resp, "Failure responding to request") + } + + return +} + +// GetNodeEventListPreparer prepares the GetNodeEventList request. +func (client BaseClient) GetNodeEventListPreparer(ctx context.Context, nodeName string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/EventsStore/Nodes/{nodeName}/$/Events", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodeEventListSender sends the GetNodeEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodeEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodeEventListResponder handles the response to the GetNodeEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodeEventListResponder(resp *http.Response) (result ListNodeEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNodeHealth gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the collection of +// health events reported on the node based on the health state. If the node that you specify by name does not exist in +// the health store, this returns an error. +// Parameters: +// nodeName - the name of the node. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetNodeHealth(ctx context.Context, nodeName string, eventsHealthStateFilter *int32, timeout *int64) (result NodeHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodeHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealth", err.Error()) + } + + req, err := client.GetNodeHealthPreparer(ctx, nodeName, eventsHealthStateFilter, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodeHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeHealth", resp, "Failure sending request") + return + } + + result, err = client.GetNodeHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeHealth", resp, "Failure responding to request") + } + + return +} + +// GetNodeHealthPreparer prepares the GetNodeHealth request. +func (client BaseClient) GetNodeHealthPreparer(ctx context.Context, nodeName string, eventsHealthStateFilter *int32, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodeHealthSender sends the GetNodeHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodeHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodeHealthResponder handles the response to the GetNodeHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodeHealthResponder(resp *http.Response) (result NodeHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNodeHealthUsingPolicy gets the health of a Service Fabric node. Use EventsHealthStateFilter to filter the +// collection of health events reported on the node based on the health state. Use ClusterHealthPolicy in the POST body +// to override the health policies used to evaluate the health. If the node that you specify by name does not exist in +// the health store, this returns an error. +// Parameters: +// nodeName - the name of the node. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// clusterHealthPolicy - describes the health policies used to evaluate the health of a cluster or node. If not +// present, the health evaluation uses the health policy from cluster manifest or the default health policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetNodeHealthUsingPolicy(ctx context.Context, nodeName string, eventsHealthStateFilter *int32, clusterHealthPolicy *ClusterHealthPolicy, timeout *int64) (result NodeHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodeHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodeHealthUsingPolicy", err.Error()) + } + + req, err := client.GetNodeHealthUsingPolicyPreparer(ctx, nodeName, eventsHealthStateFilter, clusterHealthPolicy, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodeHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetNodeHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetNodeHealthUsingPolicyPreparer prepares the GetNodeHealthUsingPolicy request. +func (client BaseClient) GetNodeHealthUsingPolicyPreparer(ctx context.Context, nodeName string, eventsHealthStateFilter *int32, clusterHealthPolicy *ClusterHealthPolicy, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if clusterHealthPolicy != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(clusterHealthPolicy)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodeHealthUsingPolicySender sends the GetNodeHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodeHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodeHealthUsingPolicyResponder handles the response to the GetNodeHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodeHealthUsingPolicyResponder(resp *http.Response) (result NodeHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNodeInfo the response includes the name, status, ID, health, uptime, and other details about the node. +// Parameters: +// nodeName - the name of the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetNodeInfo(ctx context.Context, nodeName string, timeout *int64) (result NodeInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodeInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfo", err.Error()) + } + + req, err := client.GetNodeInfoPreparer(ctx, nodeName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodeInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeInfo", resp, "Failure sending request") + return + } + + result, err = client.GetNodeInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeInfo", resp, "Failure responding to request") + } + + return +} + +// GetNodeInfoPreparer prepares the GetNodeInfo request. +func (client BaseClient) GetNodeInfoPreparer(ctx context.Context, nodeName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodeInfoSender sends the GetNodeInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodeInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodeInfoResponder handles the response to the GetNodeInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodeInfoResponder(resp *http.Response) (result NodeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNodeInfoList the response includes the name, status, ID, health, uptime, and other details about the nodes. +// Parameters: +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// nodeStatusFilter - allows filtering the nodes based on the NodeStatus. Only the nodes that are matching the +// specified filter value will be returned. The filter value can be one of the following. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetNodeInfoList(ctx context.Context, continuationToken string, nodeStatusFilter NodeStatusFilter, maxResults *int64, timeout *int64) (result PagedNodeInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodeInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodeInfoList", err.Error()) + } + + req, err := client.GetNodeInfoListPreparer(ctx, continuationToken, nodeStatusFilter, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodeInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetNodeInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeInfoList", resp, "Failure responding to request") + } + + return +} + +// GetNodeInfoListPreparer prepares the GetNodeInfoList request. +func (client BaseClient) GetNodeInfoListPreparer(ctx context.Context, continuationToken string, nodeStatusFilter NodeStatusFilter, maxResults *int64, timeout *int64) (*http.Request, error) { + const APIVersion = "6.3" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if len(string(nodeStatusFilter)) > 0 { + queryParameters["NodeStatusFilter"] = autorest.Encode("query", nodeStatusFilter) + } else { + queryParameters["NodeStatusFilter"] = autorest.Encode("query", "default") + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Nodes"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodeInfoListSender sends the GetNodeInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodeInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodeInfoListResponder handles the response to the GetNodeInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodeInfoListResponder(resp *http.Response) (result PagedNodeInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNodeLoadInfo retrieves the load information of a Service Fabric node for all the metrics that have load or +// capacity defined. +// Parameters: +// nodeName - the name of the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetNodeLoadInfo(ctx context.Context, nodeName string, timeout *int64) (result NodeLoadInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodeLoadInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodeLoadInfo", err.Error()) + } + + req, err := client.GetNodeLoadInfoPreparer(ctx, nodeName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeLoadInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodeLoadInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeLoadInfo", resp, "Failure sending request") + return + } + + result, err = client.GetNodeLoadInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeLoadInfo", resp, "Failure responding to request") + } + + return +} + +// GetNodeLoadInfoPreparer prepares the GetNodeLoadInfo request. +func (client BaseClient) GetNodeLoadInfoPreparer(ctx context.Context, nodeName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetLoadInformation", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodeLoadInfoSender sends the GetNodeLoadInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodeLoadInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodeLoadInfoResponder handles the response to the GetNodeLoadInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodeLoadInfoResponder(resp *http.Response) (result NodeLoadInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNodesEventList the response is list of NodeEvent objects. +// Parameters: +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetNodesEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListNodeEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodesEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodesEventList", err.Error()) + } + + req, err := client.GetNodesEventListPreparer(ctx, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodesEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodesEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodesEventList", resp, "Failure sending request") + return + } + + result, err = client.GetNodesEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodesEventList", resp, "Failure responding to request") + } + + return +} + +// GetNodesEventListPreparer prepares the GetNodesEventList request. +func (client BaseClient) GetNodesEventListPreparer(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/EventsStore/Nodes/Events"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodesEventListSender sends the GetNodesEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodesEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodesEventListResponder handles the response to the GetNodesEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodesEventListResponder(resp *http.Response) (result ListNodeEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetNodeTransitionProgress gets the progress of an operation started with StartNodeTransition using the provided +// OperationId. +// Parameters: +// nodeName - the name of the node. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetNodeTransitionProgress(ctx context.Context, nodeName string, operationID uuid.UUID, timeout *int64) (result NodeTransitionProgress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetNodeTransitionProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetNodeTransitionProgress", err.Error()) + } + + req, err := client.GetNodeTransitionProgressPreparer(ctx, nodeName, operationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeTransitionProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetNodeTransitionProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeTransitionProgress", resp, "Failure sending request") + return + } + + result, err = client.GetNodeTransitionProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetNodeTransitionProgress", resp, "Failure responding to request") + } + + return +} + +// GetNodeTransitionProgressPreparer prepares the GetNodeTransitionProgress request. +func (client BaseClient) GetNodeTransitionProgressPreparer(ctx context.Context, nodeName string, operationID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "OperationId": autorest.Encode("query", operationID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Nodes/{nodeName}/$/GetTransitionProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetNodeTransitionProgressSender sends the GetNodeTransitionProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetNodeTransitionProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetNodeTransitionProgressResponder handles the response to the GetNodeTransitionProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetNodeTransitionProgressResponder(resp *http.Response) (result NodeTransitionProgress, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionBackupConfigurationInfo gets the Service Fabric Backup configuration information for the specified +// partition. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionBackupConfigurationInfo(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result PartitionBackupConfigurationInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionBackupConfigurationInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", err.Error()) + } + + req, err := client.GetPartitionBackupConfigurationInfoPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionBackupConfigurationInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionBackupConfigurationInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupConfigurationInfo", resp, "Failure responding to request") + } + + return +} + +// GetPartitionBackupConfigurationInfoPreparer prepares the GetPartitionBackupConfigurationInfo request. +func (client BaseClient) GetPartitionBackupConfigurationInfoPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetBackupConfigurationInfo", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionBackupConfigurationInfoSender sends the GetPartitionBackupConfigurationInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionBackupConfigurationInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionBackupConfigurationInfoResponder handles the response to the GetPartitionBackupConfigurationInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionBackupConfigurationInfoResponder(resp *http.Response) (result PartitionBackupConfigurationInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionBackupList returns a list of backups available for the specified partition. The server enumerates all +// the backups available in the backup store configured in the backup policy. It also allows filtering of the result +// based on start and end datetime or just fetching the latest available backup for the partition. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// latest - specifies whether to get only the most recent backup available for a partition for the specified +// time range. +// startDateTimeFilter - specify the start date time from which to enumerate backups, in datetime format. The +// date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups +// from the beginning are enumerated. +// endDateTimeFilter - specify the end date time till which to enumerate backups, in datetime format. The date +// time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is +// done till the most recent backup. +func (client BaseClient) GetPartitionBackupList(ctx context.Context, partitionID uuid.UUID, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time) (result PagedBackupInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionBackupList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupList", err.Error()) + } + + req, err := client.GetPartitionBackupListPreparer(ctx, partitionID, timeout, latest, startDateTimeFilter, endDateTimeFilter) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupList", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionBackupListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupList", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionBackupListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupList", resp, "Failure responding to request") + } + + return +} + +// GetPartitionBackupListPreparer prepares the GetPartitionBackupList request. +func (client BaseClient) GetPartitionBackupListPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if latest != nil { + queryParameters["Latest"] = autorest.Encode("query", *latest) + } else { + queryParameters["Latest"] = autorest.Encode("query", false) + } + if startDateTimeFilter != nil { + queryParameters["StartDateTimeFilter"] = autorest.Encode("query", *startDateTimeFilter) + } + if endDateTimeFilter != nil { + queryParameters["EndDateTimeFilter"] = autorest.Encode("query", *endDateTimeFilter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetBackups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionBackupListSender sends the GetPartitionBackupList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionBackupListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionBackupListResponder handles the response to the GetPartitionBackupList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionBackupListResponder(resp *http.Response) (result PagedBackupInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionBackupProgress returns information about the state of the latest backup along with details or failure +// reason in case of completion. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionBackupProgress(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result BackupProgressInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionBackupProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionBackupProgress", err.Error()) + } + + req, err := client.GetPartitionBackupProgressPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionBackupProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupProgress", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionBackupProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionBackupProgress", resp, "Failure responding to request") + } + + return +} + +// GetPartitionBackupProgressPreparer prepares the GetPartitionBackupProgress request. +func (client BaseClient) GetPartitionBackupProgressPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetBackupProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionBackupProgressSender sends the GetPartitionBackupProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionBackupProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionBackupProgressResponder handles the response to the GetPartitionBackupProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionBackupProgressResponder(resp *http.Response) (result BackupProgressInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionEventList the response is list of PartitionEvent objects. +// Parameters: +// partitionID - the identity of the partition. +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetPartitionEventList(ctx context.Context, partitionID uuid.UUID, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListPartitionEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionEventList", err.Error()) + } + + req, err := client.GetPartitionEventListPreparer(ctx, partitionID, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionEventList", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionEventList", resp, "Failure responding to request") + } + + return +} + +// GetPartitionEventListPreparer prepares the GetPartitionEventList request. +func (client BaseClient) GetPartitionEventListPreparer(ctx context.Context, partitionID uuid.UUID, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/EventsStore/Partitions/{partitionId}/$/Events", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionEventListSender sends the GetPartitionEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionEventListResponder handles the response to the GetPartitionEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionEventListResponder(resp *http.Response) (result ListPartitionEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionHealth use EventsHealthStateFilter to filter the collection of health events reported on the service +// based on the health state. +// Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. +// If you specify a partition that does not exist in the health store, this request returns an error. +// Parameters: +// partitionID - the identity of the partition. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// replicasHealthStateFilter - allows filtering the collection of ReplicaHealthState objects on the partition. +// The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas +// that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. +// If not specified, all entries will be returned.The state values are flag-based enumeration, so the value +// could be a combination of these values obtained using bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The +// possible values for this parameter include integer value of one of the following health states. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionHealth(ctx context.Context, partitionID uuid.UUID, eventsHealthStateFilter *int32, replicasHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result PartitionHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealth", err.Error()) + } + + req, err := client.GetPartitionHealthPreparer(ctx, partitionID, eventsHealthStateFilter, replicasHealthStateFilter, excludeHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionHealth", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionHealth", resp, "Failure responding to request") + } + + return +} + +// GetPartitionHealthPreparer prepares the GetPartitionHealth request. +func (client BaseClient) GetPartitionHealthPreparer(ctx context.Context, partitionID uuid.UUID, eventsHealthStateFilter *int32, replicasHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if replicasHealthStateFilter != nil { + queryParameters["ReplicasHealthStateFilter"] = autorest.Encode("query", *replicasHealthStateFilter) + } else { + queryParameters["ReplicasHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionHealthSender sends the GetPartitionHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionHealthResponder handles the response to the GetPartitionHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionHealthResponder(resp *http.Response) (result PartitionHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionHealthUsingPolicy gets the health information of the specified partition. +// If the application health policy is specified, the health evaluation uses it to get the aggregated health state. +// If the policy is not specified, the health evaluation uses the application health policy defined in the application +// manifest, or the default health policy, if no policy is defined in the manifest. +// Use EventsHealthStateFilter to filter the collection of health events reported on the partition based on the health +// state. +// Use ReplicasHealthStateFilter to filter the collection of ReplicaHealthState objects on the partition. Use +// ApplicationHealthPolicy in the POST body to override the health policies used to evaluate the health. +// If you specify a partition that does not exist in the health store, this request returns an error. +// Parameters: +// partitionID - the identity of the partition. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// replicasHealthStateFilter - allows filtering the collection of ReplicaHealthState objects on the partition. +// The value can be obtained from members or bitwise operations on members of HealthStateFilter. Only replicas +// that match the filter will be returned. All replicas will be used to evaluate the aggregated health state. +// If not specified, all entries will be returned.The state values are flag-based enumeration, so the value +// could be a combination of these values obtained using bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) will be returned. The +// possible values for this parameter include integer value of one of the following health states. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// applicationHealthPolicy - describes the health policies used to evaluate the health of an application or one +// of its children. +// If not present, the health evaluation uses the health policy from application manifest or the default health +// policy. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionHealthUsingPolicy(ctx context.Context, partitionID uuid.UUID, eventsHealthStateFilter *int32, replicasHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (result PartitionHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", err.Error()) + } + + req, err := client.GetPartitionHealthUsingPolicyPreparer(ctx, partitionID, eventsHealthStateFilter, replicasHealthStateFilter, applicationHealthPolicy, excludeHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetPartitionHealthUsingPolicyPreparer prepares the GetPartitionHealthUsingPolicy request. +func (client BaseClient) GetPartitionHealthUsingPolicyPreparer(ctx context.Context, partitionID uuid.UUID, eventsHealthStateFilter *int32, replicasHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if replicasHealthStateFilter != nil { + queryParameters["ReplicasHealthStateFilter"] = autorest.Encode("query", *replicasHealthStateFilter) + } else { + queryParameters["ReplicasHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if applicationHealthPolicy != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(applicationHealthPolicy)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionHealthUsingPolicySender sends the GetPartitionHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionHealthUsingPolicyResponder handles the response to the GetPartitionHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionHealthUsingPolicyResponder(resp *http.Response) (result PartitionHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionInfo gets the information about the specified partition. The response includes the partition ID, +// partitioning scheme information, keys supported by the partition, status, health, and other details about the +// partition. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionInfo(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result ServicePartitionInfoModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfo", err.Error()) + } + + req, err := client.GetPartitionInfoPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionInfo", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionInfo", resp, "Failure responding to request") + } + + return +} + +// GetPartitionInfoPreparer prepares the GetPartitionInfo request. +func (client BaseClient) GetPartitionInfoPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionInfoSender sends the GetPartitionInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionInfoResponder handles the response to the GetPartitionInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionInfoResponder(resp *http.Response) (result ServicePartitionInfoModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionInfoList the response includes the partition ID, partitioning scheme information, keys supported by the +// partition, status, health, and other details about the partition. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionInfoList(ctx context.Context, serviceID string, continuationToken string, timeout *int64) (result PagedServicePartitionInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionInfoList", err.Error()) + } + + req, err := client.GetPartitionInfoListPreparer(ctx, serviceID, continuationToken, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionInfoList", resp, "Failure responding to request") + } + + return +} + +// GetPartitionInfoListPreparer prepares the GetPartitionInfoList request. +func (client BaseClient) GetPartitionInfoListPreparer(ctx context.Context, serviceID string, continuationToken string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetPartitions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionInfoListSender sends the GetPartitionInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionInfoListResponder handles the response to the GetPartitionInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionInfoListResponder(resp *http.Response) (result PagedServicePartitionInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionLoadInformation returns information about the load of a specified partition. +// The response includes a list of load reports for a Service Fabric partition. +// Each report includes the load metric name, value, and last reported time in UTC. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionLoadInformation(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result PartitionLoadInformation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionLoadInformation") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionLoadInformation", err.Error()) + } + + req, err := client.GetPartitionLoadInformationPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionLoadInformation", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionLoadInformationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionLoadInformation", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionLoadInformationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionLoadInformation", resp, "Failure responding to request") + } + + return +} + +// GetPartitionLoadInformationPreparer prepares the GetPartitionLoadInformation request. +func (client BaseClient) GetPartitionLoadInformationPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetLoadInformation", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionLoadInformationSender sends the GetPartitionLoadInformation request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionLoadInformationSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionLoadInformationResponder handles the response to the GetPartitionLoadInformation request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionLoadInformationResponder(resp *http.Response) (result PartitionLoadInformation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionReplicaEventList the response is list of ReplicaEvent objects. +// Parameters: +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetPartitionReplicaEventList(ctx context.Context, partitionID uuid.UUID, replicaID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListReplicaEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionReplicaEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicaEventList", err.Error()) + } + + req, err := client.GetPartitionReplicaEventListPreparer(ctx, partitionID, replicaID, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionReplicaEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionReplicaEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionReplicaEventList", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionReplicaEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionReplicaEventList", resp, "Failure responding to request") + } + + return +} + +// GetPartitionReplicaEventListPreparer prepares the GetPartitionReplicaEventList request. +func (client BaseClient) GetPartitionReplicaEventListPreparer(ctx context.Context, partitionID uuid.UUID, replicaID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/EventsStore/Partitions/{partitionId}/$/Replicas/{replicaId}/$/Events", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionReplicaEventListSender sends the GetPartitionReplicaEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionReplicaEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionReplicaEventListResponder handles the response to the GetPartitionReplicaEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionReplicaEventListResponder(resp *http.Response) (result ListReplicaEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionReplicasEventList the response is list of ReplicaEvent objects. +// Parameters: +// partitionID - the identity of the partition. +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetPartitionReplicasEventList(ctx context.Context, partitionID uuid.UUID, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListReplicaEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionReplicasEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionReplicasEventList", err.Error()) + } + + req, err := client.GetPartitionReplicasEventListPreparer(ctx, partitionID, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionReplicasEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionReplicasEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionReplicasEventList", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionReplicasEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionReplicasEventList", resp, "Failure responding to request") + } + + return +} + +// GetPartitionReplicasEventListPreparer prepares the GetPartitionReplicasEventList request. +func (client BaseClient) GetPartitionReplicasEventListPreparer(ctx context.Context, partitionID uuid.UUID, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/EventsStore/Partitions/{partitionId}/$/Replicas/Events", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionReplicasEventListSender sends the GetPartitionReplicasEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionReplicasEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionReplicasEventListResponder handles the response to the GetPartitionReplicasEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionReplicasEventListResponder(resp *http.Response) (result ListReplicaEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionRestartProgress gets the progress of a PartitionRestart started with StartPartitionRestart using the +// provided OperationId. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionID - the identity of the partition. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionRestartProgress(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (result PartitionRestartProgress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionRestartProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestartProgress", err.Error()) + } + + req, err := client.GetPartitionRestartProgressPreparer(ctx, serviceID, partitionID, operationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionRestartProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionRestartProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionRestartProgress", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionRestartProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionRestartProgress", resp, "Failure responding to request") + } + + return +} + +// GetPartitionRestartProgressPreparer prepares the GetPartitionRestartProgress request. +func (client BaseClient) GetPartitionRestartProgressPreparer(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "OperationId": autorest.Encode("query", operationID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetRestartProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionRestartProgressSender sends the GetPartitionRestartProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionRestartProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionRestartProgressResponder handles the response to the GetPartitionRestartProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionRestartProgressResponder(resp *http.Response) (result PartitionRestartProgress, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionRestoreProgress returns information about the state of the latest restore operation along with details +// or failure reason in case of completion. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPartitionRestoreProgress(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result RestoreProgressInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionRestoreProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionRestoreProgress", err.Error()) + } + + req, err := client.GetPartitionRestoreProgressPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionRestoreProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionRestoreProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionRestoreProgress", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionRestoreProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionRestoreProgress", resp, "Failure responding to request") + } + + return +} + +// GetPartitionRestoreProgressPreparer prepares the GetPartitionRestoreProgress request. +func (client BaseClient) GetPartitionRestoreProgressPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetRestoreProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionRestoreProgressSender sends the GetPartitionRestoreProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionRestoreProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionRestoreProgressResponder handles the response to the GetPartitionRestoreProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionRestoreProgressResponder(resp *http.Response) (result RestoreProgressInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPartitionsEventList the response is list of PartitionEvent objects. +// Parameters: +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetPartitionsEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListPartitionEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPartitionsEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPartitionsEventList", err.Error()) + } + + req, err := client.GetPartitionsEventListPreparer(ctx, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionsEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetPartitionsEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionsEventList", resp, "Failure sending request") + return + } + + result, err = client.GetPartitionsEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPartitionsEventList", resp, "Failure responding to request") + } + + return +} + +// GetPartitionsEventListPreparer prepares the GetPartitionsEventList request. +func (client BaseClient) GetPartitionsEventListPreparer(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/EventsStore/Partitions/Events"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPartitionsEventListSender sends the GetPartitionsEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPartitionsEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPartitionsEventListResponder handles the response to the GetPartitionsEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPartitionsEventListResponder(resp *http.Response) (result ListPartitionEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPropertyInfo gets the specified Service Fabric property under a given name. This will always return both value +// and metadata. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// propertyName - specifies the name of the property to get. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPropertyInfo(ctx context.Context, nameID string, propertyName string, timeout *int64) (result PropertyInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPropertyInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfo", err.Error()) + } + + req, err := client.GetPropertyInfoPreparer(ctx, nameID, propertyName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPropertyInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetPropertyInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPropertyInfo", resp, "Failure sending request") + return + } + + result, err = client.GetPropertyInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPropertyInfo", resp, "Failure responding to request") + } + + return +} + +// GetPropertyInfoPreparer prepares the GetPropertyInfo request. +func (client BaseClient) GetPropertyInfoPreparer(ctx context.Context, nameID string, propertyName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "PropertyName": autorest.Encode("query", propertyName), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}/$/GetProperty", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPropertyInfoSender sends the GetPropertyInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPropertyInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPropertyInfoResponder handles the response to the GetPropertyInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPropertyInfoResponder(resp *http.Response) (result PropertyInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPropertyInfoList a Service Fabric name can have one or more named properties that store custom information. This +// operation gets the information about these properties in a paged list. The information includes name, value, and +// metadata about each of the properties. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// includeValues - allows specifying whether to include the values of the properties returned. True if values +// should be returned with the metadata; False to return only property metadata. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetPropertyInfoList(ctx context.Context, nameID string, includeValues *bool, continuationToken string, timeout *int64) (result PagedPropertyInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetPropertyInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetPropertyInfoList", err.Error()) + } + + req, err := client.GetPropertyInfoListPreparer(ctx, nameID, includeValues, continuationToken, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPropertyInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetPropertyInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPropertyInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetPropertyInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetPropertyInfoList", resp, "Failure responding to request") + } + + return +} + +// GetPropertyInfoListPreparer prepares the GetPropertyInfoList request. +func (client BaseClient) GetPropertyInfoListPreparer(ctx context.Context, nameID string, includeValues *bool, continuationToken string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if includeValues != nil { + queryParameters["IncludeValues"] = autorest.Encode("query", *includeValues) + } else { + queryParameters["IncludeValues"] = autorest.Encode("query", false) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}/$/GetProperties", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetPropertyInfoListSender sends the GetPropertyInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetPropertyInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetPropertyInfoListResponder handles the response to the GetPropertyInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetPropertyInfoListResponder(resp *http.Response) (result PagedPropertyInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProvisionedFabricCodeVersionInfoList gets a list of information about fabric code versions that are provisioned +// in the cluster. The parameter CodeVersion can be used to optionally filter the output to only that particular +// version. +// Parameters: +// codeVersion - the product version of Service Fabric. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetProvisionedFabricCodeVersionInfoList(ctx context.Context, codeVersion string, timeout *int64) (result ListFabricCodeVersionInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetProvisionedFabricCodeVersionInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", err.Error()) + } + + req, err := client.GetProvisionedFabricCodeVersionInfoListPreparer(ctx, codeVersion, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetProvisionedFabricCodeVersionInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetProvisionedFabricCodeVersionInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetProvisionedFabricCodeVersionInfoList", resp, "Failure responding to request") + } + + return +} + +// GetProvisionedFabricCodeVersionInfoListPreparer prepares the GetProvisionedFabricCodeVersionInfoList request. +func (client BaseClient) GetProvisionedFabricCodeVersionInfoListPreparer(ctx context.Context, codeVersion string, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(codeVersion) > 0 { + queryParameters["CodeVersion"] = autorest.Encode("query", codeVersion) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetProvisionedCodeVersions"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetProvisionedFabricCodeVersionInfoListSender sends the GetProvisionedFabricCodeVersionInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetProvisionedFabricCodeVersionInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetProvisionedFabricCodeVersionInfoListResponder handles the response to the GetProvisionedFabricCodeVersionInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetProvisionedFabricCodeVersionInfoListResponder(resp *http.Response) (result ListFabricCodeVersionInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProvisionedFabricConfigVersionInfoList gets a list of information about fabric config versions that are +// provisioned in the cluster. The parameter ConfigVersion can be used to optionally filter the output to only that +// particular version. +// Parameters: +// configVersion - the config version of Service Fabric. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetProvisionedFabricConfigVersionInfoList(ctx context.Context, configVersion string, timeout *int64) (result ListFabricConfigVersionInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetProvisionedFabricConfigVersionInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", err.Error()) + } + + req, err := client.GetProvisionedFabricConfigVersionInfoListPreparer(ctx, configVersion, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetProvisionedFabricConfigVersionInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetProvisionedFabricConfigVersionInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetProvisionedFabricConfigVersionInfoList", resp, "Failure responding to request") + } + + return +} + +// GetProvisionedFabricConfigVersionInfoListPreparer prepares the GetProvisionedFabricConfigVersionInfoList request. +func (client BaseClient) GetProvisionedFabricConfigVersionInfoListPreparer(ctx context.Context, configVersion string, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(configVersion) > 0 { + queryParameters["ConfigVersion"] = autorest.Encode("query", configVersion) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetProvisionedConfigVersions"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetProvisionedFabricConfigVersionInfoListSender sends the GetProvisionedFabricConfigVersionInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetProvisionedFabricConfigVersionInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetProvisionedFabricConfigVersionInfoListResponder handles the response to the GetProvisionedFabricConfigVersionInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetProvisionedFabricConfigVersionInfoListResponder(resp *http.Response) (result ListFabricConfigVersionInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetQuorumLossProgress gets the progress of a quorum loss operation started with StartQuorumLoss, using the provided +// OperationId. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionID - the identity of the partition. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetQuorumLossProgress(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (result PartitionQuorumLossProgress, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetQuorumLossProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetQuorumLossProgress", err.Error()) + } + + req, err := client.GetQuorumLossProgressPreparer(ctx, serviceID, partitionID, operationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetQuorumLossProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetQuorumLossProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetQuorumLossProgress", resp, "Failure sending request") + return + } + + result, err = client.GetQuorumLossProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetQuorumLossProgress", resp, "Failure responding to request") + } + + return +} + +// GetQuorumLossProgressPreparer prepares the GetQuorumLossProgress request. +func (client BaseClient) GetQuorumLossProgressPreparer(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "OperationId": autorest.Encode("query", operationID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/GetQuorumLossProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetQuorumLossProgressSender sends the GetQuorumLossProgress request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetQuorumLossProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetQuorumLossProgressResponder handles the response to the GetQuorumLossProgress request. The method always +// closes the http.Response Body. +func (client BaseClient) GetQuorumLossProgressResponder(resp *http.Response) (result PartitionQuorumLossProgress, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetRepairTaskList this API supports the Service Fabric platform; it is not meant to be used directly from your code. +// Parameters: +// taskIDFilter - the repair task ID prefix to be matched. +// stateFilter - a bitwise-OR of the following values, specifying which task states should be included in the +// result list. +// +// - 1 - Created +// - 2 - Claimed +// - 4 - Preparing +// - 8 - Approved +// - 16 - Executing +// - 32 - Restoring +// - 64 - Completed +// executorFilter - the name of the repair executor whose claimed tasks should be included in the list. +func (client BaseClient) GetRepairTaskList(ctx context.Context, taskIDFilter string, stateFilter *int32, executorFilter string) (result ListRepairTask, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetRepairTaskList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetRepairTaskListPreparer(ctx, taskIDFilter, stateFilter, executorFilter) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetRepairTaskList", nil, "Failure preparing request") + return + } + + resp, err := client.GetRepairTaskListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetRepairTaskList", resp, "Failure sending request") + return + } + + result, err = client.GetRepairTaskListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetRepairTaskList", resp, "Failure responding to request") + } + + return +} + +// GetRepairTaskListPreparer prepares the GetRepairTaskList request. +func (client BaseClient) GetRepairTaskListPreparer(ctx context.Context, taskIDFilter string, stateFilter *int32, executorFilter string) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(taskIDFilter) > 0 { + queryParameters["TaskIdFilter"] = autorest.Encode("query", taskIDFilter) + } + if stateFilter != nil { + queryParameters["StateFilter"] = autorest.Encode("query", *stateFilter) + } + if len(executorFilter) > 0 { + queryParameters["ExecutorFilter"] = autorest.Encode("query", executorFilter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetRepairTaskList"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetRepairTaskListSender sends the GetRepairTaskList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetRepairTaskListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetRepairTaskListResponder handles the response to the GetRepairTaskList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetRepairTaskListResponder(resp *http.Response) (result ListRepairTask, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetReplicaHealth gets the health of a Service Fabric replica. +// Use EventsHealthStateFilter to filter the collection of health events reported on the replica based on the health +// state. +// Parameters: +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetReplicaHealth(ctx context.Context, partitionID uuid.UUID, replicaID string, eventsHealthStateFilter *int32, timeout *int64) (result ReplicaHealthModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetReplicaHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealth", err.Error()) + } + + req, err := client.GetReplicaHealthPreparer(ctx, partitionID, replicaID, eventsHealthStateFilter, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetReplicaHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaHealth", resp, "Failure sending request") + return + } + + result, err = client.GetReplicaHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaHealth", resp, "Failure responding to request") + } + + return +} + +// GetReplicaHealthPreparer prepares the GetReplicaHealth request. +func (client BaseClient) GetReplicaHealthPreparer(ctx context.Context, partitionID uuid.UUID, replicaID string, eventsHealthStateFilter *int32, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetReplicaHealthSender sends the GetReplicaHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetReplicaHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetReplicaHealthResponder handles the response to the GetReplicaHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetReplicaHealthResponder(resp *http.Response) (result ReplicaHealthModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetReplicaHealthUsingPolicy gets the health of a Service Fabric stateful service replica or stateless service +// instance. +// Use EventsHealthStateFilter to filter the collection of health events reported on the cluster based on the health +// state. +// Use ApplicationHealthPolicy to optionally override the health policies used to evaluate the health. This API only +// uses 'ConsiderWarningAsError' field of the ApplicationHealthPolicy. The rest of the fields are ignored while +// evaluating the health of the replica. +// Parameters: +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// applicationHealthPolicy - describes the health policies used to evaluate the health of an application or one +// of its children. +// If not present, the health evaluation uses the health policy from application manifest or the default health +// policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetReplicaHealthUsingPolicy(ctx context.Context, partitionID uuid.UUID, replicaID string, eventsHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, timeout *int64) (result ReplicaHealthModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetReplicaHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", err.Error()) + } + + req, err := client.GetReplicaHealthUsingPolicyPreparer(ctx, partitionID, replicaID, eventsHealthStateFilter, applicationHealthPolicy, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetReplicaHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetReplicaHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetReplicaHealthUsingPolicyPreparer prepares the GetReplicaHealthUsingPolicy request. +func (client BaseClient) GetReplicaHealthUsingPolicyPreparer(ctx context.Context, partitionID uuid.UUID, replicaID string, eventsHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if applicationHealthPolicy != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(applicationHealthPolicy)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetReplicaHealthUsingPolicySender sends the GetReplicaHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetReplicaHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetReplicaHealthUsingPolicyResponder handles the response to the GetReplicaHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetReplicaHealthUsingPolicyResponder(resp *http.Response) (result ReplicaHealthModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetReplicaInfo the response includes the ID, role, status, health, node name, uptime, and other details about the +// replica. +// Parameters: +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetReplicaInfo(ctx context.Context, partitionID uuid.UUID, replicaID string, timeout *int64) (result ReplicaInfoModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetReplicaInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfo", err.Error()) + } + + req, err := client.GetReplicaInfoPreparer(ctx, partitionID, replicaID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetReplicaInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaInfo", resp, "Failure sending request") + return + } + + result, err = client.GetReplicaInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaInfo", resp, "Failure responding to request") + } + + return +} + +// GetReplicaInfoPreparer prepares the GetReplicaInfo request. +func (client BaseClient) GetReplicaInfoPreparer(ctx context.Context, partitionID uuid.UUID, replicaID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetReplicas/{replicaId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetReplicaInfoSender sends the GetReplicaInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetReplicaInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetReplicaInfoResponder handles the response to the GetReplicaInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetReplicaInfoResponder(resp *http.Response) (result ReplicaInfoModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetReplicaInfoList the GetReplicas endpoint returns information about the replicas of the specified partition. The +// response includes the ID, role, status, health, node name, uptime, and other details about the replica. +// Parameters: +// partitionID - the identity of the partition. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetReplicaInfoList(ctx context.Context, partitionID uuid.UUID, continuationToken string, timeout *int64) (result PagedReplicaInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetReplicaInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetReplicaInfoList", err.Error()) + } + + req, err := client.GetReplicaInfoListPreparer(ctx, partitionID, continuationToken, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetReplicaInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetReplicaInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetReplicaInfoList", resp, "Failure responding to request") + } + + return +} + +// GetReplicaInfoListPreparer prepares the GetReplicaInfoList request. +func (client BaseClient) GetReplicaInfoListPreparer(ctx context.Context, partitionID uuid.UUID, continuationToken string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetReplicas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetReplicaInfoListSender sends the GetReplicaInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetReplicaInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetReplicaInfoListResponder handles the response to the GetReplicaInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetReplicaInfoListResponder(resp *http.Response) (result PagedReplicaInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceBackupConfigurationInfo gets the Service Fabric backup configuration information for the service and the +// partitions under this service. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceBackupConfigurationInfo(ctx context.Context, serviceID string, continuationToken string, maxResults *int64, timeout *int64) (result PagedBackupConfigurationInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceBackupConfigurationInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", err.Error()) + } + + req, err := client.GetServiceBackupConfigurationInfoPreparer(ctx, serviceID, continuationToken, maxResults, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceBackupConfigurationInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", resp, "Failure sending request") + return + } + + result, err = client.GetServiceBackupConfigurationInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceBackupConfigurationInfo", resp, "Failure responding to request") + } + + return +} + +// GetServiceBackupConfigurationInfoPreparer prepares the GetServiceBackupConfigurationInfo request. +func (client BaseClient) GetServiceBackupConfigurationInfoPreparer(ctx context.Context, serviceID string, continuationToken string, maxResults *int64, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetBackupConfigurationInfo", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceBackupConfigurationInfoSender sends the GetServiceBackupConfigurationInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceBackupConfigurationInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceBackupConfigurationInfoResponder handles the response to the GetServiceBackupConfigurationInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceBackupConfigurationInfoResponder(resp *http.Response) (result PagedBackupConfigurationInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceBackupList returns a list of backups available for every partition in this Service Fabric service. The +// server enumerates all the backups available in the backup store configured in the backup policy. It also allows +// filtering of the result based on start and end datetime or just fetching the latest available backup for every +// partition. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// latest - specifies whether to get only the most recent backup available for a partition for the specified +// time range. +// startDateTimeFilter - specify the start date time from which to enumerate backups, in datetime format. The +// date time must be specified in ISO8601 format. This is an optional parameter. If not specified, all backups +// from the beginning are enumerated. +// endDateTimeFilter - specify the end date time till which to enumerate backups, in datetime format. The date +// time must be specified in ISO8601 format. This is an optional parameter. If not specified, enumeration is +// done till the most recent backup. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// maxResults - the maximum number of results to be returned as part of the paged queries. This parameter +// defines the upper bound on the number of results returned. The results returned can be less than the +// specified maximum results if they do not fit in the message as per the max message size restrictions defined +// in the configuration. If this parameter is zero or not specified, the paged query includes as many results +// as possible that fit in the return message. +func (client BaseClient) GetServiceBackupList(ctx context.Context, serviceID string, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time, continuationToken string, maxResults *int64) (result PagedBackupInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceBackupList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}, + {TargetValue: maxResults, + Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceBackupList", err.Error()) + } + + req, err := client.GetServiceBackupListPreparer(ctx, serviceID, timeout, latest, startDateTimeFilter, endDateTimeFilter, continuationToken, maxResults) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceBackupList", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceBackupListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceBackupList", resp, "Failure sending request") + return + } + + result, err = client.GetServiceBackupListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceBackupList", resp, "Failure responding to request") + } + + return +} + +// GetServiceBackupListPreparer prepares the GetServiceBackupList request. +func (client BaseClient) GetServiceBackupListPreparer(ctx context.Context, serviceID string, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time, continuationToken string, maxResults *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if latest != nil { + queryParameters["Latest"] = autorest.Encode("query", *latest) + } else { + queryParameters["Latest"] = autorest.Encode("query", false) + } + if startDateTimeFilter != nil { + queryParameters["StartDateTimeFilter"] = autorest.Encode("query", *startDateTimeFilter) + } + if endDateTimeFilter != nil { + queryParameters["EndDateTimeFilter"] = autorest.Encode("query", *endDateTimeFilter) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if maxResults != nil { + queryParameters["MaxResults"] = autorest.Encode("query", *maxResults) + } else { + queryParameters["MaxResults"] = autorest.Encode("query", 0) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetBackups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceBackupListSender sends the GetServiceBackupList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceBackupListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceBackupListResponder handles the response to the GetServiceBackupList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceBackupListResponder(resp *http.Response) (result PagedBackupInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceDescription gets the description of an existing Service Fabric service. A service must be created before +// its description can be obtained. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceDescription(ctx context.Context, serviceID string, timeout *int64) (result ServiceDescriptionModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceDescription") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceDescription", err.Error()) + } + + req, err := client.GetServiceDescriptionPreparer(ctx, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceDescription", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceDescriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceDescription", resp, "Failure sending request") + return + } + + result, err = client.GetServiceDescriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceDescription", resp, "Failure responding to request") + } + + return +} + +// GetServiceDescriptionPreparer prepares the GetServiceDescription request. +func (client BaseClient) GetServiceDescriptionPreparer(ctx context.Context, serviceID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetDescription", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceDescriptionSender sends the GetServiceDescription request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceDescriptionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceDescriptionResponder handles the response to the GetServiceDescription request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceDescriptionResponder(resp *http.Response) (result ServiceDescriptionModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceEventList the response is list of ServiceEvent objects. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetServiceEventList(ctx context.Context, serviceID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListServiceEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceEventList", err.Error()) + } + + req, err := client.GetServiceEventListPreparer(ctx, serviceID, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceEventList", resp, "Failure sending request") + return + } + + result, err = client.GetServiceEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceEventList", resp, "Failure responding to request") + } + + return +} + +// GetServiceEventListPreparer prepares the GetServiceEventList request. +func (client BaseClient) GetServiceEventListPreparer(ctx context.Context, serviceID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/EventsStore/Services/{serviceId}/$/Events", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceEventListSender sends the GetServiceEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceEventListResponder handles the response to the GetServiceEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceEventListResponder(resp *http.Response) (result ListServiceEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceHealth gets the health information of the specified service. +// Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health +// state. +// Use PartitionsHealthStateFilter to filter the collection of partitions returned. +// If you specify a service that does not exist in the health store, this request returns an error. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// partitionsHealthStateFilter - allows filtering of the partitions health state objects returned in the result +// of service health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. +// Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated +// health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these value +// obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of +// partitions with HealthState value of OK (2) and Warning (4) will be returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceHealth(ctx context.Context, serviceID string, eventsHealthStateFilter *int32, partitionsHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result ServiceHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceHealth") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealth", err.Error()) + } + + req, err := client.GetServiceHealthPreparer(ctx, serviceID, eventsHealthStateFilter, partitionsHealthStateFilter, excludeHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceHealth", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceHealthSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceHealth", resp, "Failure sending request") + return + } + + result, err = client.GetServiceHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceHealth", resp, "Failure responding to request") + } + + return +} + +// GetServiceHealthPreparer prepares the GetServiceHealth request. +func (client BaseClient) GetServiceHealthPreparer(ctx context.Context, serviceID string, eventsHealthStateFilter *int32, partitionsHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if partitionsHealthStateFilter != nil { + queryParameters["PartitionsHealthStateFilter"] = autorest.Encode("query", *partitionsHealthStateFilter) + } else { + queryParameters["PartitionsHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceHealthSender sends the GetServiceHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceHealthResponder handles the response to the GetServiceHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceHealthResponder(resp *http.Response) (result ServiceHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceHealthUsingPolicy gets the health information of the specified service. +// If the application health policy is specified, the health evaluation uses it to get the aggregated health state. +// If the policy is not specified, the health evaluation uses the application health policy defined in the application +// manifest, or the default health policy, if no policy is defined in the manifest. +// Use EventsHealthStateFilter to filter the collection of health events reported on the service based on the health +// state. +// Use PartitionsHealthStateFilter to filter the collection of partitions returned. +// If you specify a service that does not exist in the health store, this request returns an error. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// eventsHealthStateFilter - allows filtering the collection of HealthEvent objects returned based on health +// state. +// The possible values for this parameter include integer value of one of the following health states. +// Only events that match the filter are returned. All events are used to evaluate the aggregated health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these values, obtained using the bitwise 'OR' operator. For example, If the provided +// value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// partitionsHealthStateFilter - allows filtering of the partitions health state objects returned in the result +// of service health query based on their health state. +// The possible values for this parameter include integer value of one of the following health states. +// Only partitions that match the filter are returned. All partitions are used to evaluate the aggregated +// health state. +// If not specified, all entries are returned. The state values are flag-based enumeration, so the value could +// be a combination of these value +// obtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of +// partitions with HealthState value of OK (2) and Warning (4) will be returned. +// +// - Default - Default value. Matches any HealthState. The value is zero. +// - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given +// collection of states. The value is 1. +// - Ok - Filter that matches input with HealthState value Ok. The value is 2. +// - Warning - Filter that matches input with HealthState value Warning. The value is 4. +// - Error - Filter that matches input with HealthState value Error. The value is 8. +// - All - Filter that matches input with any HealthState value. The value is 65535. +// applicationHealthPolicy - describes the health policies used to evaluate the health of an application or one +// of its children. +// If not present, the health evaluation uses the health policy from application manifest or the default health +// policy. +// excludeHealthStatistics - indicates whether the health statistics should be returned as part of the query +// result. False by default. +// The statistics show the number of children entities in health state Ok, Warning, and Error. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceHealthUsingPolicy(ctx context.Context, serviceID string, eventsHealthStateFilter *int32, partitionsHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (result ServiceHealth, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceHealthUsingPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceHealthUsingPolicy", err.Error()) + } + + req, err := client.GetServiceHealthUsingPolicyPreparer(ctx, serviceID, eventsHealthStateFilter, partitionsHealthStateFilter, applicationHealthPolicy, excludeHealthStatistics, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceHealthUsingPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceHealthUsingPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceHealthUsingPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetServiceHealthUsingPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceHealthUsingPolicy", resp, "Failure responding to request") + } + + return +} + +// GetServiceHealthUsingPolicyPreparer prepares the GetServiceHealthUsingPolicy request. +func (client BaseClient) GetServiceHealthUsingPolicyPreparer(ctx context.Context, serviceID string, eventsHealthStateFilter *int32, partitionsHealthStateFilter *int32, applicationHealthPolicy *ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if eventsHealthStateFilter != nil { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", *eventsHealthStateFilter) + } else { + queryParameters["EventsHealthStateFilter"] = autorest.Encode("query", 0) + } + if partitionsHealthStateFilter != nil { + queryParameters["PartitionsHealthStateFilter"] = autorest.Encode("query", *partitionsHealthStateFilter) + } else { + queryParameters["PartitionsHealthStateFilter"] = autorest.Encode("query", 0) + } + if excludeHealthStatistics != nil { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", *excludeHealthStatistics) + } else { + queryParameters["ExcludeHealthStatistics"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if applicationHealthPolicy != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(applicationHealthPolicy)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceHealthUsingPolicySender sends the GetServiceHealthUsingPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceHealthUsingPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceHealthUsingPolicyResponder handles the response to the GetServiceHealthUsingPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceHealthUsingPolicyResponder(resp *http.Response) (result ServiceHealth, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceInfo returns the information about the specified service belonging to the specified Service Fabric +// application. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceInfo(ctx context.Context, applicationID string, serviceID string, timeout *int64) (result ServiceInfoModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfo", err.Error()) + } + + req, err := client.GetServiceInfoPreparer(ctx, applicationID, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceInfo", resp, "Failure sending request") + return + } + + result, err = client.GetServiceInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceInfo", resp, "Failure responding to request") + } + + return +} + +// GetServiceInfoPreparer prepares the GetServiceInfo request. +func (client BaseClient) GetServiceInfoPreparer(ctx context.Context, applicationID string, serviceID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetServices/{serviceId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceInfoSender sends the GetServiceInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceInfoResponder handles the response to the GetServiceInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceInfoResponder(resp *http.Response) (result ServiceInfoModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceInfoList returns the information about all services belonging to the application specified by the +// application ID. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceTypeName - the service type name used to filter the services to query for. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceInfoList(ctx context.Context, applicationID string, serviceTypeName string, continuationToken string, timeout *int64) (result PagedServiceInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceInfoList", err.Error()) + } + + req, err := client.GetServiceInfoListPreparer(ctx, applicationID, serviceTypeName, continuationToken, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetServiceInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceInfoList", resp, "Failure responding to request") + } + + return +} + +// GetServiceInfoListPreparer prepares the GetServiceInfoList request. +func (client BaseClient) GetServiceInfoListPreparer(ctx context.Context, applicationID string, serviceTypeName string, continuationToken string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(serviceTypeName) > 0 { + queryParameters["ServiceTypeName"] = autorest.Encode("query", serviceTypeName) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/GetServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceInfoListSender sends the GetServiceInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceInfoListResponder handles the response to the GetServiceInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceInfoListResponder(resp *http.Response) (result PagedServiceInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceManifest gets the manifest describing a service type. The response contains the service manifest XML as a +// string. +// Parameters: +// applicationTypeName - the name of the application type. +// applicationTypeVersion - the version of the application type. +// serviceManifestName - the name of a service manifest registered as part of an application type in a Service +// Fabric cluster. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceManifest(ctx context.Context, applicationTypeName string, applicationTypeVersion string, serviceManifestName string, timeout *int64) (result ServiceTypeManifest, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceManifest") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceManifest", err.Error()) + } + + req, err := client.GetServiceManifestPreparer(ctx, applicationTypeName, applicationTypeVersion, serviceManifestName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceManifest", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceManifestSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceManifest", resp, "Failure sending request") + return + } + + result, err = client.GetServiceManifestResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceManifest", resp, "Failure responding to request") + } + + return +} + +// GetServiceManifestPreparer prepares the GetServiceManifest request. +func (client BaseClient) GetServiceManifestPreparer(ctx context.Context, applicationTypeName string, applicationTypeVersion string, serviceManifestName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationTypeName": autorest.Encode("path", applicationTypeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "ApplicationTypeVersion": autorest.Encode("query", applicationTypeVersion), + "ServiceManifestName": autorest.Encode("query", serviceManifestName), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ApplicationTypes/{applicationTypeName}/$/GetServiceManifest", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceManifestSender sends the GetServiceManifest request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceManifestSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceManifestResponder handles the response to the GetServiceManifest request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceManifestResponder(resp *http.Response) (result ServiceTypeManifest, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceNameInfo gets name of the service for the specified partition. A 404 error is returned if the partition ID +// does not exist in the cluster. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceNameInfo(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result ServiceNameInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceNameInfo") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceNameInfo", err.Error()) + } + + req, err := client.GetServiceNameInfoPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceNameInfo", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceNameInfoSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceNameInfo", resp, "Failure sending request") + return + } + + result, err = client.GetServiceNameInfoResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceNameInfo", resp, "Failure responding to request") + } + + return +} + +// GetServiceNameInfoPreparer prepares the GetServiceNameInfo request. +func (client BaseClient) GetServiceNameInfoPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetServiceName", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceNameInfoSender sends the GetServiceNameInfo request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceNameInfoSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceNameInfoResponder handles the response to the GetServiceNameInfo request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceNameInfoResponder(resp *http.Response) (result ServiceNameInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServicesEventList the response is list of ServiceEvent objects. +// Parameters: +// startTimeUtc - the start time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// endTimeUtc - the end time of a lookup query in ISO UTC yyyy-MM-ddTHH:mm:ssZ. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +// eventsTypesFilter - this is a comma separated string specifying the types of FabricEvents that should only +// be included in the response. +// excludeAnalysisEvents - this param disables the retrieval of AnalysisEvents if true is passed. +// skipCorrelationLookup - this param disables the search of CorrelatedEvents information if true is passed. +// otherwise the CorrelationEvents get processed and HasCorrelatedEvents field in every FabricEvent gets +// populated. +func (client BaseClient) GetServicesEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result ListServiceEvent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServicesEventList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServicesEventList", err.Error()) + } + + req, err := client.GetServicesEventListPreparer(ctx, startTimeUtc, endTimeUtc, timeout, eventsTypesFilter, excludeAnalysisEvents, skipCorrelationLookup) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServicesEventList", nil, "Failure preparing request") + return + } + + resp, err := client.GetServicesEventListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServicesEventList", resp, "Failure sending request") + return + } + + result, err = client.GetServicesEventListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServicesEventList", resp, "Failure responding to request") + } + + return +} + +// GetServicesEventListPreparer prepares the GetServicesEventList request. +func (client BaseClient) GetServicesEventListPreparer(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "EndTimeUtc": autorest.Encode("query", endTimeUtc), + "StartTimeUtc": autorest.Encode("query", startTimeUtc), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + if len(eventsTypesFilter) > 0 { + queryParameters["EventsTypesFilter"] = autorest.Encode("query", eventsTypesFilter) + } + if excludeAnalysisEvents != nil { + queryParameters["ExcludeAnalysisEvents"] = autorest.Encode("query", *excludeAnalysisEvents) + } + if skipCorrelationLookup != nil { + queryParameters["SkipCorrelationLookup"] = autorest.Encode("query", *skipCorrelationLookup) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/EventsStore/Services/Events"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServicesEventListSender sends the GetServicesEventList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServicesEventListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServicesEventListResponder handles the response to the GetServicesEventList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServicesEventListResponder(resp *http.Response) (result ListServiceEvent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceTypeInfoByName gets the information about a specific service type that is supported by a provisioned +// application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 status is +// returned. A 204 response is returned if the specified service type is not found in the cluster. +// Parameters: +// applicationTypeName - the name of the application type. +// applicationTypeVersion - the version of the application type. +// serviceTypeName - specifies the name of a Service Fabric service type. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceTypeInfoByName(ctx context.Context, applicationTypeName string, applicationTypeVersion string, serviceTypeName string, timeout *int64) (result ServiceTypeInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceTypeInfoByName") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoByName", err.Error()) + } + + req, err := client.GetServiceTypeInfoByNamePreparer(ctx, applicationTypeName, applicationTypeVersion, serviceTypeName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceTypeInfoByName", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceTypeInfoByNameSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceTypeInfoByName", resp, "Failure sending request") + return + } + + result, err = client.GetServiceTypeInfoByNameResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceTypeInfoByName", resp, "Failure responding to request") + } + + return +} + +// GetServiceTypeInfoByNamePreparer prepares the GetServiceTypeInfoByName request. +func (client BaseClient) GetServiceTypeInfoByNamePreparer(ctx context.Context, applicationTypeName string, applicationTypeVersion string, serviceTypeName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationTypeName": autorest.Encode("path", applicationTypeName), + "serviceTypeName": serviceTypeName, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "ApplicationTypeVersion": autorest.Encode("query", applicationTypeVersion), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes/{serviceTypeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceTypeInfoByNameSender sends the GetServiceTypeInfoByName request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceTypeInfoByNameSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceTypeInfoByNameResponder handles the response to the GetServiceTypeInfoByName request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceTypeInfoByNameResponder(resp *http.Response) (result ServiceTypeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetServiceTypeInfoList gets the list containing the information about service types that are supported by a +// provisioned application type in a Service Fabric cluster. The provided application type must exist. Otherwise, a 404 +// status is returned. +// Parameters: +// applicationTypeName - the name of the application type. +// applicationTypeVersion - the version of the application type. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetServiceTypeInfoList(ctx context.Context, applicationTypeName string, applicationTypeVersion string, timeout *int64) (result ListServiceTypeInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetServiceTypeInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetServiceTypeInfoList", err.Error()) + } + + req, err := client.GetServiceTypeInfoListPreparer(ctx, applicationTypeName, applicationTypeVersion, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceTypeInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetServiceTypeInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceTypeInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetServiceTypeInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetServiceTypeInfoList", resp, "Failure responding to request") + } + + return +} + +// GetServiceTypeInfoListPreparer prepares the GetServiceTypeInfoList request. +func (client BaseClient) GetServiceTypeInfoListPreparer(ctx context.Context, applicationTypeName string, applicationTypeVersion string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationTypeName": autorest.Encode("path", applicationTypeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "ApplicationTypeVersion": autorest.Encode("query", applicationTypeVersion), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ApplicationTypes/{applicationTypeName}/$/GetServiceTypes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetServiceTypeInfoListSender sends the GetServiceTypeInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetServiceTypeInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetServiceTypeInfoListResponder handles the response to the GetServiceTypeInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetServiceTypeInfoListResponder(resp *http.Response) (result ListServiceTypeInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSubNameInfoList enumerates all the Service Fabric names under a given name. If the subnames do not fit in a page, +// one page of results is returned as well as a continuation token, which can be used to get the next page. Querying a +// name that doesn't exist will fail. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// recursive - allows specifying that the search performed should be recursive. +// continuationToken - the continuation token parameter is used to obtain next set of results. A continuation +// token with a non-empty value is included in the response of the API when the results from the system do not +// fit in a single response. When this value is passed to the next API call, the API returns next set of +// results. If there are no further results, then the continuation token does not contain a value. The value of +// this parameter should not be URL encoded. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetSubNameInfoList(ctx context.Context, nameID string, recursive *bool, continuationToken string, timeout *int64) (result PagedSubNameInfoList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSubNameInfoList") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetSubNameInfoList", err.Error()) + } + + req, err := client.GetSubNameInfoListPreparer(ctx, nameID, recursive, continuationToken, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetSubNameInfoList", nil, "Failure preparing request") + return + } + + resp, err := client.GetSubNameInfoListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetSubNameInfoList", resp, "Failure sending request") + return + } + + result, err = client.GetSubNameInfoListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetSubNameInfoList", resp, "Failure responding to request") + } + + return +} + +// GetSubNameInfoListPreparer prepares the GetSubNameInfoList request. +func (client BaseClient) GetSubNameInfoListPreparer(ctx context.Context, nameID string, recursive *bool, continuationToken string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if recursive != nil { + queryParameters["Recursive"] = autorest.Encode("query", *recursive) + } else { + queryParameters["Recursive"] = autorest.Encode("query", false) + } + if len(continuationToken) > 0 { + queryParameters["ContinuationToken"] = continuationToken + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}/$/GetSubNames", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSubNameInfoListSender sends the GetSubNameInfoList request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetSubNameInfoListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetSubNameInfoListResponder handles the response to the GetSubNameInfoList request. The method always +// closes the http.Response Body. +func (client BaseClient) GetSubNameInfoListResponder(resp *http.Response) (result PagedSubNameInfoList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetUnplacedReplicaInformation returns the information about the unplaced replicas of the service. +// If PartitionId is specified, then result will contain information only about unplaced replicas for that partition. +// If PartitionId is not specified, then result will contain information about unplaced replicas for all partitions of +// that service. +// If OnlyQueryPrimaries is set to true, then result will contain information only about primary replicas, and will +// ignore unplaced secondary replicas. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionID - the identity of the partition. +// onlyQueryPrimaries - indicates that unplaced replica information will be queries only for primary replicas. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetUnplacedReplicaInformation(ctx context.Context, serviceID string, partitionID *uuid.UUID, onlyQueryPrimaries *bool, timeout *int64) (result UnplacedReplicaInformation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetUnplacedReplicaInformation") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetUnplacedReplicaInformation", err.Error()) + } + + req, err := client.GetUnplacedReplicaInformationPreparer(ctx, serviceID, partitionID, onlyQueryPrimaries, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetUnplacedReplicaInformation", nil, "Failure preparing request") + return + } + + resp, err := client.GetUnplacedReplicaInformationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetUnplacedReplicaInformation", resp, "Failure sending request") + return + } + + result, err = client.GetUnplacedReplicaInformationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetUnplacedReplicaInformation", resp, "Failure responding to request") + } + + return +} + +// GetUnplacedReplicaInformationPreparer prepares the GetUnplacedReplicaInformation request. +func (client BaseClient) GetUnplacedReplicaInformationPreparer(ctx context.Context, serviceID string, partitionID *uuid.UUID, onlyQueryPrimaries *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if partitionID != nil { + queryParameters["PartitionId"] = autorest.Encode("query", *partitionID) + } + if onlyQueryPrimaries != nil { + queryParameters["OnlyQueryPrimaries"] = autorest.Encode("query", *onlyQueryPrimaries) + } else { + queryParameters["OnlyQueryPrimaries"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/GetUnplacedReplicaInformation", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUnplacedReplicaInformationSender sends the GetUnplacedReplicaInformation request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetUnplacedReplicaInformationSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetUnplacedReplicaInformationResponder handles the response to the GetUnplacedReplicaInformation request. The method always +// closes the http.Response Body. +func (client BaseClient) GetUnplacedReplicaInformationResponder(resp *http.Response) (result UnplacedReplicaInformation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetUpgradeOrchestrationServiceState get the service state of Service Fabric Upgrade Orchestration Service. This API +// is internally used for support purposes. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) GetUpgradeOrchestrationServiceState(ctx context.Context, timeout *int64) (result UpgradeOrchestrationServiceState, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetUpgradeOrchestrationServiceState") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", err.Error()) + } + + req, err := client.GetUpgradeOrchestrationServiceStatePreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpgradeOrchestrationServiceStateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", resp, "Failure sending request") + return + } + + result, err = client.GetUpgradeOrchestrationServiceStateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "GetUpgradeOrchestrationServiceState", resp, "Failure responding to request") + } + + return +} + +// GetUpgradeOrchestrationServiceStatePreparer prepares the GetUpgradeOrchestrationServiceState request. +func (client BaseClient) GetUpgradeOrchestrationServiceStatePreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/GetUpgradeOrchestrationServiceState"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpgradeOrchestrationServiceStateSender sends the GetUpgradeOrchestrationServiceState request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) GetUpgradeOrchestrationServiceStateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetUpgradeOrchestrationServiceStateResponder handles the response to the GetUpgradeOrchestrationServiceState request. The method always +// closes the http.Response Body. +func (client BaseClient) GetUpgradeOrchestrationServiceStateResponder(resp *http.Response) (result UpgradeOrchestrationServiceState, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InvokeContainerAPI invoke container API on a container deployed on a Service Fabric node for the given code package. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// serviceManifestName - the name of a service manifest registered as part of an application type in a Service +// Fabric cluster. +// codePackageName - the name of code package specified in service manifest registered as part of an +// application type in a Service Fabric cluster. +// codePackageInstanceID - ID that uniquely identifies a code package instance deployed on a service fabric +// node. +// containerAPIRequestBody - parameters for making container API call +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) InvokeContainerAPI(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, codePackageInstanceID string, containerAPIRequestBody ContainerAPIRequestBody, timeout *int64) (result ContainerAPIResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.InvokeContainerAPI") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}, + {TargetValue: containerAPIRequestBody, + Constraints: []validation.Constraint{{Target: "containerAPIRequestBody.URIPath", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "InvokeContainerAPI", err.Error()) + } + + req, err := client.InvokeContainerAPIPreparer(ctx, nodeName, applicationID, serviceManifestName, codePackageName, codePackageInstanceID, containerAPIRequestBody, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeContainerAPI", nil, "Failure preparing request") + return + } + + resp, err := client.InvokeContainerAPISender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeContainerAPI", resp, "Failure sending request") + return + } + + result, err = client.InvokeContainerAPIResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeContainerAPI", resp, "Failure responding to request") + } + + return +} + +// InvokeContainerAPIPreparer prepares the InvokeContainerAPI request. +func (client BaseClient) InvokeContainerAPIPreparer(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, codePackageInstanceID string, containerAPIRequestBody ContainerAPIRequestBody, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "CodePackageInstanceId": autorest.Encode("query", codePackageInstanceID), + "CodePackageName": autorest.Encode("query", codePackageName), + "ServiceManifestName": autorest.Encode("query", serviceManifestName), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/ContainerApi", pathParameters), + autorest.WithJSON(containerAPIRequestBody), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InvokeContainerAPISender sends the InvokeContainerAPI request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) InvokeContainerAPISender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// InvokeContainerAPIResponder handles the response to the InvokeContainerAPI request. The method always +// closes the http.Response Body. +func (client BaseClient) InvokeContainerAPIResponder(resp *http.Response) (result ContainerAPIResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InvokeInfrastructureCommand for clusters that have one or more instances of the Infrastructure Service configured, +// this API provides a way to send infrastructure-specific commands to a particular +// instance of the Infrastructure Service. +// +// Available commands and their corresponding response formats vary depending upon +// the infrastructure on which the cluster is running. +// +// This API supports the Service Fabric platform; it is not meant to be used directly from your code. +// Parameters: +// command - the text of the command to be invoked. The content of the command is infrastructure-specific. +// serviceID - the identity of the infrastructure service. This is the full name of the infrastructure service +// without the 'fabric:' URI scheme. This parameter required only for the cluster that has more than one +// instance of infrastructure service running. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) InvokeInfrastructureCommand(ctx context.Context, command string, serviceID string, timeout *int64) (result String, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.InvokeInfrastructureCommand") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureCommand", err.Error()) + } + + req, err := client.InvokeInfrastructureCommandPreparer(ctx, command, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeInfrastructureCommand", nil, "Failure preparing request") + return + } + + resp, err := client.InvokeInfrastructureCommandSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeInfrastructureCommand", resp, "Failure sending request") + return + } + + result, err = client.InvokeInfrastructureCommandResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeInfrastructureCommand", resp, "Failure responding to request") + } + + return +} + +// InvokeInfrastructureCommandPreparer prepares the InvokeInfrastructureCommand request. +func (client BaseClient) InvokeInfrastructureCommandPreparer(ctx context.Context, command string, serviceID string, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "Command": autorest.Encode("query", command), + } + if len(serviceID) > 0 { + queryParameters["ServiceId"] = autorest.Encode("query", serviceID) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/InvokeInfrastructureCommand"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InvokeInfrastructureCommandSender sends the InvokeInfrastructureCommand request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) InvokeInfrastructureCommandSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// InvokeInfrastructureCommandResponder handles the response to the InvokeInfrastructureCommand request. The method always +// closes the http.Response Body. +func (client BaseClient) InvokeInfrastructureCommandResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InvokeInfrastructureQuery for clusters that have one or more instances of the Infrastructure Service configured, +// this API provides a way to send infrastructure-specific queries to a particular +// instance of the Infrastructure Service. +// +// Available commands and their corresponding response formats vary depending upon +// the infrastructure on which the cluster is running. +// +// This API supports the Service Fabric platform; it is not meant to be used directly from your code. +// Parameters: +// command - the text of the command to be invoked. The content of the command is infrastructure-specific. +// serviceID - the identity of the infrastructure service. This is the full name of the infrastructure service +// without the 'fabric:' URI scheme. This parameter required only for the cluster that has more than one +// instance of infrastructure service running. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) InvokeInfrastructureQuery(ctx context.Context, command string, serviceID string, timeout *int64) (result String, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.InvokeInfrastructureQuery") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "InvokeInfrastructureQuery", err.Error()) + } + + req, err := client.InvokeInfrastructureQueryPreparer(ctx, command, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeInfrastructureQuery", nil, "Failure preparing request") + return + } + + resp, err := client.InvokeInfrastructureQuerySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeInfrastructureQuery", resp, "Failure sending request") + return + } + + result, err = client.InvokeInfrastructureQueryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "InvokeInfrastructureQuery", resp, "Failure responding to request") + } + + return +} + +// InvokeInfrastructureQueryPreparer prepares the InvokeInfrastructureQuery request. +func (client BaseClient) InvokeInfrastructureQueryPreparer(ctx context.Context, command string, serviceID string, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "Command": autorest.Encode("query", command), + } + if len(serviceID) > 0 { + queryParameters["ServiceId"] = autorest.Encode("query", serviceID) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/InvokeInfrastructureQuery"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InvokeInfrastructureQuerySender sends the InvokeInfrastructureQuery request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) InvokeInfrastructureQuerySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// InvokeInfrastructureQueryResponder handles the response to the InvokeInfrastructureQuery request. The method always +// closes the http.Response Body. +func (client BaseClient) InvokeInfrastructureQueryResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// MovePrimaryReplica this command moves the primary replica of a partition of a stateful service, respecting all +// constraints. +// If NodeName parameter is specified, primary will be moved to the specified node (if constraints allow it). +// If NodeName parameter is not specified, primary replica will be moved to a random node in the cluster. +// If IgnoreConstraints parameter is specified and set to true, then primary will be moved regardless of the +// constraints. +// Parameters: +// partitionID - the identity of the partition. +// nodeName - the name of the node. +// ignoreConstraints - ignore constraints when moving a replica. If this parameter is not specified, all +// constraints are honored. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) MovePrimaryReplica(ctx context.Context, partitionID uuid.UUID, nodeName string, ignoreConstraints *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.MovePrimaryReplica") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "MovePrimaryReplica", err.Error()) + } + + req, err := client.MovePrimaryReplicaPreparer(ctx, partitionID, nodeName, ignoreConstraints, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "MovePrimaryReplica", nil, "Failure preparing request") + return + } + + resp, err := client.MovePrimaryReplicaSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "MovePrimaryReplica", resp, "Failure sending request") + return + } + + result, err = client.MovePrimaryReplicaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "MovePrimaryReplica", resp, "Failure responding to request") + } + + return +} + +// MovePrimaryReplicaPreparer prepares the MovePrimaryReplica request. +func (client BaseClient) MovePrimaryReplicaPreparer(ctx context.Context, partitionID uuid.UUID, nodeName string, ignoreConstraints *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.5" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(nodeName) > 0 { + queryParameters["NodeName"] = autorest.Encode("query", nodeName) + } + if ignoreConstraints != nil { + queryParameters["IgnoreConstraints"] = autorest.Encode("query", *ignoreConstraints) + } else { + queryParameters["IgnoreConstraints"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/MovePrimaryReplica", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// MovePrimaryReplicaSender sends the MovePrimaryReplica request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) MovePrimaryReplicaSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// MovePrimaryReplicaResponder handles the response to the MovePrimaryReplica request. The method always +// closes the http.Response Body. +func (client BaseClient) MovePrimaryReplicaResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// MoveSecondaryReplica this command moves the secondary replica of a partition of a stateful service, respecting all +// constraints. +// CurrentNodeName parameter must be specified to identify the replica that is moved. +// Source node name must be specified, but new node name can be omitted, and in that case replica is moved to a random +// node. +// If IgnoreConstraints parameter is specified and set to true, then secondary will be moved regardless of the +// constraints. +// Parameters: +// partitionID - the identity of the partition. +// currentNodeName - the name of the source node for secondary replica move. +// newNodeName - the name of the target node for secondary replica move. If not specified, replica is moved to +// a random node. +// ignoreConstraints - ignore constraints when moving a replica. If this parameter is not specified, all +// constraints are honored. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) MoveSecondaryReplica(ctx context.Context, partitionID uuid.UUID, currentNodeName string, newNodeName string, ignoreConstraints *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.MoveSecondaryReplica") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "MoveSecondaryReplica", err.Error()) + } + + req, err := client.MoveSecondaryReplicaPreparer(ctx, partitionID, currentNodeName, newNodeName, ignoreConstraints, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "MoveSecondaryReplica", nil, "Failure preparing request") + return + } + + resp, err := client.MoveSecondaryReplicaSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "MoveSecondaryReplica", resp, "Failure sending request") + return + } + + result, err = client.MoveSecondaryReplicaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "MoveSecondaryReplica", resp, "Failure responding to request") + } + + return +} + +// MoveSecondaryReplicaPreparer prepares the MoveSecondaryReplica request. +func (client BaseClient) MoveSecondaryReplicaPreparer(ctx context.Context, partitionID uuid.UUID, currentNodeName string, newNodeName string, ignoreConstraints *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.5" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "CurrentNodeName": autorest.Encode("query", currentNodeName), + } + if len(newNodeName) > 0 { + queryParameters["NewNodeName"] = autorest.Encode("query", newNodeName) + } + if ignoreConstraints != nil { + queryParameters["IgnoreConstraints"] = autorest.Encode("query", *ignoreConstraints) + } else { + queryParameters["IgnoreConstraints"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/MoveSecondaryReplica", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// MoveSecondaryReplicaSender sends the MoveSecondaryReplica request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) MoveSecondaryReplicaSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// MoveSecondaryReplicaResponder handles the response to the MoveSecondaryReplica request. The method always +// closes the http.Response Body. +func (client BaseClient) MoveSecondaryReplicaResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// PostChaosSchedule chaos will automatically schedule runs based on the Chaos Schedule. +// The Chaos Schedule will be updated if the provided version matches the version on the server. +// When updating the Chaos Schedule, the version on the server is incremented by 1. +// The version on the server will wrap back to 0 after reaching a large number. +// If Chaos is running when this call is made, the call will fail. +// Parameters: +// chaosSchedule - describes the schedule used by Chaos. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) PostChaosSchedule(ctx context.Context, chaosSchedule ChaosScheduleDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PostChaosSchedule") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}, + {TargetValue: chaosSchedule, + Constraints: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "chaosSchedule.Version", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "PostChaosSchedule", err.Error()) + } + + req, err := client.PostChaosSchedulePreparer(ctx, chaosSchedule, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "PostChaosSchedule", nil, "Failure preparing request") + return + } + + resp, err := client.PostChaosScheduleSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "PostChaosSchedule", resp, "Failure sending request") + return + } + + result, err = client.PostChaosScheduleResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "PostChaosSchedule", resp, "Failure responding to request") + } + + return +} + +// PostChaosSchedulePreparer prepares the PostChaosSchedule request. +func (client BaseClient) PostChaosSchedulePreparer(ctx context.Context, chaosSchedule ChaosScheduleDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Tools/Chaos/Schedule"), + autorest.WithJSON(chaosSchedule), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PostChaosScheduleSender sends the PostChaosSchedule request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) PostChaosScheduleSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// PostChaosScheduleResponder handles the response to the PostChaosSchedule request. The method always +// closes the http.Response Body. +func (client BaseClient) PostChaosScheduleResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ProvisionApplicationType provisions a Service Fabric application type with the cluster. The provision is required +// before any new applications can be instantiated. +// The provision operation can be performed either on the application package specified by the +// relativePathInImageStore, or by using the URI of the external '.sfpkg'. +// Parameters: +// provisionApplicationTypeDescriptionBaseRequiredBodyParam - the base type of provision application type +// description which supports either image store-based provision or external store-based provision. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ProvisionApplicationType(ctx context.Context, provisionApplicationTypeDescriptionBaseRequiredBodyParam BasicProvisionApplicationTypeDescriptionBase, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ProvisionApplicationType") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: provisionApplicationTypeDescriptionBaseRequiredBodyParam, + Constraints: []validation.Constraint{{Target: "provisionApplicationTypeDescriptionBaseRequiredBodyParam.Async", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ProvisionApplicationType", err.Error()) + } + + req, err := client.ProvisionApplicationTypePreparer(ctx, provisionApplicationTypeDescriptionBaseRequiredBodyParam, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ProvisionApplicationType", nil, "Failure preparing request") + return + } + + resp, err := client.ProvisionApplicationTypeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ProvisionApplicationType", resp, "Failure sending request") + return + } + + result, err = client.ProvisionApplicationTypeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ProvisionApplicationType", resp, "Failure responding to request") + } + + return +} + +// ProvisionApplicationTypePreparer prepares the ProvisionApplicationType request. +func (client BaseClient) ProvisionApplicationTypePreparer(ctx context.Context, provisionApplicationTypeDescriptionBaseRequiredBodyParam BasicProvisionApplicationTypeDescriptionBase, timeout *int64) (*http.Request, error) { + const APIVersion = "6.2" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/ApplicationTypes/$/Provision"), + autorest.WithJSON(provisionApplicationTypeDescriptionBaseRequiredBodyParam), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ProvisionApplicationTypeSender sends the ProvisionApplicationType request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ProvisionApplicationTypeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ProvisionApplicationTypeResponder handles the response to the ProvisionApplicationType request. The method always +// closes the http.Response Body. +func (client BaseClient) ProvisionApplicationTypeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ProvisionCluster validate and provision the code or configuration packages of a Service Fabric cluster. +// Parameters: +// provisionFabricDescription - describes the parameters for provisioning a cluster. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ProvisionCluster(ctx context.Context, provisionFabricDescription ProvisionFabricDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ProvisionCluster") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ProvisionCluster", err.Error()) + } + + req, err := client.ProvisionClusterPreparer(ctx, provisionFabricDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ProvisionCluster", nil, "Failure preparing request") + return + } + + resp, err := client.ProvisionClusterSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ProvisionCluster", resp, "Failure sending request") + return + } + + result, err = client.ProvisionClusterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ProvisionCluster", resp, "Failure responding to request") + } + + return +} + +// ProvisionClusterPreparer prepares the ProvisionCluster request. +func (client BaseClient) ProvisionClusterPreparer(ctx context.Context, provisionFabricDescription ProvisionFabricDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/Provision"), + autorest.WithJSON(provisionFabricDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ProvisionClusterSender sends the ProvisionCluster request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ProvisionClusterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ProvisionClusterResponder handles the response to the ProvisionCluster request. The method always +// closes the http.Response Body. +func (client BaseClient) ProvisionClusterResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// PutProperty creates or updates the specified Service Fabric property under a given name. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// propertyDescription - describes the Service Fabric property to be created. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) PutProperty(ctx context.Context, nameID string, propertyDescription PropertyDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PutProperty") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: propertyDescription, + Constraints: []validation.Constraint{{Target: "propertyDescription.PropertyName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "propertyDescription.Value", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "PutProperty", err.Error()) + } + + req, err := client.PutPropertyPreparer(ctx, nameID, propertyDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "PutProperty", nil, "Failure preparing request") + return + } + + resp, err := client.PutPropertySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "PutProperty", resp, "Failure sending request") + return + } + + result, err = client.PutPropertyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "PutProperty", resp, "Failure responding to request") + } + + return +} + +// PutPropertyPreparer prepares the PutProperty request. +func (client BaseClient) PutPropertyPreparer(ctx context.Context, nameID string, propertyDescription PropertyDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}/$/GetProperty", pathParameters), + autorest.WithJSON(propertyDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutPropertySender sends the PutProperty request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) PutPropertySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// PutPropertyResponder handles the response to the PutProperty request. The method always +// closes the http.Response Body. +func (client BaseClient) PutPropertyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RecoverAllPartitions this operation should only be performed if it is known that the replicas that are down cannot +// be recovered. Incorrect use of this API can cause potential data loss. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RecoverAllPartitions(ctx context.Context, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RecoverAllPartitions") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RecoverAllPartitions", err.Error()) + } + + req, err := client.RecoverAllPartitionsPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverAllPartitions", nil, "Failure preparing request") + return + } + + resp, err := client.RecoverAllPartitionsSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverAllPartitions", resp, "Failure sending request") + return + } + + result, err = client.RecoverAllPartitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverAllPartitions", resp, "Failure responding to request") + } + + return +} + +// RecoverAllPartitionsPreparer prepares the RecoverAllPartitions request. +func (client BaseClient) RecoverAllPartitionsPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/RecoverAllPartitions"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RecoverAllPartitionsSender sends the RecoverAllPartitions request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RecoverAllPartitionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RecoverAllPartitionsResponder handles the response to the RecoverAllPartitions request. The method always +// closes the http.Response Body. +func (client BaseClient) RecoverAllPartitionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RecoverPartition this operation should only be performed if it is known that the replicas that are down cannot be +// recovered. Incorrect use of this API can cause potential data loss. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RecoverPartition(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RecoverPartition") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RecoverPartition", err.Error()) + } + + req, err := client.RecoverPartitionPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverPartition", nil, "Failure preparing request") + return + } + + resp, err := client.RecoverPartitionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverPartition", resp, "Failure sending request") + return + } + + result, err = client.RecoverPartitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverPartition", resp, "Failure responding to request") + } + + return +} + +// RecoverPartitionPreparer prepares the RecoverPartition request. +func (client BaseClient) RecoverPartitionPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/Recover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RecoverPartitionSender sends the RecoverPartition request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RecoverPartitionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RecoverPartitionResponder handles the response to the RecoverPartition request. The method always +// closes the http.Response Body. +func (client BaseClient) RecoverPartitionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RecoverServicePartitions indicates to the Service Fabric cluster that it should attempt to recover the specified +// service that is currently stuck in quorum loss. This operation should only be performed if it is known that the +// replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RecoverServicePartitions(ctx context.Context, serviceID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RecoverServicePartitions") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RecoverServicePartitions", err.Error()) + } + + req, err := client.RecoverServicePartitionsPreparer(ctx, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverServicePartitions", nil, "Failure preparing request") + return + } + + resp, err := client.RecoverServicePartitionsSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverServicePartitions", resp, "Failure sending request") + return + } + + result, err = client.RecoverServicePartitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverServicePartitions", resp, "Failure responding to request") + } + + return +} + +// RecoverServicePartitionsPreparer prepares the RecoverServicePartitions request. +func (client BaseClient) RecoverServicePartitionsPreparer(ctx context.Context, serviceID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/$/{serviceId}/$/GetPartitions/$/Recover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RecoverServicePartitionsSender sends the RecoverServicePartitions request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RecoverServicePartitionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RecoverServicePartitionsResponder handles the response to the RecoverServicePartitions request. The method always +// closes the http.Response Body. +func (client BaseClient) RecoverServicePartitionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RecoverSystemPartitions indicates to the Service Fabric cluster that it should attempt to recover the system +// services that are currently stuck in quorum loss. This operation should only be performed if it is known that the +// replicas that are down cannot be recovered. Incorrect use of this API can cause potential data loss. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RecoverSystemPartitions(ctx context.Context, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RecoverSystemPartitions") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RecoverSystemPartitions", err.Error()) + } + + req, err := client.RecoverSystemPartitionsPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverSystemPartitions", nil, "Failure preparing request") + return + } + + resp, err := client.RecoverSystemPartitionsSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverSystemPartitions", resp, "Failure sending request") + return + } + + result, err = client.RecoverSystemPartitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RecoverSystemPartitions", resp, "Failure responding to request") + } + + return +} + +// RecoverSystemPartitionsPreparer prepares the RecoverSystemPartitions request. +func (client BaseClient) RecoverSystemPartitionsPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/RecoverSystemPartitions"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RecoverSystemPartitionsSender sends the RecoverSystemPartitions request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RecoverSystemPartitionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RecoverSystemPartitionsResponder handles the response to the RecoverSystemPartitions request. The method always +// closes the http.Response Body. +func (client BaseClient) RecoverSystemPartitionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RemoveComposeDeployment deletes an existing Service Fabric compose deployment. +// Parameters: +// deploymentName - the identity of the deployment. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RemoveComposeDeployment(ctx context.Context, deploymentName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RemoveComposeDeployment") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RemoveComposeDeployment", err.Error()) + } + + req, err := client.RemoveComposeDeploymentPreparer(ctx, deploymentName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveComposeDeployment", nil, "Failure preparing request") + return + } + + resp, err := client.RemoveComposeDeploymentSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveComposeDeployment", resp, "Failure sending request") + return + } + + result, err = client.RemoveComposeDeploymentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveComposeDeployment", resp, "Failure responding to request") + } + + return +} + +// RemoveComposeDeploymentPreparer prepares the RemoveComposeDeployment request. +func (client BaseClient) RemoveComposeDeploymentPreparer(ctx context.Context, deploymentName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": deploymentName, + } + + const APIVersion = "6.0-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ComposeDeployments/{deploymentName}/$/Delete", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RemoveComposeDeploymentSender sends the RemoveComposeDeployment request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RemoveComposeDeploymentSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RemoveComposeDeploymentResponder handles the response to the RemoveComposeDeployment request. The method always +// closes the http.Response Body. +func (client BaseClient) RemoveComposeDeploymentResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// RemoveConfigurationOverrides this api allows removing all existing configuration overrides on specified node. +// Parameters: +// nodeName - the name of the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RemoveConfigurationOverrides(ctx context.Context, nodeName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RemoveConfigurationOverrides") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RemoveConfigurationOverrides", err.Error()) + } + + req, err := client.RemoveConfigurationOverridesPreparer(ctx, nodeName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveConfigurationOverrides", nil, "Failure preparing request") + return + } + + resp, err := client.RemoveConfigurationOverridesSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveConfigurationOverrides", resp, "Failure sending request") + return + } + + result, err = client.RemoveConfigurationOverridesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveConfigurationOverrides", resp, "Failure responding to request") + } + + return +} + +// RemoveConfigurationOverridesPreparer prepares the RemoveConfigurationOverrides request. +func (client BaseClient) RemoveConfigurationOverridesPreparer(ctx context.Context, nodeName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "7.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/RemoveConfigurationOverrides", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RemoveConfigurationOverridesSender sends the RemoveConfigurationOverrides request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RemoveConfigurationOverridesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RemoveConfigurationOverridesResponder handles the response to the RemoveConfigurationOverrides request. The method always +// closes the http.Response Body. +func (client BaseClient) RemoveConfigurationOverridesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RemoveNodeState this implies that it is not possible to recover the persisted state of that node. This generally +// happens if a hard disk has been wiped clean, or if a hard disk crashes. The node has to be down for this operation +// to be successful. This operation lets Service Fabric know that the replicas on that node no longer exist, and that +// Service Fabric should stop waiting for those replicas to come back up. Do not run this cmdlet if the state on the +// node has not been removed and the node can come back up with its state intact. Starting from Service Fabric 6.5, in +// order to use this API for seed nodes, please change the seed nodes to regular (non-seed) nodes and then invoke this +// API to remove the node state. If the cluster is running on Azure, after the seed node goes down, Service Fabric will +// try to change it to a non-seed node automatically. To make this happen, make sure the number of non-seed nodes in +// the primary node type is no less than the number of Down seed nodes. If necessary, add more nodes to the primary +// node type to achieve this. For standalone cluster, if the Down seed node is not expected to come back up with its +// state intact, please remove the node from the cluster, see +// https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-windows-server-add-remove-nodes +// Parameters: +// nodeName - the name of the node. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RemoveNodeState(ctx context.Context, nodeName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RemoveNodeState") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RemoveNodeState", err.Error()) + } + + req, err := client.RemoveNodeStatePreparer(ctx, nodeName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveNodeState", nil, "Failure preparing request") + return + } + + resp, err := client.RemoveNodeStateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveNodeState", resp, "Failure sending request") + return + } + + result, err = client.RemoveNodeStateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveNodeState", resp, "Failure responding to request") + } + + return +} + +// RemoveNodeStatePreparer prepares the RemoveNodeState request. +func (client BaseClient) RemoveNodeStatePreparer(ctx context.Context, nodeName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/RemoveNodeState", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RemoveNodeStateSender sends the RemoveNodeState request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RemoveNodeStateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RemoveNodeStateResponder handles the response to the RemoveNodeState request. The method always +// closes the http.Response Body. +func (client BaseClient) RemoveNodeStateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RemoveReplica this API simulates a Service Fabric replica failure by removing a replica from a Service Fabric +// cluster. The removal closes the replica, transitions the replica to the role None, and then removes all of the state +// information of the replica from the cluster. This API tests the replica state removal path, and simulates the report +// fault permanent path through client APIs. Warning - There are no safety checks performed when this API is used. +// Incorrect use of this API can lead to data loss for stateful services. In addition, the forceRemove flag impacts all +// other replicas hosted in the same process. +// Parameters: +// nodeName - the name of the node. +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// forceRemove - remove a Service Fabric application or service forcefully without going through the graceful +// shutdown sequence. This parameter can be used to forcefully delete an application or service for which +// delete is timing out due to issues in the service code that prevents graceful close of replicas. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RemoveReplica(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, forceRemove *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RemoveReplica") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RemoveReplica", err.Error()) + } + + req, err := client.RemoveReplicaPreparer(ctx, nodeName, partitionID, replicaID, forceRemove, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveReplica", nil, "Failure preparing request") + return + } + + resp, err := client.RemoveReplicaSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveReplica", resp, "Failure sending request") + return + } + + result, err = client.RemoveReplicaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RemoveReplica", resp, "Failure responding to request") + } + + return +} + +// RemoveReplicaPreparer prepares the RemoveReplica request. +func (client BaseClient) RemoveReplicaPreparer(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, forceRemove *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if forceRemove != nil { + queryParameters["ForceRemove"] = autorest.Encode("query", *forceRemove) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Delete", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RemoveReplicaSender sends the RemoveReplica request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RemoveReplicaSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RemoveReplicaResponder handles the response to the RemoveReplica request. The method always +// closes the http.Response Body. +func (client BaseClient) RemoveReplicaResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportApplicationHealth reports health state of the specified Service Fabric application. The report must contain +// the information about the source of the health report and property on which it is reported. +// The report is sent to a Service Fabric gateway Application, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, get application health and check that the report appears +// in the HealthEvents section. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportApplicationHealth(ctx context.Context, applicationID string, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportApplicationHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportApplicationHealth", err.Error()) + } + + req, err := client.ReportApplicationHealthPreparer(ctx, applicationID, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportApplicationHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportApplicationHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportApplicationHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportApplicationHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportApplicationHealth", resp, "Failure responding to request") + } + + return +} + +// ReportApplicationHealthPreparer prepares the ReportApplicationHealth request. +func (client BaseClient) ReportApplicationHealthPreparer(ctx context.Context, applicationID string, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/ReportHealth", pathParameters), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportApplicationHealthSender sends the ReportApplicationHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportApplicationHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportApplicationHealthResponder handles the response to the ReportApplicationHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportApplicationHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportClusterHealth sends a health report on a Service Fabric cluster. The report must contain the information about +// the source of the health report and property on which it is reported. +// The report is sent to a Service Fabric gateway node, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, run GetClusterHealth and check that the report appears in +// the HealthEvents section. +// Parameters: +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportClusterHealth(ctx context.Context, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportClusterHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportClusterHealth", err.Error()) + } + + req, err := client.ReportClusterHealthPreparer(ctx, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportClusterHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportClusterHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportClusterHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportClusterHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportClusterHealth", resp, "Failure responding to request") + } + + return +} + +// ReportClusterHealthPreparer prepares the ReportClusterHealth request. +func (client BaseClient) ReportClusterHealthPreparer(ctx context.Context, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/ReportClusterHealth"), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportClusterHealthSender sends the ReportClusterHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportClusterHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportClusterHealthResponder handles the response to the ReportClusterHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportClusterHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportDeployedApplicationHealth reports health state of the application deployed on a Service Fabric node. The +// report must contain the information about the source of the health report and property on which it is reported. +// The report is sent to a Service Fabric gateway Service, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, get deployed application health and check that the report +// appears in the HealthEvents section. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportDeployedApplicationHealth(ctx context.Context, nodeName string, applicationID string, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportDeployedApplicationHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedApplicationHealth", err.Error()) + } + + req, err := client.ReportDeployedApplicationHealthPreparer(ctx, nodeName, applicationID, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportDeployedApplicationHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportDeployedApplicationHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportDeployedApplicationHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportDeployedApplicationHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportDeployedApplicationHealth", resp, "Failure responding to request") + } + + return +} + +// ReportDeployedApplicationHealthPreparer prepares the ReportDeployedApplicationHealth request. +func (client BaseClient) ReportDeployedApplicationHealthPreparer(ctx context.Context, nodeName string, applicationID string, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/ReportHealth", pathParameters), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportDeployedApplicationHealthSender sends the ReportDeployedApplicationHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportDeployedApplicationHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportDeployedApplicationHealthResponder handles the response to the ReportDeployedApplicationHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportDeployedApplicationHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportDeployedServicePackageHealth reports health state of the service package of the application deployed on a +// Service Fabric node. The report must contain the information about the source of the health report and property on +// which it is reported. +// The report is sent to a Service Fabric gateway Service, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, get deployed service package health and check that the +// report appears in the HealthEvents section. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// servicePackageName - the name of the service package. +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportDeployedServicePackageHealth(ctx context.Context, nodeName string, applicationID string, servicePackageName string, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportDeployedServicePackageHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportDeployedServicePackageHealth", err.Error()) + } + + req, err := client.ReportDeployedServicePackageHealthPreparer(ctx, nodeName, applicationID, servicePackageName, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportDeployedServicePackageHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportDeployedServicePackageHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportDeployedServicePackageHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportDeployedServicePackageHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportDeployedServicePackageHealth", resp, "Failure responding to request") + } + + return +} + +// ReportDeployedServicePackageHealthPreparer prepares the ReportDeployedServicePackageHealth request. +func (client BaseClient) ReportDeployedServicePackageHealthPreparer(ctx context.Context, nodeName string, applicationID string, servicePackageName string, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + "servicePackageName": servicePackageName, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetServicePackages/{servicePackageName}/$/ReportHealth", pathParameters), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportDeployedServicePackageHealthSender sends the ReportDeployedServicePackageHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportDeployedServicePackageHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportDeployedServicePackageHealthResponder handles the response to the ReportDeployedServicePackageHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportDeployedServicePackageHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportNodeHealth reports health state of the specified Service Fabric node. The report must contain the information +// about the source of the health report and property on which it is reported. +// The report is sent to a Service Fabric gateway node, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, run GetNodeHealth and check that the report appears in +// the HealthEvents section. +// Parameters: +// nodeName - the name of the node. +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportNodeHealth(ctx context.Context, nodeName string, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportNodeHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportNodeHealth", err.Error()) + } + + req, err := client.ReportNodeHealthPreparer(ctx, nodeName, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportNodeHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportNodeHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportNodeHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportNodeHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportNodeHealth", resp, "Failure responding to request") + } + + return +} + +// ReportNodeHealthPreparer prepares the ReportNodeHealth request. +func (client BaseClient) ReportNodeHealthPreparer(ctx context.Context, nodeName string, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/ReportHealth", pathParameters), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportNodeHealthSender sends the ReportNodeHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportNodeHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportNodeHealthResponder handles the response to the ReportNodeHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportNodeHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportPartitionHealth reports health state of the specified Service Fabric partition. The report must contain the +// information about the source of the health report and property on which it is reported. +// The report is sent to a Service Fabric gateway Partition, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, run GetPartitionHealth and check that the report appears +// in the HealthEvents section. +// Parameters: +// partitionID - the identity of the partition. +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportPartitionHealth(ctx context.Context, partitionID uuid.UUID, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportPartitionHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportPartitionHealth", err.Error()) + } + + req, err := client.ReportPartitionHealthPreparer(ctx, partitionID, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportPartitionHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportPartitionHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportPartitionHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportPartitionHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportPartitionHealth", resp, "Failure responding to request") + } + + return +} + +// ReportPartitionHealthPreparer prepares the ReportPartitionHealth request. +func (client BaseClient) ReportPartitionHealthPreparer(ctx context.Context, partitionID uuid.UUID, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/ReportHealth", pathParameters), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportPartitionHealthSender sends the ReportPartitionHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportPartitionHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportPartitionHealthResponder handles the response to the ReportPartitionHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportPartitionHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportReplicaHealth reports health state of the specified Service Fabric replica. The report must contain the +// information about the source of the health report and property on which it is reported. +// The report is sent to a Service Fabric gateway Replica, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, run GetReplicaHealth and check that the report appears in +// the HealthEvents section. +// Parameters: +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// serviceKind - the kind of service replica (Stateless or Stateful) for which the health is being reported. +// Following are the possible values. +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportReplicaHealth(ctx context.Context, partitionID uuid.UUID, replicaID string, serviceKind ReplicaHealthReportServiceKind, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportReplicaHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportReplicaHealth", err.Error()) + } + + req, err := client.ReportReplicaHealthPreparer(ctx, partitionID, replicaID, serviceKind, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportReplicaHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportReplicaHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportReplicaHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportReplicaHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportReplicaHealth", resp, "Failure responding to request") + } + + return +} + +// ReportReplicaHealthPreparer prepares the ReportReplicaHealth request. +func (client BaseClient) ReportReplicaHealthPreparer(ctx context.Context, partitionID uuid.UUID, replicaID string, serviceKind ReplicaHealthReportServiceKind, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "ServiceKind": autorest.Encode("query", serviceKind), + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/GetReplicas/{replicaId}/$/ReportHealth", pathParameters), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportReplicaHealthSender sends the ReportReplicaHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportReplicaHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportReplicaHealthResponder handles the response to the ReportReplicaHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportReplicaHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ReportServiceHealth reports health state of the specified Service Fabric service. The report must contain the +// information about the source of the health report and property on which it is reported. +// The report is sent to a Service Fabric gateway Service, which forwards to the health store. +// The report may be accepted by the gateway, but rejected by the health store after extra validation. +// For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. +// To see whether the report was applied in the health store, run GetServiceHealth and check that the report appears in +// the HealthEvents section. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// healthInformation - describes the health information for the health report. This information needs to be +// present in all of the health reports sent to the health manager. +// immediate - a flag that indicates whether the report should be sent immediately. +// A health report is sent to a Service Fabric gateway Application, which forwards to the health store. +// If Immediate is set to true, the report is sent immediately from HTTP Gateway to the health store, +// regardless of the fabric client settings that the HTTP Gateway Application is using. +// This is useful for critical reports that should be sent as soon as possible. +// Depending on timing and other conditions, sending the report may still fail, for example if the HTTP Gateway +// is closed or the message doesn't reach the Gateway. +// If Immediate is set to false, the report is sent based on the health client settings from the HTTP Gateway. +// Therefore, it will be batched according to the HealthReportSendInterval configuration. +// This is the recommended setting because it allows the health client to optimize health reporting messages to +// health store as well as health report processing. +// By default, reports are not sent immediately. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ReportServiceHealth(ctx context.Context, serviceID string, healthInformation HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ReportServiceHealth") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: healthInformation, + Constraints: []validation.Constraint{{Target: "healthInformation.SourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "healthInformation.Property", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ReportServiceHealth", err.Error()) + } + + req, err := client.ReportServiceHealthPreparer(ctx, serviceID, healthInformation, immediate, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportServiceHealth", nil, "Failure preparing request") + return + } + + resp, err := client.ReportServiceHealthSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportServiceHealth", resp, "Failure sending request") + return + } + + result, err = client.ReportServiceHealthResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ReportServiceHealth", resp, "Failure responding to request") + } + + return +} + +// ReportServiceHealthPreparer prepares the ReportServiceHealth request. +func (client BaseClient) ReportServiceHealthPreparer(ctx context.Context, serviceID string, healthInformation HealthInformation, immediate *bool, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if immediate != nil { + queryParameters["Immediate"] = autorest.Encode("query", *immediate) + } else { + queryParameters["Immediate"] = autorest.Encode("query", false) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/ReportHealth", pathParameters), + autorest.WithJSON(healthInformation), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ReportServiceHealthSender sends the ReportServiceHealth request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ReportServiceHealthSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ReportServiceHealthResponder handles the response to the ReportServiceHealth request. The method always +// closes the http.Response Body. +func (client BaseClient) ReportServiceHealthResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResetPartitionLoad resets the current load of a Service Fabric partition to the default load for the service. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ResetPartitionLoad(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ResetPartitionLoad") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ResetPartitionLoad", err.Error()) + } + + req, err := client.ResetPartitionLoadPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResetPartitionLoad", nil, "Failure preparing request") + return + } + + resp, err := client.ResetPartitionLoadSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResetPartitionLoad", resp, "Failure sending request") + return + } + + result, err = client.ResetPartitionLoadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResetPartitionLoad", resp, "Failure responding to request") + } + + return +} + +// ResetPartitionLoadPreparer prepares the ResetPartitionLoad request. +func (client BaseClient) ResetPartitionLoadPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/ResetLoad", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResetPartitionLoadSender sends the ResetPartitionLoad request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ResetPartitionLoadSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ResetPartitionLoadResponder handles the response to the ResetPartitionLoad request. The method always +// closes the http.Response Body. +func (client BaseClient) ResetPartitionLoadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResolveService resolve a Service Fabric service partition to get the endpoints of the service replicas. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionKeyType - key type for the partition. This parameter is required if the partition scheme for the +// service is Int64Range or Named. The possible values are following. +// - None (1) - Indicates that the PartitionKeyValue parameter is not specified. This is valid for the +// partitions with partitioning scheme as Singleton. This is the default value. The value is 1. +// - Int64Range (2) - Indicates that the PartitionKeyValue parameter is an int64 partition key. This is valid +// for the partitions with partitioning scheme as Int64Range. The value is 2. +// - Named (3) - Indicates that the PartitionKeyValue parameter is a name of the partition. This is valid for +// the partitions with partitioning scheme as Named. The value is 3. +// partitionKeyValue - partition key. This is required if the partition scheme for the service is Int64Range or +// Named. +// This is not the partition ID, but rather, either the integer key value, or the name of the partition ID. +// For example, if your service is using ranged partitions from 0 to 10, then they PartitionKeyValue would be +// an +// integer in that range. Query service description to see the range or name. +// previousRspVersion - the value in the Version field of the response that was received previously. This is +// required if the user knows that the result that was gotten previously is stale. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ResolveService(ctx context.Context, serviceID string, partitionKeyType *int32, partitionKeyValue string, previousRspVersion string, timeout *int64) (result ResolvedServicePartition, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ResolveService") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ResolveService", err.Error()) + } + + req, err := client.ResolveServicePreparer(ctx, serviceID, partitionKeyType, partitionKeyValue, previousRspVersion, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResolveService", nil, "Failure preparing request") + return + } + + resp, err := client.ResolveServiceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResolveService", resp, "Failure sending request") + return + } + + result, err = client.ResolveServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResolveService", resp, "Failure responding to request") + } + + return +} + +// ResolveServicePreparer prepares the ResolveService request. +func (client BaseClient) ResolveServicePreparer(ctx context.Context, serviceID string, partitionKeyType *int32, partitionKeyValue string, previousRspVersion string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if partitionKeyType != nil { + queryParameters["PartitionKeyType"] = autorest.Encode("query", *partitionKeyType) + } + if len(partitionKeyValue) > 0 { + queryParameters["PartitionKeyValue"] = partitionKeyValue + } + if len(previousRspVersion) > 0 { + queryParameters["PreviousRspVersion"] = previousRspVersion + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/ResolvePartition", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResolveServiceSender sends the ResolveService request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ResolveServiceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ResolveServiceResponder handles the response to the ResolveService request. The method always +// closes the http.Response Body. +func (client BaseClient) ResolveServiceResponder(resp *http.Response) (result ResolvedServicePartition, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RestartDeployedCodePackage restarts a code package deployed on a Service Fabric node in a cluster. This aborts the +// code package process, which will restart all the user service replicas hosted in that process. +// Parameters: +// nodeName - the name of the node. +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// restartDeployedCodePackageDescription - describes the deployed code package on Service Fabric node to +// restart. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RestartDeployedCodePackage(ctx context.Context, nodeName string, applicationID string, restartDeployedCodePackageDescription RestartDeployedCodePackageDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RestartDeployedCodePackage") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: restartDeployedCodePackageDescription, + Constraints: []validation.Constraint{{Target: "restartDeployedCodePackageDescription.ServiceManifestName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "restartDeployedCodePackageDescription.CodePackageName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "restartDeployedCodePackageDescription.CodePackageInstanceID", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RestartDeployedCodePackage", err.Error()) + } + + req, err := client.RestartDeployedCodePackagePreparer(ctx, nodeName, applicationID, restartDeployedCodePackageDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartDeployedCodePackage", nil, "Failure preparing request") + return + } + + resp, err := client.RestartDeployedCodePackageSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartDeployedCodePackage", resp, "Failure sending request") + return + } + + result, err = client.RestartDeployedCodePackageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartDeployedCodePackage", resp, "Failure responding to request") + } + + return +} + +// RestartDeployedCodePackagePreparer prepares the RestartDeployedCodePackage request. +func (client BaseClient) RestartDeployedCodePackagePreparer(ctx context.Context, nodeName string, applicationID string, restartDeployedCodePackageDescription RestartDeployedCodePackageDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetApplications/{applicationId}/$/GetCodePackages/$/Restart", pathParameters), + autorest.WithJSON(restartDeployedCodePackageDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestartDeployedCodePackageSender sends the RestartDeployedCodePackage request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RestartDeployedCodePackageSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RestartDeployedCodePackageResponder handles the response to the RestartDeployedCodePackage request. The method always +// closes the http.Response Body. +func (client BaseClient) RestartDeployedCodePackageResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RestartNode restarts a Service Fabric cluster node that is already started. +// Parameters: +// nodeName - the name of the node. +// restartNodeDescription - the instance of the node to be restarted and a flag indicating the need to take +// dump of the fabric process. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RestartNode(ctx context.Context, nodeName string, restartNodeDescription RestartNodeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RestartNode") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: restartNodeDescription, + Constraints: []validation.Constraint{{Target: "restartNodeDescription.NodeInstanceID", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RestartNode", err.Error()) + } + + req, err := client.RestartNodePreparer(ctx, nodeName, restartNodeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartNode", nil, "Failure preparing request") + return + } + + resp, err := client.RestartNodeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartNode", resp, "Failure sending request") + return + } + + result, err = client.RestartNodeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartNode", resp, "Failure responding to request") + } + + return +} + +// RestartNodePreparer prepares the RestartNode request. +func (client BaseClient) RestartNodePreparer(ctx context.Context, nodeName string, restartNodeDescription RestartNodeDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/Restart", pathParameters), + autorest.WithJSON(restartNodeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestartNodeSender sends the RestartNode request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RestartNodeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RestartNodeResponder handles the response to the RestartNode request. The method always +// closes the http.Response Body. +func (client BaseClient) RestartNodeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RestartReplica restarts a service replica of a persisted service running on a node. Warning - There are no safety +// checks performed when this API is used. Incorrect use of this API can lead to availability loss for stateful +// services. +// Parameters: +// nodeName - the name of the node. +// partitionID - the identity of the partition. +// replicaID - the identifier of the replica. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RestartReplica(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RestartReplica") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RestartReplica", err.Error()) + } + + req, err := client.RestartReplicaPreparer(ctx, nodeName, partitionID, replicaID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartReplica", nil, "Failure preparing request") + return + } + + resp, err := client.RestartReplicaSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartReplica", resp, "Failure sending request") + return + } + + result, err = client.RestartReplicaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestartReplica", resp, "Failure responding to request") + } + + return +} + +// RestartReplicaPreparer prepares the RestartReplica request. +func (client BaseClient) RestartReplicaPreparer(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + "partitionId": partitionID, + "replicaId": replicaID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Nodes/{nodeName}/$/GetPartitions/{partitionId}/$/GetReplicas/{replicaId}/$/Restart", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestartReplicaSender sends the RestartReplica request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RestartReplicaSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RestartReplicaResponder handles the response to the RestartReplica request. The method always +// closes the http.Response Body. +func (client BaseClient) RestartReplicaResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RestorePartition restores the state of a of the stateful persisted partition using the specified backup point. In +// case the partition is already being periodically backed up, then by default the backup point is looked for in the +// storage specified in backup policy. One can also override the same by specifying the backup storage details as part +// of the restore partition description in body. Once the restore is initiated, its progress can be tracked using the +// GetRestoreProgress operation. +// In case, the operation times out, specify a greater restore timeout value in the query parameter. +// Parameters: +// partitionID - the identity of the partition. +// restorePartitionDescription - describes the parameters to restore the partition. +// restoreTimeout - specifies the maximum amount of time to wait, in minutes, for the restore operation to +// complete. Post that, the operation returns back with timeout error. However, in certain corner cases it +// could be that the restore operation goes through even though it completes with timeout. In case of timeout +// error, its recommended to invoke this operation again with a greater timeout value. the default value for +// the same is 10 minutes. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RestorePartition(ctx context.Context, partitionID uuid.UUID, restorePartitionDescription RestorePartitionDescription, restoreTimeout *int32, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RestorePartition") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: restorePartitionDescription, + Constraints: []validation.Constraint{{Target: "restorePartitionDescription.BackupID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "restorePartitionDescription.BackupLocation", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RestorePartition", err.Error()) + } + + req, err := client.RestorePartitionPreparer(ctx, partitionID, restorePartitionDescription, restoreTimeout, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestorePartition", nil, "Failure preparing request") + return + } + + resp, err := client.RestorePartitionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestorePartition", resp, "Failure sending request") + return + } + + result, err = client.RestorePartitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RestorePartition", resp, "Failure responding to request") + } + + return +} + +// RestorePartitionPreparer prepares the RestorePartition request. +func (client BaseClient) RestorePartitionPreparer(ctx context.Context, partitionID uuid.UUID, restorePartitionDescription RestorePartitionDescription, restoreTimeout *int32, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if restoreTimeout != nil { + queryParameters["RestoreTimeout"] = autorest.Encode("query", *restoreTimeout) + } else { + queryParameters["RestoreTimeout"] = autorest.Encode("query", 10) + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/Restore", pathParameters), + autorest.WithJSON(restorePartitionDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RestorePartitionSender sends the RestorePartition request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RestorePartitionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RestorePartitionResponder handles the response to the RestorePartition request. The method always +// closes the http.Response Body. +func (client BaseClient) RestorePartitionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResumeApplicationBackup the previously suspended Service Fabric application resumes taking periodic backup as per +// the backup policy currently configured for the same. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ResumeApplicationBackup(ctx context.Context, applicationID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ResumeApplicationBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationBackup", err.Error()) + } + + req, err := client.ResumeApplicationBackupPreparer(ctx, applicationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeApplicationBackup", nil, "Failure preparing request") + return + } + + resp, err := client.ResumeApplicationBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeApplicationBackup", resp, "Failure sending request") + return + } + + result, err = client.ResumeApplicationBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeApplicationBackup", resp, "Failure responding to request") + } + + return +} + +// ResumeApplicationBackupPreparer prepares the ResumeApplicationBackup request. +func (client BaseClient) ResumeApplicationBackupPreparer(ctx context.Context, applicationID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/ResumeBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResumeApplicationBackupSender sends the ResumeApplicationBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ResumeApplicationBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ResumeApplicationBackupResponder handles the response to the ResumeApplicationBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) ResumeApplicationBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResumeApplicationUpgrade resumes an unmonitored manual Service Fabric application upgrade. Service Fabric upgrades +// one upgrade domain at a time. For unmonitored manual upgrades, after Service Fabric finishes an upgrade domain, it +// waits for you to call this API before proceeding to the next upgrade domain. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// resumeApplicationUpgradeDescription - describes the parameters for resuming an application upgrade. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ResumeApplicationUpgrade(ctx context.Context, applicationID string, resumeApplicationUpgradeDescription ResumeApplicationUpgradeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ResumeApplicationUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resumeApplicationUpgradeDescription, + Constraints: []validation.Constraint{{Target: "resumeApplicationUpgradeDescription.UpgradeDomainName", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ResumeApplicationUpgrade", err.Error()) + } + + req, err := client.ResumeApplicationUpgradePreparer(ctx, applicationID, resumeApplicationUpgradeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeApplicationUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.ResumeApplicationUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeApplicationUpgrade", resp, "Failure sending request") + return + } + + result, err = client.ResumeApplicationUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeApplicationUpgrade", resp, "Failure responding to request") + } + + return +} + +// ResumeApplicationUpgradePreparer prepares the ResumeApplicationUpgrade request. +func (client BaseClient) ResumeApplicationUpgradePreparer(ctx context.Context, applicationID string, resumeApplicationUpgradeDescription ResumeApplicationUpgradeDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/MoveToNextUpgradeDomain", pathParameters), + autorest.WithJSON(resumeApplicationUpgradeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResumeApplicationUpgradeSender sends the ResumeApplicationUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ResumeApplicationUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ResumeApplicationUpgradeResponder handles the response to the ResumeApplicationUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) ResumeApplicationUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResumeClusterUpgrade make the cluster code or configuration upgrade move on to the next upgrade domain if +// appropriate. +// Parameters: +// resumeClusterUpgradeDescription - describes the parameters for resuming a cluster upgrade. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ResumeClusterUpgrade(ctx context.Context, resumeClusterUpgradeDescription ResumeClusterUpgradeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ResumeClusterUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resumeClusterUpgradeDescription, + Constraints: []validation.Constraint{{Target: "resumeClusterUpgradeDescription.UpgradeDomain", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ResumeClusterUpgrade", err.Error()) + } + + req, err := client.ResumeClusterUpgradePreparer(ctx, resumeClusterUpgradeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeClusterUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.ResumeClusterUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeClusterUpgrade", resp, "Failure sending request") + return + } + + result, err = client.ResumeClusterUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeClusterUpgrade", resp, "Failure responding to request") + } + + return +} + +// ResumeClusterUpgradePreparer prepares the ResumeClusterUpgrade request. +func (client BaseClient) ResumeClusterUpgradePreparer(ctx context.Context, resumeClusterUpgradeDescription ResumeClusterUpgradeDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/MoveToNextUpgradeDomain"), + autorest.WithJSON(resumeClusterUpgradeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResumeClusterUpgradeSender sends the ResumeClusterUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ResumeClusterUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ResumeClusterUpgradeResponder handles the response to the ResumeClusterUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) ResumeClusterUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResumePartitionBackup the previously suspended partition resumes taking periodic backup as per the backup policy +// currently configured for the same. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ResumePartitionBackup(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ResumePartitionBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ResumePartitionBackup", err.Error()) + } + + req, err := client.ResumePartitionBackupPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumePartitionBackup", nil, "Failure preparing request") + return + } + + resp, err := client.ResumePartitionBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumePartitionBackup", resp, "Failure sending request") + return + } + + result, err = client.ResumePartitionBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumePartitionBackup", resp, "Failure responding to request") + } + + return +} + +// ResumePartitionBackupPreparer prepares the ResumePartitionBackup request. +func (client BaseClient) ResumePartitionBackupPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/ResumeBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResumePartitionBackupSender sends the ResumePartitionBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ResumePartitionBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ResumePartitionBackupResponder handles the response to the ResumePartitionBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) ResumePartitionBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ResumeServiceBackup the previously suspended Service Fabric service resumes taking periodic backup as per the backup +// policy currently configured for the same. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ResumeServiceBackup(ctx context.Context, serviceID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ResumeServiceBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ResumeServiceBackup", err.Error()) + } + + req, err := client.ResumeServiceBackupPreparer(ctx, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeServiceBackup", nil, "Failure preparing request") + return + } + + resp, err := client.ResumeServiceBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeServiceBackup", resp, "Failure sending request") + return + } + + result, err = client.ResumeServiceBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ResumeServiceBackup", resp, "Failure responding to request") + } + + return +} + +// ResumeServiceBackupPreparer prepares the ResumeServiceBackup request. +func (client BaseClient) ResumeServiceBackupPreparer(ctx context.Context, serviceID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/ResumeBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ResumeServiceBackupSender sends the ResumeServiceBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ResumeServiceBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ResumeServiceBackupResponder handles the response to the ResumeServiceBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) ResumeServiceBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// RollbackApplicationUpgrade starts rolling back the current application upgrade to the previous version. This API can +// only be used to roll back the current in-progress upgrade that is rolling forward to new version. If the application +// is not currently being upgraded use StartApplicationUpgrade API to upgrade it to desired version, including rolling +// back to a previous version. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RollbackApplicationUpgrade(ctx context.Context, applicationID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RollbackApplicationUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RollbackApplicationUpgrade", err.Error()) + } + + req, err := client.RollbackApplicationUpgradePreparer(ctx, applicationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RollbackApplicationUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.RollbackApplicationUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RollbackApplicationUpgrade", resp, "Failure sending request") + return + } + + result, err = client.RollbackApplicationUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RollbackApplicationUpgrade", resp, "Failure responding to request") + } + + return +} + +// RollbackApplicationUpgradePreparer prepares the RollbackApplicationUpgrade request. +func (client BaseClient) RollbackApplicationUpgradePreparer(ctx context.Context, applicationID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/RollbackUpgrade", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RollbackApplicationUpgradeSender sends the RollbackApplicationUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RollbackApplicationUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RollbackApplicationUpgradeResponder handles the response to the RollbackApplicationUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) RollbackApplicationUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// RollbackClusterUpgrade roll back the code or configuration upgrade of a Service Fabric cluster. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) RollbackClusterUpgrade(ctx context.Context, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RollbackClusterUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "RollbackClusterUpgrade", err.Error()) + } + + req, err := client.RollbackClusterUpgradePreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RollbackClusterUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.RollbackClusterUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RollbackClusterUpgrade", resp, "Failure sending request") + return + } + + result, err = client.RollbackClusterUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "RollbackClusterUpgrade", resp, "Failure responding to request") + } + + return +} + +// RollbackClusterUpgradePreparer prepares the RollbackClusterUpgrade request. +func (client BaseClient) RollbackClusterUpgradePreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/RollbackUpgrade"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RollbackClusterUpgradeSender sends the RollbackClusterUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) RollbackClusterUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// RollbackClusterUpgradeResponder handles the response to the RollbackClusterUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) RollbackClusterUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// SetUpgradeOrchestrationServiceState update the service state of Service Fabric Upgrade Orchestration Service. This +// API is internally used for support purposes. +// Parameters: +// upgradeOrchestrationServiceState - service state of Service Fabric Upgrade Orchestration Service. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) SetUpgradeOrchestrationServiceState(ctx context.Context, upgradeOrchestrationServiceState UpgradeOrchestrationServiceState, timeout *int64) (result UpgradeOrchestrationServiceStateSummary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SetUpgradeOrchestrationServiceState") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", err.Error()) + } + + req, err := client.SetUpgradeOrchestrationServiceStatePreparer(ctx, upgradeOrchestrationServiceState, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", nil, "Failure preparing request") + return + } + + resp, err := client.SetUpgradeOrchestrationServiceStateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", resp, "Failure sending request") + return + } + + result, err = client.SetUpgradeOrchestrationServiceStateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SetUpgradeOrchestrationServiceState", resp, "Failure responding to request") + } + + return +} + +// SetUpgradeOrchestrationServiceStatePreparer prepares the SetUpgradeOrchestrationServiceState request. +func (client BaseClient) SetUpgradeOrchestrationServiceStatePreparer(ctx context.Context, upgradeOrchestrationServiceState UpgradeOrchestrationServiceState, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/SetUpgradeOrchestrationServiceState"), + autorest.WithJSON(upgradeOrchestrationServiceState), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SetUpgradeOrchestrationServiceStateSender sends the SetUpgradeOrchestrationServiceState request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) SetUpgradeOrchestrationServiceStateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// SetUpgradeOrchestrationServiceStateResponder handles the response to the SetUpgradeOrchestrationServiceState request. The method always +// closes the http.Response Body. +func (client BaseClient) SetUpgradeOrchestrationServiceStateResponder(resp *http.Response) (result UpgradeOrchestrationServiceStateSummary, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StartApplicationUpgrade validates the supplied application upgrade parameters and starts upgrading the application +// if the parameters are valid. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// applicationUpgradeDescription - parameters for an application upgrade. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartApplicationUpgrade(ctx context.Context, applicationID string, applicationUpgradeDescription ApplicationUpgradeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartApplicationUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: applicationUpgradeDescription, + Constraints: []validation.Constraint{{Target: "applicationUpgradeDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "applicationUpgradeDescription.TargetApplicationTypeVersion", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartApplicationUpgrade", err.Error()) + } + + req, err := client.StartApplicationUpgradePreparer(ctx, applicationID, applicationUpgradeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartApplicationUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.StartApplicationUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartApplicationUpgrade", resp, "Failure sending request") + return + } + + result, err = client.StartApplicationUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartApplicationUpgrade", resp, "Failure responding to request") + } + + return +} + +// StartApplicationUpgradePreparer prepares the StartApplicationUpgrade request. +func (client BaseClient) StartApplicationUpgradePreparer(ctx context.Context, applicationID string, applicationUpgradeDescription ApplicationUpgradeDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/Upgrade", pathParameters), + autorest.WithJSON(applicationUpgradeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartApplicationUpgradeSender sends the StartApplicationUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartApplicationUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartApplicationUpgradeResponder handles the response to the StartApplicationUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) StartApplicationUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartChaos if Chaos is not already running in the cluster, it starts Chaos with the passed in Chaos parameters. +// If Chaos is already running when this call is made, the call fails with the error code +// FABRIC_E_CHAOS_ALREADY_RUNNING. +// Refer to the article [Induce controlled Chaos in Service Fabric +// clusters](https://docs.microsoft.com/azure/service-fabric/service-fabric-controlled-chaos) for more details. +// Parameters: +// chaosParameters - describes all the parameters to configure a Chaos run. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartChaos(ctx context.Context, chaosParameters ChaosParameters, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartChaos") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: chaosParameters, + Constraints: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "chaosParameters.MaxClusterStabilizationTimeoutInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "chaosParameters.MaxConcurrentFaults", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenFaultsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "chaosParameters.WaitTimeBetweenIterationsInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartChaos", err.Error()) + } + + req, err := client.StartChaosPreparer(ctx, chaosParameters, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartChaos", nil, "Failure preparing request") + return + } + + resp, err := client.StartChaosSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartChaos", resp, "Failure sending request") + return + } + + result, err = client.StartChaosResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartChaos", resp, "Failure responding to request") + } + + return +} + +// StartChaosPreparer prepares the StartChaos request. +func (client BaseClient) StartChaosPreparer(ctx context.Context, chaosParameters ChaosParameters, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Tools/Chaos/$/Start"), + autorest.WithJSON(chaosParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartChaosSender sends the StartChaos request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartChaosSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartChaosResponder handles the response to the StartChaos request. The method always +// closes the http.Response Body. +func (client BaseClient) StartChaosResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartClusterConfigurationUpgrade validate the supplied configuration upgrade parameters and start upgrading the +// cluster configuration if the parameters are valid. +// Parameters: +// clusterConfigurationUpgradeDescription - parameters for a standalone cluster configuration upgrade. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartClusterConfigurationUpgrade(ctx context.Context, clusterConfigurationUpgradeDescription ClusterConfigurationUpgradeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartClusterConfigurationUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: clusterConfigurationUpgradeDescription, + Constraints: []validation.Constraint{{Target: "clusterConfigurationUpgradeDescription.ClusterConfig", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartClusterConfigurationUpgrade", err.Error()) + } + + req, err := client.StartClusterConfigurationUpgradePreparer(ctx, clusterConfigurationUpgradeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartClusterConfigurationUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.StartClusterConfigurationUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartClusterConfigurationUpgrade", resp, "Failure sending request") + return + } + + result, err = client.StartClusterConfigurationUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartClusterConfigurationUpgrade", resp, "Failure responding to request") + } + + return +} + +// StartClusterConfigurationUpgradePreparer prepares the StartClusterConfigurationUpgrade request. +func (client BaseClient) StartClusterConfigurationUpgradePreparer(ctx context.Context, clusterConfigurationUpgradeDescription ClusterConfigurationUpgradeDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/StartClusterConfigurationUpgrade"), + autorest.WithJSON(clusterConfigurationUpgradeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartClusterConfigurationUpgradeSender sends the StartClusterConfigurationUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartClusterConfigurationUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartClusterConfigurationUpgradeResponder handles the response to the StartClusterConfigurationUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) StartClusterConfigurationUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartClusterUpgrade validate the supplied upgrade parameters and start upgrading the code or configuration version +// of a Service Fabric cluster if the parameters are valid. +// Parameters: +// startClusterUpgradeDescription - describes the parameters for starting a cluster upgrade. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartClusterUpgrade(ctx context.Context, startClusterUpgradeDescription StartClusterUpgradeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartClusterUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: startClusterUpgradeDescription, + Constraints: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "startClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartClusterUpgrade", err.Error()) + } + + req, err := client.StartClusterUpgradePreparer(ctx, startClusterUpgradeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartClusterUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.StartClusterUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartClusterUpgrade", resp, "Failure sending request") + return + } + + result, err = client.StartClusterUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartClusterUpgrade", resp, "Failure responding to request") + } + + return +} + +// StartClusterUpgradePreparer prepares the StartClusterUpgrade request. +func (client BaseClient) StartClusterUpgradePreparer(ctx context.Context, startClusterUpgradeDescription StartClusterUpgradeDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/Upgrade"), + autorest.WithJSON(startClusterUpgradeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartClusterUpgradeSender sends the StartClusterUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartClusterUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartClusterUpgradeResponder handles the response to the StartClusterUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) StartClusterUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartComposeDeploymentUpgrade validates the supplied upgrade parameters and starts upgrading the deployment if the +// parameters are valid. +// Parameters: +// deploymentName - the identity of the deployment. +// composeDeploymentUpgradeDescription - parameters for upgrading compose deployment. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartComposeDeploymentUpgrade(ctx context.Context, deploymentName string, composeDeploymentUpgradeDescription ComposeDeploymentUpgradeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartComposeDeploymentUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: composeDeploymentUpgradeDescription, + Constraints: []validation.Constraint{{Target: "composeDeploymentUpgradeDescription.DeploymentName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "composeDeploymentUpgradeDescription.ComposeFileContent", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartComposeDeploymentUpgrade", err.Error()) + } + + req, err := client.StartComposeDeploymentUpgradePreparer(ctx, deploymentName, composeDeploymentUpgradeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartComposeDeploymentUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.StartComposeDeploymentUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartComposeDeploymentUpgrade", resp, "Failure sending request") + return + } + + result, err = client.StartComposeDeploymentUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartComposeDeploymentUpgrade", resp, "Failure responding to request") + } + + return +} + +// StartComposeDeploymentUpgradePreparer prepares the StartComposeDeploymentUpgrade request. +func (client BaseClient) StartComposeDeploymentUpgradePreparer(ctx context.Context, deploymentName string, composeDeploymentUpgradeDescription ComposeDeploymentUpgradeDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": deploymentName, + } + + const APIVersion = "6.0-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ComposeDeployments/{deploymentName}/$/Upgrade", pathParameters), + autorest.WithJSON(composeDeploymentUpgradeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartComposeDeploymentUpgradeSender sends the StartComposeDeploymentUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartComposeDeploymentUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartComposeDeploymentUpgradeResponder handles the response to the StartComposeDeploymentUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) StartComposeDeploymentUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartDataLoss this API will induce data loss for the specified partition. It will trigger a call to the OnDataLoss +// API of the partition. +// Actual data loss will depend on the specified DataLossMode. +// +// - PartialDataLoss - Only a quorum of replicas are removed and OnDataLoss is triggered for the partition but actual +// data loss depends on the presence of in-flight replication. +// - FullDataLoss - All replicas are removed hence all data is lost and OnDataLoss is triggered. +// +// This API should only be called with a stateful service as the target. +// +// Calling this API with a system service as the target is not advised. +// +// Note: Once this API has been called, it cannot be reversed. Calling CancelOperation will only stop execution and +// clean up internal system state. +// It will not restore data if the command has progressed far enough to cause data loss. +// +// Call the GetDataLossProgress API with the same OperationId to return information on the operation started with this +// API. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionID - the identity of the partition. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// dataLossMode - this enum is passed to the StartDataLoss API to indicate what type of data loss to induce. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartDataLoss(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, dataLossMode DataLossMode, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartDataLoss") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartDataLoss", err.Error()) + } + + req, err := client.StartDataLossPreparer(ctx, serviceID, partitionID, operationID, dataLossMode, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartDataLoss", nil, "Failure preparing request") + return + } + + resp, err := client.StartDataLossSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartDataLoss", resp, "Failure sending request") + return + } + + result, err = client.StartDataLossResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartDataLoss", resp, "Failure responding to request") + } + + return +} + +// StartDataLossPreparer prepares the StartDataLoss request. +func (client BaseClient) StartDataLossPreparer(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, dataLossMode DataLossMode, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "DataLossMode": autorest.Encode("query", dataLossMode), + "OperationId": autorest.Encode("query", operationID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartDataLoss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartDataLossSender sends the StartDataLoss request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartDataLossSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartDataLossResponder handles the response to the StartDataLoss request. The method always +// closes the http.Response Body. +func (client BaseClient) StartDataLossResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartNodeTransition starts or stops a cluster node. A cluster node is a process, not the OS instance itself. To +// start a node, pass in "Start" for the NodeTransitionType parameter. +// To stop a node, pass in "Stop" for the NodeTransitionType parameter. This API starts the operation - when the API +// returns the node may not have finished transitioning yet. +// Call GetNodeTransitionProgress with the same OperationId to get the progress of the operation. +// Parameters: +// nodeName - the name of the node. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// nodeTransitionType - indicates the type of transition to perform. NodeTransitionType.Start will start a +// stopped node. NodeTransitionType.Stop will stop a node that is up. +// nodeInstanceID - the node instance ID of the target node. This can be determined through GetNodeInfo API. +// stopDurationInSeconds - the duration, in seconds, to keep the node stopped. The minimum value is 600, the +// maximum is 14400. After this time expires, the node will automatically come back up. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartNodeTransition(ctx context.Context, nodeName string, operationID uuid.UUID, nodeTransitionType NodeTransitionType, nodeInstanceID string, stopDurationInSeconds int32, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartNodeTransition") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: stopDurationInSeconds, + Constraints: []validation.Constraint{{Target: "stopDurationInSeconds", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartNodeTransition", err.Error()) + } + + req, err := client.StartNodeTransitionPreparer(ctx, nodeName, operationID, nodeTransitionType, nodeInstanceID, stopDurationInSeconds, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartNodeTransition", nil, "Failure preparing request") + return + } + + resp, err := client.StartNodeTransitionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartNodeTransition", resp, "Failure sending request") + return + } + + result, err = client.StartNodeTransitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartNodeTransition", resp, "Failure responding to request") + } + + return +} + +// StartNodeTransitionPreparer prepares the StartNodeTransition request. +func (client BaseClient) StartNodeTransitionPreparer(ctx context.Context, nodeName string, operationID uuid.UUID, nodeTransitionType NodeTransitionType, nodeInstanceID string, stopDurationInSeconds int32, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nodeName": autorest.Encode("path", nodeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "NodeInstanceId": autorest.Encode("query", nodeInstanceID), + "NodeTransitionType": autorest.Encode("query", nodeTransitionType), + "OperationId": autorest.Encode("query", operationID), + "StopDurationInSeconds": autorest.Encode("query", stopDurationInSeconds), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Nodes/{nodeName}/$/StartTransition/", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartNodeTransitionSender sends the StartNodeTransition request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartNodeTransitionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartNodeTransitionResponder handles the response to the StartNodeTransition request. The method always +// closes the http.Response Body. +func (client BaseClient) StartNodeTransitionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartPartitionRestart this API is useful for testing failover. +// +// If used to target a stateless service partition, RestartPartitionMode must be AllReplicasOrInstances. +// +// Call the GetPartitionRestartProgress API using the same OperationId to get the progress. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionID - the identity of the partition. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// restartPartitionMode - describe which partitions to restart. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartPartitionRestart(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, restartPartitionMode RestartPartitionMode, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartPartitionRestart") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartPartitionRestart", err.Error()) + } + + req, err := client.StartPartitionRestartPreparer(ctx, serviceID, partitionID, operationID, restartPartitionMode, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartPartitionRestart", nil, "Failure preparing request") + return + } + + resp, err := client.StartPartitionRestartSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartPartitionRestart", resp, "Failure sending request") + return + } + + result, err = client.StartPartitionRestartResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartPartitionRestart", resp, "Failure responding to request") + } + + return +} + +// StartPartitionRestartPreparer prepares the StartPartitionRestart request. +func (client BaseClient) StartPartitionRestartPreparer(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, restartPartitionMode RestartPartitionMode, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "OperationId": autorest.Encode("query", operationID), + "RestartPartitionMode": autorest.Encode("query", restartPartitionMode), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartRestart", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartPartitionRestartSender sends the StartPartitionRestart request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartPartitionRestartSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartPartitionRestartResponder handles the response to the StartPartitionRestart request. The method always +// closes the http.Response Body. +func (client BaseClient) StartPartitionRestartResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartQuorumLoss this API is useful for a temporary quorum loss situation on your service. +// +// Call the GetQuorumLossProgress API with the same OperationId to return information on the operation started with +// this API. +// +// This can only be called on stateful persisted (HasPersistedState==true) services. Do not use this API on stateless +// services or stateful in-memory only services. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// partitionID - the identity of the partition. +// operationID - a GUID that identifies a call of this API. This is passed into the corresponding GetProgress +// API +// quorumLossMode - this enum is passed to the StartQuorumLoss API to indicate what type of quorum loss to +// induce. +// quorumLossDuration - the amount of time for which the partition will be kept in quorum loss. This must be +// specified in seconds. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartQuorumLoss(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, quorumLossMode QuorumLossMode, quorumLossDuration int32, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartQuorumLoss") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartQuorumLoss", err.Error()) + } + + req, err := client.StartQuorumLossPreparer(ctx, serviceID, partitionID, operationID, quorumLossMode, quorumLossDuration, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartQuorumLoss", nil, "Failure preparing request") + return + } + + resp, err := client.StartQuorumLossSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartQuorumLoss", resp, "Failure sending request") + return + } + + result, err = client.StartQuorumLossResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartQuorumLoss", resp, "Failure responding to request") + } + + return +} + +// StartQuorumLossPreparer prepares the StartQuorumLoss request. +func (client BaseClient) StartQuorumLossPreparer(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, quorumLossMode QuorumLossMode, quorumLossDuration int32, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "OperationId": autorest.Encode("query", operationID), + "QuorumLossDuration": autorest.Encode("query", quorumLossDuration), + "QuorumLossMode": autorest.Encode("query", quorumLossMode), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Faults/Services/{serviceId}/$/GetPartitions/{partitionId}/$/StartQuorumLoss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartQuorumLossSender sends the StartQuorumLoss request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartQuorumLossSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartQuorumLossResponder handles the response to the StartQuorumLoss request. The method always +// closes the http.Response Body. +func (client BaseClient) StartQuorumLossResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartRollbackComposeDeploymentUpgrade rollback a service fabric compose deployment upgrade. +// Parameters: +// deploymentName - the identity of the deployment. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StartRollbackComposeDeploymentUpgrade(ctx context.Context, deploymentName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartRollbackComposeDeploymentUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StartRollbackComposeDeploymentUpgrade", err.Error()) + } + + req, err := client.StartRollbackComposeDeploymentUpgradePreparer(ctx, deploymentName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartRollbackComposeDeploymentUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.StartRollbackComposeDeploymentUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartRollbackComposeDeploymentUpgrade", resp, "Failure sending request") + return + } + + result, err = client.StartRollbackComposeDeploymentUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StartRollbackComposeDeploymentUpgrade", resp, "Failure responding to request") + } + + return +} + +// StartRollbackComposeDeploymentUpgradePreparer prepares the StartRollbackComposeDeploymentUpgrade request. +func (client BaseClient) StartRollbackComposeDeploymentUpgradePreparer(ctx context.Context, deploymentName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "deploymentName": deploymentName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ComposeDeployments/{deploymentName}/$/RollbackUpgrade", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StartRollbackComposeDeploymentUpgradeSender sends the StartRollbackComposeDeploymentUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StartRollbackComposeDeploymentUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StartRollbackComposeDeploymentUpgradeResponder handles the response to the StartRollbackComposeDeploymentUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) StartRollbackComposeDeploymentUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// StopChaos stops Chaos from executing new faults. In-flight faults will continue to execute until they are complete. +// The current Chaos Schedule is put into a stopped state. +// Once a schedule is stopped, it will stay in the stopped state and not be used to Chaos Schedule new runs of Chaos. A +// new Chaos Schedule must be set in order to resume scheduling. +// Parameters: +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) StopChaos(ctx context.Context, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StopChaos") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "StopChaos", err.Error()) + } + + req, err := client.StopChaosPreparer(ctx, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StopChaos", nil, "Failure preparing request") + return + } + + resp, err := client.StopChaosSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StopChaos", resp, "Failure sending request") + return + } + + result, err = client.StopChaosResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "StopChaos", resp, "Failure responding to request") + } + + return +} + +// StopChaosPreparer prepares the StopChaos request. +func (client BaseClient) StopChaosPreparer(ctx context.Context, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Tools/Chaos/$/Stop"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// StopChaosSender sends the StopChaos request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) StopChaosSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// StopChaosResponder handles the response to the StopChaos request. The method always +// closes the http.Response Body. +func (client BaseClient) StopChaosResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// SubmitPropertyBatch submits a batch of property operations. Either all or none of the operations will be committed. +// Parameters: +// nameID - the Service Fabric name, without the 'fabric:' URI scheme. +// propertyBatchDescriptionList - describes the property batch operations to be submitted. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) SubmitPropertyBatch(ctx context.Context, nameID string, propertyBatchDescriptionList PropertyBatchDescriptionList, timeout *int64) (result PropertyBatchInfoModel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SubmitPropertyBatch") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "SubmitPropertyBatch", err.Error()) + } + + req, err := client.SubmitPropertyBatchPreparer(ctx, nameID, propertyBatchDescriptionList, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SubmitPropertyBatch", nil, "Failure preparing request") + return + } + + resp, err := client.SubmitPropertyBatchSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SubmitPropertyBatch", resp, "Failure sending request") + return + } + + result, err = client.SubmitPropertyBatchResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SubmitPropertyBatch", resp, "Failure responding to request") + } + + return +} + +// SubmitPropertyBatchPreparer prepares the SubmitPropertyBatch request. +func (client BaseClient) SubmitPropertyBatchPreparer(ctx context.Context, nameID string, propertyBatchDescriptionList PropertyBatchDescriptionList, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "nameId": nameID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Names/{nameId}/$/GetProperties/$/SubmitBatch", pathParameters), + autorest.WithJSON(propertyBatchDescriptionList), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SubmitPropertyBatchSender sends the SubmitPropertyBatch request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) SubmitPropertyBatchSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// SubmitPropertyBatchResponder handles the response to the SubmitPropertyBatch request. The method always +// closes the http.Response Body. +func (client BaseClient) SubmitPropertyBatchResponder(resp *http.Response) (result PropertyBatchInfoModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusConflict), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SuspendApplicationBackup the application which is configured to take periodic backups, is suspended for taking +// further backups till it is resumed again. This operation applies to the entire application's hierarchy. It means all +// the services and partitions under this application are now suspended for backup. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) SuspendApplicationBackup(ctx context.Context, applicationID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SuspendApplicationBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "SuspendApplicationBackup", err.Error()) + } + + req, err := client.SuspendApplicationBackupPreparer(ctx, applicationID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendApplicationBackup", nil, "Failure preparing request") + return + } + + resp, err := client.SuspendApplicationBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendApplicationBackup", resp, "Failure sending request") + return + } + + result, err = client.SuspendApplicationBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendApplicationBackup", resp, "Failure responding to request") + } + + return +} + +// SuspendApplicationBackupPreparer prepares the SuspendApplicationBackup request. +func (client BaseClient) SuspendApplicationBackupPreparer(ctx context.Context, applicationID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/SuspendBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SuspendApplicationBackupSender sends the SuspendApplicationBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) SuspendApplicationBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// SuspendApplicationBackupResponder handles the response to the SuspendApplicationBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) SuspendApplicationBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// SuspendPartitionBackup the partition which is configured to take periodic backups, is suspended for taking further +// backups till it is resumed again. +// Parameters: +// partitionID - the identity of the partition. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) SuspendPartitionBackup(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SuspendPartitionBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "SuspendPartitionBackup", err.Error()) + } + + req, err := client.SuspendPartitionBackupPreparer(ctx, partitionID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendPartitionBackup", nil, "Failure preparing request") + return + } + + resp, err := client.SuspendPartitionBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendPartitionBackup", resp, "Failure sending request") + return + } + + result, err = client.SuspendPartitionBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendPartitionBackup", resp, "Failure responding to request") + } + + return +} + +// SuspendPartitionBackupPreparer prepares the SuspendPartitionBackup request. +func (client BaseClient) SuspendPartitionBackupPreparer(ctx context.Context, partitionID uuid.UUID, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "partitionId": partitionID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Partitions/{partitionId}/$/SuspendBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SuspendPartitionBackupSender sends the SuspendPartitionBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) SuspendPartitionBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// SuspendPartitionBackupResponder handles the response to the SuspendPartitionBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) SuspendPartitionBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// SuspendServiceBackup the service which is configured to take periodic backups, is suspended for taking further +// backups till it is resumed again. This operation applies to the entire service's hierarchy. It means all the +// partitions under this service are now suspended for backup. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) SuspendServiceBackup(ctx context.Context, serviceID string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SuspendServiceBackup") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "SuspendServiceBackup", err.Error()) + } + + req, err := client.SuspendServiceBackupPreparer(ctx, serviceID, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendServiceBackup", nil, "Failure preparing request") + return + } + + resp, err := client.SuspendServiceBackupSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendServiceBackup", resp, "Failure sending request") + return + } + + result, err = client.SuspendServiceBackupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "SuspendServiceBackup", resp, "Failure responding to request") + } + + return +} + +// SuspendServiceBackupPreparer prepares the SuspendServiceBackup request. +func (client BaseClient) SuspendServiceBackupPreparer(ctx context.Context, serviceID string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/SuspendBackup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SuspendServiceBackupSender sends the SuspendServiceBackup request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) SuspendServiceBackupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// SuspendServiceBackupResponder handles the response to the SuspendServiceBackup request. The method always +// closes the http.Response Body. +func (client BaseClient) SuspendServiceBackupResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// ToggleVerboseServicePlacementHealthReporting if verbosity is set to true, then detailed health reports will be +// generated when replicas cannot be placed or dropped. +// If verbosity is set to false, then no health reports will be generated when replicas cannot be placed or dropped. +// Parameters: +// enabled - the verbosity of service placement health reporting. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) ToggleVerboseServicePlacementHealthReporting(ctx context.Context, enabled bool, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ToggleVerboseServicePlacementHealthReporting") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "ToggleVerboseServicePlacementHealthReporting", err.Error()) + } + + req, err := client.ToggleVerboseServicePlacementHealthReportingPreparer(ctx, enabled, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ToggleVerboseServicePlacementHealthReporting", nil, "Failure preparing request") + return + } + + resp, err := client.ToggleVerboseServicePlacementHealthReportingSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ToggleVerboseServicePlacementHealthReporting", resp, "Failure sending request") + return + } + + result, err = client.ToggleVerboseServicePlacementHealthReportingResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "ToggleVerboseServicePlacementHealthReporting", resp, "Failure responding to request") + } + + return +} + +// ToggleVerboseServicePlacementHealthReportingPreparer prepares the ToggleVerboseServicePlacementHealthReporting request. +func (client BaseClient) ToggleVerboseServicePlacementHealthReportingPreparer(ctx context.Context, enabled bool, timeout *int64) (*http.Request, error) { + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "Enabled": autorest.Encode("query", enabled), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/ToggleVerboseServicePlacementHealthReporting"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ToggleVerboseServicePlacementHealthReportingSender sends the ToggleVerboseServicePlacementHealthReporting request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) ToggleVerboseServicePlacementHealthReportingSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ToggleVerboseServicePlacementHealthReportingResponder handles the response to the ToggleVerboseServicePlacementHealthReporting request. The method always +// closes the http.Response Body. +func (client BaseClient) ToggleVerboseServicePlacementHealthReportingResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UnprovisionApplicationType this operation can only be performed if all application instances of the application type +// have been deleted. Once the application type is unregistered, no new application instances can be created for this +// particular application type. +// Parameters: +// applicationTypeName - the name of the application type. +// unprovisionApplicationTypeDescriptionInfo - the relative path for the application package in the image store +// specified during the prior copy operation. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UnprovisionApplicationType(ctx context.Context, applicationTypeName string, unprovisionApplicationTypeDescriptionInfo UnprovisionApplicationTypeDescriptionInfo, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UnprovisionApplicationType") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: unprovisionApplicationTypeDescriptionInfo, + Constraints: []validation.Constraint{{Target: "unprovisionApplicationTypeDescriptionInfo.ApplicationTypeVersion", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UnprovisionApplicationType", err.Error()) + } + + req, err := client.UnprovisionApplicationTypePreparer(ctx, applicationTypeName, unprovisionApplicationTypeDescriptionInfo, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UnprovisionApplicationType", nil, "Failure preparing request") + return + } + + resp, err := client.UnprovisionApplicationTypeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UnprovisionApplicationType", resp, "Failure sending request") + return + } + + result, err = client.UnprovisionApplicationTypeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UnprovisionApplicationType", resp, "Failure responding to request") + } + + return +} + +// UnprovisionApplicationTypePreparer prepares the UnprovisionApplicationType request. +func (client BaseClient) UnprovisionApplicationTypePreparer(ctx context.Context, applicationTypeName string, unprovisionApplicationTypeDescriptionInfo UnprovisionApplicationTypeDescriptionInfo, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationTypeName": autorest.Encode("path", applicationTypeName), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ApplicationTypes/{applicationTypeName}/$/Unprovision", pathParameters), + autorest.WithJSON(unprovisionApplicationTypeDescriptionInfo), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnprovisionApplicationTypeSender sends the UnprovisionApplicationType request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UnprovisionApplicationTypeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UnprovisionApplicationTypeResponder handles the response to the UnprovisionApplicationType request. The method always +// closes the http.Response Body. +func (client BaseClient) UnprovisionApplicationTypeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// UnprovisionCluster it is supported to unprovision code and configuration separately. +// Parameters: +// unprovisionFabricDescription - describes the parameters for unprovisioning a cluster. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UnprovisionCluster(ctx context.Context, unprovisionFabricDescription UnprovisionFabricDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UnprovisionCluster") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UnprovisionCluster", err.Error()) + } + + req, err := client.UnprovisionClusterPreparer(ctx, unprovisionFabricDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UnprovisionCluster", nil, "Failure preparing request") + return + } + + resp, err := client.UnprovisionClusterSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UnprovisionCluster", resp, "Failure sending request") + return + } + + result, err = client.UnprovisionClusterResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UnprovisionCluster", resp, "Failure responding to request") + } + + return +} + +// UnprovisionClusterPreparer prepares the UnprovisionCluster request. +func (client BaseClient) UnprovisionClusterPreparer(ctx context.Context, unprovisionFabricDescription UnprovisionFabricDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/Unprovision"), + autorest.WithJSON(unprovisionFabricDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UnprovisionClusterSender sends the UnprovisionCluster request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UnprovisionClusterSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UnprovisionClusterResponder handles the response to the UnprovisionCluster request. The method always +// closes the http.Response Body. +func (client BaseClient) UnprovisionClusterResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateApplicationUpgrade updates the parameters of an ongoing application upgrade from the ones specified at the +// time of starting the application upgrade. This may be required to mitigate stuck application upgrades due to +// incorrect parameters or issues in the application to make progress. +// Parameters: +// applicationID - the identity of the application. This is typically the full name of the application without +// the 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the application name is "fabric:/myapp/app1", the application identity would be "myapp~app1" +// in 6.0+ and "myapp/app1" in previous versions. +// applicationUpgradeUpdateDescription - parameters for updating an existing application upgrade. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UpdateApplicationUpgrade(ctx context.Context, applicationID string, applicationUpgradeUpdateDescription ApplicationUpgradeUpdateDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateApplicationUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: applicationUpgradeUpdateDescription, + Constraints: []validation.Constraint{{Target: "applicationUpgradeUpdateDescription.Name", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UpdateApplicationUpgrade", err.Error()) + } + + req, err := client.UpdateApplicationUpgradePreparer(ctx, applicationID, applicationUpgradeUpdateDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateApplicationUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateApplicationUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateApplicationUpgrade", resp, "Failure sending request") + return + } + + result, err = client.UpdateApplicationUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateApplicationUpgrade", resp, "Failure responding to request") + } + + return +} + +// UpdateApplicationUpgradePreparer prepares the UpdateApplicationUpgrade request. +func (client BaseClient) UpdateApplicationUpgradePreparer(ctx context.Context, applicationID string, applicationUpgradeUpdateDescription ApplicationUpgradeUpdateDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationId": applicationID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Applications/{applicationId}/$/UpdateUpgrade", pathParameters), + autorest.WithJSON(applicationUpgradeUpdateDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateApplicationUpgradeSender sends the UpdateApplicationUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UpdateApplicationUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateApplicationUpgradeResponder handles the response to the UpdateApplicationUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) UpdateApplicationUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateBackupPolicy updates the backup policy identified by {backupPolicyName} +// Parameters: +// backupPolicyDescription - describes the backup policy. +// backupPolicyName - the name of the backup policy. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UpdateBackupPolicy(ctx context.Context, backupPolicyDescription BackupPolicyDescription, backupPolicyName string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateBackupPolicy") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: backupPolicyDescription, + Constraints: []validation.Constraint{{Target: "backupPolicyDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "backupPolicyDescription.AutoRestoreOnDataLoss", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMaximum, Rule: int64(255), Chain: nil}, + {Target: "backupPolicyDescription.MaxIncrementalBackups", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "backupPolicyDescription.Schedule", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "backupPolicyDescription.Storage", Name: validation.Null, Rule: true, Chain: nil}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UpdateBackupPolicy", err.Error()) + } + + req, err := client.UpdateBackupPolicyPreparer(ctx, backupPolicyDescription, backupPolicyName, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateBackupPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateBackupPolicySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateBackupPolicy", resp, "Failure sending request") + return + } + + result, err = client.UpdateBackupPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateBackupPolicy", resp, "Failure responding to request") + } + + return +} + +// UpdateBackupPolicyPreparer prepares the UpdateBackupPolicy request. +func (client BaseClient) UpdateBackupPolicyPreparer(ctx context.Context, backupPolicyDescription BackupPolicyDescription, backupPolicyName string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupPolicyName": autorest.Encode("path", backupPolicyName), + } + + const APIVersion = "6.4" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/BackupRestore/BackupPolicies/{backupPolicyName}/$/Update", pathParameters), + autorest.WithJSON(backupPolicyDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateBackupPolicySender sends the UpdateBackupPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UpdateBackupPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateBackupPolicyResponder handles the response to the UpdateBackupPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) UpdateBackupPolicyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateClusterUpgrade update the upgrade parameters used during a Service Fabric cluster upgrade. +// Parameters: +// updateClusterUpgradeDescription - parameters for updating a cluster upgrade. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UpdateClusterUpgrade(ctx context.Context, updateClusterUpgradeDescription UpdateClusterUpgradeDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateClusterUpgrade") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: updateClusterUpgradeDescription, + Constraints: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, + {Target: "updateClusterUpgradeDescription.ClusterUpgradeHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}}}, + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UpdateClusterUpgrade", err.Error()) + } + + req, err := client.UpdateClusterUpgradePreparer(ctx, updateClusterUpgradeDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateClusterUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateClusterUpgradeSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateClusterUpgrade", resp, "Failure sending request") + return + } + + result, err = client.UpdateClusterUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateClusterUpgrade", resp, "Failure responding to request") + } + + return +} + +// UpdateClusterUpgradePreparer prepares the UpdateClusterUpgrade request. +func (client BaseClient) UpdateClusterUpgradePreparer(ctx context.Context, updateClusterUpgradeDescription UpdateClusterUpgradeDescription, timeout *int64) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/UpdateUpgrade"), + autorest.WithJSON(updateClusterUpgradeDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateClusterUpgradeSender sends the UpdateClusterUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UpdateClusterUpgradeSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateClusterUpgradeResponder handles the response to the UpdateClusterUpgrade request. The method always +// closes the http.Response Body. +func (client BaseClient) UpdateClusterUpgradeResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateRepairExecutionState this API supports the Service Fabric platform; it is not meant to be used directly from +// your code. +// Parameters: +// repairTask - describes the repair task to be created or updated. +func (client BaseClient) UpdateRepairExecutionState(ctx context.Context, repairTask RepairTask) (result RepairTaskUpdateInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateRepairExecutionState") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: repairTask, + Constraints: []validation.Constraint{{Target: "repairTask.TaskID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "repairTask.Action", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UpdateRepairExecutionState", err.Error()) + } + + req, err := client.UpdateRepairExecutionStatePreparer(ctx, repairTask) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateRepairExecutionState", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateRepairExecutionStateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateRepairExecutionState", resp, "Failure sending request") + return + } + + result, err = client.UpdateRepairExecutionStateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateRepairExecutionState", resp, "Failure responding to request") + } + + return +} + +// UpdateRepairExecutionStatePreparer prepares the UpdateRepairExecutionState request. +func (client BaseClient) UpdateRepairExecutionStatePreparer(ctx context.Context, repairTask RepairTask) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/UpdateRepairExecutionState"), + autorest.WithJSON(repairTask), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateRepairExecutionStateSender sends the UpdateRepairExecutionState request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UpdateRepairExecutionStateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateRepairExecutionStateResponder handles the response to the UpdateRepairExecutionState request. The method always +// closes the http.Response Body. +func (client BaseClient) UpdateRepairExecutionStateResponder(resp *http.Response) (result RepairTaskUpdateInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateRepairTaskHealthPolicy this API supports the Service Fabric platform; it is not meant to be used directly from +// your code. +// Parameters: +// repairTaskUpdateHealthPolicyDescription - describes the repair task healthy policy to be updated. +func (client BaseClient) UpdateRepairTaskHealthPolicy(ctx context.Context, repairTaskUpdateHealthPolicyDescription RepairTaskUpdateHealthPolicyDescription) (result RepairTaskUpdateInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateRepairTaskHealthPolicy") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: repairTaskUpdateHealthPolicyDescription, + Constraints: []validation.Constraint{{Target: "repairTaskUpdateHealthPolicyDescription.TaskID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UpdateRepairTaskHealthPolicy", err.Error()) + } + + req, err := client.UpdateRepairTaskHealthPolicyPreparer(ctx, repairTaskUpdateHealthPolicyDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateRepairTaskHealthPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateRepairTaskHealthPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateRepairTaskHealthPolicy", resp, "Failure sending request") + return + } + + result, err = client.UpdateRepairTaskHealthPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateRepairTaskHealthPolicy", resp, "Failure responding to request") + } + + return +} + +// UpdateRepairTaskHealthPolicyPreparer prepares the UpdateRepairTaskHealthPolicy request. +func (client BaseClient) UpdateRepairTaskHealthPolicyPreparer(ctx context.Context, repairTaskUpdateHealthPolicyDescription RepairTaskUpdateHealthPolicyDescription) (*http.Request, error) { + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/$/UpdateRepairTaskHealthPolicy"), + autorest.WithJSON(repairTaskUpdateHealthPolicyDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateRepairTaskHealthPolicySender sends the UpdateRepairTaskHealthPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UpdateRepairTaskHealthPolicySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateRepairTaskHealthPolicyResponder handles the response to the UpdateRepairTaskHealthPolicy request. The method always +// closes the http.Response Body. +func (client BaseClient) UpdateRepairTaskHealthPolicyResponder(resp *http.Response) (result RepairTaskUpdateInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateService this API allows updating properties of a running Service Fabric service. The set of properties that +// can be updated are a subset of the properties that were specified at the time of creating the service. The current +// set of properties can be obtained using `GetServiceDescription` API. Note that updating the properties of a running +// service is different than upgrading your application using `StartApplicationUpgrade` API. The upgrade is a long +// running background operation that involves moving the application from one version to another, one upgrade domain at +// a time, whereas update applies the new properties immediately to the service. +// Parameters: +// serviceID - the identity of the service. This ID is typically the full name of the service without the +// 'fabric:' URI scheme. +// Starting from version 6.0, hierarchical names are delimited with the "~" character. +// For example, if the service name is "fabric:/myapp/app1/svc1", the service identity would be +// "myapp~app1~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. +// serviceUpdateDescription - the information necessary to update a service. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UpdateService(ctx context.Context, serviceID string, serviceUpdateDescription BasicServiceUpdateDescription, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateService") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UpdateService", err.Error()) + } + + req, err := client.UpdateServicePreparer(ctx, serviceID, serviceUpdateDescription, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateService", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateServiceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateService", resp, "Failure sending request") + return + } + + result, err = client.UpdateServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UpdateService", resp, "Failure responding to request") + } + + return +} + +// UpdateServicePreparer prepares the UpdateService request. +func (client BaseClient) UpdateServicePreparer(ctx context.Context, serviceID string, serviceUpdateDescription BasicServiceUpdateDescription, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "serviceId": serviceID, + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Services/{serviceId}/$/Update", pathParameters), + autorest.WithJSON(serviceUpdateDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateServiceSender sends the UpdateService request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UpdateServiceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateServiceResponder handles the response to the UpdateService request. The method always +// closes the http.Response Body. +func (client BaseClient) UpdateServiceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UploadFile uploads contents of the file to the image store. Use this API if the file is small enough to upload again +// if the connection fails. The file's data needs to be added to the request body. The contents will be uploaded to the +// specified path. Image store service uses a mark file to indicate the availability of the folder. The mark file is an +// empty file named "_.dir". The mark file is generated by the image store service when all files in a folder are +// uploaded. When using File-by-File approach to upload application package in REST, the image store service isn't +// aware of the file hierarchy of the application package; you need to create a mark file per folder and upload it +// last, to let the image store service know that the folder is complete. +// Parameters: +// contentPath - relative path to file or folder in the image store from its root. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UploadFile(ctx context.Context, contentPath string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UploadFile") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UploadFile", err.Error()) + } + + req, err := client.UploadFilePreparer(ctx, contentPath, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UploadFile", nil, "Failure preparing request") + return + } + + resp, err := client.UploadFileSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UploadFile", resp, "Failure sending request") + return + } + + result, err = client.UploadFileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UploadFile", resp, "Failure responding to request") + } + + return +} + +// UploadFilePreparer prepares the UploadFile request. +func (client BaseClient) UploadFilePreparer(ctx context.Context, contentPath string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "contentPath": autorest.Encode("path", contentPath), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ImageStore/{contentPath}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UploadFileSender sends the UploadFile request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UploadFileSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UploadFileResponder handles the response to the UploadFile request. The method always +// closes the http.Response Body. +func (client BaseClient) UploadFileResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UploadFileChunk uploads a file chunk to the image store with the specified upload session ID and image store +// relative path. This API allows user to resume the file upload operation. user doesn't have to restart the file +// upload from scratch whenever there is a network interruption. Use this option if the file size is large. +// +// To perform a resumable file upload, user need to break the file into multiple chunks and upload these chunks to the +// image store one-by-one. Chunks don't have to be uploaded in order. If the file represented by the image store +// relative path already exists, it will be overwritten when the upload session commits. +// Parameters: +// contentPath - relative path to file or folder in the image store from its root. +// sessionID - a GUID generated by the user for a file uploading. It identifies an image store upload session +// which keeps track of all file chunks until it is committed. +// contentRange - when uploading file chunks to the image store, the Content-Range header field need to be +// configured and sent with a request. The format should looks like "bytes +// {First-Byte-Position}-{Last-Byte-Position}/{File-Length}". For example, Content-Range:bytes 300-5000/20000 +// indicates that user is sending bytes 300 through 5,000 and the total file length is 20,000 bytes. +// timeout - the server timeout for performing the operation in seconds. This timeout specifies the time +// duration that the client is willing to wait for the requested operation to complete. The default value for +// this parameter is 60 seconds. +func (client BaseClient) UploadFileChunk(ctx context.Context, contentPath string, sessionID uuid.UUID, contentRange string, timeout *int64) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UploadFileChunk") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: timeout, + Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.BaseClient", "UploadFileChunk", err.Error()) + } + + req, err := client.UploadFileChunkPreparer(ctx, contentPath, sessionID, contentRange, timeout) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UploadFileChunk", nil, "Failure preparing request") + return + } + + resp, err := client.UploadFileChunkSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UploadFileChunk", resp, "Failure sending request") + return + } + + result, err = client.UploadFileChunkResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.BaseClient", "UploadFileChunk", resp, "Failure responding to request") + } + + return +} + +// UploadFileChunkPreparer prepares the UploadFileChunk request. +func (client BaseClient) UploadFileChunkPreparer(ctx context.Context, contentPath string, sessionID uuid.UUID, contentRange string, timeout *int64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "contentPath": autorest.Encode("path", contentPath), + } + + const APIVersion = "6.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "session-id": autorest.Encode("query", sessionID), + } + if timeout != nil { + queryParameters["timeout"] = autorest.Encode("query", *timeout) + } else { + queryParameters["timeout"] = autorest.Encode("query", 60) + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/ImageStore/{contentPath}/$/UploadChunk", pathParameters), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Content-Range", autorest.String(contentRange))) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UploadFileChunkSender sends the UploadFileChunk request. The method will close the +// http.Response Body if it receives an error. +func (client BaseClient) UploadFileChunkSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// UploadFileChunkResponder handles the response to the UploadFileChunk request. The method always +// closes the http.Response Body. +func (client BaseClient) UploadFileChunkResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshapplication.go b/services/servicefabric/7.0/servicefabric/meshapplication.go new file mode 100644 index 000000000000..b9b4cc443985 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshapplication.go @@ -0,0 +1,422 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshApplicationClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, +// applications and services. +type MeshApplicationClient struct { + BaseClient +} + +// NewMeshApplicationClient creates an instance of the MeshApplicationClient client. +func NewMeshApplicationClient() MeshApplicationClient { + return NewMeshApplicationClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshApplicationClientWithBaseURI creates an instance of the MeshApplicationClient client. +func NewMeshApplicationClientWithBaseURI(baseURI string) MeshApplicationClient { + return MeshApplicationClient{NewWithBaseURI(baseURI)} +} + +// CreateOrUpdate creates a Application resource with the specified name, description and properties. If Application +// resource with the same name exists, then it is updated with the specified description and properties. +// Parameters: +// applicationResourceName - the identity of the application. +// applicationResourceDescription - description for creating a Application resource. +func (client MeshApplicationClient) CreateOrUpdate(ctx context.Context, applicationResourceName string, applicationResourceDescription ApplicationResourceDescription) (result ApplicationResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshApplicationClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: applicationResourceDescription, + Constraints: []validation.Constraint{{Target: "applicationResourceDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "applicationResourceDescription.ApplicationProperties", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "applicationResourceDescription.Identity", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "applicationResourceDescription.Identity.Type", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("servicefabric.MeshApplicationClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, applicationResourceName, applicationResourceDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client MeshApplicationClient) CreateOrUpdatePreparer(ctx context.Context, applicationResourceName string, applicationResourceDescription ApplicationResourceDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}", pathParameters), + autorest.WithJSON(applicationResourceDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client MeshApplicationClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client MeshApplicationClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the Application resource identified by the name. +// Parameters: +// applicationResourceName - the identity of the application. +func (client MeshApplicationClient) Delete(ctx context.Context, applicationResourceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshApplicationClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, applicationResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MeshApplicationClient) DeletePreparer(ctx context.Context, applicationResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client MeshApplicationClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MeshApplicationClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the information about the Application resource with the given name. The information include the description +// and other properties of the Application. +// Parameters: +// applicationResourceName - the identity of the application. +func (client MeshApplicationClient) Get(ctx context.Context, applicationResourceName string) (result ApplicationResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshApplicationClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, applicationResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshApplicationClient) GetPreparer(ctx context.Context, applicationResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshApplicationClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshApplicationClient) GetResponder(resp *http.Response) (result ApplicationResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetUpgradeProgress gets the upgrade progress information about the Application resource with the given name. The +// information include percentage of completion and other upgrade state information of the Application resource. +// Parameters: +// applicationResourceName - the identity of the application. +func (client MeshApplicationClient) GetUpgradeProgress(ctx context.Context, applicationResourceName string) (result ApplicationResourceUpgradeProgressInfo, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshApplicationClient.GetUpgradeProgress") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetUpgradeProgressPreparer(ctx, applicationResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "GetUpgradeProgress", nil, "Failure preparing request") + return + } + + resp, err := client.GetUpgradeProgressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "GetUpgradeProgress", resp, "Failure sending request") + return + } + + result, err = client.GetUpgradeProgressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "GetUpgradeProgress", resp, "Failure responding to request") + } + + return +} + +// GetUpgradeProgressPreparer prepares the GetUpgradeProgress request. +func (client MeshApplicationClient) GetUpgradeProgressPreparer(ctx context.Context, applicationResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + } + + const APIVersion = "7.0" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetUpgradeProgressSender sends the GetUpgradeProgress request. The method will close the +// http.Response Body if it receives an error. +func (client MeshApplicationClient) GetUpgradeProgressSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetUpgradeProgressResponder handles the response to the GetUpgradeProgress request. The method always +// closes the http.Response Body. +func (client MeshApplicationClient) GetUpgradeProgressResponder(resp *http.Response) (result ApplicationResourceUpgradeProgressInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the information about all application resources in a given resource group. The information include the +// description and other properties of the Application. +func (client MeshApplicationClient) List(ctx context.Context) (result PagedApplicationResourceDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshApplicationClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshApplicationClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshApplicationClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Resources/Applications"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshApplicationClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshApplicationClient) ListResponder(resp *http.Response) (result PagedApplicationResourceDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshcodepackage.go b/services/servicefabric/7.0/servicefabric/meshcodepackage.go new file mode 100644 index 000000000000..2eee99f9eadc --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshcodepackage.go @@ -0,0 +1,126 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshCodePackageClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, +// applications and services. +type MeshCodePackageClient struct { + BaseClient +} + +// NewMeshCodePackageClient creates an instance of the MeshCodePackageClient client. +func NewMeshCodePackageClient() MeshCodePackageClient { + return NewMeshCodePackageClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshCodePackageClientWithBaseURI creates an instance of the MeshCodePackageClient client. +func NewMeshCodePackageClientWithBaseURI(baseURI string) MeshCodePackageClient { + return MeshCodePackageClient{NewWithBaseURI(baseURI)} +} + +// GetContainerLogs gets the logs for the container of the specified code package of the service replica. +// Parameters: +// applicationResourceName - the identity of the application. +// serviceResourceName - the identity of the service. +// replicaName - service Fabric replica name. +// codePackageName - the name of code package of the service. +// tail - number of lines to show from the end of the logs. Default is 100. 'all' to show the complete logs. +func (client MeshCodePackageClient) GetContainerLogs(ctx context.Context, applicationResourceName string, serviceResourceName string, replicaName string, codePackageName string, tail string) (result ContainerLogs, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshCodePackageClient.GetContainerLogs") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetContainerLogsPreparer(ctx, applicationResourceName, serviceResourceName, replicaName, codePackageName, tail) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshCodePackageClient", "GetContainerLogs", nil, "Failure preparing request") + return + } + + resp, err := client.GetContainerLogsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshCodePackageClient", "GetContainerLogs", resp, "Failure sending request") + return + } + + result, err = client.GetContainerLogsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshCodePackageClient", "GetContainerLogs", resp, "Failure responding to request") + } + + return +} + +// GetContainerLogsPreparer prepares the GetContainerLogs request. +func (client MeshCodePackageClient) GetContainerLogsPreparer(ctx context.Context, applicationResourceName string, serviceResourceName string, replicaName string, codePackageName string, tail string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + "codePackageName": autorest.Encode("path", codePackageName), + "replicaName": replicaName, + "serviceResourceName": serviceResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(tail) > 0 { + queryParameters["Tail"] = autorest.Encode("query", tail) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetContainerLogsSender sends the GetContainerLogs request. The method will close the +// http.Response Body if it receives an error. +func (client MeshCodePackageClient) GetContainerLogsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetContainerLogsResponder handles the response to the GetContainerLogs request. The method always +// closes the http.Response Body. +func (client MeshCodePackageClient) GetContainerLogsResponder(resp *http.Response) (result ContainerLogs, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshgateway.go b/services/servicefabric/7.0/servicefabric/meshgateway.go new file mode 100644 index 000000000000..96bd0a2923f5 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshgateway.go @@ -0,0 +1,349 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshGatewayClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, applications +// and services. +type MeshGatewayClient struct { + BaseClient +} + +// NewMeshGatewayClient creates an instance of the MeshGatewayClient client. +func NewMeshGatewayClient() MeshGatewayClient { + return NewMeshGatewayClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshGatewayClientWithBaseURI creates an instance of the MeshGatewayClient client. +func NewMeshGatewayClientWithBaseURI(baseURI string) MeshGatewayClient { + return MeshGatewayClient{NewWithBaseURI(baseURI)} +} + +// CreateOrUpdate creates a Gateway resource with the specified name, description and properties. If Gateway resource +// with the same name exists, then it is updated with the specified description and properties. Use Gateway resource to +// provide public connectivity to application services. +// Parameters: +// gatewayResourceName - the identity of the gateway. +// gatewayResourceDescription - description for creating a Gateway resource. +func (client MeshGatewayClient) CreateOrUpdate(ctx context.Context, gatewayResourceName string, gatewayResourceDescription GatewayResourceDescription) (result GatewayResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshGatewayClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: gatewayResourceDescription, + Constraints: []validation.Constraint{{Target: "gatewayResourceDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "gatewayResourceDescription.GatewayProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "gatewayResourceDescription.GatewayProperties.SourceNetwork", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "gatewayResourceDescription.GatewayProperties.DestinationNetwork", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.MeshGatewayClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, gatewayResourceName, gatewayResourceDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client MeshGatewayClient) CreateOrUpdatePreparer(ctx context.Context, gatewayResourceName string, gatewayResourceDescription GatewayResourceDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayResourceName": gatewayResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Gateways/{gatewayResourceName}", pathParameters), + autorest.WithJSON(gatewayResourceDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client MeshGatewayClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client MeshGatewayClient) CreateOrUpdateResponder(resp *http.Response) (result GatewayResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the Gateway resource identified by the name. +// Parameters: +// gatewayResourceName - the identity of the gateway. +func (client MeshGatewayClient) Delete(ctx context.Context, gatewayResourceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshGatewayClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, gatewayResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MeshGatewayClient) DeletePreparer(ctx context.Context, gatewayResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayResourceName": gatewayResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Gateways/{gatewayResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client MeshGatewayClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MeshGatewayClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the information about the Gateway resource with the given name. The information include the description and +// other properties of the Gateway. +// Parameters: +// gatewayResourceName - the identity of the gateway. +func (client MeshGatewayClient) Get(ctx context.Context, gatewayResourceName string) (result GatewayResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshGatewayClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, gatewayResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshGatewayClient) GetPreparer(ctx context.Context, gatewayResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayResourceName": gatewayResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Gateways/{gatewayResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshGatewayClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshGatewayClient) GetResponder(resp *http.Response) (result GatewayResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the information about all gateway resources in a given resource group. The information include the +// description and other properties of the Gateway. +func (client MeshGatewayClient) List(ctx context.Context) (result PagedGatewayResourceDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshGatewayClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshGatewayClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshGatewayClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Resources/Gateways"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshGatewayClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshGatewayClient) ListResponder(resp *http.Response) (result PagedGatewayResourceDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshnetwork.go b/services/servicefabric/7.0/servicefabric/meshnetwork.go new file mode 100644 index 000000000000..7d9cb989f2a8 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshnetwork.go @@ -0,0 +1,346 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshNetworkClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, applications +// and services. +type MeshNetworkClient struct { + BaseClient +} + +// NewMeshNetworkClient creates an instance of the MeshNetworkClient client. +func NewMeshNetworkClient() MeshNetworkClient { + return NewMeshNetworkClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshNetworkClientWithBaseURI creates an instance of the MeshNetworkClient client. +func NewMeshNetworkClientWithBaseURI(baseURI string) MeshNetworkClient { + return MeshNetworkClient{NewWithBaseURI(baseURI)} +} + +// CreateOrUpdate creates a Network resource with the specified name, description and properties. If Network resource +// with the same name exists, then it is updated with the specified description and properties. Network resource +// provides connectivity between application services. +// Parameters: +// networkResourceName - the identity of the network. +// networkResourceDescription - description for creating a Network resource. +func (client MeshNetworkClient) CreateOrUpdate(ctx context.Context, networkResourceName string, networkResourceDescription NetworkResourceDescription) (result NetworkResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshNetworkClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: networkResourceDescription, + Constraints: []validation.Constraint{{Target: "networkResourceDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "networkResourceDescription.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.MeshNetworkClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, networkResourceName, networkResourceDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client MeshNetworkClient) CreateOrUpdatePreparer(ctx context.Context, networkResourceName string, networkResourceDescription NetworkResourceDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkResourceName": networkResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Networks/{networkResourceName}", pathParameters), + autorest.WithJSON(networkResourceDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client MeshNetworkClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client MeshNetworkClient) CreateOrUpdateResponder(resp *http.Response) (result NetworkResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the Network resource identified by the name. +// Parameters: +// networkResourceName - the identity of the network. +func (client MeshNetworkClient) Delete(ctx context.Context, networkResourceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshNetworkClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, networkResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MeshNetworkClient) DeletePreparer(ctx context.Context, networkResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkResourceName": networkResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Networks/{networkResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client MeshNetworkClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MeshNetworkClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the information about the Network resource with the given name. The information include the description and +// other properties of the Network. +// Parameters: +// networkResourceName - the identity of the network. +func (client MeshNetworkClient) Get(ctx context.Context, networkResourceName string) (result NetworkResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshNetworkClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, networkResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshNetworkClient) GetPreparer(ctx context.Context, networkResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkResourceName": networkResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Networks/{networkResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshNetworkClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshNetworkClient) GetResponder(resp *http.Response) (result NetworkResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the information about all network resources in a given resource group. The information include the +// description and other properties of the Network. +func (client MeshNetworkClient) List(ctx context.Context) (result PagedNetworkResourceDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshNetworkClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshNetworkClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshNetworkClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Resources/Networks"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshNetworkClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshNetworkClient) ListResponder(resp *http.Response) (result PagedNetworkResourceDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshsecret.go b/services/servicefabric/7.0/servicefabric/meshsecret.go new file mode 100644 index 000000000000..5dfb02644b76 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshsecret.go @@ -0,0 +1,346 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshSecretClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, applications +// and services. +type MeshSecretClient struct { + BaseClient +} + +// NewMeshSecretClient creates an instance of the MeshSecretClient client. +func NewMeshSecretClient() MeshSecretClient { + return NewMeshSecretClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshSecretClientWithBaseURI creates an instance of the MeshSecretClient client. +func NewMeshSecretClientWithBaseURI(baseURI string) MeshSecretClient { + return MeshSecretClient{NewWithBaseURI(baseURI)} +} + +// CreateOrUpdate creates a Secret resource with the specified name, description and properties. If Secret resource +// with the same name exists, then it is updated with the specified description and properties. Once created, the kind +// and contentType of a secret resource cannot be updated. +// Parameters: +// secretResourceName - the name of the secret resource. +// secretResourceDescription - description for creating a secret resource. +func (client MeshSecretClient) CreateOrUpdate(ctx context.Context, secretResourceName string, secretResourceDescription SecretResourceDescription) (result SecretResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: secretResourceDescription, + Constraints: []validation.Constraint{{Target: "secretResourceDescription.Properties", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "secretResourceDescription.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.MeshSecretClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, secretResourceName, secretResourceDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client MeshSecretClient) CreateOrUpdatePreparer(ctx context.Context, secretResourceName string, secretResourceDescription SecretResourceDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}", pathParameters), + autorest.WithJSON(secretResourceDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client MeshSecretClient) CreateOrUpdateResponder(resp *http.Response) (result SecretResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified Secret resource and all of its named values. +// Parameters: +// secretResourceName - the name of the secret resource. +func (client MeshSecretClient) Delete(ctx context.Context, secretResourceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, secretResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MeshSecretClient) DeletePreparer(ctx context.Context, secretResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MeshSecretClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the information about the Secret resource with the given name. The information include the description and +// other properties of the Secret. +// Parameters: +// secretResourceName - the name of the secret resource. +func (client MeshSecretClient) Get(ctx context.Context, secretResourceName string) (result SecretResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, secretResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshSecretClient) GetPreparer(ctx context.Context, secretResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshSecretClient) GetResponder(resp *http.Response) (result SecretResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the information about all secret resources in a given resource group. The information include the +// description and other properties of the Secret. +func (client MeshSecretClient) List(ctx context.Context) (result PagedSecretResourceDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshSecretClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Resources/Secrets"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshSecretClient) ListResponder(resp *http.Response) (result PagedSecretResourceDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshsecretvalue.go b/services/servicefabric/7.0/servicefabric/meshsecretvalue.go new file mode 100644 index 000000000000..e0f410d107a0 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshsecretvalue.go @@ -0,0 +1,438 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshSecretValueClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, +// applications and services. +type MeshSecretValueClient struct { + BaseClient +} + +// NewMeshSecretValueClient creates an instance of the MeshSecretValueClient client. +func NewMeshSecretValueClient() MeshSecretValueClient { + return NewMeshSecretValueClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshSecretValueClientWithBaseURI creates an instance of the MeshSecretValueClient client. +func NewMeshSecretValueClientWithBaseURI(baseURI string) MeshSecretValueClient { + return MeshSecretValueClient{NewWithBaseURI(baseURI)} +} + +// AddValue creates a new value of the specified secret resource. The name of the value is typically the version +// identifier. Once created the value cannot be changed. +// Parameters: +// secretResourceName - the name of the secret resource. +// secretValueResourceName - the name of the secret resource value which is typically the version identifier +// for the value. +// secretValueResourceDescription - description for creating a value of a secret resource. +func (client MeshSecretValueClient) AddValue(ctx context.Context, secretResourceName string, secretValueResourceName string, secretValueResourceDescription SecretValueResourceDescription) (result SecretValueResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretValueClient.AddValue") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: secretValueResourceDescription, + Constraints: []validation.Constraint{{Target: "secretValueResourceDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "secretValueResourceDescription.SecretValueResourceProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("servicefabric.MeshSecretValueClient", "AddValue", err.Error()) + } + + req, err := client.AddValuePreparer(ctx, secretResourceName, secretValueResourceName, secretValueResourceDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "AddValue", nil, "Failure preparing request") + return + } + + resp, err := client.AddValueSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "AddValue", resp, "Failure sending request") + return + } + + result, err = client.AddValueResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "AddValue", resp, "Failure responding to request") + } + + return +} + +// AddValuePreparer prepares the AddValue request. +func (client MeshSecretValueClient) AddValuePreparer(ctx context.Context, secretResourceName string, secretValueResourceName string, secretValueResourceDescription SecretValueResourceDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + "secretValueResourceName": secretValueResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}", pathParameters), + autorest.WithJSON(secretValueResourceDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// AddValueSender sends the AddValue request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretValueClient) AddValueSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// AddValueResponder handles the response to the AddValue request. The method always +// closes the http.Response Body. +func (client MeshSecretValueClient) AddValueResponder(resp *http.Response) (result SecretValueResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the secret value resource identified by the name. The name of the resource is typically the version +// associated with that value. Deletion will fail if the specified value is in use. +// Parameters: +// secretResourceName - the name of the secret resource. +// secretValueResourceName - the name of the secret resource value which is typically the version identifier +// for the value. +func (client MeshSecretValueClient) Delete(ctx context.Context, secretResourceName string, secretValueResourceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretValueClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, secretResourceName, secretValueResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MeshSecretValueClient) DeletePreparer(ctx context.Context, secretResourceName string, secretValueResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + "secretValueResourceName": secretValueResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretValueClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MeshSecretValueClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the information about the specified named secret value resources. The information does not include the +// actual value of the secret. +// Parameters: +// secretResourceName - the name of the secret resource. +// secretValueResourceName - the name of the secret resource value which is typically the version identifier +// for the value. +func (client MeshSecretValueClient) Get(ctx context.Context, secretResourceName string, secretValueResourceName string) (result SecretValueResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretValueClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, secretResourceName, secretValueResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshSecretValueClient) GetPreparer(ctx context.Context, secretResourceName string, secretValueResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + "secretValueResourceName": secretValueResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretValueClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshSecretValueClient) GetResponder(resp *http.Response) (result SecretValueResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets information about all secret value resources of the specified secret resource. The information includes +// the names of the secret value resources, but not the actual values. +// Parameters: +// secretResourceName - the name of the secret resource. +func (client MeshSecretValueClient) List(ctx context.Context, secretResourceName string) (result PagedSecretValueResourceDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretValueClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, secretResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshSecretValueClient) ListPreparer(ctx context.Context, secretResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}/values", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretValueClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshSecretValueClient) ListResponder(resp *http.Response) (result PagedSecretValueResourceDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Show lists the decrypted value of the specified named value of the secret resource. This is a privileged operation. +// Parameters: +// secretResourceName - the name of the secret resource. +// secretValueResourceName - the name of the secret resource value which is typically the version identifier +// for the value. +func (client MeshSecretValueClient) Show(ctx context.Context, secretResourceName string, secretValueResourceName string) (result SecretValue, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshSecretValueClient.Show") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ShowPreparer(ctx, secretResourceName, secretValueResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Show", nil, "Failure preparing request") + return + } + + resp, err := client.ShowSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Show", resp, "Failure sending request") + return + } + + result, err = client.ShowResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshSecretValueClient", "Show", resp, "Failure responding to request") + } + + return +} + +// ShowPreparer prepares the Show request. +func (client MeshSecretValueClient) ShowPreparer(ctx context.Context, secretResourceName string, secretValueResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "secretResourceName": secretResourceName, + "secretValueResourceName": secretValueResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ShowSender sends the Show request. The method will close the +// http.Response Body if it receives an error. +func (client MeshSecretValueClient) ShowSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ShowResponder handles the response to the Show request. The method always +// closes the http.Response Body. +func (client MeshSecretValueClient) ShowResponder(resp *http.Response) (result SecretValue, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshservice.go b/services/servicefabric/7.0/servicefabric/meshservice.go new file mode 100644 index 000000000000..edab24224fd7 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshservice.go @@ -0,0 +1,194 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshServiceClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, applications +// and services. +type MeshServiceClient struct { + BaseClient +} + +// NewMeshServiceClient creates an instance of the MeshServiceClient client. +func NewMeshServiceClient() MeshServiceClient { + return NewMeshServiceClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshServiceClientWithBaseURI creates an instance of the MeshServiceClient client. +func NewMeshServiceClientWithBaseURI(baseURI string) MeshServiceClient { + return MeshServiceClient{NewWithBaseURI(baseURI)} +} + +// Get gets the information about the Service resource with the given name. The information include the description and +// other properties of the Service. +// Parameters: +// applicationResourceName - the identity of the application. +// serviceResourceName - the identity of the service. +func (client MeshServiceClient) Get(ctx context.Context, applicationResourceName string, serviceResourceName string) (result ServiceResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshServiceClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, applicationResourceName, serviceResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshServiceClient) GetPreparer(ctx context.Context, applicationResourceName string, serviceResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + "serviceResourceName": serviceResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshServiceClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshServiceClient) GetResponder(resp *http.Response) (result ServiceResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the information about all services of an application resource. The information include the description and +// other properties of the Service. +// Parameters: +// applicationResourceName - the identity of the application. +func (client MeshServiceClient) List(ctx context.Context, applicationResourceName string) (result PagedServiceResourceDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshServiceClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, applicationResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshServiceClient) ListPreparer(ctx context.Context, applicationResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}/Services", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshServiceClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshServiceClient) ListResponder(resp *http.Response) (result PagedServiceResourceDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshservicereplica.go b/services/servicefabric/7.0/servicefabric/meshservicereplica.go new file mode 100644 index 000000000000..88209751688f --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshservicereplica.go @@ -0,0 +1,198 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshServiceReplicaClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, +// applications and services. +type MeshServiceReplicaClient struct { + BaseClient +} + +// NewMeshServiceReplicaClient creates an instance of the MeshServiceReplicaClient client. +func NewMeshServiceReplicaClient() MeshServiceReplicaClient { + return NewMeshServiceReplicaClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshServiceReplicaClientWithBaseURI creates an instance of the MeshServiceReplicaClient client. +func NewMeshServiceReplicaClientWithBaseURI(baseURI string) MeshServiceReplicaClient { + return MeshServiceReplicaClient{NewWithBaseURI(baseURI)} +} + +// Get gets the information about the service replica with the given name. The information include the description and +// other properties of the service replica. +// Parameters: +// applicationResourceName - the identity of the application. +// serviceResourceName - the identity of the service. +// replicaName - service Fabric replica name. +func (client MeshServiceReplicaClient) Get(ctx context.Context, applicationResourceName string, serviceResourceName string, replicaName string) (result ServiceReplicaDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshServiceReplicaClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, applicationResourceName, serviceResourceName, replicaName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceReplicaClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceReplicaClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceReplicaClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshServiceReplicaClient) GetPreparer(ctx context.Context, applicationResourceName string, serviceResourceName string, replicaName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + "replicaName": replicaName, + "serviceResourceName": serviceResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshServiceReplicaClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshServiceReplicaClient) GetResponder(resp *http.Response) (result ServiceReplicaDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the information about all replicas of a service. The information include the description and other +// properties of the service replica. +// Parameters: +// applicationResourceName - the identity of the application. +// serviceResourceName - the identity of the service. +func (client MeshServiceReplicaClient) List(ctx context.Context, applicationResourceName string, serviceResourceName string) (result PagedServiceReplicaDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshServiceReplicaClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, applicationResourceName, serviceResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceReplicaClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceReplicaClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshServiceReplicaClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshServiceReplicaClient) ListPreparer(ctx context.Context, applicationResourceName string, serviceResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationResourceName": applicationResourceName, + "serviceResourceName": serviceResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshServiceReplicaClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshServiceReplicaClient) ListResponder(resp *http.Response) (result PagedServiceReplicaDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/meshvolume.go b/services/servicefabric/7.0/servicefabric/meshvolume.go new file mode 100644 index 000000000000..60e5871e842b --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/meshvolume.go @@ -0,0 +1,351 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// MeshVolumeClient is the service Fabric REST Client APIs allows management of Service Fabric clusters, applications +// and services. +type MeshVolumeClient struct { + BaseClient +} + +// NewMeshVolumeClient creates an instance of the MeshVolumeClient client. +func NewMeshVolumeClient() MeshVolumeClient { + return NewMeshVolumeClientWithBaseURI(DefaultBaseURI) +} + +// NewMeshVolumeClientWithBaseURI creates an instance of the MeshVolumeClient client. +func NewMeshVolumeClientWithBaseURI(baseURI string) MeshVolumeClient { + return MeshVolumeClient{NewWithBaseURI(baseURI)} +} + +// CreateOrUpdate creates a Volume resource with the specified name, description and properties. If Volume resource +// with the same name exists, then it is updated with the specified description and properties. +// Parameters: +// volumeResourceName - the identity of the volume. +// volumeResourceDescription - description for creating a Volume resource. +func (client MeshVolumeClient) CreateOrUpdate(ctx context.Context, volumeResourceName string, volumeResourceDescription VolumeResourceDescription) (result VolumeResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshVolumeClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: volumeResourceDescription, + Constraints: []validation.Constraint{{Target: "volumeResourceDescription.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "volumeResourceDescription.VolumeProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "volumeResourceDescription.VolumeProperties.Provider", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "volumeResourceDescription.VolumeProperties.AzureFileParameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "volumeResourceDescription.VolumeProperties.AzureFileParameters.AccountName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "volumeResourceDescription.VolumeProperties.AzureFileParameters.ShareName", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("servicefabric.MeshVolumeClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, volumeResourceName, volumeResourceDescription) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client MeshVolumeClient) CreateOrUpdatePreparer(ctx context.Context, volumeResourceName string, volumeResourceDescription VolumeResourceDescription) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "volumeResourceName": volumeResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Volumes/{volumeResourceName}", pathParameters), + autorest.WithJSON(volumeResourceDescription), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client MeshVolumeClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client MeshVolumeClient) CreateOrUpdateResponder(resp *http.Response) (result VolumeResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the Volume resource identified by the name. +// Parameters: +// volumeResourceName - the identity of the volume. +func (client MeshVolumeClient) Delete(ctx context.Context, volumeResourceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshVolumeClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, volumeResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client MeshVolumeClient) DeletePreparer(ctx context.Context, volumeResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "volumeResourceName": volumeResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Volumes/{volumeResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client MeshVolumeClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client MeshVolumeClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the information about the Volume resource with the given name. The information include the description and +// other properties of the Volume. +// Parameters: +// volumeResourceName - the identity of the volume. +func (client MeshVolumeClient) Get(ctx context.Context, volumeResourceName string) (result VolumeResourceDescription, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshVolumeClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, volumeResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MeshVolumeClient) GetPreparer(ctx context.Context, volumeResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "volumeResourceName": volumeResourceName, + } + + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Resources/Volumes/{volumeResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MeshVolumeClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MeshVolumeClient) GetResponder(resp *http.Response) (result VolumeResourceDescription, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the information about all volume resources in a given resource group. The information include the +// description and other properties of the Volume. +func (client MeshVolumeClient) List(ctx context.Context) (result PagedVolumeResourceDescriptionList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MeshVolumeClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.MeshVolumeClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client MeshVolumeClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "6.4-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/Resources/Volumes"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client MeshVolumeClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client MeshVolumeClient) ListResponder(resp *http.Response) (result PagedVolumeResourceDescriptionList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/servicefabric/7.0/servicefabric/models.go b/services/servicefabric/7.0/servicefabric/models.go new file mode 100644 index 000000000000..ee7b918ac3e3 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/models.go @@ -0,0 +1,52431 @@ +package servicefabric + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/satori/go.uuid" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/servicefabric/7.0/servicefabric" + +// ApplicationDefinitionKind enumerates the values for application definition kind. +type ApplicationDefinitionKind string + +const ( + // Compose Indicates the application is defined by compose file(s). The value is 1. + Compose ApplicationDefinitionKind = "Compose" + // Invalid Indicates the application definition kind is invalid. All Service Fabric enumerations have the + // invalid type. The value is 65535. + Invalid ApplicationDefinitionKind = "Invalid" + // ServiceFabricApplicationDescription Indicates the application is defined by a Service Fabric application + // description. The value is 0. + ServiceFabricApplicationDescription ApplicationDefinitionKind = "ServiceFabricApplicationDescription" +) + +// PossibleApplicationDefinitionKindValues returns an array of possible values for the ApplicationDefinitionKind const type. +func PossibleApplicationDefinitionKindValues() []ApplicationDefinitionKind { + return []ApplicationDefinitionKind{Compose, Invalid, ServiceFabricApplicationDescription} +} + +// ApplicationPackageCleanupPolicy enumerates the values for application package cleanup policy. +type ApplicationPackageCleanupPolicy string + +const ( + // ApplicationPackageCleanupPolicyAutomatic Indicates that the service fabric runtime determines when to do + // the application package cleanup. By default, cleanup is done on successful provision. The value is 2. + ApplicationPackageCleanupPolicyAutomatic ApplicationPackageCleanupPolicy = "Automatic" + // ApplicationPackageCleanupPolicyDefault Indicates that the cleanup policy of application packages is + // based on the cluster setting "CleanupApplicationPackageOnProvisionSuccess." The value is 1. + ApplicationPackageCleanupPolicyDefault ApplicationPackageCleanupPolicy = "Default" + // ApplicationPackageCleanupPolicyInvalid Indicates that the application package cleanup policy is invalid. + // This value is default. The value is zero. + ApplicationPackageCleanupPolicyInvalid ApplicationPackageCleanupPolicy = "Invalid" + // ApplicationPackageCleanupPolicyManual Indicates that the user has to explicitly clean up the application + // package. The value is 3. + ApplicationPackageCleanupPolicyManual ApplicationPackageCleanupPolicy = "Manual" +) + +// PossibleApplicationPackageCleanupPolicyValues returns an array of possible values for the ApplicationPackageCleanupPolicy const type. +func PossibleApplicationPackageCleanupPolicyValues() []ApplicationPackageCleanupPolicy { + return []ApplicationPackageCleanupPolicy{ApplicationPackageCleanupPolicyAutomatic, ApplicationPackageCleanupPolicyDefault, ApplicationPackageCleanupPolicyInvalid, ApplicationPackageCleanupPolicyManual} +} + +// ApplicationResourceUpgradeState enumerates the values for application resource upgrade state. +type ApplicationResourceUpgradeState string + +const ( + // ApplicationResourceUpgradeStateCompletedRollback The upgrade has finished rolling back. The value is 7. + ApplicationResourceUpgradeStateCompletedRollback ApplicationResourceUpgradeState = "CompletedRollback" + // ApplicationResourceUpgradeStateCompletedRollforward The upgrade has finished rolling forward. The value + // is 4. + ApplicationResourceUpgradeStateCompletedRollforward ApplicationResourceUpgradeState = "CompletedRollforward" + // ApplicationResourceUpgradeStateFailed The upgrade has failed and is unable to execute FailureAction. The + // value is 8. + ApplicationResourceUpgradeStateFailed ApplicationResourceUpgradeState = "Failed" + // ApplicationResourceUpgradeStateInvalid Indicates the upgrade state is invalid. All Service Fabric + // enumerations have the invalid type. The value is 0. + ApplicationResourceUpgradeStateInvalid ApplicationResourceUpgradeState = "Invalid" + // ApplicationResourceUpgradeStateProvisioningTarget The upgrade is in the progress of provisioning target + // application type version. The value is 1. + ApplicationResourceUpgradeStateProvisioningTarget ApplicationResourceUpgradeState = "ProvisioningTarget" + // ApplicationResourceUpgradeStateRollingBack The upgrade is rolling back to the previous version but is + // not complete yet. The value is 5. + ApplicationResourceUpgradeStateRollingBack ApplicationResourceUpgradeState = "RollingBack" + // ApplicationResourceUpgradeStateRollingForward The upgrade is rolling forward to the target version but + // is not complete yet. The value is 2. + ApplicationResourceUpgradeStateRollingForward ApplicationResourceUpgradeState = "RollingForward" + // ApplicationResourceUpgradeStateUnprovisioningCurrent The upgrade is in the progress of unprovisioning + // current application type version and rolling forward to the target version is completed. The value is 3. + ApplicationResourceUpgradeStateUnprovisioningCurrent ApplicationResourceUpgradeState = "UnprovisioningCurrent" + // ApplicationResourceUpgradeStateUnprovisioningTarget The upgrade is in the progress of unprovisioning + // target application type version and rolling back to the current version is completed. The value is 6. + ApplicationResourceUpgradeStateUnprovisioningTarget ApplicationResourceUpgradeState = "UnprovisioningTarget" +) + +// PossibleApplicationResourceUpgradeStateValues returns an array of possible values for the ApplicationResourceUpgradeState const type. +func PossibleApplicationResourceUpgradeStateValues() []ApplicationResourceUpgradeState { + return []ApplicationResourceUpgradeState{ApplicationResourceUpgradeStateCompletedRollback, ApplicationResourceUpgradeStateCompletedRollforward, ApplicationResourceUpgradeStateFailed, ApplicationResourceUpgradeStateInvalid, ApplicationResourceUpgradeStateProvisioningTarget, ApplicationResourceUpgradeStateRollingBack, ApplicationResourceUpgradeStateRollingForward, ApplicationResourceUpgradeStateUnprovisioningCurrent, ApplicationResourceUpgradeStateUnprovisioningTarget} +} + +// ApplicationScopedVolumeKind enumerates the values for application scoped volume kind. +type ApplicationScopedVolumeKind string + +const ( + // ServiceFabricVolumeDisk Provides Service Fabric High Availability Volume Disk + ServiceFabricVolumeDisk ApplicationScopedVolumeKind = "ServiceFabricVolumeDisk" +) + +// PossibleApplicationScopedVolumeKindValues returns an array of possible values for the ApplicationScopedVolumeKind const type. +func PossibleApplicationScopedVolumeKindValues() []ApplicationScopedVolumeKind { + return []ApplicationScopedVolumeKind{ServiceFabricVolumeDisk} +} + +// ApplicationStatus enumerates the values for application status. +type ApplicationStatus string + +const ( + // ApplicationStatusCreating Indicates the application status is creating. The value is 3. + ApplicationStatusCreating ApplicationStatus = "Creating" + // ApplicationStatusDeleting Indicates the application status is deleting. The value is 4. + ApplicationStatusDeleting ApplicationStatus = "Deleting" + // ApplicationStatusFailed Indicates the creation or deletion of application was terminated due to + // persistent failures. Another create/delete request can be accepted to resume a failed application. The + // value is 5. + ApplicationStatusFailed ApplicationStatus = "Failed" + // ApplicationStatusInvalid Indicates the application status is invalid. All Service Fabric enumerations + // have the invalid type. The value is zero. + ApplicationStatusInvalid ApplicationStatus = "Invalid" + // ApplicationStatusReady Indicates the application status is ready. The value is 1. + ApplicationStatusReady ApplicationStatus = "Ready" + // ApplicationStatusUpgrading Indicates the application status is upgrading. The value is 2. + ApplicationStatusUpgrading ApplicationStatus = "Upgrading" +) + +// PossibleApplicationStatusValues returns an array of possible values for the ApplicationStatus const type. +func PossibleApplicationStatusValues() []ApplicationStatus { + return []ApplicationStatus{ApplicationStatusCreating, ApplicationStatusDeleting, ApplicationStatusFailed, ApplicationStatusInvalid, ApplicationStatusReady, ApplicationStatusUpgrading} +} + +// ApplicationTypeDefinitionKind enumerates the values for application type definition kind. +type ApplicationTypeDefinitionKind string + +const ( + // ApplicationTypeDefinitionKindCompose Indicates the application type is defined and created implicitly as + // part of a compose deployment. The value is 2. + ApplicationTypeDefinitionKindCompose ApplicationTypeDefinitionKind = "Compose" + // ApplicationTypeDefinitionKindInvalid Indicates the application type definition kind is invalid. All + // Service Fabric enumerations have the invalid type. The value is 0. + ApplicationTypeDefinitionKindInvalid ApplicationTypeDefinitionKind = "Invalid" + // ApplicationTypeDefinitionKindServiceFabricApplicationPackage Indicates the application type is defined + // and created by a Service Fabric application package provided by the user. The value is 1. + ApplicationTypeDefinitionKindServiceFabricApplicationPackage ApplicationTypeDefinitionKind = "ServiceFabricApplicationPackage" +) + +// PossibleApplicationTypeDefinitionKindValues returns an array of possible values for the ApplicationTypeDefinitionKind const type. +func PossibleApplicationTypeDefinitionKindValues() []ApplicationTypeDefinitionKind { + return []ApplicationTypeDefinitionKind{ApplicationTypeDefinitionKindCompose, ApplicationTypeDefinitionKindInvalid, ApplicationTypeDefinitionKindServiceFabricApplicationPackage} +} + +// ApplicationTypeStatus enumerates the values for application type status. +type ApplicationTypeStatus string + +const ( + // ApplicationTypeStatusAvailable Indicates that the application type is fully provisioned and is available + // for use. An application of this type and version can be created. The value is 2. + ApplicationTypeStatusAvailable ApplicationTypeStatus = "Available" + // ApplicationTypeStatusFailed Indicates that the application type provisioning failed and it is + // unavailable for use. The failure details can be obtained from the application type information query. + // The failed application type information remains in the cluster until it is unprovisioned or + // reprovisioned successfully. The value is 4. + ApplicationTypeStatusFailed ApplicationTypeStatus = "Failed" + // ApplicationTypeStatusInvalid Indicates the application type status is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. + ApplicationTypeStatusInvalid ApplicationTypeStatus = "Invalid" + // ApplicationTypeStatusProvisioning Indicates that the application type is being provisioned in the + // cluster. The value is 1. + ApplicationTypeStatusProvisioning ApplicationTypeStatus = "Provisioning" + // ApplicationTypeStatusUnprovisioning Indicates that the application type is in process of being + // unprovisioned from the cluster. The value is 3. + ApplicationTypeStatusUnprovisioning ApplicationTypeStatus = "Unprovisioning" +) + +// PossibleApplicationTypeStatusValues returns an array of possible values for the ApplicationTypeStatus const type. +func PossibleApplicationTypeStatusValues() []ApplicationTypeStatus { + return []ApplicationTypeStatus{ApplicationTypeStatusAvailable, ApplicationTypeStatusFailed, ApplicationTypeStatusInvalid, ApplicationTypeStatusProvisioning, ApplicationTypeStatusUnprovisioning} +} + +// AutoScalingMechanismKind enumerates the values for auto scaling mechanism kind. +type AutoScalingMechanismKind string + +const ( + // AddRemoveReplica Indicates that scaling should be performed by adding or removing replicas. + AddRemoveReplica AutoScalingMechanismKind = "AddRemoveReplica" +) + +// PossibleAutoScalingMechanismKindValues returns an array of possible values for the AutoScalingMechanismKind const type. +func PossibleAutoScalingMechanismKindValues() []AutoScalingMechanismKind { + return []AutoScalingMechanismKind{AddRemoveReplica} +} + +// AutoScalingMetricKind enumerates the values for auto scaling metric kind. +type AutoScalingMetricKind string + +const ( + // Resource Indicates that the metric is one of resources, like cpu or memory. + Resource AutoScalingMetricKind = "Resource" +) + +// PossibleAutoScalingMetricKindValues returns an array of possible values for the AutoScalingMetricKind const type. +func PossibleAutoScalingMetricKindValues() []AutoScalingMetricKind { + return []AutoScalingMetricKind{Resource} +} + +// AutoScalingResourceMetricName enumerates the values for auto scaling resource metric name. +type AutoScalingResourceMetricName string + +const ( + // CPU Indicates that the resource is CPU cores. + CPU AutoScalingResourceMetricName = "cpu" + // MemoryInGB Indicates that the resource is memory in GB. + MemoryInGB AutoScalingResourceMetricName = "memoryInGB" +) + +// PossibleAutoScalingResourceMetricNameValues returns an array of possible values for the AutoScalingResourceMetricName const type. +func PossibleAutoScalingResourceMetricNameValues() []AutoScalingResourceMetricName { + return []AutoScalingResourceMetricName{CPU, MemoryInGB} +} + +// AutoScalingTriggerKind enumerates the values for auto scaling trigger kind. +type AutoScalingTriggerKind string + +const ( + // AverageLoad Indicates that scaling should be performed based on average load of all replicas in the + // service. + AverageLoad AutoScalingTriggerKind = "AverageLoad" +) + +// PossibleAutoScalingTriggerKindValues returns an array of possible values for the AutoScalingTriggerKind const type. +func PossibleAutoScalingTriggerKindValues() []AutoScalingTriggerKind { + return []AutoScalingTriggerKind{AverageLoad} +} + +// BackupEntityKind enumerates the values for backup entity kind. +type BackupEntityKind string + +const ( + // BackupEntityKindApplication Indicates the entity is a Service Fabric application. + BackupEntityKindApplication BackupEntityKind = "Application" + // BackupEntityKindInvalid Indicates an invalid entity kind. All Service Fabric enumerations have the + // invalid type. + BackupEntityKindInvalid BackupEntityKind = "Invalid" + // BackupEntityKindPartition Indicates the entity is a Service Fabric partition. + BackupEntityKindPartition BackupEntityKind = "Partition" + // BackupEntityKindService Indicates the entity is a Service Fabric service. + BackupEntityKindService BackupEntityKind = "Service" +) + +// PossibleBackupEntityKindValues returns an array of possible values for the BackupEntityKind const type. +func PossibleBackupEntityKindValues() []BackupEntityKind { + return []BackupEntityKind{BackupEntityKindApplication, BackupEntityKindInvalid, BackupEntityKindPartition, BackupEntityKindService} +} + +// BackupPolicyScope enumerates the values for backup policy scope. +type BackupPolicyScope string + +const ( + // BackupPolicyScopeApplication Indicates the backup policy is applied at application level. All services + // and partitions of the application inherit this policy unless explicitly overridden at service or + // partition level. + BackupPolicyScopeApplication BackupPolicyScope = "Application" + // BackupPolicyScopeInvalid Indicates an invalid backup policy scope type. All Service Fabric enumerations + // have the invalid type. + BackupPolicyScopeInvalid BackupPolicyScope = "Invalid" + // BackupPolicyScopePartition Indicates the backup policy is applied at partition level. Hence overriding + // any policy which may have applied at partition's service or application level. + BackupPolicyScopePartition BackupPolicyScope = "Partition" + // BackupPolicyScopeService Indicates the backup policy is applied at service level. All partitions of the + // service inherit this policy unless explicitly overridden at partition level. + BackupPolicyScopeService BackupPolicyScope = "Service" +) + +// PossibleBackupPolicyScopeValues returns an array of possible values for the BackupPolicyScope const type. +func PossibleBackupPolicyScopeValues() []BackupPolicyScope { + return []BackupPolicyScope{BackupPolicyScopeApplication, BackupPolicyScopeInvalid, BackupPolicyScopePartition, BackupPolicyScopeService} +} + +// BackupScheduleFrequencyType enumerates the values for backup schedule frequency type. +type BackupScheduleFrequencyType string + +const ( + // BackupScheduleFrequencyTypeDaily Indicates that the time based backup schedule is repeated at a daily + // frequency. + BackupScheduleFrequencyTypeDaily BackupScheduleFrequencyType = "Daily" + // BackupScheduleFrequencyTypeInvalid Indicates an invalid backup schedule frequency type. All Service + // Fabric enumerations have the invalid type. + BackupScheduleFrequencyTypeInvalid BackupScheduleFrequencyType = "Invalid" + // BackupScheduleFrequencyTypeWeekly Indicates that the time based backup schedule is repeated at a weekly + // frequency. + BackupScheduleFrequencyTypeWeekly BackupScheduleFrequencyType = "Weekly" +) + +// PossibleBackupScheduleFrequencyTypeValues returns an array of possible values for the BackupScheduleFrequencyType const type. +func PossibleBackupScheduleFrequencyTypeValues() []BackupScheduleFrequencyType { + return []BackupScheduleFrequencyType{BackupScheduleFrequencyTypeDaily, BackupScheduleFrequencyTypeInvalid, BackupScheduleFrequencyTypeWeekly} +} + +// BackupScheduleKind enumerates the values for backup schedule kind. +type BackupScheduleKind string + +const ( + // BackupScheduleKindFrequencyBased Indicates a frequency-based backup schedule. + BackupScheduleKindFrequencyBased BackupScheduleKind = "FrequencyBased" + // BackupScheduleKindInvalid Indicates an invalid backup schedule kind. All Service Fabric enumerations + // have the invalid type. + BackupScheduleKindInvalid BackupScheduleKind = "Invalid" + // BackupScheduleKindTimeBased Indicates a time-based backup schedule. + BackupScheduleKindTimeBased BackupScheduleKind = "TimeBased" +) + +// PossibleBackupScheduleKindValues returns an array of possible values for the BackupScheduleKind const type. +func PossibleBackupScheduleKindValues() []BackupScheduleKind { + return []BackupScheduleKind{BackupScheduleKindFrequencyBased, BackupScheduleKindInvalid, BackupScheduleKindTimeBased} +} + +// BackupState enumerates the values for backup state. +type BackupState string + +const ( + // BackupStateAccepted Operation has been validated and accepted. Backup is yet to be triggered. + BackupStateAccepted BackupState = "Accepted" + // BackupStateBackupInProgress Backup operation has been triggered and is under process. + BackupStateBackupInProgress BackupState = "BackupInProgress" + // BackupStateFailure Operation completed with failure. + BackupStateFailure BackupState = "Failure" + // BackupStateInvalid Indicates an invalid backup state. All Service Fabric enumerations have the invalid + // type. + BackupStateInvalid BackupState = "Invalid" + // BackupStateSuccess Operation completed with success. + BackupStateSuccess BackupState = "Success" + // BackupStateTimeout Operation timed out. + BackupStateTimeout BackupState = "Timeout" +) + +// PossibleBackupStateValues returns an array of possible values for the BackupState const type. +func PossibleBackupStateValues() []BackupState { + return []BackupState{BackupStateAccepted, BackupStateBackupInProgress, BackupStateFailure, BackupStateInvalid, BackupStateSuccess, BackupStateTimeout} +} + +// BackupStorageKind enumerates the values for backup storage kind. +type BackupStorageKind string + +const ( + // BackupStorageKindAzureBlobStore Indicates Azure blob store to be used as backup storage. + BackupStorageKindAzureBlobStore BackupStorageKind = "AzureBlobStore" + // BackupStorageKindFileShare Indicates file/ SMB share to be used as backup storage. + BackupStorageKindFileShare BackupStorageKind = "FileShare" + // BackupStorageKindInvalid Indicates an invalid backup storage kind. All Service Fabric enumerations have + // the invalid type. + BackupStorageKindInvalid BackupStorageKind = "Invalid" +) + +// PossibleBackupStorageKindValues returns an array of possible values for the BackupStorageKind const type. +func PossibleBackupStorageKindValues() []BackupStorageKind { + return []BackupStorageKind{BackupStorageKindAzureBlobStore, BackupStorageKindFileShare, BackupStorageKindInvalid} +} + +// BackupSuspensionScope enumerates the values for backup suspension scope. +type BackupSuspensionScope string + +const ( + // BackupSuspensionScopeApplication Indicates the backup suspension is applied at application level. All + // services and partitions of the application are hence suspended for backup. + BackupSuspensionScopeApplication BackupSuspensionScope = "Application" + // BackupSuspensionScopeInvalid Indicates an invalid backup suspension scope type also indicating entity is + // not suspended. All Service Fabric enumerations have the invalid type. + BackupSuspensionScopeInvalid BackupSuspensionScope = "Invalid" + // BackupSuspensionScopePartition Indicates the backup suspension is applied at partition level. + BackupSuspensionScopePartition BackupSuspensionScope = "Partition" + // BackupSuspensionScopeService Indicates the backup suspension is applied at service level. All partitions + // of the service are hence suspended for backup. + BackupSuspensionScopeService BackupSuspensionScope = "Service" +) + +// PossibleBackupSuspensionScopeValues returns an array of possible values for the BackupSuspensionScope const type. +func PossibleBackupSuspensionScopeValues() []BackupSuspensionScope { + return []BackupSuspensionScope{BackupSuspensionScopeApplication, BackupSuspensionScopeInvalid, BackupSuspensionScopePartition, BackupSuspensionScopeService} +} + +// BackupType enumerates the values for backup type. +type BackupType string + +const ( + // BackupTypeFull Indicates a full backup. + BackupTypeFull BackupType = "Full" + // BackupTypeIncremental Indicates an incremental backup. A backup chain is comprised of a full backup + // followed by 0 or more incremental backups. + BackupTypeIncremental BackupType = "Incremental" + // BackupTypeInvalid Indicates an invalid backup type. All Service Fabric enumerations have the invalid + // type. + BackupTypeInvalid BackupType = "Invalid" +) + +// PossibleBackupTypeValues returns an array of possible values for the BackupType const type. +func PossibleBackupTypeValues() []BackupType { + return []BackupType{BackupTypeFull, BackupTypeIncremental, BackupTypeInvalid} +} + +// ChaosEventKind enumerates the values for chaos event kind. +type ChaosEventKind string + +const ( + // ChaosEventKindExecutingFaults Indicates a Chaos event that gets generated when Chaos has decided on the + // faults for an iteration. This Chaos event contains the details of the faults as a list of strings. + ChaosEventKindExecutingFaults ChaosEventKind = "ExecutingFaults" + // ChaosEventKindInvalid Indicates an invalid Chaos event kind. All Service Fabric enumerations have the + // invalid type. + ChaosEventKindInvalid ChaosEventKind = "Invalid" + // ChaosEventKindStarted Indicates a Chaos event that gets generated when Chaos is started. + ChaosEventKindStarted ChaosEventKind = "Started" + // ChaosEventKindStopped Indicates a Chaos event that gets generated when Chaos stops because either the + // user issued a stop or the time to run was up. + ChaosEventKindStopped ChaosEventKind = "Stopped" + // ChaosEventKindTestError Indicates a Chaos event that gets generated when an unexpected event has + // occurred in the Chaos engine, for example, due to the cluster snapshot being inconsistent, while + // faulting a faultable entity Chaos found that the entity was already faulted. + ChaosEventKindTestError ChaosEventKind = "TestError" + // ChaosEventKindValidationFailed Indicates a Chaos event that gets generated when the cluster entities do + // not become stable and healthy within ChaosParameters.MaxClusterStabilizationTimeoutInSeconds. + ChaosEventKindValidationFailed ChaosEventKind = "ValidationFailed" + // ChaosEventKindWaiting Indicates a Chaos event that gets generated when Chaos is waiting for the cluster + // to become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. + ChaosEventKindWaiting ChaosEventKind = "Waiting" +) + +// PossibleChaosEventKindValues returns an array of possible values for the ChaosEventKind const type. +func PossibleChaosEventKindValues() []ChaosEventKind { + return []ChaosEventKind{ChaosEventKindExecutingFaults, ChaosEventKindInvalid, ChaosEventKindStarted, ChaosEventKindStopped, ChaosEventKindTestError, ChaosEventKindValidationFailed, ChaosEventKindWaiting} +} + +// ChaosScheduleStatus enumerates the values for chaos schedule status. +type ChaosScheduleStatus string + +const ( + // ChaosScheduleStatusActive Indicates that the schedule is active and is being used to schedule runs of + // Chaos. The value is two. + ChaosScheduleStatusActive ChaosScheduleStatus = "Active" + // ChaosScheduleStatusExpired Indicates that the schedule is expired and will no longer be used to schedule + // runs of Chaos. The value is three. + ChaosScheduleStatusExpired ChaosScheduleStatus = "Expired" + // ChaosScheduleStatusInvalid Indicates an invalid Chaos Schedule status. All Service Fabric enumerations + // have the invalid type. The value is zero. + ChaosScheduleStatusInvalid ChaosScheduleStatus = "Invalid" + // ChaosScheduleStatusPending Indicates that the schedule is pending and is not yet being used to schedule + // runs of Chaos but will be used when the start time is passed. The value is four. + ChaosScheduleStatusPending ChaosScheduleStatus = "Pending" + // ChaosScheduleStatusStopped Indicates that the schedule is stopped and not being used to schedule runs of + // chaos. The value is one. + ChaosScheduleStatusStopped ChaosScheduleStatus = "Stopped" +) + +// PossibleChaosScheduleStatusValues returns an array of possible values for the ChaosScheduleStatus const type. +func PossibleChaosScheduleStatusValues() []ChaosScheduleStatus { + return []ChaosScheduleStatus{ChaosScheduleStatusActive, ChaosScheduleStatusExpired, ChaosScheduleStatusInvalid, ChaosScheduleStatusPending, ChaosScheduleStatusStopped} +} + +// ChaosStatus enumerates the values for chaos status. +type ChaosStatus string + +const ( + // ChaosStatusInvalid Indicates an invalid Chaos status. All Service Fabric enumerations have the invalid + // type. The value is zero. + ChaosStatusInvalid ChaosStatus = "Invalid" + // ChaosStatusRunning Indicates that Chaos is not stopped. The value is one. + ChaosStatusRunning ChaosStatus = "Running" + // ChaosStatusStopped Indicates that Chaos is not scheduling further faults. The value is two. + ChaosStatusStopped ChaosStatus = "Stopped" +) + +// PossibleChaosStatusValues returns an array of possible values for the ChaosStatus const type. +func PossibleChaosStatusValues() []ChaosStatus { + return []ChaosStatus{ChaosStatusInvalid, ChaosStatusRunning, ChaosStatusStopped} +} + +// ComposeDeploymentStatus enumerates the values for compose deployment status. +type ComposeDeploymentStatus string + +const ( + // ComposeDeploymentStatusCreating Indicates that the compose deployment is being created in background. + // The value is 2. + ComposeDeploymentStatusCreating ComposeDeploymentStatus = "Creating" + // ComposeDeploymentStatusDeleting Indicates that the compose deployment is being deleted in background. + // The value is 5. + ComposeDeploymentStatusDeleting ComposeDeploymentStatus = "Deleting" + // ComposeDeploymentStatusFailed Indicates that the compose deployment was terminated due to persistent + // failures. The value is 6. + ComposeDeploymentStatusFailed ComposeDeploymentStatus = "Failed" + // ComposeDeploymentStatusInvalid Indicates that the compose deployment status is invalid. The value is + // zero. + ComposeDeploymentStatusInvalid ComposeDeploymentStatus = "Invalid" + // ComposeDeploymentStatusProvisioning Indicates that the compose deployment is being provisioned in + // background. The value is 1. + ComposeDeploymentStatusProvisioning ComposeDeploymentStatus = "Provisioning" + // ComposeDeploymentStatusReady Indicates that the compose deployment has been successfully created or + // upgraded. The value is 3. + ComposeDeploymentStatusReady ComposeDeploymentStatus = "Ready" + // ComposeDeploymentStatusUnprovisioning Indicates that the compose deployment is being unprovisioned in + // background. The value is 4. + ComposeDeploymentStatusUnprovisioning ComposeDeploymentStatus = "Unprovisioning" + // ComposeDeploymentStatusUpgrading Indicates that the compose deployment is being upgraded in the + // background. The value is 7. + ComposeDeploymentStatusUpgrading ComposeDeploymentStatus = "Upgrading" +) + +// PossibleComposeDeploymentStatusValues returns an array of possible values for the ComposeDeploymentStatus const type. +func PossibleComposeDeploymentStatusValues() []ComposeDeploymentStatus { + return []ComposeDeploymentStatus{ComposeDeploymentStatusCreating, ComposeDeploymentStatusDeleting, ComposeDeploymentStatusFailed, ComposeDeploymentStatusInvalid, ComposeDeploymentStatusProvisioning, ComposeDeploymentStatusReady, ComposeDeploymentStatusUnprovisioning, ComposeDeploymentStatusUpgrading} +} + +// ComposeDeploymentUpgradeState enumerates the values for compose deployment upgrade state. +type ComposeDeploymentUpgradeState string + +const ( + // ComposeDeploymentUpgradeStateFailed The upgrade has failed and is unable to execute FailureAction. The + // value is 9. + ComposeDeploymentUpgradeStateFailed ComposeDeploymentUpgradeState = "Failed" + // ComposeDeploymentUpgradeStateInvalid Indicates the upgrade state is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. + ComposeDeploymentUpgradeStateInvalid ComposeDeploymentUpgradeState = "Invalid" + // ComposeDeploymentUpgradeStateProvisioningTarget The upgrade is in the progress of provisioning target + // application type version. The value is 1. + ComposeDeploymentUpgradeStateProvisioningTarget ComposeDeploymentUpgradeState = "ProvisioningTarget" + // ComposeDeploymentUpgradeStateRollingBackCompleted The upgrade has finished rolling back. The value is 8. + ComposeDeploymentUpgradeStateRollingBackCompleted ComposeDeploymentUpgradeState = "RollingBackCompleted" + // ComposeDeploymentUpgradeStateRollingBackInProgress The upgrade is rolling back to the previous version + // but is not complete yet. The value is 6. + ComposeDeploymentUpgradeStateRollingBackInProgress ComposeDeploymentUpgradeState = "RollingBackInProgress" + // ComposeDeploymentUpgradeStateRollingForwardCompleted The upgrade has finished rolling forward. The value + // is 5. + ComposeDeploymentUpgradeStateRollingForwardCompleted ComposeDeploymentUpgradeState = "RollingForwardCompleted" + // ComposeDeploymentUpgradeStateRollingForwardInProgress The upgrade is rolling forward to the target + // version but is not complete yet. The value is 2. + ComposeDeploymentUpgradeStateRollingForwardInProgress ComposeDeploymentUpgradeState = "RollingForwardInProgress" + // ComposeDeploymentUpgradeStateRollingForwardPending The current upgrade domain has finished upgrading. + // The overall upgrade is waiting for an explicit move next request in UnmonitoredManual mode or performing + // health checks in Monitored mode. The value is 3 + ComposeDeploymentUpgradeStateRollingForwardPending ComposeDeploymentUpgradeState = "RollingForwardPending" + // ComposeDeploymentUpgradeStateUnprovisioningCurrent The upgrade is in the progress of unprovisioning + // current application type version and rolling forward to the target version is completed. The value is 4. + ComposeDeploymentUpgradeStateUnprovisioningCurrent ComposeDeploymentUpgradeState = "UnprovisioningCurrent" + // ComposeDeploymentUpgradeStateUnprovisioningTarget The upgrade is in the progress of unprovisioning + // target application type version and rolling back to the current version is completed. The value is 7. + ComposeDeploymentUpgradeStateUnprovisioningTarget ComposeDeploymentUpgradeState = "UnprovisioningTarget" +) + +// PossibleComposeDeploymentUpgradeStateValues returns an array of possible values for the ComposeDeploymentUpgradeState const type. +func PossibleComposeDeploymentUpgradeStateValues() []ComposeDeploymentUpgradeState { + return []ComposeDeploymentUpgradeState{ComposeDeploymentUpgradeStateFailed, ComposeDeploymentUpgradeStateInvalid, ComposeDeploymentUpgradeStateProvisioningTarget, ComposeDeploymentUpgradeStateRollingBackCompleted, ComposeDeploymentUpgradeStateRollingBackInProgress, ComposeDeploymentUpgradeStateRollingForwardCompleted, ComposeDeploymentUpgradeStateRollingForwardInProgress, ComposeDeploymentUpgradeStateRollingForwardPending, ComposeDeploymentUpgradeStateUnprovisioningCurrent, ComposeDeploymentUpgradeStateUnprovisioningTarget} +} + +// CreateFabricDump enumerates the values for create fabric dump. +type CreateFabricDump string + +const ( + // False ... + False CreateFabricDump = "False" + // True ... + True CreateFabricDump = "True" +) + +// PossibleCreateFabricDumpValues returns an array of possible values for the CreateFabricDump const type. +func PossibleCreateFabricDumpValues() []CreateFabricDump { + return []CreateFabricDump{False, True} +} + +// DataLossMode enumerates the values for data loss mode. +type DataLossMode string + +const ( + // DataLossModeFullDataLoss FullDataLoss option will drop all the replicas which means that all the data + // will be lost. + DataLossModeFullDataLoss DataLossMode = "FullDataLoss" + // DataLossModeInvalid Reserved. Do not pass into API. + DataLossModeInvalid DataLossMode = "Invalid" + // DataLossModePartialDataLoss PartialDataLoss option will cause a quorum of replicas to go down, + // triggering an OnDataLoss event in the system for the given partition. + DataLossModePartialDataLoss DataLossMode = "PartialDataLoss" +) + +// PossibleDataLossModeValues returns an array of possible values for the DataLossMode const type. +func PossibleDataLossModeValues() []DataLossMode { + return []DataLossMode{DataLossModeFullDataLoss, DataLossModeInvalid, DataLossModePartialDataLoss} +} + +// DayOfWeek enumerates the values for day of week. +type DayOfWeek string + +const ( + // Friday Indicates the Day referred is Friday. + Friday DayOfWeek = "Friday" + // Monday Indicates the Day referred is Monday. + Monday DayOfWeek = "Monday" + // Saturday Indicates the Day referred is Saturday. + Saturday DayOfWeek = "Saturday" + // Sunday Indicates the Day referred is Sunday. + Sunday DayOfWeek = "Sunday" + // Thursday Indicates the Day referred is Thursday. + Thursday DayOfWeek = "Thursday" + // Tuesday Indicates the Day referred is Tuesday. + Tuesday DayOfWeek = "Tuesday" + // Wednesday Indicates the Day referred is Wednesday. + Wednesday DayOfWeek = "Wednesday" +) + +// PossibleDayOfWeekValues returns an array of possible values for the DayOfWeek const type. +func PossibleDayOfWeekValues() []DayOfWeek { + return []DayOfWeek{Friday, Monday, Saturday, Sunday, Thursday, Tuesday, Wednesday} +} + +// DeactivationIntent enumerates the values for deactivation intent. +type DeactivationIntent string + +const ( + // Pause Indicates that the node should be paused. The value is 1. + Pause DeactivationIntent = "Pause" + // RemoveData Indicates the intent is for the node to remove data. The value is 3. + RemoveData DeactivationIntent = "RemoveData" + // Restart Indicates that the intent is for the node to be restarted after a short period of time. The + // value is 2. + Restart DeactivationIntent = "Restart" +) + +// PossibleDeactivationIntentValues returns an array of possible values for the DeactivationIntent const type. +func PossibleDeactivationIntentValues() []DeactivationIntent { + return []DeactivationIntent{Pause, RemoveData, Restart} +} + +// DeployedApplicationStatus enumerates the values for deployed application status. +type DeployedApplicationStatus string + +const ( + // DeployedApplicationStatusActivating Indicates that the package is activating. The value is 2. + DeployedApplicationStatusActivating DeployedApplicationStatus = "Activating" + // DeployedApplicationStatusActive Indicates that the package is active. The value is 3. + DeployedApplicationStatusActive DeployedApplicationStatus = "Active" + // DeployedApplicationStatusDeactivating Indicates that the package is deactivating. The value is 5. + DeployedApplicationStatusDeactivating DeployedApplicationStatus = "Deactivating" + // DeployedApplicationStatusDownloading Indicates that the package is downloading from the ImageStore. The + // value is 1. + DeployedApplicationStatusDownloading DeployedApplicationStatus = "Downloading" + // DeployedApplicationStatusInvalid Indicates that deployment status is not valid. All Service Fabric + // enumerations have the invalid type. The value is zero. + DeployedApplicationStatusInvalid DeployedApplicationStatus = "Invalid" + // DeployedApplicationStatusUpgrading Indicates that the package is upgrading. The value is 4. + DeployedApplicationStatusUpgrading DeployedApplicationStatus = "Upgrading" +) + +// PossibleDeployedApplicationStatusValues returns an array of possible values for the DeployedApplicationStatus const type. +func PossibleDeployedApplicationStatusValues() []DeployedApplicationStatus { + return []DeployedApplicationStatus{DeployedApplicationStatusActivating, DeployedApplicationStatusActive, DeployedApplicationStatusDeactivating, DeployedApplicationStatusDownloading, DeployedApplicationStatusInvalid, DeployedApplicationStatusUpgrading} +} + +// DeploymentStatus enumerates the values for deployment status. +type DeploymentStatus string + +const ( + // DeploymentStatusActivating Indicates the application or service package is being activated. The value is + // 2. + DeploymentStatusActivating DeploymentStatus = "Activating" + // DeploymentStatusActive Indicates the application or service package is active the node. The value is 3. + DeploymentStatusActive DeploymentStatus = "Active" + // DeploymentStatusDeactivating Indicates the application or service package is being deactivated. The + // value is 5. + DeploymentStatusDeactivating DeploymentStatus = "Deactivating" + // DeploymentStatusDownloading Indicates the application or service package is being downloaded to the node + // from the ImageStore. The value is 1. + DeploymentStatusDownloading DeploymentStatus = "Downloading" + // DeploymentStatusFailed Indicates the application or service package has failed to run to completion. The + // value is 7. + DeploymentStatusFailed DeploymentStatus = "Failed" + // DeploymentStatusInvalid Indicates status of the application or service package is not known or invalid. + // The value is 0. + DeploymentStatusInvalid DeploymentStatus = "Invalid" + // DeploymentStatusRanToCompletion Indicates the application or service package has ran to completion + // successfully. The value is 6. + DeploymentStatusRanToCompletion DeploymentStatus = "RanToCompletion" + // DeploymentStatusUpgrading Indicates the application or service package is being upgraded. The value is + // 4. + DeploymentStatusUpgrading DeploymentStatus = "Upgrading" +) + +// PossibleDeploymentStatusValues returns an array of possible values for the DeploymentStatus const type. +func PossibleDeploymentStatusValues() []DeploymentStatus { + return []DeploymentStatus{DeploymentStatusActivating, DeploymentStatusActive, DeploymentStatusDeactivating, DeploymentStatusDownloading, DeploymentStatusFailed, DeploymentStatusInvalid, DeploymentStatusRanToCompletion, DeploymentStatusUpgrading} +} + +// DiagnosticsSinkKind enumerates the values for diagnostics sink kind. +type DiagnosticsSinkKind string + +const ( + // DiagnosticsSinkKindAzureInternalMonitoringPipeline Diagnostics settings for Geneva. + DiagnosticsSinkKindAzureInternalMonitoringPipeline DiagnosticsSinkKind = "AzureInternalMonitoringPipeline" + // DiagnosticsSinkKindInvalid Indicates an invalid sink kind. All Service Fabric enumerations have the + // invalid type. + DiagnosticsSinkKindInvalid DiagnosticsSinkKind = "Invalid" +) + +// PossibleDiagnosticsSinkKindValues returns an array of possible values for the DiagnosticsSinkKind const type. +func PossibleDiagnosticsSinkKindValues() []DiagnosticsSinkKind { + return []DiagnosticsSinkKind{DiagnosticsSinkKindAzureInternalMonitoringPipeline, DiagnosticsSinkKindInvalid} +} + +// EntityKind enumerates the values for entity kind. +type EntityKind string + +const ( + // EntityKindApplication Indicates the entity is a Service Fabric application. The value is 4. + EntityKindApplication EntityKind = "Application" + // EntityKindCluster Indicates the entity is a Service Fabric cluster. The value is 8. + EntityKindCluster EntityKind = "Cluster" + // EntityKindDeployedApplication Indicates the entity is a Service Fabric deployed application. The value + // is 6. + EntityKindDeployedApplication EntityKind = "DeployedApplication" + // EntityKindDeployedServicePackage Indicates the entity is a Service Fabric deployed service package. The + // value is 7. + EntityKindDeployedServicePackage EntityKind = "DeployedServicePackage" + // EntityKindInvalid Indicates an invalid entity kind. All Service Fabric enumerations have the invalid + // type. The value is zero. + EntityKindInvalid EntityKind = "Invalid" + // EntityKindNode Indicates the entity is a Service Fabric node. The value is 1. + EntityKindNode EntityKind = "Node" + // EntityKindPartition Indicates the entity is a Service Fabric partition. The value is 2. + EntityKindPartition EntityKind = "Partition" + // EntityKindReplica Indicates the entity is a Service Fabric replica. The value is 5. + EntityKindReplica EntityKind = "Replica" + // EntityKindService Indicates the entity is a Service Fabric service. The value is 3. + EntityKindService EntityKind = "Service" +) + +// PossibleEntityKindValues returns an array of possible values for the EntityKind const type. +func PossibleEntityKindValues() []EntityKind { + return []EntityKind{EntityKindApplication, EntityKindCluster, EntityKindDeployedApplication, EntityKindDeployedServicePackage, EntityKindInvalid, EntityKindNode, EntityKindPartition, EntityKindReplica, EntityKindService} +} + +// EntityKindBasicBackupEntity enumerates the values for entity kind basic backup entity. +type EntityKindBasicBackupEntity string + +const ( + // EntityKindApplication1 ... + EntityKindApplication1 EntityKindBasicBackupEntity = "Application" + // EntityKindBackupEntity ... + EntityKindBackupEntity EntityKindBasicBackupEntity = "BackupEntity" + // EntityKindPartition1 ... + EntityKindPartition1 EntityKindBasicBackupEntity = "Partition" + // EntityKindService1 ... + EntityKindService1 EntityKindBasicBackupEntity = "Service" +) + +// PossibleEntityKindBasicBackupEntityValues returns an array of possible values for the EntityKindBasicBackupEntity const type. +func PossibleEntityKindBasicBackupEntityValues() []EntityKindBasicBackupEntity { + return []EntityKindBasicBackupEntity{EntityKindApplication1, EntityKindBackupEntity, EntityKindPartition1, EntityKindService1} +} + +// EntryPointStatus enumerates the values for entry point status. +type EntryPointStatus string + +const ( + // EntryPointStatusInvalid Indicates status of entry point is not known or invalid. The value is 0. + EntryPointStatusInvalid EntryPointStatus = "Invalid" + // EntryPointStatusPending Indicates the entry point is scheduled to be started. The value is 1. + EntryPointStatusPending EntryPointStatus = "Pending" + // EntryPointStatusStarted Indicates the entry point was started successfully and is running. The value is + // 3. + EntryPointStatusStarted EntryPointStatus = "Started" + // EntryPointStatusStarting Indicates the entry point is being started. The value is 2. + EntryPointStatusStarting EntryPointStatus = "Starting" + // EntryPointStatusStopped Indicates the entry point is not running. The value is 5. + EntryPointStatusStopped EntryPointStatus = "Stopped" + // EntryPointStatusStopping Indicates the entry point is being stopped. The value is 4. + EntryPointStatusStopping EntryPointStatus = "Stopping" +) + +// PossibleEntryPointStatusValues returns an array of possible values for the EntryPointStatus const type. +func PossibleEntryPointStatusValues() []EntryPointStatus { + return []EntryPointStatus{EntryPointStatusInvalid, EntryPointStatusPending, EntryPointStatusStarted, EntryPointStatusStarting, EntryPointStatusStopped, EntryPointStatusStopping} +} + +// EnvironmentVariableType enumerates the values for environment variable type. +type EnvironmentVariableType string + +const ( + // ClearText The environment variable in clear text, will not be processed in any way and passed in as is + ClearText EnvironmentVariableType = "ClearText" + // KeyVaultReference The URI to a KeyVault secret version, will be resolved using the application's managed + // identity (this type is only valid if the app was assigned a managed identity) before getting passed in + KeyVaultReference EnvironmentVariableType = "KeyVaultReference" + // SecretValueReference The reference to a SecretValue resource, will be resolved before getting passed in + SecretValueReference EnvironmentVariableType = "SecretValueReference" +) + +// PossibleEnvironmentVariableTypeValues returns an array of possible values for the EnvironmentVariableType const type. +func PossibleEnvironmentVariableTypeValues() []EnvironmentVariableType { + return []EnvironmentVariableType{ClearText, KeyVaultReference, SecretValueReference} +} + +// ExecutionPolicyType enumerates the values for execution policy type. +type ExecutionPolicyType string + +const ( + // RunToCompletion Indicates that the service will perform its desired operation and complete successfully. + // If the service encounters failure, it will restarted based on restart policy specified. If the service + // completes its operation successfully, it will not be restarted again. + RunToCompletion ExecutionPolicyType = "runToCompletion" +) + +// PossibleExecutionPolicyTypeValues returns an array of possible values for the ExecutionPolicyType const type. +func PossibleExecutionPolicyTypeValues() []ExecutionPolicyType { + return []ExecutionPolicyType{RunToCompletion} +} + +// FabricErrorCodes enumerates the values for fabric error codes. +type FabricErrorCodes string + +const ( + // EABORT ... + EABORT FabricErrorCodes = "E_ABORT" + // EFAIL ... + EFAIL FabricErrorCodes = "E_FAIL" + // EINVALIDARG ... + EINVALIDARG FabricErrorCodes = "E_INVALIDARG" + // FABRICEAPPLICATIONALREADYEXISTS ... + FABRICEAPPLICATIONALREADYEXISTS FabricErrorCodes = "FABRIC_E_APPLICATION_ALREADY_EXISTS" + // FABRICEAPPLICATIONALREADYINTARGETVERSION ... + FABRICEAPPLICATIONALREADYINTARGETVERSION FabricErrorCodes = "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + // FABRICEAPPLICATIONNOTFOUND ... + FABRICEAPPLICATIONNOTFOUND FabricErrorCodes = "FABRIC_E_APPLICATION_NOT_FOUND" + // FABRICEAPPLICATIONNOTUPGRADING ... + FABRICEAPPLICATIONNOTUPGRADING FabricErrorCodes = "FABRIC_E_APPLICATION_NOT_UPGRADING" + // FABRICEAPPLICATIONTYPEALREADYEXISTS ... + FABRICEAPPLICATIONTYPEALREADYEXISTS FabricErrorCodes = "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + // FABRICEAPPLICATIONTYPEINUSE ... + FABRICEAPPLICATIONTYPEINUSE FabricErrorCodes = "FABRIC_E_APPLICATION_TYPE_IN_USE" + // FABRICEAPPLICATIONTYPENOTFOUND ... + FABRICEAPPLICATIONTYPENOTFOUND FabricErrorCodes = "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + // FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS ... + FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS FabricErrorCodes = "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + // FABRICEAPPLICATIONUPGRADEINPROGRESS ... + FABRICEAPPLICATIONUPGRADEINPROGRESS FabricErrorCodes = "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + // FABRICEAPPLICATIONUPGRADEVALIDATIONERROR ... + FABRICEAPPLICATIONUPGRADEVALIDATIONERROR FabricErrorCodes = "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + // FABRICEBACKUPINPROGRESS ... + FABRICEBACKUPINPROGRESS FabricErrorCodes = "FABRIC_E_BACKUP_IN_PROGRESS" + // FABRICEBACKUPISENABLED ... + FABRICEBACKUPISENABLED FabricErrorCodes = "FABRIC_E_BACKUP_IS_ENABLED" + // FABRICEBACKUPNOTENABLED ... + FABRICEBACKUPNOTENABLED FabricErrorCodes = "FABRIC_E_BACKUP_NOT_ENABLED" + // FABRICEBACKUPPOLICYALREADYEXISTING ... + FABRICEBACKUPPOLICYALREADYEXISTING FabricErrorCodes = "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + // FABRICEBACKUPPOLICYNOTEXISTING ... + FABRICEBACKUPPOLICYNOTEXISTING FabricErrorCodes = "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + // FABRICECOMMUNICATIONERROR ... + FABRICECOMMUNICATIONERROR FabricErrorCodes = "FABRIC_E_COMMUNICATION_ERROR" + // FABRICECONFIGURATIONPARAMETERNOTFOUND ... + FABRICECONFIGURATIONPARAMETERNOTFOUND FabricErrorCodes = "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + // FABRICECONFIGURATIONSECTIONNOTFOUND ... + FABRICECONFIGURATIONSECTIONNOTFOUND FabricErrorCodes = "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + // FABRICEDIRECTORYNOTFOUND ... + FABRICEDIRECTORYNOTFOUND FabricErrorCodes = "FABRIC_E_DIRECTORY_NOT_FOUND" + // FABRICEENUMERATIONCOMPLETED ... + FABRICEENUMERATIONCOMPLETED FabricErrorCodes = "FABRIC_E_ENUMERATION_COMPLETED" + // FABRICEFABRICALREADYINTARGETVERSION ... + FABRICEFABRICALREADYINTARGETVERSION FabricErrorCodes = "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + // FABRICEFABRICNOTUPGRADING ... + FABRICEFABRICNOTUPGRADING FabricErrorCodes = "FABRIC_E_FABRIC_NOT_UPGRADING" + // FABRICEFABRICUPGRADEINPROGRESS ... + FABRICEFABRICUPGRADEINPROGRESS FabricErrorCodes = "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + // FABRICEFABRICUPGRADEVALIDATIONERROR ... + FABRICEFABRICUPGRADEVALIDATIONERROR FabricErrorCodes = "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + // FABRICEFABRICVERSIONALREADYEXISTS ... + FABRICEFABRICVERSIONALREADYEXISTS FabricErrorCodes = "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + // FABRICEFABRICVERSIONINUSE ... + FABRICEFABRICVERSIONINUSE FabricErrorCodes = "FABRIC_E_FABRIC_VERSION_IN_USE" + // FABRICEFABRICVERSIONNOTFOUND ... + FABRICEFABRICVERSIONNOTFOUND FabricErrorCodes = "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + // FABRICEFAULTANALYSISSERVICENOTEXISTING ... + FABRICEFAULTANALYSISSERVICENOTEXISTING FabricErrorCodes = "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + // FABRICEFILENOTFOUND ... + FABRICEFILENOTFOUND FabricErrorCodes = "FABRIC_E_FILE_NOT_FOUND" + // FABRICEHEALTHENTITYNOTFOUND ... + FABRICEHEALTHENTITYNOTFOUND FabricErrorCodes = "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + // FABRICEHEALTHSTALEREPORT ... + FABRICEHEALTHSTALEREPORT FabricErrorCodes = "FABRIC_E_HEALTH_STALE_REPORT" + // FABRICEIMAGEBUILDERRESERVEDDIRECTORYERROR ... + FABRICEIMAGEBUILDERRESERVEDDIRECTORYERROR FabricErrorCodes = "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + // FABRICEIMAGEBUILDERVALIDATIONERROR ... + FABRICEIMAGEBUILDERVALIDATIONERROR FabricErrorCodes = "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + // FABRICEINSTANCEIDMISMATCH ... + FABRICEINSTANCEIDMISMATCH FabricErrorCodes = "FABRIC_E_INSTANCE_ID_MISMATCH" + // FABRICEINVALIDADDRESS ... + FABRICEINVALIDADDRESS FabricErrorCodes = "FABRIC_E_INVALID_ADDRESS" + // FABRICEINVALIDATOMICGROUP ... + FABRICEINVALIDATOMICGROUP FabricErrorCodes = "FABRIC_E_INVALID_ATOMIC_GROUP" + // FABRICEINVALIDCONFIGURATION ... + FABRICEINVALIDCONFIGURATION FabricErrorCodes = "FABRIC_E_INVALID_CONFIGURATION" + // FABRICEINVALIDFORSTATELESSSERVICES ... + FABRICEINVALIDFORSTATELESSSERVICES FabricErrorCodes = "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + // FABRICEINVALIDNAMEURI ... + FABRICEINVALIDNAMEURI FabricErrorCodes = "FABRIC_E_INVALID_NAME_URI" + // FABRICEINVALIDPARTITIONKEY ... + FABRICEINVALIDPARTITIONKEY FabricErrorCodes = "FABRIC_E_INVALID_PARTITION_KEY" + // FABRICEINVALIDSERVICESCALINGPOLICY ... + FABRICEINVALIDSERVICESCALINGPOLICY FabricErrorCodes = "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + // FABRICEKEYNOTFOUND ... + FABRICEKEYNOTFOUND FabricErrorCodes = "FABRIC_E_KEY_NOT_FOUND" + // FABRICEKEYTOOLARGE ... + FABRICEKEYTOOLARGE FabricErrorCodes = "FABRIC_E_KEY_TOO_LARGE" + // FABRICENAMEALREADYEXISTS ... + FABRICENAMEALREADYEXISTS FabricErrorCodes = "FABRIC_E_NAME_ALREADY_EXISTS" + // FABRICENAMEDOESNOTEXIST ... + FABRICENAMEDOESNOTEXIST FabricErrorCodes = "FABRIC_E_NAME_DOES_NOT_EXIST" + // FABRICENAMENOTEMPTY ... + FABRICENAMENOTEMPTY FabricErrorCodes = "FABRIC_E_NAME_NOT_EMPTY" + // FABRICENODEHASNOTSTOPPEDYET ... + FABRICENODEHASNOTSTOPPEDYET FabricErrorCodes = "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + // FABRICENODEISUP ... + FABRICENODEISUP FabricErrorCodes = "FABRIC_E_NODE_IS_UP" + // FABRICENODENOTFOUND ... + FABRICENODENOTFOUND FabricErrorCodes = "FABRIC_E_NODE_NOT_FOUND" + // FABRICENOTPRIMARY ... + FABRICENOTPRIMARY FabricErrorCodes = "FABRIC_E_NOT_PRIMARY" + // FABRICENOTREADY ... + FABRICENOTREADY FabricErrorCodes = "FABRIC_E_NOT_READY" + // FABRICENOWRITEQUORUM ... + FABRICENOWRITEQUORUM FabricErrorCodes = "FABRIC_E_NO_WRITE_QUORUM" + // FABRICEOPERATIONNOTCOMPLETE ... + FABRICEOPERATIONNOTCOMPLETE FabricErrorCodes = "FABRIC_E_OPERATION_NOT_COMPLETE" + // FABRICEPARTITIONNOTFOUND ... + FABRICEPARTITIONNOTFOUND FabricErrorCodes = "FABRIC_E_PARTITION_NOT_FOUND" + // FABRICEPATHTOOLONG ... + FABRICEPATHTOOLONG FabricErrorCodes = "FABRIC_E_PATH_TOO_LONG" + // FABRICEPROPERTYCHECKFAILED ... + FABRICEPROPERTYCHECKFAILED FabricErrorCodes = "FABRIC_E_PROPERTY_CHECK_FAILED" + // FABRICEPROPERTYDOESNOTEXIST ... + FABRICEPROPERTYDOESNOTEXIST FabricErrorCodes = "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + // FABRICERECONFIGURATIONPENDING ... + FABRICERECONFIGURATIONPENDING FabricErrorCodes = "FABRIC_E_RECONFIGURATION_PENDING" + // FABRICEREPLICADOESNOTEXIST ... + FABRICEREPLICADOESNOTEXIST FabricErrorCodes = "FABRIC_E_REPLICA_DOES_NOT_EXIST" + // FABRICERESTOREINPROGRESS ... + FABRICERESTOREINPROGRESS FabricErrorCodes = "FABRIC_E_RESTORE_IN_PROGRESS" + // FABRICERESTORESOURCETARGETPARTITIONMISMATCH ... + FABRICERESTORESOURCETARGETPARTITIONMISMATCH FabricErrorCodes = "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + // FABRICESEQUENCENUMBERCHECKFAILED ... + FABRICESEQUENCENUMBERCHECKFAILED FabricErrorCodes = "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + // FABRICESERVICEAFFINITYCHAINNOTSUPPORTED ... + FABRICESERVICEAFFINITYCHAINNOTSUPPORTED FabricErrorCodes = "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + // FABRICESERVICEALREADYEXISTS ... + FABRICESERVICEALREADYEXISTS FabricErrorCodes = "FABRIC_E_SERVICE_ALREADY_EXISTS" + // FABRICESERVICEDOESNOTEXIST ... + FABRICESERVICEDOESNOTEXIST FabricErrorCodes = "FABRIC_E_SERVICE_DOES_NOT_EXIST" + // FABRICESERVICEGROUPALREADYEXISTS ... + FABRICESERVICEGROUPALREADYEXISTS FabricErrorCodes = "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + // FABRICESERVICEGROUPDOESNOTEXIST ... + FABRICESERVICEGROUPDOESNOTEXIST FabricErrorCodes = "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + // FABRICESERVICEMANIFESTNOTFOUND ... + FABRICESERVICEMANIFESTNOTFOUND FabricErrorCodes = "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + // FABRICESERVICEMETADATAMISMATCH ... + FABRICESERVICEMETADATAMISMATCH FabricErrorCodes = "FABRIC_E_SERVICE_METADATA_MISMATCH" + // FABRICESERVICEOFFLINE ... + FABRICESERVICEOFFLINE FabricErrorCodes = "FABRIC_E_SERVICE_OFFLINE" + // FABRICESERVICETYPEMISMATCH ... + FABRICESERVICETYPEMISMATCH FabricErrorCodes = "FABRIC_E_SERVICE_TYPE_MISMATCH" + // FABRICESERVICETYPENOTFOUND ... + FABRICESERVICETYPENOTFOUND FabricErrorCodes = "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + // FABRICESERVICETYPETEMPLATENOTFOUND ... + FABRICESERVICETYPETEMPLATENOTFOUND FabricErrorCodes = "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + // FABRICESINGLEINSTANCEAPPLICATIONALREADYEXISTS ... + FABRICESINGLEINSTANCEAPPLICATIONALREADYEXISTS FabricErrorCodes = "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + // FABRICESINGLEINSTANCEAPPLICATIONNOTFOUND ... + FABRICESINGLEINSTANCEAPPLICATIONNOTFOUND FabricErrorCodes = "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + // FABRICETIMEOUT ... + FABRICETIMEOUT FabricErrorCodes = "FABRIC_E_TIMEOUT" + // FABRICEVALUEEMPTY ... + FABRICEVALUEEMPTY FabricErrorCodes = "FABRIC_E_VALUE_EMPTY" + // FABRICEVALUETOOLARGE ... + FABRICEVALUETOOLARGE FabricErrorCodes = "FABRIC_E_VALUE_TOO_LARGE" + // FABRICEVOLUMEALREADYEXISTS ... + FABRICEVOLUMEALREADYEXISTS FabricErrorCodes = "FABRIC_E_VOLUME_ALREADY_EXISTS" + // FABRICEVOLUMENOTFOUND ... + FABRICEVOLUMENOTFOUND FabricErrorCodes = "FABRIC_E_VOLUME_NOT_FOUND" + // SerializationError ... + SerializationError FabricErrorCodes = "SerializationError" +) + +// PossibleFabricErrorCodesValues returns an array of possible values for the FabricErrorCodes const type. +func PossibleFabricErrorCodesValues() []FabricErrorCodes { + return []FabricErrorCodes{EABORT, EFAIL, EINVALIDARG, FABRICEAPPLICATIONALREADYEXISTS, FABRICEAPPLICATIONALREADYINTARGETVERSION, FABRICEAPPLICATIONNOTFOUND, FABRICEAPPLICATIONNOTUPGRADING, FABRICEAPPLICATIONTYPEALREADYEXISTS, FABRICEAPPLICATIONTYPEINUSE, FABRICEAPPLICATIONTYPENOTFOUND, FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS, FABRICEAPPLICATIONUPGRADEINPROGRESS, FABRICEAPPLICATIONUPGRADEVALIDATIONERROR, FABRICEBACKUPINPROGRESS, FABRICEBACKUPISENABLED, FABRICEBACKUPNOTENABLED, FABRICEBACKUPPOLICYALREADYEXISTING, FABRICEBACKUPPOLICYNOTEXISTING, FABRICECOMMUNICATIONERROR, FABRICECONFIGURATIONPARAMETERNOTFOUND, FABRICECONFIGURATIONSECTIONNOTFOUND, FABRICEDIRECTORYNOTFOUND, FABRICEENUMERATIONCOMPLETED, FABRICEFABRICALREADYINTARGETVERSION, FABRICEFABRICNOTUPGRADING, FABRICEFABRICUPGRADEINPROGRESS, FABRICEFABRICUPGRADEVALIDATIONERROR, FABRICEFABRICVERSIONALREADYEXISTS, FABRICEFABRICVERSIONINUSE, FABRICEFABRICVERSIONNOTFOUND, FABRICEFAULTANALYSISSERVICENOTEXISTING, FABRICEFILENOTFOUND, FABRICEHEALTHENTITYNOTFOUND, FABRICEHEALTHSTALEREPORT, FABRICEIMAGEBUILDERRESERVEDDIRECTORYERROR, FABRICEIMAGEBUILDERVALIDATIONERROR, FABRICEINSTANCEIDMISMATCH, FABRICEINVALIDADDRESS, FABRICEINVALIDATOMICGROUP, FABRICEINVALIDCONFIGURATION, FABRICEINVALIDFORSTATELESSSERVICES, FABRICEINVALIDNAMEURI, FABRICEINVALIDPARTITIONKEY, FABRICEINVALIDSERVICESCALINGPOLICY, FABRICEKEYNOTFOUND, FABRICEKEYTOOLARGE, FABRICENAMEALREADYEXISTS, FABRICENAMEDOESNOTEXIST, FABRICENAMENOTEMPTY, FABRICENODEHASNOTSTOPPEDYET, FABRICENODEISUP, FABRICENODENOTFOUND, FABRICENOTPRIMARY, FABRICENOTREADY, FABRICENOWRITEQUORUM, FABRICEOPERATIONNOTCOMPLETE, FABRICEPARTITIONNOTFOUND, FABRICEPATHTOOLONG, FABRICEPROPERTYCHECKFAILED, FABRICEPROPERTYDOESNOTEXIST, FABRICERECONFIGURATIONPENDING, FABRICEREPLICADOESNOTEXIST, FABRICERESTOREINPROGRESS, FABRICERESTORESOURCETARGETPARTITIONMISMATCH, FABRICESEQUENCENUMBERCHECKFAILED, FABRICESERVICEAFFINITYCHAINNOTSUPPORTED, FABRICESERVICEALREADYEXISTS, FABRICESERVICEDOESNOTEXIST, FABRICESERVICEGROUPALREADYEXISTS, FABRICESERVICEGROUPDOESNOTEXIST, FABRICESERVICEMANIFESTNOTFOUND, FABRICESERVICEMETADATAMISMATCH, FABRICESERVICEOFFLINE, FABRICESERVICETYPEMISMATCH, FABRICESERVICETYPENOTFOUND, FABRICESERVICETYPETEMPLATENOTFOUND, FABRICESINGLEINSTANCEAPPLICATIONALREADYEXISTS, FABRICESINGLEINSTANCEAPPLICATIONNOTFOUND, FABRICETIMEOUT, FABRICEVALUEEMPTY, FABRICEVALUETOOLARGE, FABRICEVOLUMEALREADYEXISTS, FABRICEVOLUMENOTFOUND, SerializationError} +} + +// FabricEventKind enumerates the values for fabric event kind. +type FabricEventKind string + +const ( + // FabricEventKindApplicationContainerInstanceExited ... + FabricEventKindApplicationContainerInstanceExited FabricEventKind = "ApplicationContainerInstanceExited" + // FabricEventKindApplicationCreated ... + FabricEventKindApplicationCreated FabricEventKind = "ApplicationCreated" + // FabricEventKindApplicationDeleted ... + FabricEventKindApplicationDeleted FabricEventKind = "ApplicationDeleted" + // FabricEventKindApplicationEvent ... + FabricEventKindApplicationEvent FabricEventKind = "ApplicationEvent" + // FabricEventKindApplicationHealthReportExpired ... + FabricEventKindApplicationHealthReportExpired FabricEventKind = "ApplicationHealthReportExpired" + // FabricEventKindApplicationNewHealthReport ... + FabricEventKindApplicationNewHealthReport FabricEventKind = "ApplicationNewHealthReport" + // FabricEventKindApplicationProcessExited ... + FabricEventKindApplicationProcessExited FabricEventKind = "ApplicationProcessExited" + // FabricEventKindApplicationUpgradeCompleted ... + FabricEventKindApplicationUpgradeCompleted FabricEventKind = "ApplicationUpgradeCompleted" + // FabricEventKindApplicationUpgradeDomainCompleted ... + FabricEventKindApplicationUpgradeDomainCompleted FabricEventKind = "ApplicationUpgradeDomainCompleted" + // FabricEventKindApplicationUpgradeRollbackCompleted ... + FabricEventKindApplicationUpgradeRollbackCompleted FabricEventKind = "ApplicationUpgradeRollbackCompleted" + // FabricEventKindApplicationUpgradeRollbackStarted ... + FabricEventKindApplicationUpgradeRollbackStarted FabricEventKind = "ApplicationUpgradeRollbackStarted" + // FabricEventKindApplicationUpgradeStarted ... + FabricEventKindApplicationUpgradeStarted FabricEventKind = "ApplicationUpgradeStarted" + // FabricEventKindChaosCodePackageRestartScheduled ... + FabricEventKindChaosCodePackageRestartScheduled FabricEventKind = "ChaosCodePackageRestartScheduled" + // FabricEventKindChaosNodeRestartScheduled ... + FabricEventKindChaosNodeRestartScheduled FabricEventKind = "ChaosNodeRestartScheduled" + // FabricEventKindChaosPartitionPrimaryMoveScheduled ... + FabricEventKindChaosPartitionPrimaryMoveScheduled FabricEventKind = "ChaosPartitionPrimaryMoveScheduled" + // FabricEventKindChaosPartitionSecondaryMoveScheduled ... + FabricEventKindChaosPartitionSecondaryMoveScheduled FabricEventKind = "ChaosPartitionSecondaryMoveScheduled" + // FabricEventKindChaosReplicaRemovalScheduled ... + FabricEventKindChaosReplicaRemovalScheduled FabricEventKind = "ChaosReplicaRemovalScheduled" + // FabricEventKindChaosReplicaRestartScheduled ... + FabricEventKindChaosReplicaRestartScheduled FabricEventKind = "ChaosReplicaRestartScheduled" + // FabricEventKindChaosStarted ... + FabricEventKindChaosStarted FabricEventKind = "ChaosStarted" + // FabricEventKindChaosStopped ... + FabricEventKindChaosStopped FabricEventKind = "ChaosStopped" + // FabricEventKindClusterEvent ... + FabricEventKindClusterEvent FabricEventKind = "ClusterEvent" + // FabricEventKindClusterHealthReportExpired ... + FabricEventKindClusterHealthReportExpired FabricEventKind = "ClusterHealthReportExpired" + // FabricEventKindClusterNewHealthReport ... + FabricEventKindClusterNewHealthReport FabricEventKind = "ClusterNewHealthReport" + // FabricEventKindClusterUpgradeCompleted ... + FabricEventKindClusterUpgradeCompleted FabricEventKind = "ClusterUpgradeCompleted" + // FabricEventKindClusterUpgradeDomainCompleted ... + FabricEventKindClusterUpgradeDomainCompleted FabricEventKind = "ClusterUpgradeDomainCompleted" + // FabricEventKindClusterUpgradeRollbackCompleted ... + FabricEventKindClusterUpgradeRollbackCompleted FabricEventKind = "ClusterUpgradeRollbackCompleted" + // FabricEventKindClusterUpgradeRollbackStarted ... + FabricEventKindClusterUpgradeRollbackStarted FabricEventKind = "ClusterUpgradeRollbackStarted" + // FabricEventKindClusterUpgradeStarted ... + FabricEventKindClusterUpgradeStarted FabricEventKind = "ClusterUpgradeStarted" + // FabricEventKindContainerInstanceEvent ... + FabricEventKindContainerInstanceEvent FabricEventKind = "ContainerInstanceEvent" + // FabricEventKindDeployedApplicationHealthReportExpired ... + FabricEventKindDeployedApplicationHealthReportExpired FabricEventKind = "DeployedApplicationHealthReportExpired" + // FabricEventKindDeployedApplicationNewHealthReport ... + FabricEventKindDeployedApplicationNewHealthReport FabricEventKind = "DeployedApplicationNewHealthReport" + // FabricEventKindDeployedServicePackageHealthReportExpired ... + FabricEventKindDeployedServicePackageHealthReportExpired FabricEventKind = "DeployedServicePackageHealthReportExpired" + // FabricEventKindDeployedServicePackageNewHealthReport ... + FabricEventKindDeployedServicePackageNewHealthReport FabricEventKind = "DeployedServicePackageNewHealthReport" + // FabricEventKindNodeAborted ... + FabricEventKindNodeAborted FabricEventKind = "NodeAborted" + // FabricEventKindNodeAddedToCluster ... + FabricEventKindNodeAddedToCluster FabricEventKind = "NodeAddedToCluster" + // FabricEventKindNodeClosed ... + FabricEventKindNodeClosed FabricEventKind = "NodeClosed" + // FabricEventKindNodeDeactivateCompleted ... + FabricEventKindNodeDeactivateCompleted FabricEventKind = "NodeDeactivateCompleted" + // FabricEventKindNodeDeactivateStarted ... + FabricEventKindNodeDeactivateStarted FabricEventKind = "NodeDeactivateStarted" + // FabricEventKindNodeDown ... + FabricEventKindNodeDown FabricEventKind = "NodeDown" + // FabricEventKindNodeEvent ... + FabricEventKindNodeEvent FabricEventKind = "NodeEvent" + // FabricEventKindNodeHealthReportExpired ... + FabricEventKindNodeHealthReportExpired FabricEventKind = "NodeHealthReportExpired" + // FabricEventKindNodeNewHealthReport ... + FabricEventKindNodeNewHealthReport FabricEventKind = "NodeNewHealthReport" + // FabricEventKindNodeOpenFailed ... + FabricEventKindNodeOpenFailed FabricEventKind = "NodeOpenFailed" + // FabricEventKindNodeOpenSucceeded ... + FabricEventKindNodeOpenSucceeded FabricEventKind = "NodeOpenSucceeded" + // FabricEventKindNodeRemovedFromCluster ... + FabricEventKindNodeRemovedFromCluster FabricEventKind = "NodeRemovedFromCluster" + // FabricEventKindNodeUp ... + FabricEventKindNodeUp FabricEventKind = "NodeUp" + // FabricEventKindPartitionAnalysisEvent ... + FabricEventKindPartitionAnalysisEvent FabricEventKind = "PartitionAnalysisEvent" + // FabricEventKindPartitionEvent ... + FabricEventKindPartitionEvent FabricEventKind = "PartitionEvent" + // FabricEventKindPartitionHealthReportExpired ... + FabricEventKindPartitionHealthReportExpired FabricEventKind = "PartitionHealthReportExpired" + // FabricEventKindPartitionNewHealthReport ... + FabricEventKindPartitionNewHealthReport FabricEventKind = "PartitionNewHealthReport" + // FabricEventKindPartitionPrimaryMoveAnalysis ... + FabricEventKindPartitionPrimaryMoveAnalysis FabricEventKind = "PartitionPrimaryMoveAnalysis" + // FabricEventKindPartitionReconfigured ... + FabricEventKindPartitionReconfigured FabricEventKind = "PartitionReconfigured" + // FabricEventKindReplicaEvent ... + FabricEventKindReplicaEvent FabricEventKind = "ReplicaEvent" + // FabricEventKindServiceCreated ... + FabricEventKindServiceCreated FabricEventKind = "ServiceCreated" + // FabricEventKindServiceDeleted ... + FabricEventKindServiceDeleted FabricEventKind = "ServiceDeleted" + // FabricEventKindServiceEvent ... + FabricEventKindServiceEvent FabricEventKind = "ServiceEvent" + // FabricEventKindServiceHealthReportExpired ... + FabricEventKindServiceHealthReportExpired FabricEventKind = "ServiceHealthReportExpired" + // FabricEventKindServiceNewHealthReport ... + FabricEventKindServiceNewHealthReport FabricEventKind = "ServiceNewHealthReport" + // FabricEventKindStatefulReplicaHealthReportExpired ... + FabricEventKindStatefulReplicaHealthReportExpired FabricEventKind = "StatefulReplicaHealthReportExpired" + // FabricEventKindStatefulReplicaNewHealthReport ... + FabricEventKindStatefulReplicaNewHealthReport FabricEventKind = "StatefulReplicaNewHealthReport" + // FabricEventKindStatelessReplicaHealthReportExpired ... + FabricEventKindStatelessReplicaHealthReportExpired FabricEventKind = "StatelessReplicaHealthReportExpired" + // FabricEventKindStatelessReplicaNewHealthReport ... + FabricEventKindStatelessReplicaNewHealthReport FabricEventKind = "StatelessReplicaNewHealthReport" +) + +// PossibleFabricEventKindValues returns an array of possible values for the FabricEventKind const type. +func PossibleFabricEventKindValues() []FabricEventKind { + return []FabricEventKind{FabricEventKindApplicationContainerInstanceExited, FabricEventKindApplicationCreated, FabricEventKindApplicationDeleted, FabricEventKindApplicationEvent, FabricEventKindApplicationHealthReportExpired, FabricEventKindApplicationNewHealthReport, FabricEventKindApplicationProcessExited, FabricEventKindApplicationUpgradeCompleted, FabricEventKindApplicationUpgradeDomainCompleted, FabricEventKindApplicationUpgradeRollbackCompleted, FabricEventKindApplicationUpgradeRollbackStarted, FabricEventKindApplicationUpgradeStarted, FabricEventKindChaosCodePackageRestartScheduled, FabricEventKindChaosNodeRestartScheduled, FabricEventKindChaosPartitionPrimaryMoveScheduled, FabricEventKindChaosPartitionSecondaryMoveScheduled, FabricEventKindChaosReplicaRemovalScheduled, FabricEventKindChaosReplicaRestartScheduled, FabricEventKindChaosStarted, FabricEventKindChaosStopped, FabricEventKindClusterEvent, FabricEventKindClusterHealthReportExpired, FabricEventKindClusterNewHealthReport, FabricEventKindClusterUpgradeCompleted, FabricEventKindClusterUpgradeDomainCompleted, FabricEventKindClusterUpgradeRollbackCompleted, FabricEventKindClusterUpgradeRollbackStarted, FabricEventKindClusterUpgradeStarted, FabricEventKindContainerInstanceEvent, FabricEventKindDeployedApplicationHealthReportExpired, FabricEventKindDeployedApplicationNewHealthReport, FabricEventKindDeployedServicePackageHealthReportExpired, FabricEventKindDeployedServicePackageNewHealthReport, FabricEventKindNodeAborted, FabricEventKindNodeAddedToCluster, FabricEventKindNodeClosed, FabricEventKindNodeDeactivateCompleted, FabricEventKindNodeDeactivateStarted, FabricEventKindNodeDown, FabricEventKindNodeEvent, FabricEventKindNodeHealthReportExpired, FabricEventKindNodeNewHealthReport, FabricEventKindNodeOpenFailed, FabricEventKindNodeOpenSucceeded, FabricEventKindNodeRemovedFromCluster, FabricEventKindNodeUp, FabricEventKindPartitionAnalysisEvent, FabricEventKindPartitionEvent, FabricEventKindPartitionHealthReportExpired, FabricEventKindPartitionNewHealthReport, FabricEventKindPartitionPrimaryMoveAnalysis, FabricEventKindPartitionReconfigured, FabricEventKindReplicaEvent, FabricEventKindServiceCreated, FabricEventKindServiceDeleted, FabricEventKindServiceEvent, FabricEventKindServiceHealthReportExpired, FabricEventKindServiceNewHealthReport, FabricEventKindStatefulReplicaHealthReportExpired, FabricEventKindStatefulReplicaNewHealthReport, FabricEventKindStatelessReplicaHealthReportExpired, FabricEventKindStatelessReplicaNewHealthReport} +} + +// FabricReplicaStatus enumerates the values for fabric replica status. +type FabricReplicaStatus string + +const ( + // FabricReplicaStatusDown Indicates that the replica is down. + FabricReplicaStatusDown FabricReplicaStatus = "Down" + // FabricReplicaStatusInvalid Indicates that the read or write operation access status is not valid. This + // value is not returned to the caller. + FabricReplicaStatusInvalid FabricReplicaStatus = "Invalid" + // FabricReplicaStatusUp Indicates that the replica is up. + FabricReplicaStatusUp FabricReplicaStatus = "Up" +) + +// PossibleFabricReplicaStatusValues returns an array of possible values for the FabricReplicaStatus const type. +func PossibleFabricReplicaStatusValues() []FabricReplicaStatus { + return []FabricReplicaStatus{FabricReplicaStatusDown, FabricReplicaStatusInvalid, FabricReplicaStatusUp} +} + +// FailureAction enumerates the values for failure action. +type FailureAction string + +const ( + // FailureActionInvalid Indicates the failure action is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + FailureActionInvalid FailureAction = "Invalid" + // FailureActionManual The upgrade will switch to UnmonitoredManual upgrade mode. The value is 2 + FailureActionManual FailureAction = "Manual" + // FailureActionRollback The upgrade will start rolling back automatically. The value is 1 + FailureActionRollback FailureAction = "Rollback" +) + +// PossibleFailureActionValues returns an array of possible values for the FailureAction const type. +func PossibleFailureActionValues() []FailureAction { + return []FailureAction{FailureActionInvalid, FailureActionManual, FailureActionRollback} +} + +// FailureReason enumerates the values for failure reason. +type FailureReason string + +const ( + // HealthCheck The upgrade failed due to health policy violations. The value is 2 + HealthCheck FailureReason = "HealthCheck" + // Interrupted There was an external request to roll back the upgrade. The value is 1 + Interrupted FailureReason = "Interrupted" + // None Indicates the reason is invalid or unknown. All Service Fabric enumerations have the invalid type. + // The value is zero. + None FailureReason = "None" + // OverallUpgradeTimeout The overall upgrade took longer than the allowed upgrade timeout to process. The + // value is 4 + OverallUpgradeTimeout FailureReason = "OverallUpgradeTimeout" + // UpgradeDomainTimeout An upgrade domain took longer than the allowed upgrade domain timeout to process. + // The value is 3 + UpgradeDomainTimeout FailureReason = "UpgradeDomainTimeout" +) + +// PossibleFailureReasonValues returns an array of possible values for the FailureReason const type. +func PossibleFailureReasonValues() []FailureReason { + return []FailureReason{HealthCheck, Interrupted, None, OverallUpgradeTimeout, UpgradeDomainTimeout} +} + +// HeaderMatchType enumerates the values for header match type. +type HeaderMatchType string + +const ( + // Exact ... + Exact HeaderMatchType = "exact" +) + +// PossibleHeaderMatchTypeValues returns an array of possible values for the HeaderMatchType const type. +func PossibleHeaderMatchTypeValues() []HeaderMatchType { + return []HeaderMatchType{Exact} +} + +// HealthEvaluationKind enumerates the values for health evaluation kind. +type HealthEvaluationKind string + +const ( + // HealthEvaluationKindApplication Indicates that the health evaluation is for an application. The value is + // 18. + HealthEvaluationKindApplication HealthEvaluationKind = "Application" + // HealthEvaluationKindApplications Indicates that the health evaluation is for the cluster applications. + // The value is 8. + HealthEvaluationKindApplications HealthEvaluationKind = "Applications" + // HealthEvaluationKindApplicationTypeApplications – Indicates that the health evaluation is for + // applications of an application type. The value is 21. + HealthEvaluationKindApplicationTypeApplications HealthEvaluationKind = "ApplicationTypeApplications" + // HealthEvaluationKindDeltaNodesCheck Indicates that the health evaluation is for the delta of unhealthy + // cluster nodes. The value is 19. + HealthEvaluationKindDeltaNodesCheck HealthEvaluationKind = "DeltaNodesCheck" + // HealthEvaluationKindDeployedApplication Indicates that the health evaluation is for a deployed + // application. The value is 17. + HealthEvaluationKindDeployedApplication HealthEvaluationKind = "DeployedApplication" + // HealthEvaluationKindDeployedApplications Indicates that the health evaluation is for the deployed + // applications of an application. The value is 5. + HealthEvaluationKindDeployedApplications HealthEvaluationKind = "DeployedApplications" + // HealthEvaluationKindDeployedServicePackage Indicates that the health evaluation is for a deployed + // service package. The value is 16. + HealthEvaluationKindDeployedServicePackage HealthEvaluationKind = "DeployedServicePackage" + // HealthEvaluationKindDeployedServicePackages Indicates that the health evaluation is for the deployed + // service packages of a deployed application. The value is 4. + HealthEvaluationKindDeployedServicePackages HealthEvaluationKind = "DeployedServicePackages" + // HealthEvaluationKindEvent Indicates that the health evaluation is for a health event. The value is 1. + HealthEvaluationKindEvent HealthEvaluationKind = "Event" + // HealthEvaluationKindInvalid Indicates that the health evaluation is invalid. The value is zero. + HealthEvaluationKindInvalid HealthEvaluationKind = "Invalid" + // HealthEvaluationKindNode Indicates that the health evaluation is for a node. The value is 12. + HealthEvaluationKindNode HealthEvaluationKind = "Node" + // HealthEvaluationKindNodes Indicates that the health evaluation is for the cluster nodes. The value is 7. + HealthEvaluationKindNodes HealthEvaluationKind = "Nodes" + // HealthEvaluationKindPartition Indicates that the health evaluation is for a partition. The value is 14. + HealthEvaluationKindPartition HealthEvaluationKind = "Partition" + // HealthEvaluationKindPartitions Indicates that the health evaluation is for the partitions of a service. + // The value is 3. + HealthEvaluationKindPartitions HealthEvaluationKind = "Partitions" + // HealthEvaluationKindReplica Indicates that the health evaluation is for a replica. The value is 13. + HealthEvaluationKindReplica HealthEvaluationKind = "Replica" + // HealthEvaluationKindReplicas Indicates that the health evaluation is for the replicas of a partition. + // The value is 2. + HealthEvaluationKindReplicas HealthEvaluationKind = "Replicas" + // HealthEvaluationKindService Indicates that the health evaluation is for a service. The value is 15. + HealthEvaluationKindService HealthEvaluationKind = "Service" + // HealthEvaluationKindServices Indicates that the health evaluation is for services of an application. The + // value is 6. + HealthEvaluationKindServices HealthEvaluationKind = "Services" + // HealthEvaluationKindSystemApplication Indicates that the health evaluation is for the system + // application. The value is 9. + HealthEvaluationKindSystemApplication HealthEvaluationKind = "SystemApplication" + // HealthEvaluationKindUpgradeDomainDeltaNodesCheck Indicates that the health evaluation is for the delta + // of unhealthy upgrade domain cluster nodes. The value is 20. + HealthEvaluationKindUpgradeDomainDeltaNodesCheck HealthEvaluationKind = "UpgradeDomainDeltaNodesCheck" + // HealthEvaluationKindUpgradeDomainDeployedApplications Indicates that the health evaluation is for the + // deployed applications of an application in an upgrade domain. The value is 10. + HealthEvaluationKindUpgradeDomainDeployedApplications HealthEvaluationKind = "UpgradeDomainDeployedApplications" + // HealthEvaluationKindUpgradeDomainNodes Indicates that the health evaluation is for the cluster nodes in + // an upgrade domain. The value is 11. + HealthEvaluationKindUpgradeDomainNodes HealthEvaluationKind = "UpgradeDomainNodes" +) + +// PossibleHealthEvaluationKindValues returns an array of possible values for the HealthEvaluationKind const type. +func PossibleHealthEvaluationKindValues() []HealthEvaluationKind { + return []HealthEvaluationKind{HealthEvaluationKindApplication, HealthEvaluationKindApplications, HealthEvaluationKindApplicationTypeApplications, HealthEvaluationKindDeltaNodesCheck, HealthEvaluationKindDeployedApplication, HealthEvaluationKindDeployedApplications, HealthEvaluationKindDeployedServicePackage, HealthEvaluationKindDeployedServicePackages, HealthEvaluationKindEvent, HealthEvaluationKindInvalid, HealthEvaluationKindNode, HealthEvaluationKindNodes, HealthEvaluationKindPartition, HealthEvaluationKindPartitions, HealthEvaluationKindReplica, HealthEvaluationKindReplicas, HealthEvaluationKindService, HealthEvaluationKindServices, HealthEvaluationKindSystemApplication, HealthEvaluationKindUpgradeDomainDeltaNodesCheck, HealthEvaluationKindUpgradeDomainDeployedApplications, HealthEvaluationKindUpgradeDomainNodes} +} + +// HealthState enumerates the values for health state. +type HealthState string + +const ( + // HealthStateError Indicates the health state is at an error level. Error health state should be + // investigated, as they can impact the correct functionality of the cluster. The value is 3. + HealthStateError HealthState = "Error" + // HealthStateInvalid Indicates an invalid health state. All Service Fabric enumerations have the invalid + // type. The value is zero. + HealthStateInvalid HealthState = "Invalid" + // HealthStateOk Indicates the health state is okay. The value is 1. + HealthStateOk HealthState = "Ok" + // HealthStateUnknown Indicates an unknown health status. The value is 65535. + HealthStateUnknown HealthState = "Unknown" + // HealthStateWarning Indicates the health state is at a warning level. The value is 2. + HealthStateWarning HealthState = "Warning" +) + +// PossibleHealthStateValues returns an array of possible values for the HealthState const type. +func PossibleHealthStateValues() []HealthState { + return []HealthState{HealthStateError, HealthStateInvalid, HealthStateOk, HealthStateUnknown, HealthStateWarning} +} + +// HostIsolationMode enumerates the values for host isolation mode. +type HostIsolationMode string + +const ( + // HostIsolationModeHyperV Indicates the ContainerHost is a Hyper-V container. This applies to only Windows + // containers. The value is 2. + HostIsolationModeHyperV HostIsolationMode = "HyperV" + // HostIsolationModeNone Indicates the isolation mode is not applicable for given HostType. The value is 0. + HostIsolationModeNone HostIsolationMode = "None" + // HostIsolationModeProcess This is the default isolation mode for a ContainerHost. The value is 1. + HostIsolationModeProcess HostIsolationMode = "Process" +) + +// PossibleHostIsolationModeValues returns an array of possible values for the HostIsolationMode const type. +func PossibleHostIsolationModeValues() []HostIsolationMode { + return []HostIsolationMode{HostIsolationModeHyperV, HostIsolationModeNone, HostIsolationModeProcess} +} + +// HostType enumerates the values for host type. +type HostType string + +const ( + // HostTypeContainerHost Indicates the host is a container. The value is 2. + HostTypeContainerHost HostType = "ContainerHost" + // HostTypeExeHost Indicates the host is an executable. The value is 1. + HostTypeExeHost HostType = "ExeHost" + // HostTypeInvalid Indicates the type of host is not known or invalid. The value is 0. + HostTypeInvalid HostType = "Invalid" +) + +// PossibleHostTypeValues returns an array of possible values for the HostType const type. +func PossibleHostTypeValues() []HostType { + return []HostType{HostTypeContainerHost, HostTypeExeHost, HostTypeInvalid} +} + +// ImageRegistryPasswordType enumerates the values for image registry password type. +type ImageRegistryPasswordType string + +const ( + // ImageRegistryPasswordTypeClearText The image registry password in clear text, will not be processed in + // any way and used directly + ImageRegistryPasswordTypeClearText ImageRegistryPasswordType = "ClearText" + // ImageRegistryPasswordTypeKeyVaultReference The URI to a KeyVault secret version, will be resolved using + // the application's managed identity (this type is only valid if the app was assigned a managed identity) + // before getting used + ImageRegistryPasswordTypeKeyVaultReference ImageRegistryPasswordType = "KeyVaultReference" + // ImageRegistryPasswordTypeSecretValueReference The reference to a SecretValue resource, will be resolved + // before getting used + ImageRegistryPasswordTypeSecretValueReference ImageRegistryPasswordType = "SecretValueReference" +) + +// PossibleImageRegistryPasswordTypeValues returns an array of possible values for the ImageRegistryPasswordType const type. +func PossibleImageRegistryPasswordTypeValues() []ImageRegistryPasswordType { + return []ImageRegistryPasswordType{ImageRegistryPasswordTypeClearText, ImageRegistryPasswordTypeKeyVaultReference, ImageRegistryPasswordTypeSecretValueReference} +} + +// ImpactLevel enumerates the values for impact level. +type ImpactLevel string + +const ( + // ImpactLevelInvalid ... + ImpactLevelInvalid ImpactLevel = "Invalid" + // ImpactLevelNone ... + ImpactLevelNone ImpactLevel = "None" + // ImpactLevelRemoveData ... + ImpactLevelRemoveData ImpactLevel = "RemoveData" + // ImpactLevelRemoveNode ... + ImpactLevelRemoveNode ImpactLevel = "RemoveNode" + // ImpactLevelRestart ... + ImpactLevelRestart ImpactLevel = "Restart" +) + +// PossibleImpactLevelValues returns an array of possible values for the ImpactLevel const type. +func PossibleImpactLevelValues() []ImpactLevel { + return []ImpactLevel{ImpactLevelInvalid, ImpactLevelNone, ImpactLevelRemoveData, ImpactLevelRemoveNode, ImpactLevelRestart} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindApplication ... + KindApplication Kind = "Application" + // KindApplications ... + KindApplications Kind = "Applications" + // KindApplicationTypeApplications ... + KindApplicationTypeApplications Kind = "ApplicationTypeApplications" + // KindDeltaNodesCheck ... + KindDeltaNodesCheck Kind = "DeltaNodesCheck" + // KindDeployedApplication ... + KindDeployedApplication Kind = "DeployedApplication" + // KindDeployedApplications ... + KindDeployedApplications Kind = "DeployedApplications" + // KindDeployedServicePackage ... + KindDeployedServicePackage Kind = "DeployedServicePackage" + // KindDeployedServicePackages ... + KindDeployedServicePackages Kind = "DeployedServicePackages" + // KindEvent ... + KindEvent Kind = "Event" + // KindHealthEvaluation ... + KindHealthEvaluation Kind = "HealthEvaluation" + // KindNode ... + KindNode Kind = "Node" + // KindNodes ... + KindNodes Kind = "Nodes" + // KindPartition ... + KindPartition Kind = "Partition" + // KindPartitions ... + KindPartitions Kind = "Partitions" + // KindReplica ... + KindReplica Kind = "Replica" + // KindReplicas ... + KindReplicas Kind = "Replicas" + // KindService ... + KindService Kind = "Service" + // KindServices ... + KindServices Kind = "Services" + // KindSystemApplication ... + KindSystemApplication Kind = "SystemApplication" + // KindUpgradeDomainDeltaNodesCheck ... + KindUpgradeDomainDeltaNodesCheck Kind = "UpgradeDomainDeltaNodesCheck" + // KindUpgradeDomainNodes ... + KindUpgradeDomainNodes Kind = "UpgradeDomainNodes" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindApplication, KindApplications, KindApplicationTypeApplications, KindDeltaNodesCheck, KindDeployedApplication, KindDeployedApplications, KindDeployedServicePackage, KindDeployedServicePackages, KindEvent, KindHealthEvaluation, KindNode, KindNodes, KindPartition, KindPartitions, KindReplica, KindReplicas, KindService, KindServices, KindSystemApplication, KindUpgradeDomainDeltaNodesCheck, KindUpgradeDomainNodes} +} + +// KindBasicApplicationScopedVolumeCreationParameters enumerates the values for kind basic application scoped +// volume creation parameters. +type KindBasicApplicationScopedVolumeCreationParameters string + +const ( + // KindApplicationScopedVolumeCreationParameters ... + KindApplicationScopedVolumeCreationParameters KindBasicApplicationScopedVolumeCreationParameters = "ApplicationScopedVolumeCreationParameters" + // KindServiceFabricVolumeDisk ... + KindServiceFabricVolumeDisk KindBasicApplicationScopedVolumeCreationParameters = "ServiceFabricVolumeDisk" +) + +// PossibleKindBasicApplicationScopedVolumeCreationParametersValues returns an array of possible values for the KindBasicApplicationScopedVolumeCreationParameters const type. +func PossibleKindBasicApplicationScopedVolumeCreationParametersValues() []KindBasicApplicationScopedVolumeCreationParameters { + return []KindBasicApplicationScopedVolumeCreationParameters{KindApplicationScopedVolumeCreationParameters, KindServiceFabricVolumeDisk} +} + +// KindBasicAutoScalingMechanism enumerates the values for kind basic auto scaling mechanism. +type KindBasicAutoScalingMechanism string + +const ( + // KindAddRemoveReplica ... + KindAddRemoveReplica KindBasicAutoScalingMechanism = "AddRemoveReplica" + // KindAutoScalingMechanism ... + KindAutoScalingMechanism KindBasicAutoScalingMechanism = "AutoScalingMechanism" +) + +// PossibleKindBasicAutoScalingMechanismValues returns an array of possible values for the KindBasicAutoScalingMechanism const type. +func PossibleKindBasicAutoScalingMechanismValues() []KindBasicAutoScalingMechanism { + return []KindBasicAutoScalingMechanism{KindAddRemoveReplica, KindAutoScalingMechanism} +} + +// KindBasicAutoScalingMetric enumerates the values for kind basic auto scaling metric. +type KindBasicAutoScalingMetric string + +const ( + // KindAutoScalingMetric ... + KindAutoScalingMetric KindBasicAutoScalingMetric = "AutoScalingMetric" + // KindResource ... + KindResource KindBasicAutoScalingMetric = "Resource" +) + +// PossibleKindBasicAutoScalingMetricValues returns an array of possible values for the KindBasicAutoScalingMetric const type. +func PossibleKindBasicAutoScalingMetricValues() []KindBasicAutoScalingMetric { + return []KindBasicAutoScalingMetric{KindAutoScalingMetric, KindResource} +} + +// KindBasicAutoScalingTrigger enumerates the values for kind basic auto scaling trigger. +type KindBasicAutoScalingTrigger string + +const ( + // KindAutoScalingTrigger ... + KindAutoScalingTrigger KindBasicAutoScalingTrigger = "AutoScalingTrigger" + // KindAverageLoad ... + KindAverageLoad KindBasicAutoScalingTrigger = "AverageLoad" +) + +// PossibleKindBasicAutoScalingTriggerValues returns an array of possible values for the KindBasicAutoScalingTrigger const type. +func PossibleKindBasicAutoScalingTriggerValues() []KindBasicAutoScalingTrigger { + return []KindBasicAutoScalingTrigger{KindAutoScalingTrigger, KindAverageLoad} +} + +// KindBasicBackupConfigurationInfo enumerates the values for kind basic backup configuration info. +type KindBasicBackupConfigurationInfo string + +const ( + // KindBasicBackupConfigurationInfoKindApplication ... + KindBasicBackupConfigurationInfoKindApplication KindBasicBackupConfigurationInfo = "Application" + // KindBasicBackupConfigurationInfoKindBackupConfigurationInfo ... + KindBasicBackupConfigurationInfoKindBackupConfigurationInfo KindBasicBackupConfigurationInfo = "BackupConfigurationInfo" + // KindBasicBackupConfigurationInfoKindPartition ... + KindBasicBackupConfigurationInfoKindPartition KindBasicBackupConfigurationInfo = "Partition" + // KindBasicBackupConfigurationInfoKindService ... + KindBasicBackupConfigurationInfoKindService KindBasicBackupConfigurationInfo = "Service" +) + +// PossibleKindBasicBackupConfigurationInfoValues returns an array of possible values for the KindBasicBackupConfigurationInfo const type. +func PossibleKindBasicBackupConfigurationInfoValues() []KindBasicBackupConfigurationInfo { + return []KindBasicBackupConfigurationInfo{KindBasicBackupConfigurationInfoKindApplication, KindBasicBackupConfigurationInfoKindBackupConfigurationInfo, KindBasicBackupConfigurationInfoKindPartition, KindBasicBackupConfigurationInfoKindService} +} + +// KindBasicChaosEvent enumerates the values for kind basic chaos event. +type KindBasicChaosEvent string + +const ( + // KindChaosEvent ... + KindChaosEvent KindBasicChaosEvent = "ChaosEvent" + // KindExecutingFaults ... + KindExecutingFaults KindBasicChaosEvent = "ExecutingFaults" + // KindStarted ... + KindStarted KindBasicChaosEvent = "Started" + // KindStopped ... + KindStopped KindBasicChaosEvent = "Stopped" + // KindTestError ... + KindTestError KindBasicChaosEvent = "TestError" + // KindValidationFailed ... + KindValidationFailed KindBasicChaosEvent = "ValidationFailed" + // KindWaiting ... + KindWaiting KindBasicChaosEvent = "Waiting" +) + +// PossibleKindBasicChaosEventValues returns an array of possible values for the KindBasicChaosEvent const type. +func PossibleKindBasicChaosEventValues() []KindBasicChaosEvent { + return []KindBasicChaosEvent{KindChaosEvent, KindExecutingFaults, KindStarted, KindStopped, KindTestError, KindValidationFailed, KindWaiting} +} + +// KindBasicDiagnosticsSinkProperties enumerates the values for kind basic diagnostics sink properties. +type KindBasicDiagnosticsSinkProperties string + +const ( + // KindAzureInternalMonitoringPipeline ... + KindAzureInternalMonitoringPipeline KindBasicDiagnosticsSinkProperties = "AzureInternalMonitoringPipeline" + // KindDiagnosticsSinkProperties ... + KindDiagnosticsSinkProperties KindBasicDiagnosticsSinkProperties = "DiagnosticsSinkProperties" +) + +// PossibleKindBasicDiagnosticsSinkPropertiesValues returns an array of possible values for the KindBasicDiagnosticsSinkProperties const type. +func PossibleKindBasicDiagnosticsSinkPropertiesValues() []KindBasicDiagnosticsSinkProperties { + return []KindBasicDiagnosticsSinkProperties{KindAzureInternalMonitoringPipeline, KindDiagnosticsSinkProperties} +} + +// KindBasicFabricEvent enumerates the values for kind basic fabric event. +type KindBasicFabricEvent string + +const ( + // KindApplicationContainerInstanceExited ... + KindApplicationContainerInstanceExited KindBasicFabricEvent = "ApplicationContainerInstanceExited" + // KindApplicationCreated ... + KindApplicationCreated KindBasicFabricEvent = "ApplicationCreated" + // KindApplicationDeleted ... + KindApplicationDeleted KindBasicFabricEvent = "ApplicationDeleted" + // KindApplicationEvent ... + KindApplicationEvent KindBasicFabricEvent = "ApplicationEvent" + // KindApplicationHealthReportExpired ... + KindApplicationHealthReportExpired KindBasicFabricEvent = "ApplicationHealthReportExpired" + // KindApplicationNewHealthReport ... + KindApplicationNewHealthReport KindBasicFabricEvent = "ApplicationNewHealthReport" + // KindApplicationProcessExited ... + KindApplicationProcessExited KindBasicFabricEvent = "ApplicationProcessExited" + // KindApplicationUpgradeCompleted ... + KindApplicationUpgradeCompleted KindBasicFabricEvent = "ApplicationUpgradeCompleted" + // KindApplicationUpgradeDomainCompleted ... + KindApplicationUpgradeDomainCompleted KindBasicFabricEvent = "ApplicationUpgradeDomainCompleted" + // KindApplicationUpgradeRollbackCompleted ... + KindApplicationUpgradeRollbackCompleted KindBasicFabricEvent = "ApplicationUpgradeRollbackCompleted" + // KindApplicationUpgradeRollbackStarted ... + KindApplicationUpgradeRollbackStarted KindBasicFabricEvent = "ApplicationUpgradeRollbackStarted" + // KindApplicationUpgradeStarted ... + KindApplicationUpgradeStarted KindBasicFabricEvent = "ApplicationUpgradeStarted" + // KindChaosCodePackageRestartScheduled ... + KindChaosCodePackageRestartScheduled KindBasicFabricEvent = "ChaosCodePackageRestartScheduled" + // KindChaosNodeRestartScheduled ... + KindChaosNodeRestartScheduled KindBasicFabricEvent = "ChaosNodeRestartScheduled" + // KindChaosPartitionPrimaryMoveScheduled ... + KindChaosPartitionPrimaryMoveScheduled KindBasicFabricEvent = "ChaosPartitionPrimaryMoveScheduled" + // KindChaosPartitionSecondaryMoveScheduled ... + KindChaosPartitionSecondaryMoveScheduled KindBasicFabricEvent = "ChaosPartitionSecondaryMoveScheduled" + // KindChaosReplicaRemovalScheduled ... + KindChaosReplicaRemovalScheduled KindBasicFabricEvent = "ChaosReplicaRemovalScheduled" + // KindChaosReplicaRestartScheduled ... + KindChaosReplicaRestartScheduled KindBasicFabricEvent = "ChaosReplicaRestartScheduled" + // KindChaosStarted ... + KindChaosStarted KindBasicFabricEvent = "ChaosStarted" + // KindChaosStopped ... + KindChaosStopped KindBasicFabricEvent = "ChaosStopped" + // KindClusterEvent ... + KindClusterEvent KindBasicFabricEvent = "ClusterEvent" + // KindClusterHealthReportExpired ... + KindClusterHealthReportExpired KindBasicFabricEvent = "ClusterHealthReportExpired" + // KindClusterNewHealthReport ... + KindClusterNewHealthReport KindBasicFabricEvent = "ClusterNewHealthReport" + // KindClusterUpgradeCompleted ... + KindClusterUpgradeCompleted KindBasicFabricEvent = "ClusterUpgradeCompleted" + // KindClusterUpgradeDomainCompleted ... + KindClusterUpgradeDomainCompleted KindBasicFabricEvent = "ClusterUpgradeDomainCompleted" + // KindClusterUpgradeRollbackCompleted ... + KindClusterUpgradeRollbackCompleted KindBasicFabricEvent = "ClusterUpgradeRollbackCompleted" + // KindClusterUpgradeRollbackStarted ... + KindClusterUpgradeRollbackStarted KindBasicFabricEvent = "ClusterUpgradeRollbackStarted" + // KindClusterUpgradeStarted ... + KindClusterUpgradeStarted KindBasicFabricEvent = "ClusterUpgradeStarted" + // KindContainerInstanceEvent ... + KindContainerInstanceEvent KindBasicFabricEvent = "ContainerInstanceEvent" + // KindDeployedApplicationHealthReportExpired ... + KindDeployedApplicationHealthReportExpired KindBasicFabricEvent = "DeployedApplicationHealthReportExpired" + // KindDeployedApplicationNewHealthReport ... + KindDeployedApplicationNewHealthReport KindBasicFabricEvent = "DeployedApplicationNewHealthReport" + // KindDeployedServicePackageHealthReportExpired ... + KindDeployedServicePackageHealthReportExpired KindBasicFabricEvent = "DeployedServicePackageHealthReportExpired" + // KindDeployedServicePackageNewHealthReport ... + KindDeployedServicePackageNewHealthReport KindBasicFabricEvent = "DeployedServicePackageNewHealthReport" + // KindFabricEvent ... + KindFabricEvent KindBasicFabricEvent = "FabricEvent" + // KindNodeAborted ... + KindNodeAborted KindBasicFabricEvent = "NodeAborted" + // KindNodeAddedToCluster ... + KindNodeAddedToCluster KindBasicFabricEvent = "NodeAddedToCluster" + // KindNodeClosed ... + KindNodeClosed KindBasicFabricEvent = "NodeClosed" + // KindNodeDeactivateCompleted ... + KindNodeDeactivateCompleted KindBasicFabricEvent = "NodeDeactivateCompleted" + // KindNodeDeactivateStarted ... + KindNodeDeactivateStarted KindBasicFabricEvent = "NodeDeactivateStarted" + // KindNodeDown ... + KindNodeDown KindBasicFabricEvent = "NodeDown" + // KindNodeEvent ... + KindNodeEvent KindBasicFabricEvent = "NodeEvent" + // KindNodeHealthReportExpired ... + KindNodeHealthReportExpired KindBasicFabricEvent = "NodeHealthReportExpired" + // KindNodeNewHealthReport ... + KindNodeNewHealthReport KindBasicFabricEvent = "NodeNewHealthReport" + // KindNodeOpenFailed ... + KindNodeOpenFailed KindBasicFabricEvent = "NodeOpenFailed" + // KindNodeOpenSucceeded ... + KindNodeOpenSucceeded KindBasicFabricEvent = "NodeOpenSucceeded" + // KindNodeRemovedFromCluster ... + KindNodeRemovedFromCluster KindBasicFabricEvent = "NodeRemovedFromCluster" + // KindNodeUp ... + KindNodeUp KindBasicFabricEvent = "NodeUp" + // KindPartitionAnalysisEvent ... + KindPartitionAnalysisEvent KindBasicFabricEvent = "PartitionAnalysisEvent" + // KindPartitionEvent ... + KindPartitionEvent KindBasicFabricEvent = "PartitionEvent" + // KindPartitionHealthReportExpired ... + KindPartitionHealthReportExpired KindBasicFabricEvent = "PartitionHealthReportExpired" + // KindPartitionNewHealthReport ... + KindPartitionNewHealthReport KindBasicFabricEvent = "PartitionNewHealthReport" + // KindPartitionPrimaryMoveAnalysis ... + KindPartitionPrimaryMoveAnalysis KindBasicFabricEvent = "PartitionPrimaryMoveAnalysis" + // KindPartitionReconfigured ... + KindPartitionReconfigured KindBasicFabricEvent = "PartitionReconfigured" + // KindReplicaEvent ... + KindReplicaEvent KindBasicFabricEvent = "ReplicaEvent" + // KindServiceCreated ... + KindServiceCreated KindBasicFabricEvent = "ServiceCreated" + // KindServiceDeleted ... + KindServiceDeleted KindBasicFabricEvent = "ServiceDeleted" + // KindServiceEvent ... + KindServiceEvent KindBasicFabricEvent = "ServiceEvent" + // KindServiceHealthReportExpired ... + KindServiceHealthReportExpired KindBasicFabricEvent = "ServiceHealthReportExpired" + // KindServiceNewHealthReport ... + KindServiceNewHealthReport KindBasicFabricEvent = "ServiceNewHealthReport" + // KindStatefulReplicaHealthReportExpired ... + KindStatefulReplicaHealthReportExpired KindBasicFabricEvent = "StatefulReplicaHealthReportExpired" + // KindStatefulReplicaNewHealthReport ... + KindStatefulReplicaNewHealthReport KindBasicFabricEvent = "StatefulReplicaNewHealthReport" + // KindStatelessReplicaHealthReportExpired ... + KindStatelessReplicaHealthReportExpired KindBasicFabricEvent = "StatelessReplicaHealthReportExpired" + // KindStatelessReplicaNewHealthReport ... + KindStatelessReplicaNewHealthReport KindBasicFabricEvent = "StatelessReplicaNewHealthReport" +) + +// PossibleKindBasicFabricEventValues returns an array of possible values for the KindBasicFabricEvent const type. +func PossibleKindBasicFabricEventValues() []KindBasicFabricEvent { + return []KindBasicFabricEvent{KindApplicationContainerInstanceExited, KindApplicationCreated, KindApplicationDeleted, KindApplicationEvent, KindApplicationHealthReportExpired, KindApplicationNewHealthReport, KindApplicationProcessExited, KindApplicationUpgradeCompleted, KindApplicationUpgradeDomainCompleted, KindApplicationUpgradeRollbackCompleted, KindApplicationUpgradeRollbackStarted, KindApplicationUpgradeStarted, KindChaosCodePackageRestartScheduled, KindChaosNodeRestartScheduled, KindChaosPartitionPrimaryMoveScheduled, KindChaosPartitionSecondaryMoveScheduled, KindChaosReplicaRemovalScheduled, KindChaosReplicaRestartScheduled, KindChaosStarted, KindChaosStopped, KindClusterEvent, KindClusterHealthReportExpired, KindClusterNewHealthReport, KindClusterUpgradeCompleted, KindClusterUpgradeDomainCompleted, KindClusterUpgradeRollbackCompleted, KindClusterUpgradeRollbackStarted, KindClusterUpgradeStarted, KindContainerInstanceEvent, KindDeployedApplicationHealthReportExpired, KindDeployedApplicationNewHealthReport, KindDeployedServicePackageHealthReportExpired, KindDeployedServicePackageNewHealthReport, KindFabricEvent, KindNodeAborted, KindNodeAddedToCluster, KindNodeClosed, KindNodeDeactivateCompleted, KindNodeDeactivateStarted, KindNodeDown, KindNodeEvent, KindNodeHealthReportExpired, KindNodeNewHealthReport, KindNodeOpenFailed, KindNodeOpenSucceeded, KindNodeRemovedFromCluster, KindNodeUp, KindPartitionAnalysisEvent, KindPartitionEvent, KindPartitionHealthReportExpired, KindPartitionNewHealthReport, KindPartitionPrimaryMoveAnalysis, KindPartitionReconfigured, KindReplicaEvent, KindServiceCreated, KindServiceDeleted, KindServiceEvent, KindServiceHealthReportExpired, KindServiceNewHealthReport, KindStatefulReplicaHealthReportExpired, KindStatefulReplicaNewHealthReport, KindStatelessReplicaHealthReportExpired, KindStatelessReplicaNewHealthReport} +} + +// KindBasicNetworkResourcePropertiesBase enumerates the values for kind basic network resource properties +// base. +type KindBasicNetworkResourcePropertiesBase string + +const ( + // KindLocal ... + KindLocal KindBasicNetworkResourcePropertiesBase = "Local" + // KindNetworkResourceProperties ... + KindNetworkResourceProperties KindBasicNetworkResourcePropertiesBase = "NetworkResourceProperties" + // KindNetworkResourcePropertiesBase ... + KindNetworkResourcePropertiesBase KindBasicNetworkResourcePropertiesBase = "NetworkResourcePropertiesBase" +) + +// PossibleKindBasicNetworkResourcePropertiesBaseValues returns an array of possible values for the KindBasicNetworkResourcePropertiesBase const type. +func PossibleKindBasicNetworkResourcePropertiesBaseValues() []KindBasicNetworkResourcePropertiesBase { + return []KindBasicNetworkResourcePropertiesBase{KindLocal, KindNetworkResourceProperties, KindNetworkResourcePropertiesBase} +} + +// KindBasicPropertyBatchInfo enumerates the values for kind basic property batch info. +type KindBasicPropertyBatchInfo string + +const ( + // KindFailed ... + KindFailed KindBasicPropertyBatchInfo = "Failed" + // KindPropertyBatchInfo ... + KindPropertyBatchInfo KindBasicPropertyBatchInfo = "PropertyBatchInfo" + // KindSuccessful ... + KindSuccessful KindBasicPropertyBatchInfo = "Successful" +) + +// PossibleKindBasicPropertyBatchInfoValues returns an array of possible values for the KindBasicPropertyBatchInfo const type. +func PossibleKindBasicPropertyBatchInfoValues() []KindBasicPropertyBatchInfo { + return []KindBasicPropertyBatchInfo{KindFailed, KindPropertyBatchInfo, KindSuccessful} +} + +// KindBasicPropertyBatchOperation enumerates the values for kind basic property batch operation. +type KindBasicPropertyBatchOperation string + +const ( + // KindCheckExists ... + KindCheckExists KindBasicPropertyBatchOperation = "CheckExists" + // KindCheckSequence ... + KindCheckSequence KindBasicPropertyBatchOperation = "CheckSequence" + // KindCheckValue ... + KindCheckValue KindBasicPropertyBatchOperation = "CheckValue" + // KindDelete ... + KindDelete KindBasicPropertyBatchOperation = "Delete" + // KindGet ... + KindGet KindBasicPropertyBatchOperation = "Get" + // KindPropertyBatchOperation ... + KindPropertyBatchOperation KindBasicPropertyBatchOperation = "PropertyBatchOperation" + // KindPut ... + KindPut KindBasicPropertyBatchOperation = "Put" +) + +// PossibleKindBasicPropertyBatchOperationValues returns an array of possible values for the KindBasicPropertyBatchOperation const type. +func PossibleKindBasicPropertyBatchOperationValues() []KindBasicPropertyBatchOperation { + return []KindBasicPropertyBatchOperation{KindCheckExists, KindCheckSequence, KindCheckValue, KindDelete, KindGet, KindPropertyBatchOperation, KindPut} +} + +// KindBasicPropertyValue enumerates the values for kind basic property value. +type KindBasicPropertyValue string + +const ( + // KindBinary ... + KindBinary KindBasicPropertyValue = "Binary" + // KindDouble ... + KindDouble KindBasicPropertyValue = "Double" + // KindGUID ... + KindGUID KindBasicPropertyValue = "Guid" + // KindInt64 ... + KindInt64 KindBasicPropertyValue = "Int64" + // KindPropertyValue ... + KindPropertyValue KindBasicPropertyValue = "PropertyValue" + // KindString ... + KindString KindBasicPropertyValue = "String" +) + +// PossibleKindBasicPropertyValueValues returns an array of possible values for the KindBasicPropertyValue const type. +func PossibleKindBasicPropertyValueValues() []KindBasicPropertyValue { + return []KindBasicPropertyValue{KindBinary, KindDouble, KindGUID, KindInt64, KindPropertyValue, KindString} +} + +// KindBasicProvisionApplicationTypeDescriptionBase enumerates the values for kind basic provision application +// type description base. +type KindBasicProvisionApplicationTypeDescriptionBase string + +const ( + // KindExternalStore ... + KindExternalStore KindBasicProvisionApplicationTypeDescriptionBase = "ExternalStore" + // KindImageStorePath ... + KindImageStorePath KindBasicProvisionApplicationTypeDescriptionBase = "ImageStorePath" + // KindProvisionApplicationTypeDescriptionBase ... + KindProvisionApplicationTypeDescriptionBase KindBasicProvisionApplicationTypeDescriptionBase = "ProvisionApplicationTypeDescriptionBase" +) + +// PossibleKindBasicProvisionApplicationTypeDescriptionBaseValues returns an array of possible values for the KindBasicProvisionApplicationTypeDescriptionBase const type. +func PossibleKindBasicProvisionApplicationTypeDescriptionBaseValues() []KindBasicProvisionApplicationTypeDescriptionBase { + return []KindBasicProvisionApplicationTypeDescriptionBase{KindExternalStore, KindImageStorePath, KindProvisionApplicationTypeDescriptionBase} +} + +// KindBasicRepairImpactDescriptionBase enumerates the values for kind basic repair impact description base. +type KindBasicRepairImpactDescriptionBase string + +const ( + // KindBasicRepairImpactDescriptionBaseKindNode ... + KindBasicRepairImpactDescriptionBaseKindNode KindBasicRepairImpactDescriptionBase = "Node" + // KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase ... + KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase KindBasicRepairImpactDescriptionBase = "RepairImpactDescriptionBase" +) + +// PossibleKindBasicRepairImpactDescriptionBaseValues returns an array of possible values for the KindBasicRepairImpactDescriptionBase const type. +func PossibleKindBasicRepairImpactDescriptionBaseValues() []KindBasicRepairImpactDescriptionBase { + return []KindBasicRepairImpactDescriptionBase{KindBasicRepairImpactDescriptionBaseKindNode, KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase} +} + +// KindBasicRepairTargetDescriptionBase enumerates the values for kind basic repair target description base. +type KindBasicRepairTargetDescriptionBase string + +const ( + // KindBasicRepairTargetDescriptionBaseKindNode ... + KindBasicRepairTargetDescriptionBaseKindNode KindBasicRepairTargetDescriptionBase = "Node" + // KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase ... + KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase KindBasicRepairTargetDescriptionBase = "RepairTargetDescriptionBase" +) + +// PossibleKindBasicRepairTargetDescriptionBaseValues returns an array of possible values for the KindBasicRepairTargetDescriptionBase const type. +func PossibleKindBasicRepairTargetDescriptionBaseValues() []KindBasicRepairTargetDescriptionBase { + return []KindBasicRepairTargetDescriptionBase{KindBasicRepairTargetDescriptionBaseKindNode, KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase} +} + +// KindBasicReplicaStatusBase enumerates the values for kind basic replica status base. +type KindBasicReplicaStatusBase string + +const ( + // KindKeyValueStore ... + KindKeyValueStore KindBasicReplicaStatusBase = "KeyValueStore" + // KindReplicaStatusBase ... + KindReplicaStatusBase KindBasicReplicaStatusBase = "ReplicaStatusBase" +) + +// PossibleKindBasicReplicaStatusBaseValues returns an array of possible values for the KindBasicReplicaStatusBase const type. +func PossibleKindBasicReplicaStatusBaseValues() []KindBasicReplicaStatusBase { + return []KindBasicReplicaStatusBase{KindKeyValueStore, KindReplicaStatusBase} +} + +// KindBasicReplicatorStatus enumerates the values for kind basic replicator status. +type KindBasicReplicatorStatus string + +const ( + // KindActiveSecondary ... + KindActiveSecondary KindBasicReplicatorStatus = "ActiveSecondary" + // KindIdleSecondary ... + KindIdleSecondary KindBasicReplicatorStatus = "IdleSecondary" + // KindPrimary ... + KindPrimary KindBasicReplicatorStatus = "Primary" + // KindReplicatorStatus ... + KindReplicatorStatus KindBasicReplicatorStatus = "ReplicatorStatus" + // KindSecondaryReplicatorStatus ... + KindSecondaryReplicatorStatus KindBasicReplicatorStatus = "SecondaryReplicatorStatus" +) + +// PossibleKindBasicReplicatorStatusValues returns an array of possible values for the KindBasicReplicatorStatus const type. +func PossibleKindBasicReplicatorStatusValues() []KindBasicReplicatorStatus { + return []KindBasicReplicatorStatus{KindActiveSecondary, KindIdleSecondary, KindPrimary, KindReplicatorStatus, KindSecondaryReplicatorStatus} +} + +// KindBasicSafetyCheck enumerates the values for kind basic safety check. +type KindBasicSafetyCheck string + +const ( + // KindEnsureAvailability ... + KindEnsureAvailability KindBasicSafetyCheck = "EnsureAvailability" + // KindEnsurePartitionQuorum ... + KindEnsurePartitionQuorum KindBasicSafetyCheck = "EnsurePartitionQuorum" + // KindEnsureSeedNodeQuorum ... + KindEnsureSeedNodeQuorum KindBasicSafetyCheck = "EnsureSeedNodeQuorum" + // KindPartitionSafetyCheck ... + KindPartitionSafetyCheck KindBasicSafetyCheck = "PartitionSafetyCheck" + // KindSafetyCheck ... + KindSafetyCheck KindBasicSafetyCheck = "SafetyCheck" + // KindWaitForInbuildReplica ... + KindWaitForInbuildReplica KindBasicSafetyCheck = "WaitForInbuildReplica" + // KindWaitForPrimaryPlacement ... + KindWaitForPrimaryPlacement KindBasicSafetyCheck = "WaitForPrimaryPlacement" + // KindWaitForPrimarySwap ... + KindWaitForPrimarySwap KindBasicSafetyCheck = "WaitForPrimarySwap" + // KindWaitForReconfiguration ... + KindWaitForReconfiguration KindBasicSafetyCheck = "WaitForReconfiguration" +) + +// PossibleKindBasicSafetyCheckValues returns an array of possible values for the KindBasicSafetyCheck const type. +func PossibleKindBasicSafetyCheckValues() []KindBasicSafetyCheck { + return []KindBasicSafetyCheck{KindEnsureAvailability, KindEnsurePartitionQuorum, KindEnsureSeedNodeQuorum, KindPartitionSafetyCheck, KindSafetyCheck, KindWaitForInbuildReplica, KindWaitForPrimaryPlacement, KindWaitForPrimarySwap, KindWaitForReconfiguration} +} + +// KindBasicScalingMechanismDescription enumerates the values for kind basic scaling mechanism description. +type KindBasicScalingMechanismDescription string + +const ( + // KindAddRemoveIncrementalNamedPartition ... + KindAddRemoveIncrementalNamedPartition KindBasicScalingMechanismDescription = "AddRemoveIncrementalNamedPartition" + // KindPartitionInstanceCount ... + KindPartitionInstanceCount KindBasicScalingMechanismDescription = "PartitionInstanceCount" + // KindScalingMechanismDescription ... + KindScalingMechanismDescription KindBasicScalingMechanismDescription = "ScalingMechanismDescription" +) + +// PossibleKindBasicScalingMechanismDescriptionValues returns an array of possible values for the KindBasicScalingMechanismDescription const type. +func PossibleKindBasicScalingMechanismDescriptionValues() []KindBasicScalingMechanismDescription { + return []KindBasicScalingMechanismDescription{KindAddRemoveIncrementalNamedPartition, KindPartitionInstanceCount, KindScalingMechanismDescription} +} + +// KindBasicScalingTriggerDescription enumerates the values for kind basic scaling trigger description. +type KindBasicScalingTriggerDescription string + +const ( + // KindAveragePartitionLoad ... + KindAveragePartitionLoad KindBasicScalingTriggerDescription = "AveragePartitionLoad" + // KindAverageServiceLoad ... + KindAverageServiceLoad KindBasicScalingTriggerDescription = "AverageServiceLoad" + // KindScalingTriggerDescription ... + KindScalingTriggerDescription KindBasicScalingTriggerDescription = "ScalingTriggerDescription" +) + +// PossibleKindBasicScalingTriggerDescriptionValues returns an array of possible values for the KindBasicScalingTriggerDescription const type. +func PossibleKindBasicScalingTriggerDescriptionValues() []KindBasicScalingTriggerDescription { + return []KindBasicScalingTriggerDescription{KindAveragePartitionLoad, KindAverageServiceLoad, KindScalingTriggerDescription} +} + +// KindBasicSecretResourcePropertiesBase enumerates the values for kind basic secret resource properties base. +type KindBasicSecretResourcePropertiesBase string + +const ( + // KindInlinedValue ... + KindInlinedValue KindBasicSecretResourcePropertiesBase = "inlinedValue" + // KindSecretResourceProperties ... + KindSecretResourceProperties KindBasicSecretResourcePropertiesBase = "SecretResourceProperties" + // KindSecretResourcePropertiesBase ... + KindSecretResourcePropertiesBase KindBasicSecretResourcePropertiesBase = "SecretResourcePropertiesBase" +) + +// PossibleKindBasicSecretResourcePropertiesBaseValues returns an array of possible values for the KindBasicSecretResourcePropertiesBase const type. +func PossibleKindBasicSecretResourcePropertiesBaseValues() []KindBasicSecretResourcePropertiesBase { + return []KindBasicSecretResourcePropertiesBase{KindInlinedValue, KindSecretResourceProperties, KindSecretResourcePropertiesBase} +} + +// KindBasicServiceTypeDescription enumerates the values for kind basic service type description. +type KindBasicServiceTypeDescription string + +const ( + // KindServiceTypeDescription ... + KindServiceTypeDescription KindBasicServiceTypeDescription = "ServiceTypeDescription" + // KindStateful ... + KindStateful KindBasicServiceTypeDescription = "Stateful" + // KindStateless ... + KindStateless KindBasicServiceTypeDescription = "Stateless" +) + +// PossibleKindBasicServiceTypeDescriptionValues returns an array of possible values for the KindBasicServiceTypeDescription const type. +func PossibleKindBasicServiceTypeDescriptionValues() []KindBasicServiceTypeDescription { + return []KindBasicServiceTypeDescription{KindServiceTypeDescription, KindStateful, KindStateless} +} + +// MoveCost enumerates the values for move cost. +type MoveCost string + +const ( + // High Specifies the move cost of the service as High. The value is 3. + High MoveCost = "High" + // Low Specifies the move cost of the service as Low. The value is 1. + Low MoveCost = "Low" + // Medium Specifies the move cost of the service as Medium. The value is 2. + Medium MoveCost = "Medium" + // VeryHigh Specifies the move cost of the service as VeryHigh. The value is 4. + VeryHigh MoveCost = "VeryHigh" + // Zero Zero move cost. This value is zero. + Zero MoveCost = "Zero" +) + +// PossibleMoveCostValues returns an array of possible values for the MoveCost const type. +func PossibleMoveCostValues() []MoveCost { + return []MoveCost{High, Low, Medium, VeryHigh, Zero} +} + +// NetworkKind enumerates the values for network kind. +type NetworkKind string + +const ( + // Local Indicates a container network local to a single Service Fabric cluster. The value is 1. + Local NetworkKind = "Local" +) + +// PossibleNetworkKindValues returns an array of possible values for the NetworkKind const type. +func PossibleNetworkKindValues() []NetworkKind { + return []NetworkKind{Local} +} + +// NodeDeactivationIntent enumerates the values for node deactivation intent. +type NodeDeactivationIntent string + +const ( + // NodeDeactivationIntentInvalid Indicates the node deactivation intent is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. This value is not used. + NodeDeactivationIntentInvalid NodeDeactivationIntent = "Invalid" + // NodeDeactivationIntentPause Indicates that the node should be paused. The value is 1. + NodeDeactivationIntentPause NodeDeactivationIntent = "Pause" + // NodeDeactivationIntentRemoveData Indicates that the intent is to reimage the node. Service Fabric does + // not reimage the node, this action is done outside of Service Fabric. The value is 3. + NodeDeactivationIntentRemoveData NodeDeactivationIntent = "RemoveData" + // NodeDeactivationIntentRemoveNode Indicates that the node is being decommissioned and is not expected to + // return. Service Fabric does not decommission the node, this action is done outside of Service Fabric. + // The value is 4. + NodeDeactivationIntentRemoveNode NodeDeactivationIntent = "RemoveNode" + // NodeDeactivationIntentRestart Indicates that the intent is for the node to be restarted after a short + // period of time. Service Fabric does not restart the node, this action is done outside of Service Fabric. + // The value is 2. + NodeDeactivationIntentRestart NodeDeactivationIntent = "Restart" +) + +// PossibleNodeDeactivationIntentValues returns an array of possible values for the NodeDeactivationIntent const type. +func PossibleNodeDeactivationIntentValues() []NodeDeactivationIntent { + return []NodeDeactivationIntent{NodeDeactivationIntentInvalid, NodeDeactivationIntentPause, NodeDeactivationIntentRemoveData, NodeDeactivationIntentRemoveNode, NodeDeactivationIntentRestart} +} + +// NodeDeactivationStatus enumerates the values for node deactivation status. +type NodeDeactivationStatus string + +const ( + // NodeDeactivationStatusCompleted The task is completed. The value is 3. + NodeDeactivationStatusCompleted NodeDeactivationStatus = "Completed" + // NodeDeactivationStatusNone No status is associated with the task. The value is zero. + NodeDeactivationStatusNone NodeDeactivationStatus = "None" + // NodeDeactivationStatusSafetyCheckComplete When a node is deactivated Service Fabric performs checks to + // ensure that the operation is safe to proceed to ensure availability of the service and reliability of + // the state. This value indicates that all safety checks have been completed. The value is 2. + NodeDeactivationStatusSafetyCheckComplete NodeDeactivationStatus = "SafetyCheckComplete" + // NodeDeactivationStatusSafetyCheckInProgress When a node is deactivated Service Fabric performs checks to + // ensure that the operation is safe to proceed to ensure availability of the service and reliability of + // the state. This value indicates that one or more safety checks are in progress. The value is 1. + NodeDeactivationStatusSafetyCheckInProgress NodeDeactivationStatus = "SafetyCheckInProgress" +) + +// PossibleNodeDeactivationStatusValues returns an array of possible values for the NodeDeactivationStatus const type. +func PossibleNodeDeactivationStatusValues() []NodeDeactivationStatus { + return []NodeDeactivationStatus{NodeDeactivationStatusCompleted, NodeDeactivationStatusNone, NodeDeactivationStatusSafetyCheckComplete, NodeDeactivationStatusSafetyCheckInProgress} +} + +// NodeDeactivationTaskType enumerates the values for node deactivation task type. +type NodeDeactivationTaskType string + +const ( + // NodeDeactivationTaskTypeClient Specifies that the task was created by using the public API. The value is + // 3. + NodeDeactivationTaskTypeClient NodeDeactivationTaskType = "Client" + // NodeDeactivationTaskTypeInfrastructure Specifies the task created by Infrastructure hosting the nodes. + // The value is 1. + NodeDeactivationTaskTypeInfrastructure NodeDeactivationTaskType = "Infrastructure" + // NodeDeactivationTaskTypeInvalid Indicates the node deactivation task type is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. This value is not used. + NodeDeactivationTaskTypeInvalid NodeDeactivationTaskType = "Invalid" + // NodeDeactivationTaskTypeRepair Specifies the task that was created by the Repair Manager service. The + // value is 2. + NodeDeactivationTaskTypeRepair NodeDeactivationTaskType = "Repair" +) + +// PossibleNodeDeactivationTaskTypeValues returns an array of possible values for the NodeDeactivationTaskType const type. +func PossibleNodeDeactivationTaskTypeValues() []NodeDeactivationTaskType { + return []NodeDeactivationTaskType{NodeDeactivationTaskTypeClient, NodeDeactivationTaskTypeInfrastructure, NodeDeactivationTaskTypeInvalid, NodeDeactivationTaskTypeRepair} +} + +// NodeStatus enumerates the values for node status. +type NodeStatus string + +const ( + // NodeStatusDisabled Indicates the node is disabled. The value is 5. + NodeStatusDisabled NodeStatus = "Disabled" + // NodeStatusDisabling Indicates the node is in the process of being disabled. The value is 4. + NodeStatusDisabling NodeStatus = "Disabling" + // NodeStatusDown Indicates the node is down. The value is 2. + NodeStatusDown NodeStatus = "Down" + // NodeStatusEnabling Indicates the node is in process of being enabled. The value is 3. + NodeStatusEnabling NodeStatus = "Enabling" + // NodeStatusInvalid Indicates the node status is invalid. All Service Fabric enumerations have the invalid + // type. The value is zero. + NodeStatusInvalid NodeStatus = "Invalid" + // NodeStatusRemoved Indicates the node is removed. A node would be in Removed state if NodeStateRemoved + // API has been called for this node. In other words, Service Fabric has been informed that the persisted + // state on the node has been permanently lost. The value is 7. + NodeStatusRemoved NodeStatus = "Removed" + // NodeStatusUnknown Indicates the node is unknown. A node would be in Unknown state if Service Fabric does + // not have authoritative information about that node. This can happen if the system learns about a node at + // runtime.The value is 6. + NodeStatusUnknown NodeStatus = "Unknown" + // NodeStatusUp Indicates the node is up. The value is 1. + NodeStatusUp NodeStatus = "Up" +) + +// PossibleNodeStatusValues returns an array of possible values for the NodeStatus const type. +func PossibleNodeStatusValues() []NodeStatus { + return []NodeStatus{NodeStatusDisabled, NodeStatusDisabling, NodeStatusDown, NodeStatusEnabling, NodeStatusInvalid, NodeStatusRemoved, NodeStatusUnknown, NodeStatusUp} +} + +// NodeStatusFilter enumerates the values for node status filter. +type NodeStatusFilter string + +const ( + // All This filter value will match all of the nodes. + All NodeStatusFilter = "all" + // Default This filter value will match all of the nodes excepts the ones with status as Unknown or + // Removed. + Default NodeStatusFilter = "default" + // Disabled This filter value will match nodes that are Disabled. + Disabled NodeStatusFilter = "disabled" + // Disabling This filter value will match nodes that are in the process of being disabled with status as + // Disabling. + Disabling NodeStatusFilter = "disabling" + // Down This filter value will match nodes that are Down. + Down NodeStatusFilter = "down" + // Enabling This filter value will match nodes that are in the process of being enabled with status as + // Enabling. + Enabling NodeStatusFilter = "enabling" + // Removed This filter value will match nodes whose status is Removed. These are the nodes that are removed + // from the cluster using the RemoveNodeState API. + Removed NodeStatusFilter = "removed" + // Unknown This filter value will match nodes whose status is Unknown. A node would be in Unknown state if + // Service Fabric does not have authoritative information about that node. This can happen if the system + // learns about a node at runtime. + Unknown NodeStatusFilter = "unknown" + // Up This filter value will match nodes that are Up. + Up NodeStatusFilter = "up" +) + +// PossibleNodeStatusFilterValues returns an array of possible values for the NodeStatusFilter const type. +func PossibleNodeStatusFilterValues() []NodeStatusFilter { + return []NodeStatusFilter{All, Default, Disabled, Disabling, Down, Enabling, Removed, Unknown, Up} +} + +// NodeTransitionType enumerates the values for node transition type. +type NodeTransitionType string + +const ( + // NodeTransitionTypeInvalid Reserved. Do not pass into API. + NodeTransitionTypeInvalid NodeTransitionType = "Invalid" + // NodeTransitionTypeStart Transition a stopped node to up. + NodeTransitionTypeStart NodeTransitionType = "Start" + // NodeTransitionTypeStop Transition an up node to stopped. + NodeTransitionTypeStop NodeTransitionType = "Stop" +) + +// PossibleNodeTransitionTypeValues returns an array of possible values for the NodeTransitionType const type. +func PossibleNodeTransitionTypeValues() []NodeTransitionType { + return []NodeTransitionType{NodeTransitionTypeInvalid, NodeTransitionTypeStart, NodeTransitionTypeStop} +} + +// NodeUpgradePhase enumerates the values for node upgrade phase. +type NodeUpgradePhase string + +const ( + // NodeUpgradePhaseInvalid Indicates the upgrade state is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + NodeUpgradePhaseInvalid NodeUpgradePhase = "Invalid" + // NodeUpgradePhasePostUpgradeSafetyCheck The upgrade has completed and post upgrade safety checks are + // being performed. The value is 3 + NodeUpgradePhasePostUpgradeSafetyCheck NodeUpgradePhase = "PostUpgradeSafetyCheck" + // NodeUpgradePhasePreUpgradeSafetyCheck The upgrade has not started yet due to pending safety checks. The + // value is 1 + NodeUpgradePhasePreUpgradeSafetyCheck NodeUpgradePhase = "PreUpgradeSafetyCheck" + // NodeUpgradePhaseUpgrading The upgrade is in progress. The value is 2 + NodeUpgradePhaseUpgrading NodeUpgradePhase = "Upgrading" +) + +// PossibleNodeUpgradePhaseValues returns an array of possible values for the NodeUpgradePhase const type. +func PossibleNodeUpgradePhaseValues() []NodeUpgradePhase { + return []NodeUpgradePhase{NodeUpgradePhaseInvalid, NodeUpgradePhasePostUpgradeSafetyCheck, NodeUpgradePhasePreUpgradeSafetyCheck, NodeUpgradePhaseUpgrading} +} + +// OperatingSystemType enumerates the values for operating system type. +type OperatingSystemType string + +const ( + // Linux The required operating system is Linux. + Linux OperatingSystemType = "Linux" + // Windows The required operating system is Windows. + Windows OperatingSystemType = "Windows" +) + +// PossibleOperatingSystemTypeValues returns an array of possible values for the OperatingSystemType const type. +func PossibleOperatingSystemTypeValues() []OperatingSystemType { + return []OperatingSystemType{Linux, Windows} +} + +// OperationState enumerates the values for operation state. +type OperationState string + +const ( + // OperationStateCancelled The operation was cancelled by the user using CancelOperation, and is no longer + // running. + OperationStateCancelled OperationState = "Cancelled" + // OperationStateCompleted The operation has completed successfully and is no longer running. + OperationStateCompleted OperationState = "Completed" + // OperationStateFaulted The operation has failed and is no longer running. + OperationStateFaulted OperationState = "Faulted" + // OperationStateForceCancelled The operation was cancelled by the user using CancelOperation, with the + // force parameter set to true. It is no longer running. Refer to CancelOperation for more details. + OperationStateForceCancelled OperationState = "ForceCancelled" + // OperationStateInvalid The operation state is invalid. + OperationStateInvalid OperationState = "Invalid" + // OperationStateRollingBack The operation is rolling back internal system state because it encountered a + // fatal error or was cancelled by the user. "RollingBack" does not refer to user state. For example, + // if CancelOperation is called on a command of type PartitionDataLoss, state of "RollingBack" does not + // mean service data is being restored (assuming the command has progressed far enough to cause data loss). + // It means the system is rolling back/cleaning up internal system state associated with the command. + OperationStateRollingBack OperationState = "RollingBack" + // OperationStateRunning The operation is in progress. + OperationStateRunning OperationState = "Running" +) + +// PossibleOperationStateValues returns an array of possible values for the OperationState const type. +func PossibleOperationStateValues() []OperationState { + return []OperationState{OperationStateCancelled, OperationStateCompleted, OperationStateFaulted, OperationStateForceCancelled, OperationStateInvalid, OperationStateRollingBack, OperationStateRunning} +} + +// OperationType enumerates the values for operation type. +type OperationType string + +const ( + // OperationTypeInvalid The operation state is invalid. + OperationTypeInvalid OperationType = "Invalid" + // OperationTypeNodeTransition An operation started using the StartNodeTransition API. + OperationTypeNodeTransition OperationType = "NodeTransition" + // OperationTypePartitionDataLoss An operation started using the StartDataLoss API. + OperationTypePartitionDataLoss OperationType = "PartitionDataLoss" + // OperationTypePartitionQuorumLoss An operation started using the StartQuorumLoss API. + OperationTypePartitionQuorumLoss OperationType = "PartitionQuorumLoss" + // OperationTypePartitionRestart An operation started using the StartPartitionRestart API. + OperationTypePartitionRestart OperationType = "PartitionRestart" +) + +// PossibleOperationTypeValues returns an array of possible values for the OperationType const type. +func PossibleOperationTypeValues() []OperationType { + return []OperationType{OperationTypeInvalid, OperationTypeNodeTransition, OperationTypePartitionDataLoss, OperationTypePartitionQuorumLoss, OperationTypePartitionRestart} +} + +// PackageSharingPolicyScope enumerates the values for package sharing policy scope. +type PackageSharingPolicyScope string + +const ( + // PackageSharingPolicyScopeAll Share all code, config and data packages from corresponding service + // manifest. The value is 1. + PackageSharingPolicyScopeAll PackageSharingPolicyScope = "All" + // PackageSharingPolicyScopeCode Share all code packages from corresponding service manifest. The value is + // 2. + PackageSharingPolicyScopeCode PackageSharingPolicyScope = "Code" + // PackageSharingPolicyScopeConfig Share all config packages from corresponding service manifest. The value + // is 3. + PackageSharingPolicyScopeConfig PackageSharingPolicyScope = "Config" + // PackageSharingPolicyScopeData Share all data packages from corresponding service manifest. The value is + // 4. + PackageSharingPolicyScopeData PackageSharingPolicyScope = "Data" + // PackageSharingPolicyScopeNone No package sharing policy scope. The value is 0. + PackageSharingPolicyScopeNone PackageSharingPolicyScope = "None" +) + +// PossiblePackageSharingPolicyScopeValues returns an array of possible values for the PackageSharingPolicyScope const type. +func PossiblePackageSharingPolicyScopeValues() []PackageSharingPolicyScope { + return []PackageSharingPolicyScope{PackageSharingPolicyScopeAll, PackageSharingPolicyScopeCode, PackageSharingPolicyScopeConfig, PackageSharingPolicyScopeData, PackageSharingPolicyScopeNone} +} + +// PartitionAccessStatus enumerates the values for partition access status. +type PartitionAccessStatus string + +const ( + // PartitionAccessStatusGranted Indicates that the read or write operation access is granted and the + // operation is allowed. + PartitionAccessStatusGranted PartitionAccessStatus = "Granted" + // PartitionAccessStatusInvalid Indicates that the read or write operation access status is not valid. This + // value is not returned to the caller. + PartitionAccessStatusInvalid PartitionAccessStatus = "Invalid" + // PartitionAccessStatusNotPrimary Indicates that this client request was received by a replica that is not + // a Primary replica. + PartitionAccessStatusNotPrimary PartitionAccessStatus = "NotPrimary" + // PartitionAccessStatusNoWriteQuorum Indicates that no write quorum is available and, therefore, no write + // operation can be accepted. + PartitionAccessStatusNoWriteQuorum PartitionAccessStatus = "NoWriteQuorum" + // PartitionAccessStatusReconfigurationPending Indicates that the client should try again later, because a + // reconfiguration is in progress. + PartitionAccessStatusReconfigurationPending PartitionAccessStatus = "ReconfigurationPending" +) + +// PossiblePartitionAccessStatusValues returns an array of possible values for the PartitionAccessStatus const type. +func PossiblePartitionAccessStatusValues() []PartitionAccessStatus { + return []PartitionAccessStatus{PartitionAccessStatusGranted, PartitionAccessStatusInvalid, PartitionAccessStatusNotPrimary, PartitionAccessStatusNoWriteQuorum, PartitionAccessStatusReconfigurationPending} +} + +// PartitionScheme enumerates the values for partition scheme. +type PartitionScheme string + +const ( + // PartitionSchemeInvalid Indicates the partition kind is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + PartitionSchemeInvalid PartitionScheme = "Invalid" + // PartitionSchemeNamed Indicates that the partition is based on string names, and is a + // NamedPartitionSchemeDescription object. The value is 3 + PartitionSchemeNamed PartitionScheme = "Named" + // PartitionSchemeSingleton Indicates that the partition is based on string names, and is a + // SingletonPartitionSchemeDescription object, The value is 1. + PartitionSchemeSingleton PartitionScheme = "Singleton" + // PartitionSchemeUniformInt64Range Indicates that the partition is based on Int64 key ranges, and is a + // UniformInt64RangePartitionSchemeDescription object. The value is 2. + PartitionSchemeUniformInt64Range PartitionScheme = "UniformInt64Range" +) + +// PossiblePartitionSchemeValues returns an array of possible values for the PartitionScheme const type. +func PossiblePartitionSchemeValues() []PartitionScheme { + return []PartitionScheme{PartitionSchemeInvalid, PartitionSchemeNamed, PartitionSchemeSingleton, PartitionSchemeUniformInt64Range} +} + +// PartitionSchemeBasicPartitionSchemeDescription enumerates the values for partition scheme basic partition +// scheme description. +type PartitionSchemeBasicPartitionSchemeDescription string + +const ( + // PartitionSchemeNamed1 ... + PartitionSchemeNamed1 PartitionSchemeBasicPartitionSchemeDescription = "Named" + // PartitionSchemePartitionSchemeDescription ... + PartitionSchemePartitionSchemeDescription PartitionSchemeBasicPartitionSchemeDescription = "PartitionSchemeDescription" + // PartitionSchemeSingleton1 ... + PartitionSchemeSingleton1 PartitionSchemeBasicPartitionSchemeDescription = "Singleton" + // PartitionSchemeUniformInt64Range1 ... + PartitionSchemeUniformInt64Range1 PartitionSchemeBasicPartitionSchemeDescription = "UniformInt64Range" +) + +// PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues returns an array of possible values for the PartitionSchemeBasicPartitionSchemeDescription const type. +func PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues() []PartitionSchemeBasicPartitionSchemeDescription { + return []PartitionSchemeBasicPartitionSchemeDescription{PartitionSchemeNamed1, PartitionSchemePartitionSchemeDescription, PartitionSchemeSingleton1, PartitionSchemeUniformInt64Range1} +} + +// PropertyBatchInfoKind enumerates the values for property batch info kind. +type PropertyBatchInfoKind string + +const ( + // PropertyBatchInfoKindFailed The property batch failed. + PropertyBatchInfoKindFailed PropertyBatchInfoKind = "Failed" + // PropertyBatchInfoKindInvalid Indicates the property batch info is invalid. All Service Fabric + // enumerations have the invalid type. + PropertyBatchInfoKindInvalid PropertyBatchInfoKind = "Invalid" + // PropertyBatchInfoKindSuccessful The property batch succeeded. + PropertyBatchInfoKindSuccessful PropertyBatchInfoKind = "Successful" +) + +// PossiblePropertyBatchInfoKindValues returns an array of possible values for the PropertyBatchInfoKind const type. +func PossiblePropertyBatchInfoKindValues() []PropertyBatchInfoKind { + return []PropertyBatchInfoKind{PropertyBatchInfoKindFailed, PropertyBatchInfoKindInvalid, PropertyBatchInfoKindSuccessful} +} + +// PropertyBatchOperationKind enumerates the values for property batch operation kind. +type PropertyBatchOperationKind string + +const ( + // PropertyBatchOperationKindCheckExists The operation will check that a property exists or doesn't exists, + // depending on the provided value. The value is 3. + PropertyBatchOperationKindCheckExists PropertyBatchOperationKind = "CheckExists" + // PropertyBatchOperationKindCheckSequence The operation will ensure that the sequence number is equal to + // the provided value. The value is 4. + PropertyBatchOperationKindCheckSequence PropertyBatchOperationKind = "CheckSequence" + // PropertyBatchOperationKindCheckValue The operation will ensure that the value of a property is equal to + // the provided value. The value is 7. + PropertyBatchOperationKindCheckValue PropertyBatchOperationKind = "CheckValue" + // PropertyBatchOperationKindDelete The operation will delete a property. The value is 5. + PropertyBatchOperationKindDelete PropertyBatchOperationKind = "Delete" + // PropertyBatchOperationKindGet The operation will get a property. The value is 2. + PropertyBatchOperationKindGet PropertyBatchOperationKind = "Get" + // PropertyBatchOperationKindInvalid Indicates the property operation is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. + PropertyBatchOperationKindInvalid PropertyBatchOperationKind = "Invalid" + // PropertyBatchOperationKindPut The operation will create or edit a property. The value is 1. + PropertyBatchOperationKindPut PropertyBatchOperationKind = "Put" +) + +// PossiblePropertyBatchOperationKindValues returns an array of possible values for the PropertyBatchOperationKind const type. +func PossiblePropertyBatchOperationKindValues() []PropertyBatchOperationKind { + return []PropertyBatchOperationKind{PropertyBatchOperationKindCheckExists, PropertyBatchOperationKindCheckSequence, PropertyBatchOperationKindCheckValue, PropertyBatchOperationKindDelete, PropertyBatchOperationKindGet, PropertyBatchOperationKindInvalid, PropertyBatchOperationKindPut} +} + +// PropertyValueKind enumerates the values for property value kind. +type PropertyValueKind string + +const ( + // PropertyValueKindBinary The data inside the property is a binary blob. The value is 1. + PropertyValueKindBinary PropertyValueKind = "Binary" + // PropertyValueKindDouble The data inside the property is a double. The value is 3. + PropertyValueKindDouble PropertyValueKind = "Double" + // PropertyValueKindGUID The data inside the property is a guid. The value is 5. + PropertyValueKindGUID PropertyValueKind = "Guid" + // PropertyValueKindInt64 The data inside the property is an int64. The value is 2. + PropertyValueKindInt64 PropertyValueKind = "Int64" + // PropertyValueKindInvalid Indicates the property is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + PropertyValueKindInvalid PropertyValueKind = "Invalid" + // PropertyValueKindString The data inside the property is a string. The value is 4. + PropertyValueKindString PropertyValueKind = "String" +) + +// PossiblePropertyValueKindValues returns an array of possible values for the PropertyValueKind const type. +func PossiblePropertyValueKindValues() []PropertyValueKind { + return []PropertyValueKind{PropertyValueKindBinary, PropertyValueKindDouble, PropertyValueKindGUID, PropertyValueKindInt64, PropertyValueKindInvalid, PropertyValueKindString} +} + +// ProvisionApplicationTypeKind enumerates the values for provision application type kind. +type ProvisionApplicationTypeKind string + +const ( + // ProvisionApplicationTypeKindExternalStore Indicates that the provision is for an application package + // that was previously uploaded to an external store. The application package ends with the extension + // *.sfpkg. The value is 2. + ProvisionApplicationTypeKindExternalStore ProvisionApplicationTypeKind = "ExternalStore" + // ProvisionApplicationTypeKindImageStorePath Indicates that the provision is for a package that was + // previously uploaded to the image store. The value is 1. + ProvisionApplicationTypeKindImageStorePath ProvisionApplicationTypeKind = "ImageStorePath" + // ProvisionApplicationTypeKindInvalid Indicates that the provision kind is invalid. This value is default + // and should not be used. The value is zero. + ProvisionApplicationTypeKindInvalid ProvisionApplicationTypeKind = "Invalid" +) + +// PossibleProvisionApplicationTypeKindValues returns an array of possible values for the ProvisionApplicationTypeKind const type. +func PossibleProvisionApplicationTypeKindValues() []ProvisionApplicationTypeKind { + return []ProvisionApplicationTypeKind{ProvisionApplicationTypeKindExternalStore, ProvisionApplicationTypeKindImageStorePath, ProvisionApplicationTypeKindInvalid} +} + +// QuorumLossMode enumerates the values for quorum loss mode. +type QuorumLossMode string + +const ( + // QuorumLossModeAllReplicas ... + QuorumLossModeAllReplicas QuorumLossMode = "AllReplicas" + // QuorumLossModeInvalid Reserved. Do not pass into API. + QuorumLossModeInvalid QuorumLossMode = "Invalid" + // QuorumLossModeQuorumReplicas Partial Quorum loss mode : Minimum number of replicas for a partition will + // be down that will cause a quorum loss. + QuorumLossModeQuorumReplicas QuorumLossMode = "QuorumReplicas" +) + +// PossibleQuorumLossModeValues returns an array of possible values for the QuorumLossMode const type. +func PossibleQuorumLossModeValues() []QuorumLossMode { + return []QuorumLossMode{QuorumLossModeAllReplicas, QuorumLossModeInvalid, QuorumLossModeQuorumReplicas} +} + +// ReconfigurationPhase enumerates the values for reconfiguration phase. +type ReconfigurationPhase string + +const ( + // ReconfigurationPhaseAbortPhaseZero This phase is for internal use only. + ReconfigurationPhaseAbortPhaseZero ReconfigurationPhase = "AbortPhaseZero" + // ReconfigurationPhaseNone Specifies that there is no reconfiguration in progress. + ReconfigurationPhaseNone ReconfigurationPhase = "None" + // ReconfigurationPhasePhase0 Refers to the phase where the reconfiguration is transferring data from the + // previous primary to the new primary. + ReconfigurationPhasePhase0 ReconfigurationPhase = "Phase0" + // ReconfigurationPhasePhase1 Refers to the phase where the reconfiguration is querying the replica set for + // the progress. + ReconfigurationPhasePhase1 ReconfigurationPhase = "Phase1" + // ReconfigurationPhasePhase2 Refers to the phase where the reconfiguration is ensuring that data from the + // current primary is present in a majority of the replica set. + ReconfigurationPhasePhase2 ReconfigurationPhase = "Phase2" + // ReconfigurationPhasePhase3 This phase is for internal use only. + ReconfigurationPhasePhase3 ReconfigurationPhase = "Phase3" + // ReconfigurationPhasePhase4 This phase is for internal use only. + ReconfigurationPhasePhase4 ReconfigurationPhase = "Phase4" + // ReconfigurationPhaseUnknown Indicates the invalid reconfiguration phase. + ReconfigurationPhaseUnknown ReconfigurationPhase = "Unknown" +) + +// PossibleReconfigurationPhaseValues returns an array of possible values for the ReconfigurationPhase const type. +func PossibleReconfigurationPhaseValues() []ReconfigurationPhase { + return []ReconfigurationPhase{ReconfigurationPhaseAbortPhaseZero, ReconfigurationPhaseNone, ReconfigurationPhasePhase0, ReconfigurationPhasePhase1, ReconfigurationPhasePhase2, ReconfigurationPhasePhase3, ReconfigurationPhasePhase4, ReconfigurationPhaseUnknown} +} + +// ReconfigurationType enumerates the values for reconfiguration type. +type ReconfigurationType string + +const ( + // ReconfigurationTypeFailover Reconfiguration triggered in response to a primary going down. This could be + // due to many reasons such as primary replica crashing etc. + ReconfigurationTypeFailover ReconfigurationType = "Failover" + // ReconfigurationTypeOther Reconfigurations where the primary replica is not changing. + ReconfigurationTypeOther ReconfigurationType = "Other" + // ReconfigurationTypeSwapPrimary Specifies that the primary replica is being swapped with a different + // replica. + ReconfigurationTypeSwapPrimary ReconfigurationType = "SwapPrimary" + // ReconfigurationTypeUnknown Indicates the invalid reconfiguration type. + ReconfigurationTypeUnknown ReconfigurationType = "Unknown" +) + +// PossibleReconfigurationTypeValues returns an array of possible values for the ReconfigurationType const type. +func PossibleReconfigurationTypeValues() []ReconfigurationType { + return []ReconfigurationType{ReconfigurationTypeFailover, ReconfigurationTypeOther, ReconfigurationTypeSwapPrimary, ReconfigurationTypeUnknown} +} + +// RepairImpactKind enumerates the values for repair impact kind. +type RepairImpactKind string + +const ( + // RepairImpactKindInvalid The repair impact is not valid or is of an unknown type. + RepairImpactKindInvalid RepairImpactKind = "Invalid" + // RepairImpactKindNode The repair impact affects a set of Service Fabric nodes. + RepairImpactKindNode RepairImpactKind = "Node" +) + +// PossibleRepairImpactKindValues returns an array of possible values for the RepairImpactKind const type. +func PossibleRepairImpactKindValues() []RepairImpactKind { + return []RepairImpactKind{RepairImpactKindInvalid, RepairImpactKindNode} +} + +// RepairTargetKind enumerates the values for repair target kind. +type RepairTargetKind string + +const ( + // RepairTargetKindInvalid The repair target is not valid or is of an unknown type. + RepairTargetKindInvalid RepairTargetKind = "Invalid" + // RepairTargetKindNode The repair target is a set of Service Fabric nodes. + RepairTargetKindNode RepairTargetKind = "Node" +) + +// PossibleRepairTargetKindValues returns an array of possible values for the RepairTargetKind const type. +func PossibleRepairTargetKindValues() []RepairTargetKind { + return []RepairTargetKind{RepairTargetKindInvalid, RepairTargetKindNode} +} + +// RepairTaskHealthCheckState enumerates the values for repair task health check state. +type RepairTaskHealthCheckState string + +const ( + // InProgress Indicates that the health check is in progress. + InProgress RepairTaskHealthCheckState = "InProgress" + // NotStarted Indicates that the health check has not started. + NotStarted RepairTaskHealthCheckState = "NotStarted" + // Skipped Indicates that the health check was skipped. + Skipped RepairTaskHealthCheckState = "Skipped" + // Succeeded Indicates that the health check succeeded. + Succeeded RepairTaskHealthCheckState = "Succeeded" + // TimedOut Indicates that the health check timed out. + TimedOut RepairTaskHealthCheckState = "TimedOut" +) + +// PossibleRepairTaskHealthCheckStateValues returns an array of possible values for the RepairTaskHealthCheckState const type. +func PossibleRepairTaskHealthCheckStateValues() []RepairTaskHealthCheckState { + return []RepairTaskHealthCheckState{InProgress, NotStarted, Skipped, Succeeded, TimedOut} +} + +// ReplicaHealthReportServiceKind enumerates the values for replica health report service kind. +type ReplicaHealthReportServiceKind string + +const ( + // Stateful Uses Service Fabric to make its state or part of its state highly available and reliable. The + // value is 2. + Stateful ReplicaHealthReportServiceKind = "Stateful" + // Stateless Does not use Service Fabric to make its state highly available or reliable. The value is 1 + Stateless ReplicaHealthReportServiceKind = "Stateless" +) + +// PossibleReplicaHealthReportServiceKindValues returns an array of possible values for the ReplicaHealthReportServiceKind const type. +func PossibleReplicaHealthReportServiceKindValues() []ReplicaHealthReportServiceKind { + return []ReplicaHealthReportServiceKind{Stateful, Stateless} +} + +// ReplicaKind enumerates the values for replica kind. +type ReplicaKind string + +const ( + // ReplicaKindInvalid Represents an invalid replica kind. The value is zero. + ReplicaKindInvalid ReplicaKind = "Invalid" + // ReplicaKindKeyValueStore Represents a key value store replica. The value is 1 + ReplicaKindKeyValueStore ReplicaKind = "KeyValueStore" +) + +// PossibleReplicaKindValues returns an array of possible values for the ReplicaKind const type. +func PossibleReplicaKindValues() []ReplicaKind { + return []ReplicaKind{ReplicaKindInvalid, ReplicaKindKeyValueStore} +} + +// ReplicaRole enumerates the values for replica role. +type ReplicaRole string + +const ( + // ReplicaRoleActiveSecondary Refers to a replica in the set that receives state updates from the Primary + // replica, applies them, and sends acknowledgements back. Secondary replicas must participate in the write + // quorum for a replica set. There can be multiple active Secondary replicas in a replica set at a time. + // The number of active Secondary replicas is configurable that the reliability subsystem should maintain. + // The value is 4. + ReplicaRoleActiveSecondary ReplicaRole = "ActiveSecondary" + // ReplicaRoleIdleSecondary Refers to a replica in the set that receives a state transfer from the Primary + // replica to prepare for becoming an active Secondary replica. There can be multiple Idle Secondary + // replicas in a replica set at a time. Idle Secondary replicas do not count as a part of a write quorum. + // The value is 3. + ReplicaRoleIdleSecondary ReplicaRole = "IdleSecondary" + // ReplicaRoleNone Specifies that the replica has no responsibility in regard to the replica set. The value + // is 1 + ReplicaRoleNone ReplicaRole = "None" + // ReplicaRolePrimary Refers to the replica in the set on which all read and write operations are complete + // in order to enforce strong consistency semantics. Read operations are handled directly by the Primary + // replica, while write operations must be acknowledged by a quorum of the replicas in the replica set. + // There can only be one Primary replica in a replica set at a time. The value is 2. + ReplicaRolePrimary ReplicaRole = "Primary" + // ReplicaRoleUnknown Indicates the initial role that a replica is created in. The value is zero. + ReplicaRoleUnknown ReplicaRole = "Unknown" +) + +// PossibleReplicaRoleValues returns an array of possible values for the ReplicaRole const type. +func PossibleReplicaRoleValues() []ReplicaRole { + return []ReplicaRole{ReplicaRoleActiveSecondary, ReplicaRoleIdleSecondary, ReplicaRoleNone, ReplicaRolePrimary, ReplicaRoleUnknown} +} + +// ReplicaStatus enumerates the values for replica status. +type ReplicaStatus string + +const ( + // ReplicaStatusDown The replica is down. The value is 4. + ReplicaStatusDown ReplicaStatus = "Down" + // ReplicaStatusDropped Replica is dropped. This means that the replica has been removed from the replica + // set. If it is persisted, its state has been deleted. The value is 5. + ReplicaStatusDropped ReplicaStatus = "Dropped" + // ReplicaStatusInBuild The replica is being built. This means that a primary replica is seeding this + // replica. The value is 1. + ReplicaStatusInBuild ReplicaStatus = "InBuild" + // ReplicaStatusInvalid Indicates the replica status is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + ReplicaStatusInvalid ReplicaStatus = "Invalid" + // ReplicaStatusReady The replica is ready. The value is 3. + ReplicaStatusReady ReplicaStatus = "Ready" + // ReplicaStatusStandby The replica is in standby. The value is 2. + ReplicaStatusStandby ReplicaStatus = "Standby" +) + +// PossibleReplicaStatusValues returns an array of possible values for the ReplicaStatus const type. +func PossibleReplicaStatusValues() []ReplicaStatus { + return []ReplicaStatus{ReplicaStatusDown, ReplicaStatusDropped, ReplicaStatusInBuild, ReplicaStatusInvalid, ReplicaStatusReady, ReplicaStatusStandby} +} + +// ReplicatorOperationName enumerates the values for replicator operation name. +type ReplicatorOperationName string + +const ( + // ReplicatorOperationNameAbort Replicator is being aborted. + ReplicatorOperationNameAbort ReplicatorOperationName = "Abort" + // ReplicatorOperationNameBuild Replicator is in the process of building one or more replicas. + ReplicatorOperationNameBuild ReplicatorOperationName = "Build" + // ReplicatorOperationNameChangeRole Replicator is in the process of changing its role. + ReplicatorOperationNameChangeRole ReplicatorOperationName = "ChangeRole" + // ReplicatorOperationNameClose Replicator is closing. + ReplicatorOperationNameClose ReplicatorOperationName = "Close" + // ReplicatorOperationNameInvalid Default value if the replicator is not yet ready. + ReplicatorOperationNameInvalid ReplicatorOperationName = "Invalid" + // ReplicatorOperationNameNone Replicator is not running any operation from Service Fabric perspective. + ReplicatorOperationNameNone ReplicatorOperationName = "None" + // ReplicatorOperationNameOnDataLoss Replicator is handling the data loss condition, where the user service + // may potentially be recovering state from an external source. + ReplicatorOperationNameOnDataLoss ReplicatorOperationName = "OnDataLoss" + // ReplicatorOperationNameOpen Replicator is opening. + ReplicatorOperationNameOpen ReplicatorOperationName = "Open" + // ReplicatorOperationNameUpdateEpoch Due to a change in the replica set, replicator is being updated with + // its Epoch. + ReplicatorOperationNameUpdateEpoch ReplicatorOperationName = "UpdateEpoch" + // ReplicatorOperationNameWaitForCatchup Replicator is waiting for a quorum of replicas to be caught up to + // the latest state. + ReplicatorOperationNameWaitForCatchup ReplicatorOperationName = "WaitForCatchup" +) + +// PossibleReplicatorOperationNameValues returns an array of possible values for the ReplicatorOperationName const type. +func PossibleReplicatorOperationNameValues() []ReplicatorOperationName { + return []ReplicatorOperationName{ReplicatorOperationNameAbort, ReplicatorOperationNameBuild, ReplicatorOperationNameChangeRole, ReplicatorOperationNameClose, ReplicatorOperationNameInvalid, ReplicatorOperationNameNone, ReplicatorOperationNameOnDataLoss, ReplicatorOperationNameOpen, ReplicatorOperationNameUpdateEpoch, ReplicatorOperationNameWaitForCatchup} +} + +// ResourceStatus enumerates the values for resource status. +type ResourceStatus string + +const ( + // ResourceStatusCreating Indicates the resource is being created. The value is 3. + ResourceStatusCreating ResourceStatus = "Creating" + // ResourceStatusDeleting Indicates the resource is being deleted. The value is 4. + ResourceStatusDeleting ResourceStatus = "Deleting" + // ResourceStatusFailed Indicates the resource is not functional due to persistent failures. See + // statusDetails property for more details. The value is 5. + ResourceStatusFailed ResourceStatus = "Failed" + // ResourceStatusReady Indicates the resource is ready. The value is 1. + ResourceStatusReady ResourceStatus = "Ready" + // ResourceStatusUnknown Indicates the resource status is unknown. The value is zero. + ResourceStatusUnknown ResourceStatus = "Unknown" + // ResourceStatusUpgrading Indicates the resource is upgrading. The value is 2. + ResourceStatusUpgrading ResourceStatus = "Upgrading" +) + +// PossibleResourceStatusValues returns an array of possible values for the ResourceStatus const type. +func PossibleResourceStatusValues() []ResourceStatus { + return []ResourceStatus{ResourceStatusCreating, ResourceStatusDeleting, ResourceStatusFailed, ResourceStatusReady, ResourceStatusUnknown, ResourceStatusUpgrading} +} + +// RestartPartitionMode enumerates the values for restart partition mode. +type RestartPartitionMode string + +const ( + // RestartPartitionModeAllReplicasOrInstances All replicas or instances in the partition are restarted at + // once. + RestartPartitionModeAllReplicasOrInstances RestartPartitionMode = "AllReplicasOrInstances" + // RestartPartitionModeInvalid Reserved. Do not pass into API. + RestartPartitionModeInvalid RestartPartitionMode = "Invalid" + // RestartPartitionModeOnlyActiveSecondaries Only the secondary replicas are restarted. + RestartPartitionModeOnlyActiveSecondaries RestartPartitionMode = "OnlyActiveSecondaries" +) + +// PossibleRestartPartitionModeValues returns an array of possible values for the RestartPartitionMode const type. +func PossibleRestartPartitionModeValues() []RestartPartitionMode { + return []RestartPartitionMode{RestartPartitionModeAllReplicasOrInstances, RestartPartitionModeInvalid, RestartPartitionModeOnlyActiveSecondaries} +} + +// RestartPolicy enumerates the values for restart policy. +type RestartPolicy string + +const ( + // Never Service will never be restarted. If the service encounters a failure, it will move to Failed + // state. + Never RestartPolicy = "never" + // OnFailure Service will be restarted when it encounters a failure. + OnFailure RestartPolicy = "onFailure" +) + +// PossibleRestartPolicyValues returns an array of possible values for the RestartPolicy const type. +func PossibleRestartPolicyValues() []RestartPolicy { + return []RestartPolicy{Never, OnFailure} +} + +// RestoreState enumerates the values for restore state. +type RestoreState string + +const ( + // RestoreStateAccepted Operation has been validated and accepted. Restore is yet to be triggered. + RestoreStateAccepted RestoreState = "Accepted" + // RestoreStateFailure Operation completed with failure. + RestoreStateFailure RestoreState = "Failure" + // RestoreStateInvalid Indicates an invalid restore state. All Service Fabric enumerations have the invalid + // type. + RestoreStateInvalid RestoreState = "Invalid" + // RestoreStateRestoreInProgress Restore operation has been triggered and is under process. + RestoreStateRestoreInProgress RestoreState = "RestoreInProgress" + // RestoreStateSuccess Operation completed with success. + RestoreStateSuccess RestoreState = "Success" + // RestoreStateTimeout Operation timed out. + RestoreStateTimeout RestoreState = "Timeout" +) + +// PossibleRestoreStateValues returns an array of possible values for the RestoreState const type. +func PossibleRestoreStateValues() []RestoreState { + return []RestoreState{RestoreStateAccepted, RestoreStateFailure, RestoreStateInvalid, RestoreStateRestoreInProgress, RestoreStateSuccess, RestoreStateTimeout} +} + +// ResultStatus enumerates the values for result status. +type ResultStatus string + +const ( + // ResultStatusCancelled Indicates that the repair task was cancelled prior to execution. + ResultStatusCancelled ResultStatus = "Cancelled" + // ResultStatusFailed Indicates that there was a failure during execution of the repair task. Some work may + // have been performed. + ResultStatusFailed ResultStatus = "Failed" + // ResultStatusInterrupted Indicates that execution of the repair task was interrupted by a cancellation + // request after some work had already been performed. + ResultStatusInterrupted ResultStatus = "Interrupted" + // ResultStatusInvalid Indicates that the repair task result is invalid. All Service Fabric enumerations + // have the invalid value. + ResultStatusInvalid ResultStatus = "Invalid" + // ResultStatusPending Indicates that the repair task result is not yet available, because the repair task + // has not finished executing. + ResultStatusPending ResultStatus = "Pending" + // ResultStatusSucceeded Indicates that the repair task completed execution successfully. + ResultStatusSucceeded ResultStatus = "Succeeded" +) + +// PossibleResultStatusValues returns an array of possible values for the ResultStatus const type. +func PossibleResultStatusValues() []ResultStatus { + return []ResultStatus{ResultStatusCancelled, ResultStatusFailed, ResultStatusInterrupted, ResultStatusInvalid, ResultStatusPending, ResultStatusSucceeded} +} + +// RetentionPolicyType enumerates the values for retention policy type. +type RetentionPolicyType string + +const ( + // RetentionPolicyTypeBasic Indicates a basic retention policy type. + RetentionPolicyTypeBasic RetentionPolicyType = "Basic" + // RetentionPolicyTypeInvalid Indicates an invalid retention policy type. + RetentionPolicyTypeInvalid RetentionPolicyType = "Invalid" +) + +// PossibleRetentionPolicyTypeValues returns an array of possible values for the RetentionPolicyType const type. +func PossibleRetentionPolicyTypeValues() []RetentionPolicyType { + return []RetentionPolicyType{RetentionPolicyTypeBasic, RetentionPolicyTypeInvalid} +} + +// RetentionPolicyTypeBasicBasicRetentionPolicyDescription enumerates the values for retention policy type +// basic basic retention policy description. +type RetentionPolicyTypeBasicBasicRetentionPolicyDescription string + +const ( + // RetentionPolicyTypeBasic1 ... + RetentionPolicyTypeBasic1 RetentionPolicyTypeBasicBasicRetentionPolicyDescription = "Basic" + // RetentionPolicyTypeRetentionPolicyDescription ... + RetentionPolicyTypeRetentionPolicyDescription RetentionPolicyTypeBasicBasicRetentionPolicyDescription = "RetentionPolicyDescription" +) + +// PossibleRetentionPolicyTypeBasicBasicRetentionPolicyDescriptionValues returns an array of possible values for the RetentionPolicyTypeBasicBasicRetentionPolicyDescription const type. +func PossibleRetentionPolicyTypeBasicBasicRetentionPolicyDescriptionValues() []RetentionPolicyTypeBasicBasicRetentionPolicyDescription { + return []RetentionPolicyTypeBasicBasicRetentionPolicyDescription{RetentionPolicyTypeBasic1, RetentionPolicyTypeRetentionPolicyDescription} +} + +// RollingUpgradeMode enumerates the values for rolling upgrade mode. +type RollingUpgradeMode string + +const ( + // RollingUpgradeModeInvalid Indicates the upgrade mode is invalid. All Service Fabric enumerations have + // the invalid type. The value is zero. + RollingUpgradeModeInvalid RollingUpgradeMode = "Invalid" + // RollingUpgradeModeMonitored The upgrade will stop after completing each upgrade domain and automatically + // monitor health before proceeding. The value is 3 + RollingUpgradeModeMonitored RollingUpgradeMode = "Monitored" + // RollingUpgradeModeUnmonitoredAuto The upgrade will proceed automatically without performing any health + // monitoring. The value is 1 + RollingUpgradeModeUnmonitoredAuto RollingUpgradeMode = "UnmonitoredAuto" + // RollingUpgradeModeUnmonitoredManual The upgrade will stop after completing each upgrade domain, giving + // the opportunity to manually monitor health before proceeding. The value is 2 + RollingUpgradeModeUnmonitoredManual RollingUpgradeMode = "UnmonitoredManual" +) + +// PossibleRollingUpgradeModeValues returns an array of possible values for the RollingUpgradeMode const type. +func PossibleRollingUpgradeModeValues() []RollingUpgradeMode { + return []RollingUpgradeMode{RollingUpgradeModeInvalid, RollingUpgradeModeMonitored, RollingUpgradeModeUnmonitoredAuto, RollingUpgradeModeUnmonitoredManual} +} + +// SafetyCheckKind enumerates the values for safety check kind. +type SafetyCheckKind string + +const ( + // SafetyCheckKindEnsureAvailability Indicates that there is either a stateless service partition on the + // node having exactly one instance, or there is a primary replica on the node for which the partition is + // quorum loss. In both cases, bringing down the replicas due to upgrade will result in loss of + // availability. The value is 7. + SafetyCheckKindEnsureAvailability SafetyCheckKind = "EnsureAvailability" + // SafetyCheckKindEnsurePartitionQuorum Indicates that there is some partition for which if we bring down + // the replica on the node, it will result in quorum loss for that partition. The value is 2. + SafetyCheckKindEnsurePartitionQuorum SafetyCheckKind = "EnsurePartitionQuorum" + // SafetyCheckKindEnsureSeedNodeQuorum Indicates that if we bring down the node then this will result in + // global seed node quorum loss. The value is 1. + SafetyCheckKindEnsureSeedNodeQuorum SafetyCheckKind = "EnsureSeedNodeQuorum" + // SafetyCheckKindInvalid Indicates that the upgrade safety check kind is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. + SafetyCheckKindInvalid SafetyCheckKind = "Invalid" + // SafetyCheckKindWaitForInbuildReplica Indicates that there is either a replica on the node that is going + // through copy, or there is a primary replica on the node that is copying data to some other replica. In + // both cases, bringing down the replica on the node due to upgrade will abort the copy. The value is 6. + SafetyCheckKindWaitForInbuildReplica SafetyCheckKind = "WaitForInbuildReplica" + // SafetyCheckKindWaitForPrimaryPlacement Indicates that there is some replica on the node that was moved + // out of this node due to upgrade. Service Fabric is now waiting for the primary to be moved back to this + // node. The value is 3. + SafetyCheckKindWaitForPrimaryPlacement SafetyCheckKind = "WaitForPrimaryPlacement" + // SafetyCheckKindWaitForPrimarySwap Indicates that Service Fabric is waiting for a primary replica to be + // moved out of the node before starting upgrade on that node. The value is 4. + SafetyCheckKindWaitForPrimarySwap SafetyCheckKind = "WaitForPrimarySwap" + // SafetyCheckKindWaitForReconfiguration Indicates that there is some replica on the node that is involved + // in a reconfiguration. Service Fabric is waiting for the reconfiguration to be complete before staring + // upgrade on that node. The value is 5. + SafetyCheckKindWaitForReconfiguration SafetyCheckKind = "WaitForReconfiguration" +) + +// PossibleSafetyCheckKindValues returns an array of possible values for the SafetyCheckKind const type. +func PossibleSafetyCheckKindValues() []SafetyCheckKind { + return []SafetyCheckKind{SafetyCheckKindEnsureAvailability, SafetyCheckKindEnsurePartitionQuorum, SafetyCheckKindEnsureSeedNodeQuorum, SafetyCheckKindInvalid, SafetyCheckKindWaitForInbuildReplica, SafetyCheckKindWaitForPrimaryPlacement, SafetyCheckKindWaitForPrimarySwap, SafetyCheckKindWaitForReconfiguration} +} + +// ScalingMechanismKind enumerates the values for scaling mechanism kind. +type ScalingMechanismKind string + +const ( + // ScalingMechanismKindAddRemoveIncrementalNamedPartition Indicates a mechanism for scaling where new named + // partitions are added or removed from a service. The value is 2. + ScalingMechanismKindAddRemoveIncrementalNamedPartition ScalingMechanismKind = "AddRemoveIncrementalNamedPartition" + // ScalingMechanismKindInvalid Indicates the scaling mechanism is invalid. All Service Fabric enumerations + // have the invalid type. The value is zero. + ScalingMechanismKindInvalid ScalingMechanismKind = "Invalid" + // ScalingMechanismKindPartitionInstanceCount Indicates a mechanism for scaling where new instances are + // added or removed from a partition. The value is 1. + ScalingMechanismKindPartitionInstanceCount ScalingMechanismKind = "PartitionInstanceCount" +) + +// PossibleScalingMechanismKindValues returns an array of possible values for the ScalingMechanismKind const type. +func PossibleScalingMechanismKindValues() []ScalingMechanismKind { + return []ScalingMechanismKind{ScalingMechanismKindAddRemoveIncrementalNamedPartition, ScalingMechanismKindInvalid, ScalingMechanismKindPartitionInstanceCount} +} + +// ScalingTriggerKind enumerates the values for scaling trigger kind. +type ScalingTriggerKind string + +const ( + // ScalingTriggerKindAveragePartitionLoad Indicates a trigger where scaling decisions are made based on + // average load of a partition. The value is 1. + ScalingTriggerKindAveragePartitionLoad ScalingTriggerKind = "AveragePartitionLoad" + // ScalingTriggerKindAverageServiceLoad Indicates a trigger where scaling decisions are made based on + // average load of a service. The value is 2. + ScalingTriggerKindAverageServiceLoad ScalingTriggerKind = "AverageServiceLoad" + // ScalingTriggerKindInvalid Indicates the scaling trigger is invalid. All Service Fabric enumerations have + // the invalid type. The value is zero. + ScalingTriggerKindInvalid ScalingTriggerKind = "Invalid" +) + +// PossibleScalingTriggerKindValues returns an array of possible values for the ScalingTriggerKind const type. +func PossibleScalingTriggerKindValues() []ScalingTriggerKind { + return []ScalingTriggerKind{ScalingTriggerKindAveragePartitionLoad, ScalingTriggerKindAverageServiceLoad, ScalingTriggerKindInvalid} +} + +// ScheduleKind enumerates the values for schedule kind. +type ScheduleKind string + +const ( + // ScheduleKindBackupScheduleDescription ... + ScheduleKindBackupScheduleDescription ScheduleKind = "BackupScheduleDescription" + // ScheduleKindFrequencyBased ... + ScheduleKindFrequencyBased ScheduleKind = "FrequencyBased" + // ScheduleKindTimeBased ... + ScheduleKindTimeBased ScheduleKind = "TimeBased" +) + +// PossibleScheduleKindValues returns an array of possible values for the ScheduleKind const type. +func PossibleScheduleKindValues() []ScheduleKind { + return []ScheduleKind{ScheduleKindBackupScheduleDescription, ScheduleKindFrequencyBased, ScheduleKindTimeBased} +} + +// Scheme enumerates the values for scheme. +type Scheme string + +const ( + // HTTP Indicates that the probe is http. + HTTP Scheme = "http" + // HTTPS Indicates that the probe is https. No cert validation. + HTTPS Scheme = "https" +) + +// PossibleSchemeValues returns an array of possible values for the Scheme const type. +func PossibleSchemeValues() []Scheme { + return []Scheme{HTTP, HTTPS} +} + +// SecretKind enumerates the values for secret kind. +type SecretKind string + +const ( + // InlinedValue A simple secret resource whose plaintext value is provided by the user. + InlinedValue SecretKind = "inlinedValue" + // KeyVaultVersionedReference A secret resource that references a specific version of a secret stored in + // Azure Key Vault; the expected value is a versioned KeyVault URI corresponding to the version of the + // secret being referenced. + KeyVaultVersionedReference SecretKind = "keyVaultVersionedReference" +) + +// PossibleSecretKindValues returns an array of possible values for the SecretKind const type. +func PossibleSecretKindValues() []SecretKind { + return []SecretKind{InlinedValue, KeyVaultVersionedReference} +} + +// ServiceCorrelationScheme enumerates the values for service correlation scheme. +type ServiceCorrelationScheme string + +const ( + // ServiceCorrelationSchemeAffinity Indicates that this service has an affinity relationship with another + // service. Provided for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity + // options. The value is 1. + ServiceCorrelationSchemeAffinity ServiceCorrelationScheme = "Affinity" + // ServiceCorrelationSchemeAlignedAffinity Aligned affinity ensures that the primaries of the partitions of + // the affinitized services are collocated on the same nodes. This is the default and is the same as + // selecting the Affinity scheme. The value is 2. + ServiceCorrelationSchemeAlignedAffinity ServiceCorrelationScheme = "AlignedAffinity" + // ServiceCorrelationSchemeInvalid An invalid correlation scheme. Cannot be used. The value is zero. + ServiceCorrelationSchemeInvalid ServiceCorrelationScheme = "Invalid" + // ServiceCorrelationSchemeNonAlignedAffinity Non-Aligned affinity guarantees that all replicas of each + // service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas + // of particular role will be collocated. The value is 3. + ServiceCorrelationSchemeNonAlignedAffinity ServiceCorrelationScheme = "NonAlignedAffinity" +) + +// PossibleServiceCorrelationSchemeValues returns an array of possible values for the ServiceCorrelationScheme const type. +func PossibleServiceCorrelationSchemeValues() []ServiceCorrelationScheme { + return []ServiceCorrelationScheme{ServiceCorrelationSchemeAffinity, ServiceCorrelationSchemeAlignedAffinity, ServiceCorrelationSchemeInvalid, ServiceCorrelationSchemeNonAlignedAffinity} +} + +// ServiceEndpointRole enumerates the values for service endpoint role. +type ServiceEndpointRole string + +const ( + // ServiceEndpointRoleInvalid Indicates the service endpoint role is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. + ServiceEndpointRoleInvalid ServiceEndpointRole = "Invalid" + // ServiceEndpointRoleStatefulPrimary Indicates that the service endpoint is of a primary replica of a + // stateful service. The value is 2. + ServiceEndpointRoleStatefulPrimary ServiceEndpointRole = "StatefulPrimary" + // ServiceEndpointRoleStatefulSecondary Indicates that the service endpoint is of a secondary replica of a + // stateful service. The value is 3. + ServiceEndpointRoleStatefulSecondary ServiceEndpointRole = "StatefulSecondary" + // ServiceEndpointRoleStateless Indicates that the service endpoint is of a stateless service. The value is + // 1. + ServiceEndpointRoleStateless ServiceEndpointRole = "Stateless" +) + +// PossibleServiceEndpointRoleValues returns an array of possible values for the ServiceEndpointRole const type. +func PossibleServiceEndpointRoleValues() []ServiceEndpointRole { + return []ServiceEndpointRole{ServiceEndpointRoleInvalid, ServiceEndpointRoleStatefulPrimary, ServiceEndpointRoleStatefulSecondary, ServiceEndpointRoleStateless} +} + +// ServiceKind enumerates the values for service kind. +type ServiceKind string + +const ( + // ServiceKindInvalid Indicates the service kind is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + ServiceKindInvalid ServiceKind = "Invalid" + // ServiceKindStateful Uses Service Fabric to make its state or part of its state highly available and + // reliable. The value is 2. + ServiceKindStateful ServiceKind = "Stateful" + // ServiceKindStateless Does not use Service Fabric to make its state highly available or reliable. The + // value is 1. + ServiceKindStateless ServiceKind = "Stateless" +) + +// PossibleServiceKindValues returns an array of possible values for the ServiceKind const type. +func PossibleServiceKindValues() []ServiceKind { + return []ServiceKind{ServiceKindInvalid, ServiceKindStateful, ServiceKindStateless} +} + +// ServiceKindBasicDeployedServiceReplicaDetailInfo enumerates the values for service kind basic deployed +// service replica detail info. +type ServiceKindBasicDeployedServiceReplicaDetailInfo string + +const ( + // ServiceKindDeployedServiceReplicaDetailInfo ... + ServiceKindDeployedServiceReplicaDetailInfo ServiceKindBasicDeployedServiceReplicaDetailInfo = "DeployedServiceReplicaDetailInfo" + // ServiceKindStateful1 ... + ServiceKindStateful1 ServiceKindBasicDeployedServiceReplicaDetailInfo = "Stateful" + // ServiceKindStateless1 ... + ServiceKindStateless1 ServiceKindBasicDeployedServiceReplicaDetailInfo = "Stateless" +) + +// PossibleServiceKindBasicDeployedServiceReplicaDetailInfoValues returns an array of possible values for the ServiceKindBasicDeployedServiceReplicaDetailInfo const type. +func PossibleServiceKindBasicDeployedServiceReplicaDetailInfoValues() []ServiceKindBasicDeployedServiceReplicaDetailInfo { + return []ServiceKindBasicDeployedServiceReplicaDetailInfo{ServiceKindDeployedServiceReplicaDetailInfo, ServiceKindStateful1, ServiceKindStateless1} +} + +// ServiceKindBasicDeployedServiceReplicaInfo enumerates the values for service kind basic deployed service +// replica info. +type ServiceKindBasicDeployedServiceReplicaInfo string + +const ( + // ServiceKindBasicDeployedServiceReplicaInfoServiceKindDeployedServiceReplicaInfo ... + ServiceKindBasicDeployedServiceReplicaInfoServiceKindDeployedServiceReplicaInfo ServiceKindBasicDeployedServiceReplicaInfo = "DeployedServiceReplicaInfo" + // ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful ... + ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful ServiceKindBasicDeployedServiceReplicaInfo = "Stateful" + // ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless ... + ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless ServiceKindBasicDeployedServiceReplicaInfo = "Stateless" +) + +// PossibleServiceKindBasicDeployedServiceReplicaInfoValues returns an array of possible values for the ServiceKindBasicDeployedServiceReplicaInfo const type. +func PossibleServiceKindBasicDeployedServiceReplicaInfoValues() []ServiceKindBasicDeployedServiceReplicaInfo { + return []ServiceKindBasicDeployedServiceReplicaInfo{ServiceKindBasicDeployedServiceReplicaInfoServiceKindDeployedServiceReplicaInfo, ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful, ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless} +} + +// ServiceKindBasicReplicaHealth enumerates the values for service kind basic replica health. +type ServiceKindBasicReplicaHealth string + +const ( + // ServiceKindBasicReplicaHealthServiceKindReplicaHealth ... + ServiceKindBasicReplicaHealthServiceKindReplicaHealth ServiceKindBasicReplicaHealth = "ReplicaHealth" + // ServiceKindBasicReplicaHealthServiceKindStateful ... + ServiceKindBasicReplicaHealthServiceKindStateful ServiceKindBasicReplicaHealth = "Stateful" + // ServiceKindBasicReplicaHealthServiceKindStateless ... + ServiceKindBasicReplicaHealthServiceKindStateless ServiceKindBasicReplicaHealth = "Stateless" +) + +// PossibleServiceKindBasicReplicaHealthValues returns an array of possible values for the ServiceKindBasicReplicaHealth const type. +func PossibleServiceKindBasicReplicaHealthValues() []ServiceKindBasicReplicaHealth { + return []ServiceKindBasicReplicaHealth{ServiceKindBasicReplicaHealthServiceKindReplicaHealth, ServiceKindBasicReplicaHealthServiceKindStateful, ServiceKindBasicReplicaHealthServiceKindStateless} +} + +// ServiceKindBasicReplicaHealthState enumerates the values for service kind basic replica health state. +type ServiceKindBasicReplicaHealthState string + +const ( + // ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState ... + ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState ServiceKindBasicReplicaHealthState = "ReplicaHealthState" + // ServiceKindBasicReplicaHealthStateServiceKindStateful ... + ServiceKindBasicReplicaHealthStateServiceKindStateful ServiceKindBasicReplicaHealthState = "Stateful" + // ServiceKindBasicReplicaHealthStateServiceKindStateless ... + ServiceKindBasicReplicaHealthStateServiceKindStateless ServiceKindBasicReplicaHealthState = "Stateless" +) + +// PossibleServiceKindBasicReplicaHealthStateValues returns an array of possible values for the ServiceKindBasicReplicaHealthState const type. +func PossibleServiceKindBasicReplicaHealthStateValues() []ServiceKindBasicReplicaHealthState { + return []ServiceKindBasicReplicaHealthState{ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState, ServiceKindBasicReplicaHealthStateServiceKindStateful, ServiceKindBasicReplicaHealthStateServiceKindStateless} +} + +// ServiceKindBasicReplicaInfo enumerates the values for service kind basic replica info. +type ServiceKindBasicReplicaInfo string + +const ( + // ServiceKindBasicReplicaInfoServiceKindReplicaInfo ... + ServiceKindBasicReplicaInfoServiceKindReplicaInfo ServiceKindBasicReplicaInfo = "ReplicaInfo" + // ServiceKindBasicReplicaInfoServiceKindStateful ... + ServiceKindBasicReplicaInfoServiceKindStateful ServiceKindBasicReplicaInfo = "Stateful" + // ServiceKindBasicReplicaInfoServiceKindStateless ... + ServiceKindBasicReplicaInfoServiceKindStateless ServiceKindBasicReplicaInfo = "Stateless" +) + +// PossibleServiceKindBasicReplicaInfoValues returns an array of possible values for the ServiceKindBasicReplicaInfo const type. +func PossibleServiceKindBasicReplicaInfoValues() []ServiceKindBasicReplicaInfo { + return []ServiceKindBasicReplicaInfo{ServiceKindBasicReplicaInfoServiceKindReplicaInfo, ServiceKindBasicReplicaInfoServiceKindStateful, ServiceKindBasicReplicaInfoServiceKindStateless} +} + +// ServiceKindBasicServiceDescription enumerates the values for service kind basic service description. +type ServiceKindBasicServiceDescription string + +const ( + // ServiceKindBasicServiceDescriptionServiceKindServiceDescription ... + ServiceKindBasicServiceDescriptionServiceKindServiceDescription ServiceKindBasicServiceDescription = "ServiceDescription" + // ServiceKindBasicServiceDescriptionServiceKindStateful ... + ServiceKindBasicServiceDescriptionServiceKindStateful ServiceKindBasicServiceDescription = "Stateful" + // ServiceKindBasicServiceDescriptionServiceKindStateless ... + ServiceKindBasicServiceDescriptionServiceKindStateless ServiceKindBasicServiceDescription = "Stateless" +) + +// PossibleServiceKindBasicServiceDescriptionValues returns an array of possible values for the ServiceKindBasicServiceDescription const type. +func PossibleServiceKindBasicServiceDescriptionValues() []ServiceKindBasicServiceDescription { + return []ServiceKindBasicServiceDescription{ServiceKindBasicServiceDescriptionServiceKindServiceDescription, ServiceKindBasicServiceDescriptionServiceKindStateful, ServiceKindBasicServiceDescriptionServiceKindStateless} +} + +// ServiceKindBasicServiceInfo enumerates the values for service kind basic service info. +type ServiceKindBasicServiceInfo string + +const ( + // ServiceKindBasicServiceInfoServiceKindServiceInfo ... + ServiceKindBasicServiceInfoServiceKindServiceInfo ServiceKindBasicServiceInfo = "ServiceInfo" + // ServiceKindBasicServiceInfoServiceKindStateful ... + ServiceKindBasicServiceInfoServiceKindStateful ServiceKindBasicServiceInfo = "Stateful" + // ServiceKindBasicServiceInfoServiceKindStateless ... + ServiceKindBasicServiceInfoServiceKindStateless ServiceKindBasicServiceInfo = "Stateless" +) + +// PossibleServiceKindBasicServiceInfoValues returns an array of possible values for the ServiceKindBasicServiceInfo const type. +func PossibleServiceKindBasicServiceInfoValues() []ServiceKindBasicServiceInfo { + return []ServiceKindBasicServiceInfo{ServiceKindBasicServiceInfoServiceKindServiceInfo, ServiceKindBasicServiceInfoServiceKindStateful, ServiceKindBasicServiceInfoServiceKindStateless} +} + +// ServiceKindBasicServicePartitionInfo enumerates the values for service kind basic service partition info. +type ServiceKindBasicServicePartitionInfo string + +const ( + // ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo ... + ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo ServiceKindBasicServicePartitionInfo = "ServicePartitionInfo" + // ServiceKindBasicServicePartitionInfoServiceKindStateful ... + ServiceKindBasicServicePartitionInfoServiceKindStateful ServiceKindBasicServicePartitionInfo = "Stateful" + // ServiceKindBasicServicePartitionInfoServiceKindStateless ... + ServiceKindBasicServicePartitionInfoServiceKindStateless ServiceKindBasicServicePartitionInfo = "Stateless" +) + +// PossibleServiceKindBasicServicePartitionInfoValues returns an array of possible values for the ServiceKindBasicServicePartitionInfo const type. +func PossibleServiceKindBasicServicePartitionInfoValues() []ServiceKindBasicServicePartitionInfo { + return []ServiceKindBasicServicePartitionInfo{ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo, ServiceKindBasicServicePartitionInfoServiceKindStateful, ServiceKindBasicServicePartitionInfoServiceKindStateless} +} + +// ServiceKindBasicServiceUpdateDescription enumerates the values for service kind basic service update +// description. +type ServiceKindBasicServiceUpdateDescription string + +const ( + // ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription ... + ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription ServiceKindBasicServiceUpdateDescription = "ServiceUpdateDescription" + // ServiceKindBasicServiceUpdateDescriptionServiceKindStateful ... + ServiceKindBasicServiceUpdateDescriptionServiceKindStateful ServiceKindBasicServiceUpdateDescription = "Stateful" + // ServiceKindBasicServiceUpdateDescriptionServiceKindStateless ... + ServiceKindBasicServiceUpdateDescriptionServiceKindStateless ServiceKindBasicServiceUpdateDescription = "Stateless" +) + +// PossibleServiceKindBasicServiceUpdateDescriptionValues returns an array of possible values for the ServiceKindBasicServiceUpdateDescription const type. +func PossibleServiceKindBasicServiceUpdateDescriptionValues() []ServiceKindBasicServiceUpdateDescription { + return []ServiceKindBasicServiceUpdateDescription{ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription, ServiceKindBasicServiceUpdateDescriptionServiceKindStateful, ServiceKindBasicServiceUpdateDescriptionServiceKindStateless} +} + +// ServiceLoadMetricWeight enumerates the values for service load metric weight. +type ServiceLoadMetricWeight string + +const ( + // ServiceLoadMetricWeightHigh Specifies the metric weight of the service load as High. The value is 3. + ServiceLoadMetricWeightHigh ServiceLoadMetricWeight = "High" + // ServiceLoadMetricWeightLow Specifies the metric weight of the service load as Low. The value is 1. + ServiceLoadMetricWeightLow ServiceLoadMetricWeight = "Low" + // ServiceLoadMetricWeightMedium Specifies the metric weight of the service load as Medium. The value is 2. + ServiceLoadMetricWeightMedium ServiceLoadMetricWeight = "Medium" + // ServiceLoadMetricWeightZero Disables resource balancing for this metric. This value is zero. + ServiceLoadMetricWeightZero ServiceLoadMetricWeight = "Zero" +) + +// PossibleServiceLoadMetricWeightValues returns an array of possible values for the ServiceLoadMetricWeight const type. +func PossibleServiceLoadMetricWeightValues() []ServiceLoadMetricWeight { + return []ServiceLoadMetricWeight{ServiceLoadMetricWeightHigh, ServiceLoadMetricWeightLow, ServiceLoadMetricWeightMedium, ServiceLoadMetricWeightZero} +} + +// ServiceOperationName enumerates the values for service operation name. +type ServiceOperationName string + +const ( + // ServiceOperationNameAbort The service replica or instance is being aborted. + ServiceOperationNameAbort ServiceOperationName = "Abort" + // ServiceOperationNameChangeRole The service replica is changing roles. + ServiceOperationNameChangeRole ServiceOperationName = "ChangeRole" + // ServiceOperationNameClose The service replica or instance is being closed. + ServiceOperationNameClose ServiceOperationName = "Close" + // ServiceOperationNameNone The service replica or instance is not going through any life-cycle changes. + ServiceOperationNameNone ServiceOperationName = "None" + // ServiceOperationNameOpen The service replica or instance is being opened. + ServiceOperationNameOpen ServiceOperationName = "Open" + // ServiceOperationNameUnknown Reserved for future use. + ServiceOperationNameUnknown ServiceOperationName = "Unknown" +) + +// PossibleServiceOperationNameValues returns an array of possible values for the ServiceOperationName const type. +func PossibleServiceOperationNameValues() []ServiceOperationName { + return []ServiceOperationName{ServiceOperationNameAbort, ServiceOperationNameChangeRole, ServiceOperationNameClose, ServiceOperationNameNone, ServiceOperationNameOpen, ServiceOperationNameUnknown} +} + +// ServicePackageActivationMode enumerates the values for service package activation mode. +type ServicePackageActivationMode string + +const ( + // ExclusiveProcess With this activation mode, each replica or instance of service, on a given node, will + // have its own dedicated activation of service package on a node. The value is 1. + ExclusiveProcess ServicePackageActivationMode = "ExclusiveProcess" + // SharedProcess This is the default activation mode. With this activation mode, replicas or instances from + // different partition(s) of service, on a given node, will share same activation of service package on a + // node. The value is zero. + SharedProcess ServicePackageActivationMode = "SharedProcess" +) + +// PossibleServicePackageActivationModeValues returns an array of possible values for the ServicePackageActivationMode const type. +func PossibleServicePackageActivationModeValues() []ServicePackageActivationMode { + return []ServicePackageActivationMode{ExclusiveProcess, SharedProcess} +} + +// ServicePartitionKind enumerates the values for service partition kind. +type ServicePartitionKind string + +const ( + // ServicePartitionKindInt64Range Indicates that the partition is based on Int64 key ranges, and + // UniformInt64RangePartitionSchemeDescription was specified while creating the service. The value is 2. + ServicePartitionKindInt64Range ServicePartitionKind = "Int64Range" + // ServicePartitionKindInvalid Indicates the partition kind is invalid. All Service Fabric enumerations + // have the invalid type. The value is zero. + ServicePartitionKindInvalid ServicePartitionKind = "Invalid" + // ServicePartitionKindNamed Indicates that the partition is based on string names, and + // NamedPartitionInformation was specified while creating the service. The value is 3. + ServicePartitionKindNamed ServicePartitionKind = "Named" + // ServicePartitionKindSingleton Indicates that there is only one partition, and + // SingletonPartitionSchemeDescription was specified while creating the service. The value is 1. + ServicePartitionKindSingleton ServicePartitionKind = "Singleton" +) + +// PossibleServicePartitionKindValues returns an array of possible values for the ServicePartitionKind const type. +func PossibleServicePartitionKindValues() []ServicePartitionKind { + return []ServicePartitionKind{ServicePartitionKindInt64Range, ServicePartitionKindInvalid, ServicePartitionKindNamed, ServicePartitionKindSingleton} +} + +// ServicePartitionKindBasicPartitionInformation enumerates the values for service partition kind basic +// partition information. +type ServicePartitionKindBasicPartitionInformation string + +const ( + // ServicePartitionKindInt64Range1 ... + ServicePartitionKindInt64Range1 ServicePartitionKindBasicPartitionInformation = "Int64Range" + // ServicePartitionKindNamed1 ... + ServicePartitionKindNamed1 ServicePartitionKindBasicPartitionInformation = "Named" + // ServicePartitionKindPartitionInformation ... + ServicePartitionKindPartitionInformation ServicePartitionKindBasicPartitionInformation = "PartitionInformation" + // ServicePartitionKindSingleton1 ... + ServicePartitionKindSingleton1 ServicePartitionKindBasicPartitionInformation = "Singleton" +) + +// PossibleServicePartitionKindBasicPartitionInformationValues returns an array of possible values for the ServicePartitionKindBasicPartitionInformation const type. +func PossibleServicePartitionKindBasicPartitionInformationValues() []ServicePartitionKindBasicPartitionInformation { + return []ServicePartitionKindBasicPartitionInformation{ServicePartitionKindInt64Range1, ServicePartitionKindNamed1, ServicePartitionKindPartitionInformation, ServicePartitionKindSingleton1} +} + +// ServicePartitionStatus enumerates the values for service partition status. +type ServicePartitionStatus string + +const ( + // ServicePartitionStatusDeleting Indicates that the partition is being deleted. The value is 5. + ServicePartitionStatusDeleting ServicePartitionStatus = "Deleting" + // ServicePartitionStatusInQuorumLoss Indicates that the partition is in quorum loss. This means that + // number of replicas that are up and participating in a replica set is less than MinReplicaSetSize for + // this partition. The value is 3. + ServicePartitionStatusInQuorumLoss ServicePartitionStatus = "InQuorumLoss" + // ServicePartitionStatusInvalid Indicates the partition status is invalid. All Service Fabric enumerations + // have the invalid type. The value is zero. + ServicePartitionStatusInvalid ServicePartitionStatus = "Invalid" + // ServicePartitionStatusNotReady Indicates that the partition is not ready. This status is returned when + // none of the other states apply. The value is 2. + ServicePartitionStatusNotReady ServicePartitionStatus = "NotReady" + // ServicePartitionStatusReady Indicates that the partition is ready. This means that for a stateless + // service partition there is at least one instance that is up and for a stateful service partition the + // number of ready replicas is greater than or equal to the MinReplicaSetSize. The value is 1. + ServicePartitionStatusReady ServicePartitionStatus = "Ready" + // ServicePartitionStatusReconfiguring Indicates that the partition is undergoing reconfiguration of its + // replica sets. This can happen due to failover, upgrade, load balancing or addition or removal of + // replicas from the replica set. The value is 4. + ServicePartitionStatusReconfiguring ServicePartitionStatus = "Reconfiguring" +) + +// PossibleServicePartitionStatusValues returns an array of possible values for the ServicePartitionStatus const type. +func PossibleServicePartitionStatusValues() []ServicePartitionStatus { + return []ServicePartitionStatus{ServicePartitionStatusDeleting, ServicePartitionStatusInQuorumLoss, ServicePartitionStatusInvalid, ServicePartitionStatusNotReady, ServicePartitionStatusReady, ServicePartitionStatusReconfiguring} +} + +// ServicePlacementPolicyType enumerates the values for service placement policy type. +type ServicePlacementPolicyType string + +const ( + // ServicePlacementPolicyTypeInvalid Indicates the type of the placement policy is invalid. All Service + // Fabric enumerations have the invalid type. The value is zero. + ServicePlacementPolicyTypeInvalid ServicePlacementPolicyType = "Invalid" + // ServicePlacementPolicyTypeInvalidDomain Indicates that the ServicePlacementPolicyDescription is of type + // ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade + // domain cannot be used for placement of this service. The value is 1. + ServicePlacementPolicyTypeInvalidDomain ServicePlacementPolicyType = "InvalidDomain" + // ServicePlacementPolicyTypeNonPartiallyPlaceService Indicates that the ServicePlacementPolicyDescription + // is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible + // all replicas of a particular partition of the service should be placed atomically. The value is 5. + ServicePlacementPolicyTypeNonPartiallyPlaceService ServicePlacementPolicyType = "NonPartiallyPlaceService" + // ServicePlacementPolicyTypePreferPrimaryDomain Indicates that the ServicePlacementPolicyDescription is of + // type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary + // replica for the partitions of the service should be located in a particular domain as an optimization. + // The value is 3. + ServicePlacementPolicyTypePreferPrimaryDomain ServicePlacementPolicyType = "PreferPrimaryDomain" + // ServicePlacementPolicyTypeRequireDomain Indicates that the ServicePlacementPolicyDescription is of type + // ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service + // must be placed in a specific domain. The value is 2. + ServicePlacementPolicyTypeRequireDomain ServicePlacementPolicyType = "RequireDomain" + // ServicePlacementPolicyTypeRequireDomainDistribution Indicates that the ServicePlacementPolicyDescription + // is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will + // disallow placement of any two replicas from the same partition in the same domain at any time. The value + // is 4. + ServicePlacementPolicyTypeRequireDomainDistribution ServicePlacementPolicyType = "RequireDomainDistribution" +) + +// PossibleServicePlacementPolicyTypeValues returns an array of possible values for the ServicePlacementPolicyType const type. +func PossibleServicePlacementPolicyTypeValues() []ServicePlacementPolicyType { + return []ServicePlacementPolicyType{ServicePlacementPolicyTypeInvalid, ServicePlacementPolicyTypeInvalidDomain, ServicePlacementPolicyTypeNonPartiallyPlaceService, ServicePlacementPolicyTypePreferPrimaryDomain, ServicePlacementPolicyTypeRequireDomain, ServicePlacementPolicyTypeRequireDomainDistribution} +} + +// ServiceStatus enumerates the values for service status. +type ServiceStatus string + +const ( + // ServiceStatusActive Indicates the service status is active. The value is 1. + ServiceStatusActive ServiceStatus = "Active" + // ServiceStatusCreating Indicates the service is being created. The value is 4. + ServiceStatusCreating ServiceStatus = "Creating" + // ServiceStatusDeleting Indicates the service is being deleted. The value is 3. + ServiceStatusDeleting ServiceStatus = "Deleting" + // ServiceStatusFailed Indicates creation or deletion was terminated due to persistent failures. Another + // create/delete request can be accepted. The value is 5. + ServiceStatusFailed ServiceStatus = "Failed" + // ServiceStatusUnknown Indicates the service status is unknown. The value is zero. + ServiceStatusUnknown ServiceStatus = "Unknown" + // ServiceStatusUpgrading Indicates the service is upgrading. The value is 2. + ServiceStatusUpgrading ServiceStatus = "Upgrading" +) + +// PossibleServiceStatusValues returns an array of possible values for the ServiceStatus const type. +func PossibleServiceStatusValues() []ServiceStatus { + return []ServiceStatus{ServiceStatusActive, ServiceStatusCreating, ServiceStatusDeleting, ServiceStatusFailed, ServiceStatusUnknown, ServiceStatusUpgrading} +} + +// ServiceTypeRegistrationStatus enumerates the values for service type registration status. +type ServiceTypeRegistrationStatus string + +const ( + // ServiceTypeRegistrationStatusDisabled Indicates that the service type is disabled on this node. A type + // gets disabled when there are too many failures of the code package hosting the service type. If the + // service type is disabled, new replicas of that service type will not be placed on the node until it is + // enabled again. The service type is enabled again after the process hosting it comes up and re-registers + // the type or a preconfigured time interval has passed. The value is 1. + ServiceTypeRegistrationStatusDisabled ServiceTypeRegistrationStatus = "Disabled" + // ServiceTypeRegistrationStatusEnabled Indicates that the service type is enabled on this node. Replicas + // of this service type can be placed on this node when the code package registers the service type. The + // value is 2. + ServiceTypeRegistrationStatusEnabled ServiceTypeRegistrationStatus = "Enabled" + // ServiceTypeRegistrationStatusInvalid Indicates the registration status is invalid. All Service Fabric + // enumerations have the invalid type. The value is zero. + ServiceTypeRegistrationStatusInvalid ServiceTypeRegistrationStatus = "Invalid" + // ServiceTypeRegistrationStatusRegistered Indicates that the service type is enabled and registered on the + // node by a code package. Replicas of this service type can now be placed on this node. The value is 3. + ServiceTypeRegistrationStatusRegistered ServiceTypeRegistrationStatus = "Registered" +) + +// PossibleServiceTypeRegistrationStatusValues returns an array of possible values for the ServiceTypeRegistrationStatus const type. +func PossibleServiceTypeRegistrationStatusValues() []ServiceTypeRegistrationStatus { + return []ServiceTypeRegistrationStatus{ServiceTypeRegistrationStatusDisabled, ServiceTypeRegistrationStatusEnabled, ServiceTypeRegistrationStatusInvalid, ServiceTypeRegistrationStatusRegistered} +} + +// SettingType enumerates the values for setting type. +type SettingType string + +const ( + // SettingTypeClearText The setting in clear text, will not be processed in any way and passed in as is + SettingTypeClearText SettingType = "ClearText" + // SettingTypeKeyVaultReference The URI to a KeyVault secret version, will be resolved using the + // application's managed identity (this type is only valid if the app was assigned a managed identity) + // before getting passed in + SettingTypeKeyVaultReference SettingType = "KeyVaultReference" + // SettingTypeSecretValueReference The reference to a SecretValue resource, will be resolved before getting + // passed in + SettingTypeSecretValueReference SettingType = "SecretValueReference" +) + +// PossibleSettingTypeValues returns an array of possible values for the SettingType const type. +func PossibleSettingTypeValues() []SettingType { + return []SettingType{SettingTypeClearText, SettingTypeKeyVaultReference, SettingTypeSecretValueReference} +} + +// SizeTypes enumerates the values for size types. +type SizeTypes string + +const ( + // SizeTypesLarge ... + SizeTypesLarge SizeTypes = "Large" + // SizeTypesMedium ... + SizeTypesMedium SizeTypes = "Medium" + // SizeTypesSmall ... + SizeTypesSmall SizeTypes = "Small" +) + +// PossibleSizeTypesValues returns an array of possible values for the SizeTypes const type. +func PossibleSizeTypesValues() []SizeTypes { + return []SizeTypes{SizeTypesLarge, SizeTypesMedium, SizeTypesSmall} +} + +// State enumerates the values for state. +type State string + +const ( + // StateApproved Indicates that the repair task has been approved by the Repair Manager and is safe to + // execute. + StateApproved State = "Approved" + // StateClaimed Indicates that the repair task has been claimed by a repair executor. + StateClaimed State = "Claimed" + // StateCompleted Indicates that the repair task has completed, and no further state changes will occur. + StateCompleted State = "Completed" + // StateCreated Indicates that the repair task has been created. + StateCreated State = "Created" + // StateExecuting Indicates that execution of the repair task is in progress. + StateExecuting State = "Executing" + // StateInvalid Indicates that the repair task state is invalid. All Service Fabric enumerations have the + // invalid value. + StateInvalid State = "Invalid" + // StatePreparing Indicates that the Repair Manager is preparing the system to handle the impact of the + // repair task, usually by taking resources offline gracefully. + StatePreparing State = "Preparing" + // StateRestoring Indicates that the Repair Manager is restoring the system to its pre-repair state, + // usually by bringing resources back online. + StateRestoring State = "Restoring" +) + +// PossibleStateValues returns an array of possible values for the State const type. +func PossibleStateValues() []State { + return []State{StateApproved, StateClaimed, StateCompleted, StateCreated, StateExecuting, StateInvalid, StatePreparing, StateRestoring} +} + +// StorageKind enumerates the values for storage kind. +type StorageKind string + +const ( + // StorageKindAzureBlobStore ... + StorageKindAzureBlobStore StorageKind = "AzureBlobStore" + // StorageKindBackupStorageDescription ... + StorageKindBackupStorageDescription StorageKind = "BackupStorageDescription" + // StorageKindFileShare ... + StorageKindFileShare StorageKind = "FileShare" +) + +// PossibleStorageKindValues returns an array of possible values for the StorageKind const type. +func PossibleStorageKindValues() []StorageKind { + return []StorageKind{StorageKindAzureBlobStore, StorageKindBackupStorageDescription, StorageKindFileShare} +} + +// Type enumerates the values for type. +type Type string + +const ( + // TypeInvalidDomain ... + TypeInvalidDomain Type = "InvalidDomain" + // TypeNonPartiallyPlaceService ... + TypeNonPartiallyPlaceService Type = "NonPartiallyPlaceService" + // TypePreferPrimaryDomain ... + TypePreferPrimaryDomain Type = "PreferPrimaryDomain" + // TypeRequireDomain ... + TypeRequireDomain Type = "RequireDomain" + // TypeRequireDomainDistribution ... + TypeRequireDomainDistribution Type = "RequireDomainDistribution" + // TypeServicePlacementPolicyDescription ... + TypeServicePlacementPolicyDescription Type = "ServicePlacementPolicyDescription" +) + +// PossibleTypeValues returns an array of possible values for the Type const type. +func PossibleTypeValues() []Type { + return []Type{TypeInvalidDomain, TypeNonPartiallyPlaceService, TypePreferPrimaryDomain, TypeRequireDomain, TypeRequireDomainDistribution, TypeServicePlacementPolicyDescription} +} + +// TypeBasicExecutionPolicy enumerates the values for type basic execution policy. +type TypeBasicExecutionPolicy string + +const ( + // TypeExecutionPolicy ... + TypeExecutionPolicy TypeBasicExecutionPolicy = "ExecutionPolicy" + // TypeRunToCompletion ... + TypeRunToCompletion TypeBasicExecutionPolicy = "runToCompletion" +) + +// PossibleTypeBasicExecutionPolicyValues returns an array of possible values for the TypeBasicExecutionPolicy const type. +func PossibleTypeBasicExecutionPolicyValues() []TypeBasicExecutionPolicy { + return []TypeBasicExecutionPolicy{TypeExecutionPolicy, TypeRunToCompletion} +} + +// UpgradeDomainState enumerates the values for upgrade domain state. +type UpgradeDomainState string + +const ( + // UpgradeDomainStateCompleted The upgrade domain has completed upgrade. The value is 3 + UpgradeDomainStateCompleted UpgradeDomainState = "Completed" + // UpgradeDomainStateInProgress The upgrade domain is being upgraded but not complete yet. The value is 2 + UpgradeDomainStateInProgress UpgradeDomainState = "InProgress" + // UpgradeDomainStateInvalid Indicates the upgrade domain state is invalid. All Service Fabric enumerations + // have the invalid type. The value is zero. + UpgradeDomainStateInvalid UpgradeDomainState = "Invalid" + // UpgradeDomainStatePending The upgrade domain has not started upgrading yet. The value is 1 + UpgradeDomainStatePending UpgradeDomainState = "Pending" +) + +// PossibleUpgradeDomainStateValues returns an array of possible values for the UpgradeDomainState const type. +func PossibleUpgradeDomainStateValues() []UpgradeDomainState { + return []UpgradeDomainState{UpgradeDomainStateCompleted, UpgradeDomainStateInProgress, UpgradeDomainStateInvalid, UpgradeDomainStatePending} +} + +// UpgradeKind enumerates the values for upgrade kind. +type UpgradeKind string + +const ( + // UpgradeKindInvalid Indicates the upgrade kind is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + UpgradeKindInvalid UpgradeKind = "Invalid" + // UpgradeKindRolling The upgrade progresses one upgrade domain at a time. The value is 1 + UpgradeKindRolling UpgradeKind = "Rolling" +) + +// PossibleUpgradeKindValues returns an array of possible values for the UpgradeKind const type. +func PossibleUpgradeKindValues() []UpgradeKind { + return []UpgradeKind{UpgradeKindInvalid, UpgradeKindRolling} +} + +// UpgradeMode enumerates the values for upgrade mode. +type UpgradeMode string + +const ( + // UpgradeModeInvalid Indicates the upgrade mode is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + UpgradeModeInvalid UpgradeMode = "Invalid" + // UpgradeModeMonitored The upgrade will stop after completing each upgrade domain and automatically + // monitor health before proceeding. The value is 3 + UpgradeModeMonitored UpgradeMode = "Monitored" + // UpgradeModeUnmonitoredAuto The upgrade will proceed automatically without performing any health + // monitoring. The value is 1 + UpgradeModeUnmonitoredAuto UpgradeMode = "UnmonitoredAuto" + // UpgradeModeUnmonitoredManual The upgrade will stop after completing each upgrade domain, giving the + // opportunity to manually monitor health before proceeding. The value is 2 + UpgradeModeUnmonitoredManual UpgradeMode = "UnmonitoredManual" +) + +// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type. +func PossibleUpgradeModeValues() []UpgradeMode { + return []UpgradeMode{UpgradeModeInvalid, UpgradeModeMonitored, UpgradeModeUnmonitoredAuto, UpgradeModeUnmonitoredManual} +} + +// UpgradeSortOrder enumerates the values for upgrade sort order. +type UpgradeSortOrder string + +const ( + // UpgradeSortOrderDefault Indicates that the default sort order (as specified in cluster manifest) will be + // used. The value is 1. + UpgradeSortOrderDefault UpgradeSortOrder = "Default" + // UpgradeSortOrderInvalid Indicates that this sort order is not valid. All Service Fabric enumerations + // have the invalid type. The value is 0. + UpgradeSortOrderInvalid UpgradeSortOrder = "Invalid" + // UpgradeSortOrderLexicographical Indicates that forward lexicographical sort order (UD names sorted as + // strings) will be used. The value is 3. + UpgradeSortOrderLexicographical UpgradeSortOrder = "Lexicographical" + // UpgradeSortOrderNumeric Indicates that forward numeric sort order (UD names sorted as numbers) will be + // used. The value is 2. + UpgradeSortOrderNumeric UpgradeSortOrder = "Numeric" + // UpgradeSortOrderReverseLexicographical Indicates that reverse lexicographical sort order (UD names + // sorted as strings) will be used. The value is 5. + UpgradeSortOrderReverseLexicographical UpgradeSortOrder = "ReverseLexicographical" + // UpgradeSortOrderReverseNumeric Indicates that reverse numeric sort order (UD names sorted as numbers) + // will be used. The value is 4. + UpgradeSortOrderReverseNumeric UpgradeSortOrder = "ReverseNumeric" +) + +// PossibleUpgradeSortOrderValues returns an array of possible values for the UpgradeSortOrder const type. +func PossibleUpgradeSortOrderValues() []UpgradeSortOrder { + return []UpgradeSortOrder{UpgradeSortOrderDefault, UpgradeSortOrderInvalid, UpgradeSortOrderLexicographical, UpgradeSortOrderNumeric, UpgradeSortOrderReverseLexicographical, UpgradeSortOrderReverseNumeric} +} + +// UpgradeState enumerates the values for upgrade state. +type UpgradeState string + +const ( + // UpgradeStateFailed The upgrade has failed and is unable to execute FailureAction. The value is 6 + UpgradeStateFailed UpgradeState = "Failed" + // UpgradeStateInvalid Indicates the upgrade state is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + UpgradeStateInvalid UpgradeState = "Invalid" + // UpgradeStateRollingBackCompleted The upgrade has finished rolling back. The value is 2 + UpgradeStateRollingBackCompleted UpgradeState = "RollingBackCompleted" + // UpgradeStateRollingBackInProgress The upgrade is rolling back to the previous version but is not + // complete yet. The value is 1 + UpgradeStateRollingBackInProgress UpgradeState = "RollingBackInProgress" + // UpgradeStateRollingForwardCompleted The upgrade has finished rolling forward. The value is 5 + UpgradeStateRollingForwardCompleted UpgradeState = "RollingForwardCompleted" + // UpgradeStateRollingForwardInProgress The upgrade is rolling forward to the target version but is not + // complete yet. The value is 4 + UpgradeStateRollingForwardInProgress UpgradeState = "RollingForwardInProgress" + // UpgradeStateRollingForwardPending The current upgrade domain has finished upgrading. The overall upgrade + // is waiting for an explicit move next request in UnmonitoredManual mode or performing health checks in + // Monitored mode. The value is 3 + UpgradeStateRollingForwardPending UpgradeState = "RollingForwardPending" +) + +// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type. +func PossibleUpgradeStateValues() []UpgradeState { + return []UpgradeState{UpgradeStateFailed, UpgradeStateInvalid, UpgradeStateRollingBackCompleted, UpgradeStateRollingBackInProgress, UpgradeStateRollingForwardCompleted, UpgradeStateRollingForwardInProgress, UpgradeStateRollingForwardPending} +} + +// UpgradeType enumerates the values for upgrade type. +type UpgradeType string + +const ( + // UpgradeTypeInvalid Indicates the upgrade kind is invalid. All Service Fabric enumerations have the + // invalid type. The value is zero. + UpgradeTypeInvalid UpgradeType = "Invalid" + // UpgradeTypeRolling The upgrade progresses one upgrade domain at a time. The value is 1. + UpgradeTypeRolling UpgradeType = "Rolling" + // UpgradeTypeRollingForceRestart The upgrade gets restarted by force. The value is 2. + UpgradeTypeRollingForceRestart UpgradeType = "Rolling_ForceRestart" +) + +// PossibleUpgradeTypeValues returns an array of possible values for the UpgradeType const type. +func PossibleUpgradeTypeValues() []UpgradeType { + return []UpgradeType{UpgradeTypeInvalid, UpgradeTypeRolling, UpgradeTypeRollingForceRestart} +} + +// VolumeProvider enumerates the values for volume provider. +type VolumeProvider string + +const ( + // SFAzureFile Provides volumes that are backed by Azure Files. + SFAzureFile VolumeProvider = "SFAzureFile" +) + +// PossibleVolumeProviderValues returns an array of possible values for the VolumeProvider const type. +func PossibleVolumeProviderValues() []VolumeProvider { + return []VolumeProvider{SFAzureFile} +} + +// AadMetadata azure Active Directory metadata used for secured connection to cluster. +type AadMetadata struct { + // Authority - The AAD authority url. + Authority *string `json:"authority,omitempty"` + // Client - The AAD client application Id. + Client *string `json:"client,omitempty"` + // Cluster - The AAD cluster application Id. + Cluster *string `json:"cluster,omitempty"` + // Login - The AAD login url. + Login *string `json:"login,omitempty"` + // Redirect - The client application redirect address. + Redirect *string `json:"redirect,omitempty"` + // Tenant - The AAD tenant Id. + Tenant *string `json:"tenant,omitempty"` +} + +// AadMetadataObject azure Active Directory metadata object used for secured connection to cluster. +type AadMetadataObject struct { + autorest.Response `json:"-"` + // Type - The client authentication method. + Type *string `json:"type,omitempty"` + // Metadata - Azure Active Directory metadata used for secured connection to cluster. + Metadata *AadMetadata `json:"metadata,omitempty"` +} + +// AddRemoveIncrementalNamedPartitionScalingMechanism represents a scaling mechanism for adding or removing +// named partitions of a stateless service. Partition names are in the format '0','1''N-1' +type AddRemoveIncrementalNamedPartitionScalingMechanism struct { + // MinPartitionCount - Minimum number of named partitions of the service. + MinPartitionCount *int32 `json:"MinPartitionCount,omitempty"` + // MaxPartitionCount - Maximum number of named partitions of the service. + MaxPartitionCount *int32 `json:"MaxPartitionCount,omitempty"` + // ScaleIncrement - The number of instances to add or remove during a scaling operation. + ScaleIncrement *int32 `json:"ScaleIncrement,omitempty"` + // Kind - Possible values include: 'KindScalingMechanismDescription', 'KindPartitionInstanceCount', 'KindAddRemoveIncrementalNamedPartition' + Kind KindBasicScalingMechanismDescription `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AddRemoveIncrementalNamedPartitionScalingMechanism. +func (arinpsm AddRemoveIncrementalNamedPartitionScalingMechanism) MarshalJSON() ([]byte, error) { + arinpsm.Kind = KindAddRemoveIncrementalNamedPartition + objectMap := make(map[string]interface{}) + if arinpsm.MinPartitionCount != nil { + objectMap["MinPartitionCount"] = arinpsm.MinPartitionCount + } + if arinpsm.MaxPartitionCount != nil { + objectMap["MaxPartitionCount"] = arinpsm.MaxPartitionCount + } + if arinpsm.ScaleIncrement != nil { + objectMap["ScaleIncrement"] = arinpsm.ScaleIncrement + } + if arinpsm.Kind != "" { + objectMap["Kind"] = arinpsm.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionInstanceCountScaleMechanism is the BasicScalingMechanismDescription implementation for AddRemoveIncrementalNamedPartitionScalingMechanism. +func (arinpsm AddRemoveIncrementalNamedPartitionScalingMechanism) AsPartitionInstanceCountScaleMechanism() (*PartitionInstanceCountScaleMechanism, bool) { + return nil, false +} + +// AsAddRemoveIncrementalNamedPartitionScalingMechanism is the BasicScalingMechanismDescription implementation for AddRemoveIncrementalNamedPartitionScalingMechanism. +func (arinpsm AddRemoveIncrementalNamedPartitionScalingMechanism) AsAddRemoveIncrementalNamedPartitionScalingMechanism() (*AddRemoveIncrementalNamedPartitionScalingMechanism, bool) { + return &arinpsm, true +} + +// AsScalingMechanismDescription is the BasicScalingMechanismDescription implementation for AddRemoveIncrementalNamedPartitionScalingMechanism. +func (arinpsm AddRemoveIncrementalNamedPartitionScalingMechanism) AsScalingMechanismDescription() (*ScalingMechanismDescription, bool) { + return nil, false +} + +// AsBasicScalingMechanismDescription is the BasicScalingMechanismDescription implementation for AddRemoveIncrementalNamedPartitionScalingMechanism. +func (arinpsm AddRemoveIncrementalNamedPartitionScalingMechanism) AsBasicScalingMechanismDescription() (BasicScalingMechanismDescription, bool) { + return &arinpsm, true +} + +// AddRemoveReplicaScalingMechanism describes the horizontal auto scaling mechanism that adds or removes +// replicas (containers or container groups). +type AddRemoveReplicaScalingMechanism struct { + // MinCount - Minimum number of containers (scale down won't be performed below this number). + MinCount *int32 `json:"minCount,omitempty"` + // MaxCount - Maximum number of containers (scale up won't be performed above this number). + MaxCount *int32 `json:"maxCount,omitempty"` + // ScaleIncrement - Each time auto scaling is performed, this number of containers will be added or removed. + ScaleIncrement *int32 `json:"scaleIncrement,omitempty"` + // Kind - Possible values include: 'KindAutoScalingMechanism', 'KindAddRemoveReplica' + Kind KindBasicAutoScalingMechanism `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AddRemoveReplicaScalingMechanism. +func (arrsm AddRemoveReplicaScalingMechanism) MarshalJSON() ([]byte, error) { + arrsm.Kind = KindAddRemoveReplica + objectMap := make(map[string]interface{}) + if arrsm.MinCount != nil { + objectMap["minCount"] = arrsm.MinCount + } + if arrsm.MaxCount != nil { + objectMap["maxCount"] = arrsm.MaxCount + } + if arrsm.ScaleIncrement != nil { + objectMap["scaleIncrement"] = arrsm.ScaleIncrement + } + if arrsm.Kind != "" { + objectMap["kind"] = arrsm.Kind + } + return json.Marshal(objectMap) +} + +// AsAddRemoveReplicaScalingMechanism is the BasicAutoScalingMechanism implementation for AddRemoveReplicaScalingMechanism. +func (arrsm AddRemoveReplicaScalingMechanism) AsAddRemoveReplicaScalingMechanism() (*AddRemoveReplicaScalingMechanism, bool) { + return &arrsm, true +} + +// AsAutoScalingMechanism is the BasicAutoScalingMechanism implementation for AddRemoveReplicaScalingMechanism. +func (arrsm AddRemoveReplicaScalingMechanism) AsAutoScalingMechanism() (*AutoScalingMechanism, bool) { + return nil, false +} + +// AsBasicAutoScalingMechanism is the BasicAutoScalingMechanism implementation for AddRemoveReplicaScalingMechanism. +func (arrsm AddRemoveReplicaScalingMechanism) AsBasicAutoScalingMechanism() (BasicAutoScalingMechanism, bool) { + return &arrsm, true +} + +// AnalysisEventMetadata metadata about an Analysis Event. +type AnalysisEventMetadata struct { + // Delay - The analysis delay. + Delay *string `json:"Delay,omitempty"` + // Duration - The duration of analysis. + Duration *string `json:"Duration,omitempty"` +} + +// ApplicationBackupConfigurationInfo backup configuration information for a specific Service Fabric +// application specifying what backup policy is being applied and suspend description, if any. +type ApplicationBackupConfigurationInfo struct { + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // PolicyName - The name of the backup policy which is applicable to this Service Fabric application or service or partition. + PolicyName *string `json:"PolicyName,omitempty"` + // PolicyInheritedFrom - Specifies the scope at which the backup policy is applied. Possible values include: 'BackupPolicyScopeInvalid', 'BackupPolicyScopePartition', 'BackupPolicyScopeService', 'BackupPolicyScopeApplication' + PolicyInheritedFrom BackupPolicyScope `json:"PolicyInheritedFrom,omitempty"` + // SuspensionInfo - Describes the backup suspension details. + SuspensionInfo *BackupSuspensionInfo `json:"SuspensionInfo,omitempty"` + // Kind - Possible values include: 'KindBasicBackupConfigurationInfoKindBackupConfigurationInfo', 'KindBasicBackupConfigurationInfoKindApplication', 'KindBasicBackupConfigurationInfoKindService', 'KindBasicBackupConfigurationInfoKindPartition' + Kind KindBasicBackupConfigurationInfo `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationBackupConfigurationInfo. +func (abci ApplicationBackupConfigurationInfo) MarshalJSON() ([]byte, error) { + abci.Kind = KindBasicBackupConfigurationInfoKindApplication + objectMap := make(map[string]interface{}) + if abci.ApplicationName != nil { + objectMap["ApplicationName"] = abci.ApplicationName + } + if abci.PolicyName != nil { + objectMap["PolicyName"] = abci.PolicyName + } + if abci.PolicyInheritedFrom != "" { + objectMap["PolicyInheritedFrom"] = abci.PolicyInheritedFrom + } + if abci.SuspensionInfo != nil { + objectMap["SuspensionInfo"] = abci.SuspensionInfo + } + if abci.Kind != "" { + objectMap["Kind"] = abci.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ApplicationBackupConfigurationInfo. +func (abci ApplicationBackupConfigurationInfo) AsApplicationBackupConfigurationInfo() (*ApplicationBackupConfigurationInfo, bool) { + return &abci, true +} + +// AsServiceBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ApplicationBackupConfigurationInfo. +func (abci ApplicationBackupConfigurationInfo) AsServiceBackupConfigurationInfo() (*ServiceBackupConfigurationInfo, bool) { + return nil, false +} + +// AsPartitionBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ApplicationBackupConfigurationInfo. +func (abci ApplicationBackupConfigurationInfo) AsPartitionBackupConfigurationInfo() (*PartitionBackupConfigurationInfo, bool) { + return nil, false +} + +// AsBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ApplicationBackupConfigurationInfo. +func (abci ApplicationBackupConfigurationInfo) AsBackupConfigurationInfo() (*BackupConfigurationInfo, bool) { + return nil, false +} + +// AsBasicBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ApplicationBackupConfigurationInfo. +func (abci ApplicationBackupConfigurationInfo) AsBasicBackupConfigurationInfo() (BasicBackupConfigurationInfo, bool) { + return &abci, true +} + +// ApplicationBackupEntity identifies the Service Fabric application which is being backed up. +type ApplicationBackupEntity struct { + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // EntityKind - Possible values include: 'EntityKindBackupEntity', 'EntityKindApplication1', 'EntityKindService1', 'EntityKindPartition1' + EntityKind EntityKindBasicBackupEntity `json:"EntityKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationBackupEntity. +func (abe ApplicationBackupEntity) MarshalJSON() ([]byte, error) { + abe.EntityKind = EntityKindApplication1 + objectMap := make(map[string]interface{}) + if abe.ApplicationName != nil { + objectMap["ApplicationName"] = abe.ApplicationName + } + if abe.EntityKind != "" { + objectMap["EntityKind"] = abe.EntityKind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupEntity is the BasicBackupEntity implementation for ApplicationBackupEntity. +func (abe ApplicationBackupEntity) AsApplicationBackupEntity() (*ApplicationBackupEntity, bool) { + return &abe, true +} + +// AsServiceBackupEntity is the BasicBackupEntity implementation for ApplicationBackupEntity. +func (abe ApplicationBackupEntity) AsServiceBackupEntity() (*ServiceBackupEntity, bool) { + return nil, false +} + +// AsPartitionBackupEntity is the BasicBackupEntity implementation for ApplicationBackupEntity. +func (abe ApplicationBackupEntity) AsPartitionBackupEntity() (*PartitionBackupEntity, bool) { + return nil, false +} + +// AsBackupEntity is the BasicBackupEntity implementation for ApplicationBackupEntity. +func (abe ApplicationBackupEntity) AsBackupEntity() (*BackupEntity, bool) { + return nil, false +} + +// AsBasicBackupEntity is the BasicBackupEntity implementation for ApplicationBackupEntity. +func (abe ApplicationBackupEntity) AsBasicBackupEntity() (BasicBackupEntity, bool) { + return &abe, true +} + +// ApplicationCapacityDescription describes capacity information for services of this application. This +// description can be used for describing the following. +// - Reserving the capacity for the services on the nodes +// - Limiting the total number of nodes that services of this application can run on +// - Limiting the custom capacity metrics to limit the total consumption of this metric by the services of +// this application +type ApplicationCapacityDescription struct { + // MinimumNodes - The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property. + MinimumNodes *int64 `json:"MinimumNodes,omitempty"` + // MaximumNodes - The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node. + MaximumNodes *int64 `json:"MaximumNodes,omitempty"` + // ApplicationMetrics - List of application capacity metric description. + ApplicationMetrics *[]ApplicationMetricDescription `json:"ApplicationMetrics,omitempty"` +} + +// ApplicationContainerInstanceExitedEvent container Exited event. +type ApplicationContainerInstanceExitedEvent struct { + // ServiceName - Name of Service. + ServiceName *string `json:"ServiceName,omitempty"` + // ServicePackageName - Name of Service package. + ServicePackageName *string `json:"ServicePackageName,omitempty"` + // ServicePackageActivationID - Activation Id of Service package. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // IsExclusive - Indicates IsExclusive flag. + IsExclusive *bool `json:"IsExclusive,omitempty"` + // CodePackageName - Name of Code package. + CodePackageName *string `json:"CodePackageName,omitempty"` + // EntryPointType - Type of EntryPoint. + EntryPointType *string `json:"EntryPointType,omitempty"` + // ImageName - Name of Container image. + ImageName *string `json:"ImageName,omitempty"` + // ContainerName - Name of Container. + ContainerName *string `json:"ContainerName,omitempty"` + // HostID - Host Id. + HostID *string `json:"HostId,omitempty"` + // ExitCode - Exit code of process. + ExitCode *int64 `json:"ExitCode,omitempty"` + // UnexpectedTermination - Indicates if termination is unexpected. + UnexpectedTermination *bool `json:"UnexpectedTermination,omitempty"` + // StartTime - Start time of process. + StartTime *date.Time `json:"StartTime,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) MarshalJSON() ([]byte, error) { + aciee.Kind = KindApplicationContainerInstanceExited + objectMap := make(map[string]interface{}) + if aciee.ServiceName != nil { + objectMap["ServiceName"] = aciee.ServiceName + } + if aciee.ServicePackageName != nil { + objectMap["ServicePackageName"] = aciee.ServicePackageName + } + if aciee.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = aciee.ServicePackageActivationID + } + if aciee.IsExclusive != nil { + objectMap["IsExclusive"] = aciee.IsExclusive + } + if aciee.CodePackageName != nil { + objectMap["CodePackageName"] = aciee.CodePackageName + } + if aciee.EntryPointType != nil { + objectMap["EntryPointType"] = aciee.EntryPointType + } + if aciee.ImageName != nil { + objectMap["ImageName"] = aciee.ImageName + } + if aciee.ContainerName != nil { + objectMap["ContainerName"] = aciee.ContainerName + } + if aciee.HostID != nil { + objectMap["HostId"] = aciee.HostID + } + if aciee.ExitCode != nil { + objectMap["ExitCode"] = aciee.ExitCode + } + if aciee.UnexpectedTermination != nil { + objectMap["UnexpectedTermination"] = aciee.UnexpectedTermination + } + if aciee.StartTime != nil { + objectMap["StartTime"] = aciee.StartTime + } + if aciee.ApplicationID != nil { + objectMap["ApplicationId"] = aciee.ApplicationID + } + if aciee.EventInstanceID != nil { + objectMap["EventInstanceId"] = aciee.EventInstanceID + } + if aciee.Category != nil { + objectMap["Category"] = aciee.Category + } + if aciee.TimeStamp != nil { + objectMap["TimeStamp"] = aciee.TimeStamp + } + if aciee.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = aciee.HasCorrelatedEvents + } + if aciee.Kind != "" { + objectMap["Kind"] = aciee.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &aciee, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return &aciee, true +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationContainerInstanceExitedEvent. +func (aciee ApplicationContainerInstanceExitedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &aciee, true +} + +// ApplicationCreatedEvent application Created event. +type ApplicationCreatedEvent struct { + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ApplicationTypeVersion - Application type version. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // ApplicationDefinitionKind - Application definition kind. + ApplicationDefinitionKind *string `json:"ApplicationDefinitionKind,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) MarshalJSON() ([]byte, error) { + ace.Kind = KindApplicationCreated + objectMap := make(map[string]interface{}) + if ace.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = ace.ApplicationTypeName + } + if ace.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = ace.ApplicationTypeVersion + } + if ace.ApplicationDefinitionKind != nil { + objectMap["ApplicationDefinitionKind"] = ace.ApplicationDefinitionKind + } + if ace.ApplicationID != nil { + objectMap["ApplicationId"] = ace.ApplicationID + } + if ace.EventInstanceID != nil { + objectMap["EventInstanceId"] = ace.EventInstanceID + } + if ace.Category != nil { + objectMap["Category"] = ace.Category + } + if ace.TimeStamp != nil { + objectMap["TimeStamp"] = ace.TimeStamp + } + if ace.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ace.HasCorrelatedEvents + } + if ace.Kind != "" { + objectMap["Kind"] = ace.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &ace, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return &ace, true +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationCreatedEvent. +func (ace ApplicationCreatedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ace, true +} + +// ApplicationDeletedEvent application Deleted event. +type ApplicationDeletedEvent struct { + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ApplicationTypeVersion - Application type version. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) MarshalJSON() ([]byte, error) { + ade.Kind = KindApplicationDeleted + objectMap := make(map[string]interface{}) + if ade.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = ade.ApplicationTypeName + } + if ade.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = ade.ApplicationTypeVersion + } + if ade.ApplicationID != nil { + objectMap["ApplicationId"] = ade.ApplicationID + } + if ade.EventInstanceID != nil { + objectMap["EventInstanceId"] = ade.EventInstanceID + } + if ade.Category != nil { + objectMap["Category"] = ade.Category + } + if ade.TimeStamp != nil { + objectMap["TimeStamp"] = ade.TimeStamp + } + if ade.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ade.HasCorrelatedEvents + } + if ade.Kind != "" { + objectMap["Kind"] = ade.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &ade, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return &ade, true +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationDeletedEvent. +func (ade ApplicationDeletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ade, true +} + +// ApplicationDescription describes a Service Fabric application. +type ApplicationDescription struct { + // Name - The name of the application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TypeName - The application type name as defined in the application manifest. + TypeName *string `json:"TypeName,omitempty"` + // TypeVersion - The version of the application type as defined in the application manifest. + TypeVersion *string `json:"TypeVersion,omitempty"` + // ParameterList - List of application parameters with overridden values from their default values specified in the application manifest. + ParameterList *[]ApplicationParameter `json:"ParameterList,omitempty"` + // ApplicationCapacity - Describes capacity information for services of this application. This description can be used for describing the following. + // - Reserving the capacity for the services on the nodes + // - Limiting the total number of nodes that services of this application can run on + // - Limiting the custom capacity metrics to limit the total consumption of this metric by the services of this application + ApplicationCapacity *ApplicationCapacityDescription `json:"ApplicationCapacity,omitempty"` + // ManagedApplicationIdentity - Managed application identity description. + ManagedApplicationIdentity *ManagedApplicationIdentityDescription `json:"ManagedApplicationIdentity,omitempty"` +} + +// BasicApplicationEvent represents the base for all Application Events. +type BasicApplicationEvent interface { + AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) + AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) + AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) + AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) + AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) + AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) + AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) + AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) + AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) + AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) + AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) + AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) + AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) + AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) + AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) + AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) + AsApplicationEvent() (*ApplicationEvent, bool) +} + +// ApplicationEvent represents the base for all Application Events. +type ApplicationEvent struct { + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicApplicationEvent(body []byte) (BasicApplicationEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindApplicationCreated): + var ace ApplicationCreatedEvent + err := json.Unmarshal(body, &ace) + return ace, err + case string(KindApplicationDeleted): + var ade ApplicationDeletedEvent + err := json.Unmarshal(body, &ade) + return ade, err + case string(KindApplicationNewHealthReport): + var anhre ApplicationNewHealthReportEvent + err := json.Unmarshal(body, &anhre) + return anhre, err + case string(KindApplicationHealthReportExpired): + var ahree ApplicationHealthReportExpiredEvent + err := json.Unmarshal(body, &ahree) + return ahree, err + case string(KindApplicationUpgradeCompleted): + var auce ApplicationUpgradeCompletedEvent + err := json.Unmarshal(body, &auce) + return auce, err + case string(KindApplicationUpgradeDomainCompleted): + var audce ApplicationUpgradeDomainCompletedEvent + err := json.Unmarshal(body, &audce) + return audce, err + case string(KindApplicationUpgradeRollbackCompleted): + var aurce ApplicationUpgradeRollbackCompletedEvent + err := json.Unmarshal(body, &aurce) + return aurce, err + case string(KindApplicationUpgradeRollbackStarted): + var aurse ApplicationUpgradeRollbackStartedEvent + err := json.Unmarshal(body, &aurse) + return aurse, err + case string(KindApplicationUpgradeStarted): + var ause ApplicationUpgradeStartedEvent + err := json.Unmarshal(body, &ause) + return ause, err + case string(KindDeployedApplicationNewHealthReport): + var danhre DeployedApplicationNewHealthReportEvent + err := json.Unmarshal(body, &danhre) + return danhre, err + case string(KindDeployedApplicationHealthReportExpired): + var dahree DeployedApplicationHealthReportExpiredEvent + err := json.Unmarshal(body, &dahree) + return dahree, err + case string(KindApplicationProcessExited): + var apee ApplicationProcessExitedEvent + err := json.Unmarshal(body, &apee) + return apee, err + case string(KindApplicationContainerInstanceExited): + var aciee ApplicationContainerInstanceExitedEvent + err := json.Unmarshal(body, &aciee) + return aciee, err + case string(KindDeployedServicePackageNewHealthReport): + var dspnhre DeployedServicePackageNewHealthReportEvent + err := json.Unmarshal(body, &dspnhre) + return dspnhre, err + case string(KindDeployedServicePackageHealthReportExpired): + var dsphree DeployedServicePackageHealthReportExpiredEvent + err := json.Unmarshal(body, &dsphree) + return dsphree, err + case string(KindChaosCodePackageRestartScheduled): + var ccprse ChaosCodePackageRestartScheduledEvent + err := json.Unmarshal(body, &ccprse) + return ccprse, err + default: + var ae ApplicationEvent + err := json.Unmarshal(body, &ae) + return ae, err + } +} +func unmarshalBasicApplicationEventArray(body []byte) ([]BasicApplicationEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + aeArray := make([]BasicApplicationEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ae, err := unmarshalBasicApplicationEvent(*rawMessage) + if err != nil { + return nil, err + } + aeArray[index] = ae + } + return aeArray, nil +} + +// MarshalJSON is the custom marshaler for ApplicationEvent. +func (ae ApplicationEvent) MarshalJSON() ([]byte, error) { + ae.Kind = KindApplicationEvent + objectMap := make(map[string]interface{}) + if ae.ApplicationID != nil { + objectMap["ApplicationId"] = ae.ApplicationID + } + if ae.EventInstanceID != nil { + objectMap["EventInstanceId"] = ae.EventInstanceID + } + if ae.Category != nil { + objectMap["Category"] = ae.Category + } + if ae.TimeStamp != nil { + objectMap["TimeStamp"] = ae.TimeStamp + } + if ae.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ae.HasCorrelatedEvents + } + if ae.Kind != "" { + objectMap["Kind"] = ae.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return &ae, true +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &ae, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationEvent. +func (ae ApplicationEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ae, true +} + +// ApplicationHealth represents the health of the application. Contains the application aggregated health +// state and the service and deployed application health states. +type ApplicationHealth struct { + autorest.Response `json:"-"` + // Name - The name of the application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // ServiceHealthStates - Service health states as found in the health store. + ServiceHealthStates *[]ServiceHealthState `json:"ServiceHealthStates,omitempty"` + // DeployedApplicationHealthStates - Deployed application health states as found in the health store. + DeployedApplicationHealthStates *[]DeployedApplicationHealthState `json:"DeployedApplicationHealthStates,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// ApplicationHealthEvaluation represents health evaluation for an application, containing information +// about the data and the algorithm used by the health store to evaluate health. +type ApplicationHealthEvaluation struct { + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state of the application. The types of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) MarshalJSON() ([]byte, error) { + ahe.Kind = KindApplication + objectMap := make(map[string]interface{}) + if ahe.ApplicationName != nil { + objectMap["ApplicationName"] = ahe.ApplicationName + } + if ahe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = ahe.UnhealthyEvaluations + } + if ahe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = ahe.AggregatedHealthState + } + if ahe.Description != nil { + objectMap["Description"] = ahe.Description + } + if ahe.Kind != "" { + objectMap["Kind"] = ahe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return &ahe, true +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationHealthEvaluation. +func (ahe ApplicationHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &ahe, true +} + +// ApplicationHealthPolicies defines the application health policy map used to evaluate the health of an +// application or one of its children entities. +type ApplicationHealthPolicies struct { + // ApplicationHealthPolicyMap - The wrapper that contains the map with application health policies used to evaluate specific applications in the cluster. + ApplicationHealthPolicyMap *[]ApplicationHealthPolicyMapItem `json:"ApplicationHealthPolicyMap,omitempty"` +} + +// ApplicationHealthPolicy defines a health policy used to evaluate the health of an application or one of +// its children entities. +type ApplicationHealthPolicy struct { + // ConsiderWarningAsError - Indicates whether warnings are treated with the same severity as errors. + ConsiderWarningAsError *bool `json:"ConsiderWarningAsError,omitempty"` + // MaxPercentUnhealthyDeployedApplications - The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. + // The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. + // This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. + // The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + MaxPercentUnhealthyDeployedApplications *int32 `json:"MaxPercentUnhealthyDeployedApplications,omitempty"` + // DefaultServiceTypeHealthPolicy - The health policy used by default to evaluate the health of a service type. + DefaultServiceTypeHealthPolicy *ServiceTypeHealthPolicy `json:"DefaultServiceTypeHealthPolicy,omitempty"` + // ServiceTypeHealthPolicyMap - The map with service type health policy per service type name. The map is empty by default. + ServiceTypeHealthPolicyMap *[]ServiceTypeHealthPolicyMapItem `json:"ServiceTypeHealthPolicyMap,omitempty"` +} + +// ApplicationHealthPolicyMapItem defines an item in ApplicationHealthPolicyMap. +type ApplicationHealthPolicyMapItem struct { + // Key - The key of the application health policy map item. This is the name of the application. + Key *string `json:"Key,omitempty"` + // Value - The value of the application health policy map item. This is the ApplicationHealthPolicy for this application. + Value *ApplicationHealthPolicy `json:"Value,omitempty"` +} + +// ApplicationHealthReportExpiredEvent application Health Report Expired event. +type ApplicationHealthReportExpiredEvent struct { + // ApplicationInstanceID - Id of Application instance. + ApplicationInstanceID *int64 `json:"ApplicationInstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + ahree.Kind = KindApplicationHealthReportExpired + objectMap := make(map[string]interface{}) + if ahree.ApplicationInstanceID != nil { + objectMap["ApplicationInstanceId"] = ahree.ApplicationInstanceID + } + if ahree.SourceID != nil { + objectMap["SourceId"] = ahree.SourceID + } + if ahree.Property != nil { + objectMap["Property"] = ahree.Property + } + if ahree.HealthState != nil { + objectMap["HealthState"] = ahree.HealthState + } + if ahree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = ahree.TimeToLiveMs + } + if ahree.SequenceNumber != nil { + objectMap["SequenceNumber"] = ahree.SequenceNumber + } + if ahree.Description != nil { + objectMap["Description"] = ahree.Description + } + if ahree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = ahree.RemoveWhenExpired + } + if ahree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = ahree.SourceUtcTimestamp + } + if ahree.ApplicationID != nil { + objectMap["ApplicationId"] = ahree.ApplicationID + } + if ahree.EventInstanceID != nil { + objectMap["EventInstanceId"] = ahree.EventInstanceID + } + if ahree.Category != nil { + objectMap["Category"] = ahree.Category + } + if ahree.TimeStamp != nil { + objectMap["TimeStamp"] = ahree.TimeStamp + } + if ahree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ahree.HasCorrelatedEvents + } + if ahree.Kind != "" { + objectMap["Kind"] = ahree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &ahree, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return &ahree, true +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationHealthReportExpiredEvent. +func (ahree ApplicationHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ahree, true +} + +// ApplicationHealthState represents the health state of an application, which contains the application +// identifier and the aggregated health state. +type ApplicationHealthState struct { + // Name - The name of the application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// ApplicationHealthStateChunk represents the health state chunk of a application. +// The application health state chunk contains the application name, its aggregated health state and any +// children services and deployed applications that respect the filters in cluster health chunk query +// description. +type ApplicationHealthStateChunk struct { + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ApplicationTypeName - The application type name as defined in the application manifest. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ServiceHealthStateChunks - The list of service health state chunks in the cluster that respect the filters in the cluster health chunk query description. + ServiceHealthStateChunks *ServiceHealthStateChunkList `json:"ServiceHealthStateChunks,omitempty"` + // DeployedApplicationHealthStateChunks - The list of deployed application health state chunks in the cluster that respect the filters in the cluster health chunk query description. + DeployedApplicationHealthStateChunks *DeployedApplicationHealthStateChunkList `json:"DeployedApplicationHealthStateChunks,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// ApplicationHealthStateChunkList the list of application health state chunks in the cluster that respect +// the input filters in the chunk query. Returned by get cluster health state chunks query. +type ApplicationHealthStateChunkList struct { + // Items - The list of application health state chunks that respect the input filters in the chunk query. + Items *[]ApplicationHealthStateChunk `json:"Items,omitempty"` + // TotalCount - Total number of entity health state objects that match the specified filters from the cluster health chunk query description. + TotalCount *int64 `json:"TotalCount,omitempty"` +} + +// ApplicationHealthStateFilter defines matching criteria to determine whether a application should be +// included in the cluster health chunk. +// One filter can match zero, one or multiple applications, depending on its properties. +type ApplicationHealthStateFilter struct { + // ApplicationNameFilter - The name of the application that matches the filter, as a fabric uri. The filter is applied only to the specified application, if it exists. + // If the application doesn't exist, no application is returned in the cluster health chunk based on this filter. + // If the application exists, it is included in the cluster health chunk if it respects the other filter properties. + // If not specified, all applications are matched against the other filter members, like health state filter. + ApplicationNameFilter *string `json:"ApplicationNameFilter,omitempty"` + // ApplicationTypeNameFilter - The name of the application type that matches the filter. + // If specified, the filter is applied only to applications of the selected application type, if any exists. + // If no applications of the specified application type exists, no application is returned in the cluster health chunk based on this filter. + // Each application of the specified application type is included in the cluster health chunk if it respects the other filter properties. + // If not specified, all applications are matched against the other filter members, like health state filter. + ApplicationTypeNameFilter *string `json:"ApplicationTypeNameFilter,omitempty"` + // HealthStateFilter - The filter for the health state of the applications. It allows selecting applications if they match the desired health states. + // The possible values are integer value of one of the following health states. Only applications that match the filter are returned. All applications are used to evaluate the cluster aggregated health state. + // If not specified, default value is None, unless the application name or the application type name are specified. If the filter has default value and application name is specified, the matching application is returned. + // The state values are flag-based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. + // For example, if the provided value is 6, it matches applications with HealthState value of OK (2) and Warning (4). + // - Default - Default value. Matches any HealthState. The value is zero. + // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. + // - Ok - Filter that matches input with HealthState value Ok. The value is 2. + // - Warning - Filter that matches input with HealthState value Warning. The value is 4. + // - Error - Filter that matches input with HealthState value Error. The value is 8. + // - All - Filter that matches input with any HealthState value. The value is 65535. + HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` + // ServiceFilters - Defines a list of filters that specify which services to be included in the returned cluster health chunk as children of the application. The services are returned only if the parent application matches a filter. + // If the list is empty, no services are returned. All the services are used to evaluate the parent application aggregated health state, regardless of the input filters. + // The application filter may specify multiple service filters. + // For example, it can specify a filter to return all services with health state Error and another filter to always include a service identified by its service name. + ServiceFilters *[]ServiceHealthStateFilter `json:"ServiceFilters,omitempty"` + // DeployedApplicationFilters - Defines a list of filters that specify which deployed applications to be included in the returned cluster health chunk as children of the application. The deployed applications are returned only if the parent application matches a filter. + // If the list is empty, no deployed applications are returned. All the deployed applications are used to evaluate the parent application aggregated health state, regardless of the input filters. + // The application filter may specify multiple deployed application filters. + // For example, it can specify a filter to return all deployed applications with health state Error and another filter to always include a deployed application on a specified node. + DeployedApplicationFilters *[]DeployedApplicationHealthStateFilter `json:"DeployedApplicationFilters,omitempty"` +} + +// ApplicationInfo information about a Service Fabric application. +type ApplicationInfo struct { + autorest.Response `json:"-"` + // ID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ID *string `json:"Id,omitempty"` + // Name - The name of the application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TypeName - The application type name as defined in the application manifest. + TypeName *string `json:"TypeName,omitempty"` + // TypeVersion - The version of the application type as defined in the application manifest. + TypeVersion *string `json:"TypeVersion,omitempty"` + // Status - The status of the application. Possible values include: 'ApplicationStatusInvalid', 'ApplicationStatusReady', 'ApplicationStatusUpgrading', 'ApplicationStatusCreating', 'ApplicationStatusDeleting', 'ApplicationStatusFailed' + Status ApplicationStatus `json:"Status,omitempty"` + // Parameters - List of application parameters with overridden values from their default values specified in the application manifest. + Parameters *[]ApplicationParameter `json:"Parameters,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // ApplicationDefinitionKind - The mechanism used to define a Service Fabric application. Possible values include: 'Invalid', 'ServiceFabricApplicationDescription', 'Compose' + ApplicationDefinitionKind ApplicationDefinitionKind `json:"ApplicationDefinitionKind,omitempty"` +} + +// ApplicationLoadInfo load Information about a Service Fabric application. +type ApplicationLoadInfo struct { + autorest.Response `json:"-"` + // ID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ID *string `json:"Id,omitempty"` + // MinimumNodes - The minimum number of nodes for this application. + // It is the number of nodes where Service Fabric will reserve Capacity in the cluster which equals to ReservedLoad * MinimumNodes for this Application instance. + // For applications that do not have application capacity defined this value will be zero. + MinimumNodes *int64 `json:"MinimumNodes,omitempty"` + // MaximumNodes - The maximum number of nodes where this application can be instantiated. + // It is the number of nodes this application is allowed to span. + // For applications that do not have application capacity defined this value will be zero. + MaximumNodes *int64 `json:"MaximumNodes,omitempty"` + // NodeCount - The number of nodes on which this application is instantiated. + // For applications that do not have application capacity defined this value will be zero. + NodeCount *int64 `json:"NodeCount,omitempty"` + // ApplicationLoadMetricInformation - List of application capacity metric description. + ApplicationLoadMetricInformation *[]ApplicationMetricDescription `json:"ApplicationLoadMetricInformation,omitempty"` +} + +// ApplicationMetricDescription describes capacity information for a custom resource balancing metric. This +// can be used to limit the total consumption of this metric by the services of this application. +type ApplicationMetricDescription struct { + // Name - The name of the metric. + Name *string `json:"Name,omitempty"` + // MaximumCapacity - The maximum node capacity for Service Fabric application. + // This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value. + // If set to zero, capacity for this metric is unlimited on each node. + // When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity. + // When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity. + MaximumCapacity *int64 `json:"MaximumCapacity,omitempty"` + // ReservationCapacity - The node reservation capacity for Service Fabric application. + // This is the amount of load which is reserved on nodes which have instances of this application. + // If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application. + // If set to zero, no capacity is reserved for this metric. + // When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric. + ReservationCapacity *int64 `json:"ReservationCapacity,omitempty"` + // TotalApplicationCapacity - The total metric capacity for Service Fabric application. + // This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value. + // When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value. + TotalApplicationCapacity *int64 `json:"TotalApplicationCapacity,omitempty"` +} + +// ApplicationNameInfo information about the application name. +type ApplicationNameInfo struct { + autorest.Response `json:"-"` + // ID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ID *string `json:"Id,omitempty"` + // Name - The name of the application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` +} + +// ApplicationNewHealthReportEvent application Health Report Created event. +type ApplicationNewHealthReportEvent struct { + // ApplicationInstanceID - Id of Application instance. + ApplicationInstanceID *int64 `json:"ApplicationInstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) MarshalJSON() ([]byte, error) { + anhre.Kind = KindApplicationNewHealthReport + objectMap := make(map[string]interface{}) + if anhre.ApplicationInstanceID != nil { + objectMap["ApplicationInstanceId"] = anhre.ApplicationInstanceID + } + if anhre.SourceID != nil { + objectMap["SourceId"] = anhre.SourceID + } + if anhre.Property != nil { + objectMap["Property"] = anhre.Property + } + if anhre.HealthState != nil { + objectMap["HealthState"] = anhre.HealthState + } + if anhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = anhre.TimeToLiveMs + } + if anhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = anhre.SequenceNumber + } + if anhre.Description != nil { + objectMap["Description"] = anhre.Description + } + if anhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = anhre.RemoveWhenExpired + } + if anhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = anhre.SourceUtcTimestamp + } + if anhre.ApplicationID != nil { + objectMap["ApplicationId"] = anhre.ApplicationID + } + if anhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = anhre.EventInstanceID + } + if anhre.Category != nil { + objectMap["Category"] = anhre.Category + } + if anhre.TimeStamp != nil { + objectMap["TimeStamp"] = anhre.TimeStamp + } + if anhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = anhre.HasCorrelatedEvents + } + if anhre.Kind != "" { + objectMap["Kind"] = anhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &anhre, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return &anhre, true +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationNewHealthReportEvent. +func (anhre ApplicationNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &anhre, true +} + +// ApplicationParameter describes an application parameter override to be applied when creating or +// upgrading an application. +type ApplicationParameter struct { + // Key - The name of the parameter. + Key *string `json:"Key,omitempty"` + // Value - The value of the parameter. + Value *string `json:"Value,omitempty"` +} + +// ApplicationProcessExitedEvent process Exited event. +type ApplicationProcessExitedEvent struct { + // ServiceName - Name of Service. + ServiceName *string `json:"ServiceName,omitempty"` + // ServicePackageName - Name of Service package. + ServicePackageName *string `json:"ServicePackageName,omitempty"` + // ServicePackageActivationID - Activation Id of Service package. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // IsExclusive - Indicates IsExclusive flag. + IsExclusive *bool `json:"IsExclusive,omitempty"` + // CodePackageName - Name of Code package. + CodePackageName *string `json:"CodePackageName,omitempty"` + // EntryPointType - Type of EntryPoint. + EntryPointType *string `json:"EntryPointType,omitempty"` + // ExeName - Name of executable. + ExeName *string `json:"ExeName,omitempty"` + // ProcessID - Process Id. + ProcessID *int64 `json:"ProcessId,omitempty"` + // HostID - Host Id. + HostID *string `json:"HostId,omitempty"` + // ExitCode - Exit code of process. + ExitCode *int64 `json:"ExitCode,omitempty"` + // UnexpectedTermination - Indicates if termination is unexpected. + UnexpectedTermination *bool `json:"UnexpectedTermination,omitempty"` + // StartTime - Start time of process. + StartTime *date.Time `json:"StartTime,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) MarshalJSON() ([]byte, error) { + apee.Kind = KindApplicationProcessExited + objectMap := make(map[string]interface{}) + if apee.ServiceName != nil { + objectMap["ServiceName"] = apee.ServiceName + } + if apee.ServicePackageName != nil { + objectMap["ServicePackageName"] = apee.ServicePackageName + } + if apee.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = apee.ServicePackageActivationID + } + if apee.IsExclusive != nil { + objectMap["IsExclusive"] = apee.IsExclusive + } + if apee.CodePackageName != nil { + objectMap["CodePackageName"] = apee.CodePackageName + } + if apee.EntryPointType != nil { + objectMap["EntryPointType"] = apee.EntryPointType + } + if apee.ExeName != nil { + objectMap["ExeName"] = apee.ExeName + } + if apee.ProcessID != nil { + objectMap["ProcessId"] = apee.ProcessID + } + if apee.HostID != nil { + objectMap["HostId"] = apee.HostID + } + if apee.ExitCode != nil { + objectMap["ExitCode"] = apee.ExitCode + } + if apee.UnexpectedTermination != nil { + objectMap["UnexpectedTermination"] = apee.UnexpectedTermination + } + if apee.StartTime != nil { + objectMap["StartTime"] = apee.StartTime + } + if apee.ApplicationID != nil { + objectMap["ApplicationId"] = apee.ApplicationID + } + if apee.EventInstanceID != nil { + objectMap["EventInstanceId"] = apee.EventInstanceID + } + if apee.Category != nil { + objectMap["Category"] = apee.Category + } + if apee.TimeStamp != nil { + objectMap["TimeStamp"] = apee.TimeStamp + } + if apee.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = apee.HasCorrelatedEvents + } + if apee.Kind != "" { + objectMap["Kind"] = apee.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &apee, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return &apee, true +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationProcessExitedEvent. +func (apee ApplicationProcessExitedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &apee, true +} + +// ApplicationProperties describes properties of a application resource. +type ApplicationProperties struct { + // Description - User readable description of the application. + Description *string `json:"description,omitempty"` + // Services - Describes the services in the application. This property is used to create or modify services of the application. On get only the name of the service is returned. The service description can be obtained by querying for the service resource. + Services *[]ServiceResourceDescription `json:"services,omitempty"` + // Diagnostics - Describes the diagnostics definition and usage for an application resource. + Diagnostics *DiagnosticsDescription `json:"diagnostics,omitempty"` + // DebugParams - Internal - used by Visual Studio to setup the debugging session on the local development environment. + DebugParams *string `json:"debugParams,omitempty"` + // ServiceNames - READ-ONLY; Names of the services in the application. + ServiceNames *[]string `json:"serviceNames,omitempty"` + // Status - READ-ONLY; Status of the application. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the application. + StatusDetails *string `json:"statusDetails,omitempty"` + // HealthState - READ-ONLY; Describes the health state of an application resource. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"healthState,omitempty"` + // UnhealthyEvaluation - READ-ONLY; When the application's health state is not 'Ok', this additional details from service fabric Health Manager for the user to know why the application is marked unhealthy. + UnhealthyEvaluation *string `json:"unhealthyEvaluation,omitempty"` +} + +// ApplicationResourceDescription this type describes a application resource. +type ApplicationResourceDescription struct { + autorest.Response `json:"-"` + // Name - Name of the Application resource. + Name *string `json:"name,omitempty"` + // ApplicationProperties - Describes properties of a application resource. + *ApplicationProperties `json:"properties,omitempty"` + // Identity - Describes the identity of the application. + Identity *IdentityDescription `json:"identity,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationResourceDescription. +func (ard ApplicationResourceDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ard.Name != nil { + objectMap["name"] = ard.Name + } + if ard.ApplicationProperties != nil { + objectMap["properties"] = ard.ApplicationProperties + } + if ard.Identity != nil { + objectMap["identity"] = ard.Identity + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationResourceDescription struct. +func (ard *ApplicationResourceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ard.Name = &name + } + case "properties": + if v != nil { + var applicationProperties ApplicationProperties + err = json.Unmarshal(*v, &applicationProperties) + if err != nil { + return err + } + ard.ApplicationProperties = &applicationProperties + } + case "identity": + if v != nil { + var identity IdentityDescription + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ard.Identity = &identity + } + } + } + + return nil +} + +// ApplicationResourceUpgradeProgressInfo this type describes an application resource upgrade. +type ApplicationResourceUpgradeProgressInfo struct { + autorest.Response `json:"-"` + // Name - Name of the Application resource. + Name *string `json:"Name,omitempty"` + // TargetApplicationTypeVersion - The target application version for the application upgrade. + TargetApplicationTypeVersion *string `json:"TargetApplicationTypeVersion,omitempty"` + // StartTimestampUtc - The estimated UTC datetime when the upgrade started. + StartTimestampUtc *string `json:"StartTimestampUtc,omitempty"` + // UpgradeState - The state of the application resource upgrade. Possible values include: 'ApplicationResourceUpgradeStateInvalid', 'ApplicationResourceUpgradeStateProvisioningTarget', 'ApplicationResourceUpgradeStateRollingForward', 'ApplicationResourceUpgradeStateUnprovisioningCurrent', 'ApplicationResourceUpgradeStateCompletedRollforward', 'ApplicationResourceUpgradeStateRollingBack', 'ApplicationResourceUpgradeStateUnprovisioningTarget', 'ApplicationResourceUpgradeStateCompletedRollback', 'ApplicationResourceUpgradeStateFailed' + UpgradeState ApplicationResourceUpgradeState `json:"UpgradeState,omitempty"` + // PercentCompleted - The estimated percent of replicas are completed in the upgrade. + PercentCompleted *string `json:"PercentCompleted,omitempty"` + // ServiceUpgradeProgress - List of service upgrade progresses. + ServiceUpgradeProgress *[]ServiceUpgradeProgress `json:"ServiceUpgradeProgress,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'RollingUpgradeModeInvalid', 'RollingUpgradeModeUnmonitoredAuto', 'RollingUpgradeModeUnmonitoredManual', 'RollingUpgradeModeMonitored' + RollingUpgradeMode RollingUpgradeMode `json:"RollingUpgradeMode,omitempty"` + // UpgradeDuration - The estimated amount of time that the overall upgrade elapsed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + UpgradeDuration *string `json:"UpgradeDuration,omitempty"` + // ApplicationUpgradeStatusDetails - Additional detailed information about the status of the pending upgrade. + ApplicationUpgradeStatusDetails *string `json:"ApplicationUpgradeStatusDetails,omitempty"` + // UpgradeReplicaSetCheckTimeoutInSeconds - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` + // FailureTimestampUtc - The estimated UTC datetime when the upgrade failed and FailureAction was executed. + FailureTimestampUtc *string `json:"FailureTimestampUtc,omitempty"` +} + +// ApplicationScopedVolume describes a volume whose lifetime is scoped to the application's lifetime. +type ApplicationScopedVolume struct { + // CreationParameters - Describes parameters for creating application-scoped volumes. + CreationParameters BasicApplicationScopedVolumeCreationParameters `json:"creationParameters,omitempty"` + // Name - Name of the volume being referenced. + Name *string `json:"name,omitempty"` + // ReadOnly - The flag indicating whether the volume is read only. Default is 'false'. + ReadOnly *bool `json:"readOnly,omitempty"` + // DestinationPath - The path within the container at which the volume should be mounted. Only valid path characters are allowed. + DestinationPath *string `json:"destinationPath,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationScopedVolume struct. +func (asv *ApplicationScopedVolume) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "creationParameters": + if v != nil { + creationParameters, err := unmarshalBasicApplicationScopedVolumeCreationParameters(*v) + if err != nil { + return err + } + asv.CreationParameters = creationParameters + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + asv.Name = &name + } + case "readOnly": + if v != nil { + var readOnly bool + err = json.Unmarshal(*v, &readOnly) + if err != nil { + return err + } + asv.ReadOnly = &readOnly + } + case "destinationPath": + if v != nil { + var destinationPath string + err = json.Unmarshal(*v, &destinationPath) + if err != nil { + return err + } + asv.DestinationPath = &destinationPath + } + } + } + + return nil +} + +// BasicApplicationScopedVolumeCreationParameters describes parameters for creating application-scoped volumes. +type BasicApplicationScopedVolumeCreationParameters interface { + AsApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk() (*ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, bool) + AsApplicationScopedVolumeCreationParameters() (*ApplicationScopedVolumeCreationParameters, bool) +} + +// ApplicationScopedVolumeCreationParameters describes parameters for creating application-scoped volumes. +type ApplicationScopedVolumeCreationParameters struct { + // Description - User readable description of the volume. + Description *string `json:"description,omitempty"` + // Kind - Possible values include: 'KindApplicationScopedVolumeCreationParameters', 'KindServiceFabricVolumeDisk' + Kind KindBasicApplicationScopedVolumeCreationParameters `json:"kind,omitempty"` +} + +func unmarshalBasicApplicationScopedVolumeCreationParameters(body []byte) (BasicApplicationScopedVolumeCreationParameters, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindServiceFabricVolumeDisk): + var asvcpsfvd ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk + err := json.Unmarshal(body, &asvcpsfvd) + return asvcpsfvd, err + default: + var asvcp ApplicationScopedVolumeCreationParameters + err := json.Unmarshal(body, &asvcp) + return asvcp, err + } +} +func unmarshalBasicApplicationScopedVolumeCreationParametersArray(body []byte) ([]BasicApplicationScopedVolumeCreationParameters, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + asvcpArray := make([]BasicApplicationScopedVolumeCreationParameters, len(rawMessages)) + + for index, rawMessage := range rawMessages { + asvcp, err := unmarshalBasicApplicationScopedVolumeCreationParameters(*rawMessage) + if err != nil { + return nil, err + } + asvcpArray[index] = asvcp + } + return asvcpArray, nil +} + +// MarshalJSON is the custom marshaler for ApplicationScopedVolumeCreationParameters. +func (asvcp ApplicationScopedVolumeCreationParameters) MarshalJSON() ([]byte, error) { + asvcp.Kind = KindApplicationScopedVolumeCreationParameters + objectMap := make(map[string]interface{}) + if asvcp.Description != nil { + objectMap["description"] = asvcp.Description + } + if asvcp.Kind != "" { + objectMap["kind"] = asvcp.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk is the BasicApplicationScopedVolumeCreationParameters implementation for ApplicationScopedVolumeCreationParameters. +func (asvcp ApplicationScopedVolumeCreationParameters) AsApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk() (*ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, bool) { + return nil, false +} + +// AsApplicationScopedVolumeCreationParameters is the BasicApplicationScopedVolumeCreationParameters implementation for ApplicationScopedVolumeCreationParameters. +func (asvcp ApplicationScopedVolumeCreationParameters) AsApplicationScopedVolumeCreationParameters() (*ApplicationScopedVolumeCreationParameters, bool) { + return &asvcp, true +} + +// AsBasicApplicationScopedVolumeCreationParameters is the BasicApplicationScopedVolumeCreationParameters implementation for ApplicationScopedVolumeCreationParameters. +func (asvcp ApplicationScopedVolumeCreationParameters) AsBasicApplicationScopedVolumeCreationParameters() (BasicApplicationScopedVolumeCreationParameters, bool) { + return &asvcp, true +} + +// ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk describes parameters for creating +// application-scoped volumes provided by Service Fabric Volume Disks +type ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk struct { + // SizeDisk - Volume size. Possible values include: 'SizeTypesSmall', 'SizeTypesMedium', 'SizeTypesLarge' + SizeDisk SizeTypes `json:"sizeDisk,omitempty"` + // Description - User readable description of the volume. + Description *string `json:"description,omitempty"` + // Kind - Possible values include: 'KindApplicationScopedVolumeCreationParameters', 'KindServiceFabricVolumeDisk' + Kind KindBasicApplicationScopedVolumeCreationParameters `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. +func (asvcpsfvd ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) MarshalJSON() ([]byte, error) { + asvcpsfvd.Kind = KindServiceFabricVolumeDisk + objectMap := make(map[string]interface{}) + if asvcpsfvd.SizeDisk != "" { + objectMap["sizeDisk"] = asvcpsfvd.SizeDisk + } + if asvcpsfvd.Description != nil { + objectMap["description"] = asvcpsfvd.Description + } + if asvcpsfvd.Kind != "" { + objectMap["kind"] = asvcpsfvd.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk is the BasicApplicationScopedVolumeCreationParameters implementation for ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. +func (asvcpsfvd ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) AsApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk() (*ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, bool) { + return &asvcpsfvd, true +} + +// AsApplicationScopedVolumeCreationParameters is the BasicApplicationScopedVolumeCreationParameters implementation for ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. +func (asvcpsfvd ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) AsApplicationScopedVolumeCreationParameters() (*ApplicationScopedVolumeCreationParameters, bool) { + return nil, false +} + +// AsBasicApplicationScopedVolumeCreationParameters is the BasicApplicationScopedVolumeCreationParameters implementation for ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk. +func (asvcpsfvd ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk) AsBasicApplicationScopedVolumeCreationParameters() (BasicApplicationScopedVolumeCreationParameters, bool) { + return &asvcpsfvd, true +} + +// ApplicationsHealthEvaluation represents health evaluation for applications, containing health +// evaluations for each unhealthy application that impacted current aggregated health state. +type ApplicationsHealthEvaluation struct { + // MaxPercentUnhealthyApplications - Maximum allowed percentage of unhealthy applications from the ClusterHealthPolicy. + MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` + // TotalCount - Total number of applications from the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy ApplicationHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) MarshalJSON() ([]byte, error) { + ahe.Kind = KindApplications + objectMap := make(map[string]interface{}) + if ahe.MaxPercentUnhealthyApplications != nil { + objectMap["MaxPercentUnhealthyApplications"] = ahe.MaxPercentUnhealthyApplications + } + if ahe.TotalCount != nil { + objectMap["TotalCount"] = ahe.TotalCount + } + if ahe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = ahe.UnhealthyEvaluations + } + if ahe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = ahe.AggregatedHealthState + } + if ahe.Description != nil { + objectMap["Description"] = ahe.Description + } + if ahe.Kind != "" { + objectMap["Kind"] = ahe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return &ahe, true +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationsHealthEvaluation. +func (ahe ApplicationsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &ahe, true +} + +// ApplicationTypeApplicationsHealthEvaluation represents health evaluation for applications of a +// particular application type. The application type applications evaluation can be returned when cluster +// health evaluation returns unhealthy aggregated health state, either Error or Warning. It contains health +// evaluations for each unhealthy application of the included application type that impacted current +// aggregated health state. +type ApplicationTypeApplicationsHealthEvaluation struct { + // ApplicationTypeName - The application type name as defined in the application manifest. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // MaxPercentUnhealthyApplications - Maximum allowed percentage of unhealthy applications for the application type, specified as an entry in ApplicationTypeHealthPolicyMap. + MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` + // TotalCount - Total number of applications of the application type found in the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy ApplicationHealthEvaluation of this application type that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) MarshalJSON() ([]byte, error) { + atahe.Kind = KindApplicationTypeApplications + objectMap := make(map[string]interface{}) + if atahe.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = atahe.ApplicationTypeName + } + if atahe.MaxPercentUnhealthyApplications != nil { + objectMap["MaxPercentUnhealthyApplications"] = atahe.MaxPercentUnhealthyApplications + } + if atahe.TotalCount != nil { + objectMap["TotalCount"] = atahe.TotalCount + } + if atahe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = atahe.UnhealthyEvaluations + } + if atahe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = atahe.AggregatedHealthState + } + if atahe.Description != nil { + objectMap["Description"] = atahe.Description + } + if atahe.Kind != "" { + objectMap["Kind"] = atahe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return &atahe, true +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ApplicationTypeApplicationsHealthEvaluation. +func (atahe ApplicationTypeApplicationsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &atahe, true +} + +// ApplicationTypeHealthPolicyMapItem defines an item in ApplicationTypeHealthPolicyMap. +type ApplicationTypeHealthPolicyMapItem struct { + // Key - The key of the application type health policy map item. This is the name of the application type. + Key *string `json:"Key,omitempty"` + // Value - The value of the application type health policy map item. + // The max percent unhealthy applications allowed for the application type. Must be between zero and 100. + Value *int32 `json:"Value,omitempty"` +} + +// ApplicationTypeImageStorePath path description for the application package in the image store specified +// during the prior copy operation. +type ApplicationTypeImageStorePath struct { + // ApplicationTypeBuildPath - The relative image store path to the application package. + ApplicationTypeBuildPath *string `json:"ApplicationTypeBuildPath,omitempty"` +} + +// ApplicationTypeInfo information about an application type. +type ApplicationTypeInfo struct { + // Name - The application type name as defined in the application manifest. + Name *string `json:"Name,omitempty"` + // Version - The version of the application type as defined in the application manifest. + Version *string `json:"Version,omitempty"` + // DefaultParameterList - List of application type parameters that can be overridden when creating or updating the application. + DefaultParameterList *[]ApplicationParameter `json:"DefaultParameterList,omitempty"` + // Status - The status of the application type. Possible values include: 'ApplicationTypeStatusInvalid', 'ApplicationTypeStatusProvisioning', 'ApplicationTypeStatusAvailable', 'ApplicationTypeStatusUnprovisioning', 'ApplicationTypeStatusFailed' + Status ApplicationTypeStatus `json:"Status,omitempty"` + // StatusDetails - Additional detailed information about the status of the application type. + StatusDetails *string `json:"StatusDetails,omitempty"` + // ApplicationTypeDefinitionKind - The mechanism used to define a Service Fabric application type. Possible values include: 'ApplicationTypeDefinitionKindInvalid', 'ApplicationTypeDefinitionKindServiceFabricApplicationPackage', 'ApplicationTypeDefinitionKindCompose' + ApplicationTypeDefinitionKind ApplicationTypeDefinitionKind `json:"ApplicationTypeDefinitionKind,omitempty"` +} + +// ApplicationTypeManifest contains the manifest describing an application type registered in a Service +// Fabric cluster. +type ApplicationTypeManifest struct { + autorest.Response `json:"-"` + // Manifest - The XML manifest as a string. + Manifest *string `json:"Manifest,omitempty"` +} + +// ApplicationUpgradeCompletedEvent application Upgrade Completed event. +type ApplicationUpgradeCompletedEvent struct { + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ApplicationTypeVersion - Application type version. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // OverallUpgradeElapsedTimeInMs - Overall upgrade time in milli-seconds. + OverallUpgradeElapsedTimeInMs *float64 `json:"OverallUpgradeElapsedTimeInMs,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) MarshalJSON() ([]byte, error) { + auce.Kind = KindApplicationUpgradeCompleted + objectMap := make(map[string]interface{}) + if auce.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = auce.ApplicationTypeName + } + if auce.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = auce.ApplicationTypeVersion + } + if auce.OverallUpgradeElapsedTimeInMs != nil { + objectMap["OverallUpgradeElapsedTimeInMs"] = auce.OverallUpgradeElapsedTimeInMs + } + if auce.ApplicationID != nil { + objectMap["ApplicationId"] = auce.ApplicationID + } + if auce.EventInstanceID != nil { + objectMap["EventInstanceId"] = auce.EventInstanceID + } + if auce.Category != nil { + objectMap["Category"] = auce.Category + } + if auce.TimeStamp != nil { + objectMap["TimeStamp"] = auce.TimeStamp + } + if auce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = auce.HasCorrelatedEvents + } + if auce.Kind != "" { + objectMap["Kind"] = auce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &auce, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return &auce, true +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeCompletedEvent. +func (auce ApplicationUpgradeCompletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &auce, true +} + +// ApplicationUpgradeDescription describes the parameters for an application upgrade. Note that upgrade +// description replaces the existing application description. This means that if the parameters are not +// specified, the existing parameters on the applications will be overwritten with the empty parameters +// list. This would result in the application using the default value of the parameters from the +// application manifest. If you do not want to change any existing parameter values, please get the +// application parameters first using the GetApplicationInfo query and then supply those values as +// Parameters in this ApplicationUpgradeDescription. +type ApplicationUpgradeDescription struct { + // Name - The name of the target application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TargetApplicationTypeVersion - The target application type version (found in the application manifest) for the application upgrade. + TargetApplicationTypeVersion *string `json:"TargetApplicationTypeVersion,omitempty"` + // Parameters - List of application parameters with overridden values from their default values specified in the application manifest. + Parameters *[]ApplicationParameter `json:"Parameters,omitempty"` + // UpgradeKind - The kind of upgrade out of the following possible values. Possible values include: 'UpgradeKindInvalid', 'UpgradeKindRolling' + UpgradeKind UpgradeKind `json:"UpgradeKind,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // UpgradeReplicaSetCheckTimeoutInSeconds - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` + // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). + ForceRestart *bool `json:"ForceRestart,omitempty"` + // SortOrder - Defines the order in which an upgrade proceeds through the cluster. Possible values include: 'UpgradeSortOrderInvalid', 'UpgradeSortOrderDefault', 'UpgradeSortOrderNumeric', 'UpgradeSortOrderLexicographical', 'UpgradeSortOrderReverseNumeric', 'UpgradeSortOrderReverseLexicographical' + SortOrder UpgradeSortOrder `json:"SortOrder,omitempty"` + // MonitoringPolicy - Describes the parameters for monitoring an upgrade in Monitored mode. + MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` + // ApplicationHealthPolicy - Defines a health policy used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` + // InstanceCloseDelayDurationInSeconds - Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster + // upgrade, only for those instances which have a non-zero delay duration configured in the service description. See InstanceCloseDelayDurationSeconds property in $ref: "#/definitions/StatelessServiceDescription.yaml" for details. + // Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that the behavior will entirely depend on the delay configured in the stateless service description. + InstanceCloseDelayDurationInSeconds *int64 `json:"InstanceCloseDelayDurationInSeconds,omitempty"` +} + +// ApplicationUpgradeDomainCompletedEvent application Upgrade Domain Completed event. +type ApplicationUpgradeDomainCompletedEvent struct { + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // CurrentApplicationTypeVersion - Current Application type version. + CurrentApplicationTypeVersion *string `json:"CurrentApplicationTypeVersion,omitempty"` + // ApplicationTypeVersion - Target Application type version. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // UpgradeState - State of upgrade. + UpgradeState *string `json:"UpgradeState,omitempty"` + // UpgradeDomains - Upgrade domains. + UpgradeDomains *string `json:"UpgradeDomains,omitempty"` + // UpgradeDomainElapsedTimeInMs - Upgrade time of domain in milli-seconds. + UpgradeDomainElapsedTimeInMs *float64 `json:"UpgradeDomainElapsedTimeInMs,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) MarshalJSON() ([]byte, error) { + audce.Kind = KindApplicationUpgradeDomainCompleted + objectMap := make(map[string]interface{}) + if audce.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = audce.ApplicationTypeName + } + if audce.CurrentApplicationTypeVersion != nil { + objectMap["CurrentApplicationTypeVersion"] = audce.CurrentApplicationTypeVersion + } + if audce.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = audce.ApplicationTypeVersion + } + if audce.UpgradeState != nil { + objectMap["UpgradeState"] = audce.UpgradeState + } + if audce.UpgradeDomains != nil { + objectMap["UpgradeDomains"] = audce.UpgradeDomains + } + if audce.UpgradeDomainElapsedTimeInMs != nil { + objectMap["UpgradeDomainElapsedTimeInMs"] = audce.UpgradeDomainElapsedTimeInMs + } + if audce.ApplicationID != nil { + objectMap["ApplicationId"] = audce.ApplicationID + } + if audce.EventInstanceID != nil { + objectMap["EventInstanceId"] = audce.EventInstanceID + } + if audce.Category != nil { + objectMap["Category"] = audce.Category + } + if audce.TimeStamp != nil { + objectMap["TimeStamp"] = audce.TimeStamp + } + if audce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = audce.HasCorrelatedEvents + } + if audce.Kind != "" { + objectMap["Kind"] = audce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &audce, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return &audce, true +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeDomainCompletedEvent. +func (audce ApplicationUpgradeDomainCompletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &audce, true +} + +// ApplicationUpgradeProgressInfo describes the parameters for an application upgrade. +type ApplicationUpgradeProgressInfo struct { + autorest.Response `json:"-"` + // Name - The name of the target application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TypeName - The application type name as defined in the application manifest. + TypeName *string `json:"TypeName,omitempty"` + // TargetApplicationTypeVersion - The target application type version (found in the application manifest) for the application upgrade. + TargetApplicationTypeVersion *string `json:"TargetApplicationTypeVersion,omitempty"` + // UpgradeDomains - List of upgrade domains and their statuses. + UpgradeDomains *[]UpgradeDomainInfo `json:"UpgradeDomains,omitempty"` + // UpgradeState - The state of the upgrade domain. Possible values include: 'UpgradeStateInvalid', 'UpgradeStateRollingBackInProgress', 'UpgradeStateRollingBackCompleted', 'UpgradeStateRollingForwardPending', 'UpgradeStateRollingForwardInProgress', 'UpgradeStateRollingForwardCompleted', 'UpgradeStateFailed' + UpgradeState UpgradeState `json:"UpgradeState,omitempty"` + // NextUpgradeDomain - The name of the next upgrade domain to be processed. + NextUpgradeDomain *string `json:"NextUpgradeDomain,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // UpgradeDescription - Describes the parameters for an application upgrade. Note that upgrade description replaces the existing application description. This means that if the parameters are not specified, the existing parameters on the applications will be overwritten with the empty parameters list. This would result in the application using the default value of the parameters from the application manifest. If you do not want to change any existing parameter values, please get the application parameters first using the GetApplicationInfo query and then supply those values as Parameters in this ApplicationUpgradeDescription. + UpgradeDescription *ApplicationUpgradeDescription `json:"UpgradeDescription,omitempty"` + // UpgradeDurationInMilliseconds - The estimated total amount of time spent processing the overall upgrade. + UpgradeDurationInMilliseconds *string `json:"UpgradeDurationInMilliseconds,omitempty"` + // UpgradeDomainDurationInMilliseconds - The estimated total amount of time spent processing the current upgrade domain. + UpgradeDomainDurationInMilliseconds *string `json:"UpgradeDomainDurationInMilliseconds,omitempty"` + // UnhealthyEvaluations - List of health evaluations that resulted in the current aggregated health state. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // CurrentUpgradeDomainProgress - Information about the current in-progress upgrade domain. + CurrentUpgradeDomainProgress *CurrentUpgradeDomainProgressInfo `json:"CurrentUpgradeDomainProgress,omitempty"` + // StartTimestampUtc - The estimated UTC datetime when the upgrade started. + StartTimestampUtc *string `json:"StartTimestampUtc,omitempty"` + // FailureTimestampUtc - The estimated UTC datetime when the upgrade failed and FailureAction was executed. + FailureTimestampUtc *string `json:"FailureTimestampUtc,omitempty"` + // FailureReason - The cause of an upgrade failure that resulted in FailureAction being executed. Possible values include: 'None', 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'OverallUpgradeTimeout' + FailureReason FailureReason `json:"FailureReason,omitempty"` + // UpgradeDomainProgressAtFailure - Information about the upgrade domain progress at the time of upgrade failure. + UpgradeDomainProgressAtFailure *FailureUpgradeDomainProgressInfo `json:"UpgradeDomainProgressAtFailure,omitempty"` + // UpgradeStatusDetails - Additional detailed information about the status of the pending upgrade. + UpgradeStatusDetails *string `json:"UpgradeStatusDetails,omitempty"` +} + +// ApplicationUpgradeRollbackCompletedEvent application Upgrade Rollback Completed event. +type ApplicationUpgradeRollbackCompletedEvent struct { + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ApplicationTypeVersion - Application type version. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // FailureReason - Describes reason of failure. + FailureReason *string `json:"FailureReason,omitempty"` + // OverallUpgradeElapsedTimeInMs - Overall upgrade time in milli-seconds. + OverallUpgradeElapsedTimeInMs *float64 `json:"OverallUpgradeElapsedTimeInMs,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) MarshalJSON() ([]byte, error) { + aurce.Kind = KindApplicationUpgradeRollbackCompleted + objectMap := make(map[string]interface{}) + if aurce.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = aurce.ApplicationTypeName + } + if aurce.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = aurce.ApplicationTypeVersion + } + if aurce.FailureReason != nil { + objectMap["FailureReason"] = aurce.FailureReason + } + if aurce.OverallUpgradeElapsedTimeInMs != nil { + objectMap["OverallUpgradeElapsedTimeInMs"] = aurce.OverallUpgradeElapsedTimeInMs + } + if aurce.ApplicationID != nil { + objectMap["ApplicationId"] = aurce.ApplicationID + } + if aurce.EventInstanceID != nil { + objectMap["EventInstanceId"] = aurce.EventInstanceID + } + if aurce.Category != nil { + objectMap["Category"] = aurce.Category + } + if aurce.TimeStamp != nil { + objectMap["TimeStamp"] = aurce.TimeStamp + } + if aurce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = aurce.HasCorrelatedEvents + } + if aurce.Kind != "" { + objectMap["Kind"] = aurce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &aurce, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return &aurce, true +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackCompletedEvent. +func (aurce ApplicationUpgradeRollbackCompletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &aurce, true +} + +// ApplicationUpgradeRollbackStartedEvent application Upgrade Rollback Started event. +type ApplicationUpgradeRollbackStartedEvent struct { + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // CurrentApplicationTypeVersion - Current Application type version. + CurrentApplicationTypeVersion *string `json:"CurrentApplicationTypeVersion,omitempty"` + // ApplicationTypeVersion - Target Application type version. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // FailureReason - Describes reason of failure. + FailureReason *string `json:"FailureReason,omitempty"` + // OverallUpgradeElapsedTimeInMs - Overall upgrade time in milli-seconds. + OverallUpgradeElapsedTimeInMs *float64 `json:"OverallUpgradeElapsedTimeInMs,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) MarshalJSON() ([]byte, error) { + aurse.Kind = KindApplicationUpgradeRollbackStarted + objectMap := make(map[string]interface{}) + if aurse.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = aurse.ApplicationTypeName + } + if aurse.CurrentApplicationTypeVersion != nil { + objectMap["CurrentApplicationTypeVersion"] = aurse.CurrentApplicationTypeVersion + } + if aurse.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = aurse.ApplicationTypeVersion + } + if aurse.FailureReason != nil { + objectMap["FailureReason"] = aurse.FailureReason + } + if aurse.OverallUpgradeElapsedTimeInMs != nil { + objectMap["OverallUpgradeElapsedTimeInMs"] = aurse.OverallUpgradeElapsedTimeInMs + } + if aurse.ApplicationID != nil { + objectMap["ApplicationId"] = aurse.ApplicationID + } + if aurse.EventInstanceID != nil { + objectMap["EventInstanceId"] = aurse.EventInstanceID + } + if aurse.Category != nil { + objectMap["Category"] = aurse.Category + } + if aurse.TimeStamp != nil { + objectMap["TimeStamp"] = aurse.TimeStamp + } + if aurse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = aurse.HasCorrelatedEvents + } + if aurse.Kind != "" { + objectMap["Kind"] = aurse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &aurse, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return &aurse, true +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeRollbackStartedEvent. +func (aurse ApplicationUpgradeRollbackStartedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &aurse, true +} + +// ApplicationUpgradeStartedEvent application Upgrade Started event. +type ApplicationUpgradeStartedEvent struct { + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // CurrentApplicationTypeVersion - Current Application type version. + CurrentApplicationTypeVersion *string `json:"CurrentApplicationTypeVersion,omitempty"` + // ApplicationTypeVersion - Target Application type version. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // UpgradeType - Type of upgrade. + UpgradeType *string `json:"UpgradeType,omitempty"` + // RollingUpgradeMode - Mode of upgrade. + RollingUpgradeMode *string `json:"RollingUpgradeMode,omitempty"` + // FailureAction - Action if failed. + FailureAction *string `json:"FailureAction,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) MarshalJSON() ([]byte, error) { + ause.Kind = KindApplicationUpgradeStarted + objectMap := make(map[string]interface{}) + if ause.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = ause.ApplicationTypeName + } + if ause.CurrentApplicationTypeVersion != nil { + objectMap["CurrentApplicationTypeVersion"] = ause.CurrentApplicationTypeVersion + } + if ause.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = ause.ApplicationTypeVersion + } + if ause.UpgradeType != nil { + objectMap["UpgradeType"] = ause.UpgradeType + } + if ause.RollingUpgradeMode != nil { + objectMap["RollingUpgradeMode"] = ause.RollingUpgradeMode + } + if ause.FailureAction != nil { + objectMap["FailureAction"] = ause.FailureAction + } + if ause.ApplicationID != nil { + objectMap["ApplicationId"] = ause.ApplicationID + } + if ause.EventInstanceID != nil { + objectMap["EventInstanceId"] = ause.EventInstanceID + } + if ause.Category != nil { + objectMap["Category"] = ause.Category + } + if ause.TimeStamp != nil { + objectMap["TimeStamp"] = ause.TimeStamp + } + if ause.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ause.HasCorrelatedEvents + } + if ause.Kind != "" { + objectMap["Kind"] = ause.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &ause, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return &ause, true +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ApplicationUpgradeStartedEvent. +func (ause ApplicationUpgradeStartedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ause, true +} + +// ApplicationUpgradeUpdateDescription describes the parameters for updating an ongoing application +// upgrade. +type ApplicationUpgradeUpdateDescription struct { + // Name - The name of the application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // UpgradeKind - The kind of upgrade out of the following possible values. Possible values include: 'UpgradeKindInvalid', 'UpgradeKindRolling' + UpgradeKind UpgradeKind `json:"UpgradeKind,omitempty"` + // ApplicationHealthPolicy - Defines a health policy used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` + // UpdateDescription - Describes the parameters for updating a rolling upgrade of application or cluster. + UpdateDescription *RollingUpgradeUpdateDescription `json:"UpdateDescription,omitempty"` +} + +// BasicAutoScalingMechanism describes the mechanism for performing auto scaling operation. Derived classes will +// describe the actual mechanism. +type BasicAutoScalingMechanism interface { + AsAddRemoveReplicaScalingMechanism() (*AddRemoveReplicaScalingMechanism, bool) + AsAutoScalingMechanism() (*AutoScalingMechanism, bool) +} + +// AutoScalingMechanism describes the mechanism for performing auto scaling operation. Derived classes will +// describe the actual mechanism. +type AutoScalingMechanism struct { + // Kind - Possible values include: 'KindAutoScalingMechanism', 'KindAddRemoveReplica' + Kind KindBasicAutoScalingMechanism `json:"kind,omitempty"` +} + +func unmarshalBasicAutoScalingMechanism(body []byte) (BasicAutoScalingMechanism, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindAddRemoveReplica): + var arrsm AddRemoveReplicaScalingMechanism + err := json.Unmarshal(body, &arrsm) + return arrsm, err + default: + var asm AutoScalingMechanism + err := json.Unmarshal(body, &asm) + return asm, err + } +} +func unmarshalBasicAutoScalingMechanismArray(body []byte) ([]BasicAutoScalingMechanism, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + asmArray := make([]BasicAutoScalingMechanism, len(rawMessages)) + + for index, rawMessage := range rawMessages { + asm, err := unmarshalBasicAutoScalingMechanism(*rawMessage) + if err != nil { + return nil, err + } + asmArray[index] = asm + } + return asmArray, nil +} + +// MarshalJSON is the custom marshaler for AutoScalingMechanism. +func (asm AutoScalingMechanism) MarshalJSON() ([]byte, error) { + asm.Kind = KindAutoScalingMechanism + objectMap := make(map[string]interface{}) + if asm.Kind != "" { + objectMap["kind"] = asm.Kind + } + return json.Marshal(objectMap) +} + +// AsAddRemoveReplicaScalingMechanism is the BasicAutoScalingMechanism implementation for AutoScalingMechanism. +func (asm AutoScalingMechanism) AsAddRemoveReplicaScalingMechanism() (*AddRemoveReplicaScalingMechanism, bool) { + return nil, false +} + +// AsAutoScalingMechanism is the BasicAutoScalingMechanism implementation for AutoScalingMechanism. +func (asm AutoScalingMechanism) AsAutoScalingMechanism() (*AutoScalingMechanism, bool) { + return &asm, true +} + +// AsBasicAutoScalingMechanism is the BasicAutoScalingMechanism implementation for AutoScalingMechanism. +func (asm AutoScalingMechanism) AsBasicAutoScalingMechanism() (BasicAutoScalingMechanism, bool) { + return &asm, true +} + +// BasicAutoScalingMetric describes the metric that is used for triggering auto scaling operation. Derived classes will +// describe resources or metrics. +type BasicAutoScalingMetric interface { + AsAutoScalingResourceMetric() (*AutoScalingResourceMetric, bool) + AsAutoScalingMetric() (*AutoScalingMetric, bool) +} + +// AutoScalingMetric describes the metric that is used for triggering auto scaling operation. Derived classes +// will describe resources or metrics. +type AutoScalingMetric struct { + // Kind - Possible values include: 'KindAutoScalingMetric', 'KindResource' + Kind KindBasicAutoScalingMetric `json:"kind,omitempty"` +} + +func unmarshalBasicAutoScalingMetric(body []byte) (BasicAutoScalingMetric, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindResource): + var asrm AutoScalingResourceMetric + err := json.Unmarshal(body, &asrm) + return asrm, err + default: + var asm AutoScalingMetric + err := json.Unmarshal(body, &asm) + return asm, err + } +} +func unmarshalBasicAutoScalingMetricArray(body []byte) ([]BasicAutoScalingMetric, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + asmArray := make([]BasicAutoScalingMetric, len(rawMessages)) + + for index, rawMessage := range rawMessages { + asm, err := unmarshalBasicAutoScalingMetric(*rawMessage) + if err != nil { + return nil, err + } + asmArray[index] = asm + } + return asmArray, nil +} + +// MarshalJSON is the custom marshaler for AutoScalingMetric. +func (asm AutoScalingMetric) MarshalJSON() ([]byte, error) { + asm.Kind = KindAutoScalingMetric + objectMap := make(map[string]interface{}) + if asm.Kind != "" { + objectMap["kind"] = asm.Kind + } + return json.Marshal(objectMap) +} + +// AsAutoScalingResourceMetric is the BasicAutoScalingMetric implementation for AutoScalingMetric. +func (asm AutoScalingMetric) AsAutoScalingResourceMetric() (*AutoScalingResourceMetric, bool) { + return nil, false +} + +// AsAutoScalingMetric is the BasicAutoScalingMetric implementation for AutoScalingMetric. +func (asm AutoScalingMetric) AsAutoScalingMetric() (*AutoScalingMetric, bool) { + return &asm, true +} + +// AsBasicAutoScalingMetric is the BasicAutoScalingMetric implementation for AutoScalingMetric. +func (asm AutoScalingMetric) AsBasicAutoScalingMetric() (BasicAutoScalingMetric, bool) { + return &asm, true +} + +// AutoScalingPolicy describes the auto scaling policy +type AutoScalingPolicy struct { + // Name - The name of the auto scaling policy. + Name *string `json:"name,omitempty"` + // Trigger - Determines when auto scaling operation will be invoked. + Trigger BasicAutoScalingTrigger `json:"trigger,omitempty"` + // Mechanism - The mechanism that is used to scale when auto scaling operation is invoked. + Mechanism BasicAutoScalingMechanism `json:"mechanism,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for AutoScalingPolicy struct. +func (asp *AutoScalingPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + asp.Name = &name + } + case "trigger": + if v != nil { + trigger, err := unmarshalBasicAutoScalingTrigger(*v) + if err != nil { + return err + } + asp.Trigger = trigger + } + case "mechanism": + if v != nil { + mechanism, err := unmarshalBasicAutoScalingMechanism(*v) + if err != nil { + return err + } + asp.Mechanism = mechanism + } + } + } + + return nil +} + +// AutoScalingResourceMetric describes the resource that is used for triggering auto scaling. +type AutoScalingResourceMetric struct { + // Name - Name of the resource. Possible values include: 'CPU', 'MemoryInGB' + Name AutoScalingResourceMetricName `json:"name,omitempty"` + // Kind - Possible values include: 'KindAutoScalingMetric', 'KindResource' + Kind KindBasicAutoScalingMetric `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AutoScalingResourceMetric. +func (asrm AutoScalingResourceMetric) MarshalJSON() ([]byte, error) { + asrm.Kind = KindResource + objectMap := make(map[string]interface{}) + if asrm.Name != "" { + objectMap["name"] = asrm.Name + } + if asrm.Kind != "" { + objectMap["kind"] = asrm.Kind + } + return json.Marshal(objectMap) +} + +// AsAutoScalingResourceMetric is the BasicAutoScalingMetric implementation for AutoScalingResourceMetric. +func (asrm AutoScalingResourceMetric) AsAutoScalingResourceMetric() (*AutoScalingResourceMetric, bool) { + return &asrm, true +} + +// AsAutoScalingMetric is the BasicAutoScalingMetric implementation for AutoScalingResourceMetric. +func (asrm AutoScalingResourceMetric) AsAutoScalingMetric() (*AutoScalingMetric, bool) { + return nil, false +} + +// AsBasicAutoScalingMetric is the BasicAutoScalingMetric implementation for AutoScalingResourceMetric. +func (asrm AutoScalingResourceMetric) AsBasicAutoScalingMetric() (BasicAutoScalingMetric, bool) { + return &asrm, true +} + +// BasicAutoScalingTrigger describes the trigger for performing auto scaling operation. +type BasicAutoScalingTrigger interface { + AsAverageLoadScalingTrigger() (*AverageLoadScalingTrigger, bool) + AsAutoScalingTrigger() (*AutoScalingTrigger, bool) +} + +// AutoScalingTrigger describes the trigger for performing auto scaling operation. +type AutoScalingTrigger struct { + // Kind - Possible values include: 'KindAutoScalingTrigger', 'KindAverageLoad' + Kind KindBasicAutoScalingTrigger `json:"kind,omitempty"` +} + +func unmarshalBasicAutoScalingTrigger(body []byte) (BasicAutoScalingTrigger, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindAverageLoad): + var alst AverageLoadScalingTrigger + err := json.Unmarshal(body, &alst) + return alst, err + default: + var astVar AutoScalingTrigger + err := json.Unmarshal(body, &astVar) + return astVar, err + } +} +func unmarshalBasicAutoScalingTriggerArray(body []byte) ([]BasicAutoScalingTrigger, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + astVarArray := make([]BasicAutoScalingTrigger, len(rawMessages)) + + for index, rawMessage := range rawMessages { + astVar, err := unmarshalBasicAutoScalingTrigger(*rawMessage) + if err != nil { + return nil, err + } + astVarArray[index] = astVar + } + return astVarArray, nil +} + +// MarshalJSON is the custom marshaler for AutoScalingTrigger. +func (astVar AutoScalingTrigger) MarshalJSON() ([]byte, error) { + astVar.Kind = KindAutoScalingTrigger + objectMap := make(map[string]interface{}) + if astVar.Kind != "" { + objectMap["kind"] = astVar.Kind + } + return json.Marshal(objectMap) +} + +// AsAverageLoadScalingTrigger is the BasicAutoScalingTrigger implementation for AutoScalingTrigger. +func (astVar AutoScalingTrigger) AsAverageLoadScalingTrigger() (*AverageLoadScalingTrigger, bool) { + return nil, false +} + +// AsAutoScalingTrigger is the BasicAutoScalingTrigger implementation for AutoScalingTrigger. +func (astVar AutoScalingTrigger) AsAutoScalingTrigger() (*AutoScalingTrigger, bool) { + return &astVar, true +} + +// AsBasicAutoScalingTrigger is the BasicAutoScalingTrigger implementation for AutoScalingTrigger. +func (astVar AutoScalingTrigger) AsBasicAutoScalingTrigger() (BasicAutoScalingTrigger, bool) { + return &astVar, true +} + +// AverageLoadScalingTrigger describes the average load trigger used for auto scaling. +type AverageLoadScalingTrigger struct { + // Metric - Description of the metric that is used for scaling. + Metric BasicAutoScalingMetric `json:"metric,omitempty"` + // LowerLoadThreshold - Lower load threshold (if average load is below this threshold, service will scale down). + LowerLoadThreshold *float64 `json:"lowerLoadThreshold,omitempty"` + // UpperLoadThreshold - Upper load threshold (if average load is above this threshold, service will scale up). + UpperLoadThreshold *float64 `json:"upperLoadThreshold,omitempty"` + // ScaleIntervalInSeconds - Scale interval that indicates how often will this trigger be checked. + ScaleIntervalInSeconds *int32 `json:"scaleIntervalInSeconds,omitempty"` + // Kind - Possible values include: 'KindAutoScalingTrigger', 'KindAverageLoad' + Kind KindBasicAutoScalingTrigger `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AverageLoadScalingTrigger. +func (alst AverageLoadScalingTrigger) MarshalJSON() ([]byte, error) { + alst.Kind = KindAverageLoad + objectMap := make(map[string]interface{}) + objectMap["metric"] = alst.Metric + if alst.LowerLoadThreshold != nil { + objectMap["lowerLoadThreshold"] = alst.LowerLoadThreshold + } + if alst.UpperLoadThreshold != nil { + objectMap["upperLoadThreshold"] = alst.UpperLoadThreshold + } + if alst.ScaleIntervalInSeconds != nil { + objectMap["scaleIntervalInSeconds"] = alst.ScaleIntervalInSeconds + } + if alst.Kind != "" { + objectMap["kind"] = alst.Kind + } + return json.Marshal(objectMap) +} + +// AsAverageLoadScalingTrigger is the BasicAutoScalingTrigger implementation for AverageLoadScalingTrigger. +func (alst AverageLoadScalingTrigger) AsAverageLoadScalingTrigger() (*AverageLoadScalingTrigger, bool) { + return &alst, true +} + +// AsAutoScalingTrigger is the BasicAutoScalingTrigger implementation for AverageLoadScalingTrigger. +func (alst AverageLoadScalingTrigger) AsAutoScalingTrigger() (*AutoScalingTrigger, bool) { + return nil, false +} + +// AsBasicAutoScalingTrigger is the BasicAutoScalingTrigger implementation for AverageLoadScalingTrigger. +func (alst AverageLoadScalingTrigger) AsBasicAutoScalingTrigger() (BasicAutoScalingTrigger, bool) { + return &alst, true +} + +// UnmarshalJSON is the custom unmarshaler for AverageLoadScalingTrigger struct. +func (alst *AverageLoadScalingTrigger) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "metric": + if v != nil { + metric, err := unmarshalBasicAutoScalingMetric(*v) + if err != nil { + return err + } + alst.Metric = metric + } + case "lowerLoadThreshold": + if v != nil { + var lowerLoadThreshold float64 + err = json.Unmarshal(*v, &lowerLoadThreshold) + if err != nil { + return err + } + alst.LowerLoadThreshold = &lowerLoadThreshold + } + case "upperLoadThreshold": + if v != nil { + var upperLoadThreshold float64 + err = json.Unmarshal(*v, &upperLoadThreshold) + if err != nil { + return err + } + alst.UpperLoadThreshold = &upperLoadThreshold + } + case "scaleIntervalInSeconds": + if v != nil { + var scaleIntervalInSeconds int32 + err = json.Unmarshal(*v, &scaleIntervalInSeconds) + if err != nil { + return err + } + alst.ScaleIntervalInSeconds = &scaleIntervalInSeconds + } + case "kind": + if v != nil { + var kind KindBasicAutoScalingTrigger + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + alst.Kind = kind + } + } + } + + return nil +} + +// AveragePartitionLoadScalingTrigger represents a scaling trigger related to an average load of a +// metric/resource of a partition. +type AveragePartitionLoadScalingTrigger struct { + // MetricName - The name of the metric for which usage should be tracked. + MetricName *string `json:"MetricName,omitempty"` + // LowerLoadThreshold - The lower limit of the load below which a scale in operation should be performed. + LowerLoadThreshold *string `json:"LowerLoadThreshold,omitempty"` + // UpperLoadThreshold - The upper limit of the load beyond which a scale out operation should be performed. + UpperLoadThreshold *string `json:"UpperLoadThreshold,omitempty"` + // ScaleIntervalInSeconds - The period in seconds on which a decision is made whether to scale or not. + ScaleIntervalInSeconds *int64 `json:"ScaleIntervalInSeconds,omitempty"` + // Kind - Possible values include: 'KindScalingTriggerDescription', 'KindAveragePartitionLoad', 'KindAverageServiceLoad' + Kind KindBasicScalingTriggerDescription `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AveragePartitionLoadScalingTrigger. +func (aplst AveragePartitionLoadScalingTrigger) MarshalJSON() ([]byte, error) { + aplst.Kind = KindAveragePartitionLoad + objectMap := make(map[string]interface{}) + if aplst.MetricName != nil { + objectMap["MetricName"] = aplst.MetricName + } + if aplst.LowerLoadThreshold != nil { + objectMap["LowerLoadThreshold"] = aplst.LowerLoadThreshold + } + if aplst.UpperLoadThreshold != nil { + objectMap["UpperLoadThreshold"] = aplst.UpperLoadThreshold + } + if aplst.ScaleIntervalInSeconds != nil { + objectMap["ScaleIntervalInSeconds"] = aplst.ScaleIntervalInSeconds + } + if aplst.Kind != "" { + objectMap["Kind"] = aplst.Kind + } + return json.Marshal(objectMap) +} + +// AsAveragePartitionLoadScalingTrigger is the BasicScalingTriggerDescription implementation for AveragePartitionLoadScalingTrigger. +func (aplst AveragePartitionLoadScalingTrigger) AsAveragePartitionLoadScalingTrigger() (*AveragePartitionLoadScalingTrigger, bool) { + return &aplst, true +} + +// AsAverageServiceLoadScalingTrigger is the BasicScalingTriggerDescription implementation for AveragePartitionLoadScalingTrigger. +func (aplst AveragePartitionLoadScalingTrigger) AsAverageServiceLoadScalingTrigger() (*AverageServiceLoadScalingTrigger, bool) { + return nil, false +} + +// AsScalingTriggerDescription is the BasicScalingTriggerDescription implementation for AveragePartitionLoadScalingTrigger. +func (aplst AveragePartitionLoadScalingTrigger) AsScalingTriggerDescription() (*ScalingTriggerDescription, bool) { + return nil, false +} + +// AsBasicScalingTriggerDescription is the BasicScalingTriggerDescription implementation for AveragePartitionLoadScalingTrigger. +func (aplst AveragePartitionLoadScalingTrigger) AsBasicScalingTriggerDescription() (BasicScalingTriggerDescription, bool) { + return &aplst, true +} + +// AverageServiceLoadScalingTrigger represents a scaling policy related to an average load of a +// metric/resource of a service. +type AverageServiceLoadScalingTrigger struct { + // MetricName - The name of the metric for which usage should be tracked. + MetricName *string `json:"MetricName,omitempty"` + // LowerLoadThreshold - The lower limit of the load below which a scale in operation should be performed. + LowerLoadThreshold *string `json:"LowerLoadThreshold,omitempty"` + // UpperLoadThreshold - The upper limit of the load beyond which a scale out operation should be performed. + UpperLoadThreshold *string `json:"UpperLoadThreshold,omitempty"` + // ScaleIntervalInSeconds - The period in seconds on which a decision is made whether to scale or not. + ScaleIntervalInSeconds *int64 `json:"ScaleIntervalInSeconds,omitempty"` + // Kind - Possible values include: 'KindScalingTriggerDescription', 'KindAveragePartitionLoad', 'KindAverageServiceLoad' + Kind KindBasicScalingTriggerDescription `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AverageServiceLoadScalingTrigger. +func (aslst AverageServiceLoadScalingTrigger) MarshalJSON() ([]byte, error) { + aslst.Kind = KindAverageServiceLoad + objectMap := make(map[string]interface{}) + if aslst.MetricName != nil { + objectMap["MetricName"] = aslst.MetricName + } + if aslst.LowerLoadThreshold != nil { + objectMap["LowerLoadThreshold"] = aslst.LowerLoadThreshold + } + if aslst.UpperLoadThreshold != nil { + objectMap["UpperLoadThreshold"] = aslst.UpperLoadThreshold + } + if aslst.ScaleIntervalInSeconds != nil { + objectMap["ScaleIntervalInSeconds"] = aslst.ScaleIntervalInSeconds + } + if aslst.Kind != "" { + objectMap["Kind"] = aslst.Kind + } + return json.Marshal(objectMap) +} + +// AsAveragePartitionLoadScalingTrigger is the BasicScalingTriggerDescription implementation for AverageServiceLoadScalingTrigger. +func (aslst AverageServiceLoadScalingTrigger) AsAveragePartitionLoadScalingTrigger() (*AveragePartitionLoadScalingTrigger, bool) { + return nil, false +} + +// AsAverageServiceLoadScalingTrigger is the BasicScalingTriggerDescription implementation for AverageServiceLoadScalingTrigger. +func (aslst AverageServiceLoadScalingTrigger) AsAverageServiceLoadScalingTrigger() (*AverageServiceLoadScalingTrigger, bool) { + return &aslst, true +} + +// AsScalingTriggerDescription is the BasicScalingTriggerDescription implementation for AverageServiceLoadScalingTrigger. +func (aslst AverageServiceLoadScalingTrigger) AsScalingTriggerDescription() (*ScalingTriggerDescription, bool) { + return nil, false +} + +// AsBasicScalingTriggerDescription is the BasicScalingTriggerDescription implementation for AverageServiceLoadScalingTrigger. +func (aslst AverageServiceLoadScalingTrigger) AsBasicScalingTriggerDescription() (BasicScalingTriggerDescription, bool) { + return &aslst, true +} + +// AzureBlobBackupStorageDescription describes the parameters for Azure blob store used for storing and +// enumerating backups. +type AzureBlobBackupStorageDescription struct { + // ConnectionString - The connection string to connect to the Azure blob store. + ConnectionString *string `json:"ConnectionString,omitempty"` + // ContainerName - The name of the container in the blob store to store and enumerate backups from. + ContainerName *string `json:"ContainerName,omitempty"` + // FriendlyName - Friendly name for this backup storage. + FriendlyName *string `json:"FriendlyName,omitempty"` + // StorageKind - Possible values include: 'StorageKindBackupStorageDescription', 'StorageKindAzureBlobStore', 'StorageKindFileShare' + StorageKind StorageKind `json:"StorageKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureBlobBackupStorageDescription. +func (abbsd AzureBlobBackupStorageDescription) MarshalJSON() ([]byte, error) { + abbsd.StorageKind = StorageKindAzureBlobStore + objectMap := make(map[string]interface{}) + if abbsd.ConnectionString != nil { + objectMap["ConnectionString"] = abbsd.ConnectionString + } + if abbsd.ContainerName != nil { + objectMap["ContainerName"] = abbsd.ContainerName + } + if abbsd.FriendlyName != nil { + objectMap["FriendlyName"] = abbsd.FriendlyName + } + if abbsd.StorageKind != "" { + objectMap["StorageKind"] = abbsd.StorageKind + } + return json.Marshal(objectMap) +} + +// AsAzureBlobBackupStorageDescription is the BasicBackupStorageDescription implementation for AzureBlobBackupStorageDescription. +func (abbsd AzureBlobBackupStorageDescription) AsAzureBlobBackupStorageDescription() (*AzureBlobBackupStorageDescription, bool) { + return &abbsd, true +} + +// AsFileShareBackupStorageDescription is the BasicBackupStorageDescription implementation for AzureBlobBackupStorageDescription. +func (abbsd AzureBlobBackupStorageDescription) AsFileShareBackupStorageDescription() (*FileShareBackupStorageDescription, bool) { + return nil, false +} + +// AsBackupStorageDescription is the BasicBackupStorageDescription implementation for AzureBlobBackupStorageDescription. +func (abbsd AzureBlobBackupStorageDescription) AsBackupStorageDescription() (*BackupStorageDescription, bool) { + return nil, false +} + +// AsBasicBackupStorageDescription is the BasicBackupStorageDescription implementation for AzureBlobBackupStorageDescription. +func (abbsd AzureBlobBackupStorageDescription) AsBasicBackupStorageDescription() (BasicBackupStorageDescription, bool) { + return &abbsd, true +} + +// AzureInternalMonitoringPipelineSinkDescription diagnostics settings for Geneva. +type AzureInternalMonitoringPipelineSinkDescription struct { + // AccountName - Azure Internal monitoring pipeline account. + AccountName *string `json:"accountName,omitempty"` + // Namespace - Azure Internal monitoring pipeline account namespace. + Namespace *string `json:"namespace,omitempty"` + // MaConfigURL - Azure Internal monitoring agent configuration. + MaConfigURL *string `json:"maConfigUrl,omitempty"` + // FluentdConfigURL - Azure Internal monitoring agent fluentd configuration. + FluentdConfigURL *string `json:"fluentdConfigUrl,omitempty"` + // AutoKeyConfigURL - Azure Internal monitoring pipeline autokey associated with the certificate. + AutoKeyConfigURL *string `json:"autoKeyConfigUrl,omitempty"` + // Name - Name of the sink. This value is referenced by DiagnosticsReferenceDescription + Name *string `json:"name,omitempty"` + // Description - A description of the sink. + Description *string `json:"description,omitempty"` + // Kind - Possible values include: 'KindDiagnosticsSinkProperties', 'KindAzureInternalMonitoringPipeline' + Kind KindBasicDiagnosticsSinkProperties `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureInternalMonitoringPipelineSinkDescription. +func (aimpsd AzureInternalMonitoringPipelineSinkDescription) MarshalJSON() ([]byte, error) { + aimpsd.Kind = KindAzureInternalMonitoringPipeline + objectMap := make(map[string]interface{}) + if aimpsd.AccountName != nil { + objectMap["accountName"] = aimpsd.AccountName + } + if aimpsd.Namespace != nil { + objectMap["namespace"] = aimpsd.Namespace + } + if aimpsd.MaConfigURL != nil { + objectMap["maConfigUrl"] = aimpsd.MaConfigURL + } + if aimpsd.FluentdConfigURL != nil { + objectMap["fluentdConfigUrl"] = aimpsd.FluentdConfigURL + } + if aimpsd.AutoKeyConfigURL != nil { + objectMap["autoKeyConfigUrl"] = aimpsd.AutoKeyConfigURL + } + if aimpsd.Name != nil { + objectMap["name"] = aimpsd.Name + } + if aimpsd.Description != nil { + objectMap["description"] = aimpsd.Description + } + if aimpsd.Kind != "" { + objectMap["kind"] = aimpsd.Kind + } + return json.Marshal(objectMap) +} + +// AsAzureInternalMonitoringPipelineSinkDescription is the BasicDiagnosticsSinkProperties implementation for AzureInternalMonitoringPipelineSinkDescription. +func (aimpsd AzureInternalMonitoringPipelineSinkDescription) AsAzureInternalMonitoringPipelineSinkDescription() (*AzureInternalMonitoringPipelineSinkDescription, bool) { + return &aimpsd, true +} + +// AsDiagnosticsSinkProperties is the BasicDiagnosticsSinkProperties implementation for AzureInternalMonitoringPipelineSinkDescription. +func (aimpsd AzureInternalMonitoringPipelineSinkDescription) AsDiagnosticsSinkProperties() (*DiagnosticsSinkProperties, bool) { + return nil, false +} + +// AsBasicDiagnosticsSinkProperties is the BasicDiagnosticsSinkProperties implementation for AzureInternalMonitoringPipelineSinkDescription. +func (aimpsd AzureInternalMonitoringPipelineSinkDescription) AsBasicDiagnosticsSinkProperties() (BasicDiagnosticsSinkProperties, bool) { + return &aimpsd, true +} + +// BasicBackupConfigurationInfo describes the backup configuration information. +type BasicBackupConfigurationInfo interface { + AsApplicationBackupConfigurationInfo() (*ApplicationBackupConfigurationInfo, bool) + AsServiceBackupConfigurationInfo() (*ServiceBackupConfigurationInfo, bool) + AsPartitionBackupConfigurationInfo() (*PartitionBackupConfigurationInfo, bool) + AsBackupConfigurationInfo() (*BackupConfigurationInfo, bool) +} + +// BackupConfigurationInfo describes the backup configuration information. +type BackupConfigurationInfo struct { + // PolicyName - The name of the backup policy which is applicable to this Service Fabric application or service or partition. + PolicyName *string `json:"PolicyName,omitempty"` + // PolicyInheritedFrom - Specifies the scope at which the backup policy is applied. Possible values include: 'BackupPolicyScopeInvalid', 'BackupPolicyScopePartition', 'BackupPolicyScopeService', 'BackupPolicyScopeApplication' + PolicyInheritedFrom BackupPolicyScope `json:"PolicyInheritedFrom,omitempty"` + // SuspensionInfo - Describes the backup suspension details. + SuspensionInfo *BackupSuspensionInfo `json:"SuspensionInfo,omitempty"` + // Kind - Possible values include: 'KindBasicBackupConfigurationInfoKindBackupConfigurationInfo', 'KindBasicBackupConfigurationInfoKindApplication', 'KindBasicBackupConfigurationInfoKindService', 'KindBasicBackupConfigurationInfoKindPartition' + Kind KindBasicBackupConfigurationInfo `json:"Kind,omitempty"` +} + +func unmarshalBasicBackupConfigurationInfo(body []byte) (BasicBackupConfigurationInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindBasicBackupConfigurationInfoKindApplication): + var abci ApplicationBackupConfigurationInfo + err := json.Unmarshal(body, &abci) + return abci, err + case string(KindBasicBackupConfigurationInfoKindService): + var sbci ServiceBackupConfigurationInfo + err := json.Unmarshal(body, &sbci) + return sbci, err + case string(KindBasicBackupConfigurationInfoKindPartition): + var pbci PartitionBackupConfigurationInfo + err := json.Unmarshal(body, &pbci) + return pbci, err + default: + var bci BackupConfigurationInfo + err := json.Unmarshal(body, &bci) + return bci, err + } +} +func unmarshalBasicBackupConfigurationInfoArray(body []byte) ([]BasicBackupConfigurationInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bciArray := make([]BasicBackupConfigurationInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + bci, err := unmarshalBasicBackupConfigurationInfo(*rawMessage) + if err != nil { + return nil, err + } + bciArray[index] = bci + } + return bciArray, nil +} + +// MarshalJSON is the custom marshaler for BackupConfigurationInfo. +func (bci BackupConfigurationInfo) MarshalJSON() ([]byte, error) { + bci.Kind = KindBasicBackupConfigurationInfoKindBackupConfigurationInfo + objectMap := make(map[string]interface{}) + if bci.PolicyName != nil { + objectMap["PolicyName"] = bci.PolicyName + } + if bci.PolicyInheritedFrom != "" { + objectMap["PolicyInheritedFrom"] = bci.PolicyInheritedFrom + } + if bci.SuspensionInfo != nil { + objectMap["SuspensionInfo"] = bci.SuspensionInfo + } + if bci.Kind != "" { + objectMap["Kind"] = bci.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for BackupConfigurationInfo. +func (bci BackupConfigurationInfo) AsApplicationBackupConfigurationInfo() (*ApplicationBackupConfigurationInfo, bool) { + return nil, false +} + +// AsServiceBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for BackupConfigurationInfo. +func (bci BackupConfigurationInfo) AsServiceBackupConfigurationInfo() (*ServiceBackupConfigurationInfo, bool) { + return nil, false +} + +// AsPartitionBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for BackupConfigurationInfo. +func (bci BackupConfigurationInfo) AsPartitionBackupConfigurationInfo() (*PartitionBackupConfigurationInfo, bool) { + return nil, false +} + +// AsBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for BackupConfigurationInfo. +func (bci BackupConfigurationInfo) AsBackupConfigurationInfo() (*BackupConfigurationInfo, bool) { + return &bci, true +} + +// AsBasicBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for BackupConfigurationInfo. +func (bci BackupConfigurationInfo) AsBasicBackupConfigurationInfo() (BasicBackupConfigurationInfo, bool) { + return &bci, true +} + +// BasicBackupEntity describes the Service Fabric entity that is configured for backup. +type BasicBackupEntity interface { + AsApplicationBackupEntity() (*ApplicationBackupEntity, bool) + AsServiceBackupEntity() (*ServiceBackupEntity, bool) + AsPartitionBackupEntity() (*PartitionBackupEntity, bool) + AsBackupEntity() (*BackupEntity, bool) +} + +// BackupEntity describes the Service Fabric entity that is configured for backup. +type BackupEntity struct { + // EntityKind - Possible values include: 'EntityKindBackupEntity', 'EntityKindApplication1', 'EntityKindService1', 'EntityKindPartition1' + EntityKind EntityKindBasicBackupEntity `json:"EntityKind,omitempty"` +} + +func unmarshalBasicBackupEntity(body []byte) (BasicBackupEntity, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["EntityKind"] { + case string(EntityKindApplication1): + var abe ApplicationBackupEntity + err := json.Unmarshal(body, &abe) + return abe, err + case string(EntityKindService1): + var sbe ServiceBackupEntity + err := json.Unmarshal(body, &sbe) + return sbe, err + case string(EntityKindPartition1): + var pbe PartitionBackupEntity + err := json.Unmarshal(body, &pbe) + return pbe, err + default: + var be BackupEntity + err := json.Unmarshal(body, &be) + return be, err + } +} +func unmarshalBasicBackupEntityArray(body []byte) ([]BasicBackupEntity, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + beArray := make([]BasicBackupEntity, len(rawMessages)) + + for index, rawMessage := range rawMessages { + be, err := unmarshalBasicBackupEntity(*rawMessage) + if err != nil { + return nil, err + } + beArray[index] = be + } + return beArray, nil +} + +// MarshalJSON is the custom marshaler for BackupEntity. +func (be BackupEntity) MarshalJSON() ([]byte, error) { + be.EntityKind = EntityKindBackupEntity + objectMap := make(map[string]interface{}) + if be.EntityKind != "" { + objectMap["EntityKind"] = be.EntityKind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupEntity is the BasicBackupEntity implementation for BackupEntity. +func (be BackupEntity) AsApplicationBackupEntity() (*ApplicationBackupEntity, bool) { + return nil, false +} + +// AsServiceBackupEntity is the BasicBackupEntity implementation for BackupEntity. +func (be BackupEntity) AsServiceBackupEntity() (*ServiceBackupEntity, bool) { + return nil, false +} + +// AsPartitionBackupEntity is the BasicBackupEntity implementation for BackupEntity. +func (be BackupEntity) AsPartitionBackupEntity() (*PartitionBackupEntity, bool) { + return nil, false +} + +// AsBackupEntity is the BasicBackupEntity implementation for BackupEntity. +func (be BackupEntity) AsBackupEntity() (*BackupEntity, bool) { + return &be, true +} + +// AsBasicBackupEntity is the BasicBackupEntity implementation for BackupEntity. +func (be BackupEntity) AsBasicBackupEntity() (BasicBackupEntity, bool) { + return &be, true +} + +// BackupInfo represents a backup point which can be used to trigger a restore. +type BackupInfo struct { + // BackupID - Unique backup ID . + BackupID *uuid.UUID `json:"BackupId,omitempty"` + // BackupChainID - Unique backup chain ID. All backups part of the same chain has the same backup chain id. A backup chain is comprised of 1 full backup and multiple incremental backups. + BackupChainID *uuid.UUID `json:"BackupChainId,omitempty"` + // ApplicationName - Name of the Service Fabric application this partition backup belongs to. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceName - Name of the Service Fabric service this partition backup belongs to. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionInformation - Information about the partition to which this backup belongs to + PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` + // BackupLocation - Location of the backup, relative to the backup store. + BackupLocation *string `json:"BackupLocation,omitempty"` + // BackupType - Describes the type of backup, whether its full or incremental. Possible values include: 'BackupTypeInvalid', 'BackupTypeFull', 'BackupTypeIncremental' + BackupType BackupType `json:"BackupType,omitempty"` + // EpochOfLastBackupRecord - Epoch of the last record in this backup. + EpochOfLastBackupRecord *Epoch `json:"EpochOfLastBackupRecord,omitempty"` + // LsnOfLastBackupRecord - LSN of the last record in this backup. + LsnOfLastBackupRecord *string `json:"LsnOfLastBackupRecord,omitempty"` + // CreationTimeUtc - The date time when this backup was taken. + CreationTimeUtc *date.Time `json:"CreationTimeUtc,omitempty"` + // ServiceManifestVersion - Manifest Version of the service this partition backup belongs to. + ServiceManifestVersion *string `json:"ServiceManifestVersion,omitempty"` + // FailureError - Denotes the failure encountered in getting backup point information. + FailureError *FabricErrorError `json:"FailureError,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for BackupInfo struct. +func (bi *BackupInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "BackupId": + if v != nil { + var backupID uuid.UUID + err = json.Unmarshal(*v, &backupID) + if err != nil { + return err + } + bi.BackupID = &backupID + } + case "BackupChainId": + if v != nil { + var backupChainID uuid.UUID + err = json.Unmarshal(*v, &backupChainID) + if err != nil { + return err + } + bi.BackupChainID = &backupChainID + } + case "ApplicationName": + if v != nil { + var applicationName string + err = json.Unmarshal(*v, &applicationName) + if err != nil { + return err + } + bi.ApplicationName = &applicationName + } + case "ServiceName": + if v != nil { + var serviceName string + err = json.Unmarshal(*v, &serviceName) + if err != nil { + return err + } + bi.ServiceName = &serviceName + } + case "PartitionInformation": + if v != nil { + partitionInformation, err := unmarshalBasicPartitionInformation(*v) + if err != nil { + return err + } + bi.PartitionInformation = partitionInformation + } + case "BackupLocation": + if v != nil { + var backupLocation string + err = json.Unmarshal(*v, &backupLocation) + if err != nil { + return err + } + bi.BackupLocation = &backupLocation + } + case "BackupType": + if v != nil { + var backupType BackupType + err = json.Unmarshal(*v, &backupType) + if err != nil { + return err + } + bi.BackupType = backupType + } + case "EpochOfLastBackupRecord": + if v != nil { + var epochOfLastBackupRecord Epoch + err = json.Unmarshal(*v, &epochOfLastBackupRecord) + if err != nil { + return err + } + bi.EpochOfLastBackupRecord = &epochOfLastBackupRecord + } + case "LsnOfLastBackupRecord": + if v != nil { + var lsnOfLastBackupRecord string + err = json.Unmarshal(*v, &lsnOfLastBackupRecord) + if err != nil { + return err + } + bi.LsnOfLastBackupRecord = &lsnOfLastBackupRecord + } + case "CreationTimeUtc": + if v != nil { + var creationTimeUtc date.Time + err = json.Unmarshal(*v, &creationTimeUtc) + if err != nil { + return err + } + bi.CreationTimeUtc = &creationTimeUtc + } + case "ServiceManifestVersion": + if v != nil { + var serviceManifestVersion string + err = json.Unmarshal(*v, &serviceManifestVersion) + if err != nil { + return err + } + bi.ServiceManifestVersion = &serviceManifestVersion + } + case "FailureError": + if v != nil { + var failureError FabricErrorError + err = json.Unmarshal(*v, &failureError) + if err != nil { + return err + } + bi.FailureError = &failureError + } + } + } + + return nil +} + +// BackupPartitionDescription describes the parameters for triggering partition's backup. +type BackupPartitionDescription struct { + // BackupStorage - Specifies the details of the backup storage where to save the backup. + BackupStorage BasicBackupStorageDescription `json:"BackupStorage,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for BackupPartitionDescription struct. +func (bpd *BackupPartitionDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "BackupStorage": + if v != nil { + backupStorage, err := unmarshalBasicBackupStorageDescription(*v) + if err != nil { + return err + } + bpd.BackupStorage = backupStorage + } + } + } + + return nil +} + +// BackupPolicyDescription describes a backup policy for configuring periodic backup. +type BackupPolicyDescription struct { + autorest.Response `json:"-"` + // Name - The unique name identifying this backup policy. + Name *string `json:"Name,omitempty"` + // AutoRestoreOnDataLoss - Specifies whether to trigger restore automatically using the latest available backup in case the partition experiences a data loss event. + AutoRestoreOnDataLoss *bool `json:"AutoRestoreOnDataLoss,omitempty"` + // MaxIncrementalBackups - Defines the maximum number of incremental backups to be taken between two full backups. This is just the upper limit. A full backup may be taken before specified number of incremental backups are completed in one of the following conditions + // - The replica has never taken a full backup since it has become primary, + // - Some of the log records since the last backup has been truncated, or + // - Replica passed the MaxAccumulatedBackupLogSizeInMB limit. + MaxIncrementalBackups *int32 `json:"MaxIncrementalBackups,omitempty"` + // Schedule - Describes the backup schedule parameters. + Schedule BasicBackupScheduleDescription `json:"Schedule,omitempty"` + // Storage - Describes the details of backup storage where to store the periodic backups. + Storage BasicBackupStorageDescription `json:"Storage,omitempty"` + // RetentionPolicy - Describes the policy to retain backups in storage. + RetentionPolicy BasicBasicRetentionPolicyDescription `json:"RetentionPolicy,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for BackupPolicyDescription struct. +func (bpd *BackupPolicyDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "Name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bpd.Name = &name + } + case "AutoRestoreOnDataLoss": + if v != nil { + var autoRestoreOnDataLoss bool + err = json.Unmarshal(*v, &autoRestoreOnDataLoss) + if err != nil { + return err + } + bpd.AutoRestoreOnDataLoss = &autoRestoreOnDataLoss + } + case "MaxIncrementalBackups": + if v != nil { + var maxIncrementalBackups int32 + err = json.Unmarshal(*v, &maxIncrementalBackups) + if err != nil { + return err + } + bpd.MaxIncrementalBackups = &maxIncrementalBackups + } + case "Schedule": + if v != nil { + schedule, err := unmarshalBasicBackupScheduleDescription(*v) + if err != nil { + return err + } + bpd.Schedule = schedule + } + case "Storage": + if v != nil { + storage, err := unmarshalBasicBackupStorageDescription(*v) + if err != nil { + return err + } + bpd.Storage = storage + } + case "RetentionPolicy": + if v != nil { + retentionPolicy, err := unmarshalBasicBasicRetentionPolicyDescription(*v) + if err != nil { + return err + } + bpd.RetentionPolicy = retentionPolicy + } + } + } + + return nil +} + +// BackupProgressInfo describes the progress of a partition's backup. +type BackupProgressInfo struct { + autorest.Response `json:"-"` + // BackupState - Represents the current state of the partition backup operation. Possible values include: 'BackupStateInvalid', 'BackupStateAccepted', 'BackupStateBackupInProgress', 'BackupStateSuccess', 'BackupStateFailure', 'BackupStateTimeout' + BackupState BackupState `json:"BackupState,omitempty"` + // TimeStampUtc - TimeStamp in UTC when operation succeeded or failed. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // BackupID - Unique ID of the newly created backup. + BackupID *uuid.UUID `json:"BackupId,omitempty"` + // BackupLocation - Location, relative to the backup store, of the newly created backup. + BackupLocation *string `json:"BackupLocation,omitempty"` + // EpochOfLastBackupRecord - Specifies the epoch of the last record included in backup. + EpochOfLastBackupRecord *Epoch `json:"EpochOfLastBackupRecord,omitempty"` + // LsnOfLastBackupRecord - The LSN of last record included in backup. + LsnOfLastBackupRecord *string `json:"LsnOfLastBackupRecord,omitempty"` + // FailureError - Denotes the failure encountered in performing backup operation. + FailureError *FabricErrorError `json:"FailureError,omitempty"` +} + +// BasicBackupScheduleDescription describes the backup schedule parameters. +type BasicBackupScheduleDescription interface { + AsFrequencyBasedBackupScheduleDescription() (*FrequencyBasedBackupScheduleDescription, bool) + AsTimeBasedBackupScheduleDescription() (*TimeBasedBackupScheduleDescription, bool) + AsBackupScheduleDescription() (*BackupScheduleDescription, bool) +} + +// BackupScheduleDescription describes the backup schedule parameters. +type BackupScheduleDescription struct { + // ScheduleKind - Possible values include: 'ScheduleKindBackupScheduleDescription', 'ScheduleKindFrequencyBased', 'ScheduleKindTimeBased' + ScheduleKind ScheduleKind `json:"ScheduleKind,omitempty"` +} + +func unmarshalBasicBackupScheduleDescription(body []byte) (BasicBackupScheduleDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ScheduleKind"] { + case string(ScheduleKindFrequencyBased): + var fbbsd FrequencyBasedBackupScheduleDescription + err := json.Unmarshal(body, &fbbsd) + return fbbsd, err + case string(ScheduleKindTimeBased): + var tbbsd TimeBasedBackupScheduleDescription + err := json.Unmarshal(body, &tbbsd) + return tbbsd, err + default: + var bsd BackupScheduleDescription + err := json.Unmarshal(body, &bsd) + return bsd, err + } +} +func unmarshalBasicBackupScheduleDescriptionArray(body []byte) ([]BasicBackupScheduleDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bsdArray := make([]BasicBackupScheduleDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + bsd, err := unmarshalBasicBackupScheduleDescription(*rawMessage) + if err != nil { + return nil, err + } + bsdArray[index] = bsd + } + return bsdArray, nil +} + +// MarshalJSON is the custom marshaler for BackupScheduleDescription. +func (bsd BackupScheduleDescription) MarshalJSON() ([]byte, error) { + bsd.ScheduleKind = ScheduleKindBackupScheduleDescription + objectMap := make(map[string]interface{}) + if bsd.ScheduleKind != "" { + objectMap["ScheduleKind"] = bsd.ScheduleKind + } + return json.Marshal(objectMap) +} + +// AsFrequencyBasedBackupScheduleDescription is the BasicBackupScheduleDescription implementation for BackupScheduleDescription. +func (bsd BackupScheduleDescription) AsFrequencyBasedBackupScheduleDescription() (*FrequencyBasedBackupScheduleDescription, bool) { + return nil, false +} + +// AsTimeBasedBackupScheduleDescription is the BasicBackupScheduleDescription implementation for BackupScheduleDescription. +func (bsd BackupScheduleDescription) AsTimeBasedBackupScheduleDescription() (*TimeBasedBackupScheduleDescription, bool) { + return nil, false +} + +// AsBackupScheduleDescription is the BasicBackupScheduleDescription implementation for BackupScheduleDescription. +func (bsd BackupScheduleDescription) AsBackupScheduleDescription() (*BackupScheduleDescription, bool) { + return &bsd, true +} + +// AsBasicBackupScheduleDescription is the BasicBackupScheduleDescription implementation for BackupScheduleDescription. +func (bsd BackupScheduleDescription) AsBasicBackupScheduleDescription() (BasicBackupScheduleDescription, bool) { + return &bsd, true +} + +// BasicBackupStorageDescription describes the parameters for the backup storage. +type BasicBackupStorageDescription interface { + AsAzureBlobBackupStorageDescription() (*AzureBlobBackupStorageDescription, bool) + AsFileShareBackupStorageDescription() (*FileShareBackupStorageDescription, bool) + AsBackupStorageDescription() (*BackupStorageDescription, bool) +} + +// BackupStorageDescription describes the parameters for the backup storage. +type BackupStorageDescription struct { + // FriendlyName - Friendly name for this backup storage. + FriendlyName *string `json:"FriendlyName,omitempty"` + // StorageKind - Possible values include: 'StorageKindBackupStorageDescription', 'StorageKindAzureBlobStore', 'StorageKindFileShare' + StorageKind StorageKind `json:"StorageKind,omitempty"` +} + +func unmarshalBasicBackupStorageDescription(body []byte) (BasicBackupStorageDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["StorageKind"] { + case string(StorageKindAzureBlobStore): + var abbsd AzureBlobBackupStorageDescription + err := json.Unmarshal(body, &abbsd) + return abbsd, err + case string(StorageKindFileShare): + var fsbsd FileShareBackupStorageDescription + err := json.Unmarshal(body, &fsbsd) + return fsbsd, err + default: + var bsd BackupStorageDescription + err := json.Unmarshal(body, &bsd) + return bsd, err + } +} +func unmarshalBasicBackupStorageDescriptionArray(body []byte) ([]BasicBackupStorageDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bsdArray := make([]BasicBackupStorageDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + bsd, err := unmarshalBasicBackupStorageDescription(*rawMessage) + if err != nil { + return nil, err + } + bsdArray[index] = bsd + } + return bsdArray, nil +} + +// MarshalJSON is the custom marshaler for BackupStorageDescription. +func (bsd BackupStorageDescription) MarshalJSON() ([]byte, error) { + bsd.StorageKind = StorageKindBackupStorageDescription + objectMap := make(map[string]interface{}) + if bsd.FriendlyName != nil { + objectMap["FriendlyName"] = bsd.FriendlyName + } + if bsd.StorageKind != "" { + objectMap["StorageKind"] = bsd.StorageKind + } + return json.Marshal(objectMap) +} + +// AsAzureBlobBackupStorageDescription is the BasicBackupStorageDescription implementation for BackupStorageDescription. +func (bsd BackupStorageDescription) AsAzureBlobBackupStorageDescription() (*AzureBlobBackupStorageDescription, bool) { + return nil, false +} + +// AsFileShareBackupStorageDescription is the BasicBackupStorageDescription implementation for BackupStorageDescription. +func (bsd BackupStorageDescription) AsFileShareBackupStorageDescription() (*FileShareBackupStorageDescription, bool) { + return nil, false +} + +// AsBackupStorageDescription is the BasicBackupStorageDescription implementation for BackupStorageDescription. +func (bsd BackupStorageDescription) AsBackupStorageDescription() (*BackupStorageDescription, bool) { + return &bsd, true +} + +// AsBasicBackupStorageDescription is the BasicBackupStorageDescription implementation for BackupStorageDescription. +func (bsd BackupStorageDescription) AsBasicBackupStorageDescription() (BasicBackupStorageDescription, bool) { + return &bsd, true +} + +// BackupSuspensionInfo describes the backup suspension details. +type BackupSuspensionInfo struct { + // IsSuspended - Indicates whether periodic backup is suspended at this level or not. + IsSuspended *bool `json:"IsSuspended,omitempty"` + // SuspensionInheritedFrom - Specifies the scope at which the backup suspension was applied. Possible values include: 'BackupSuspensionScopeInvalid', 'BackupSuspensionScopePartition', 'BackupSuspensionScopeService', 'BackupSuspensionScopeApplication' + SuspensionInheritedFrom BackupSuspensionScope `json:"SuspensionInheritedFrom,omitempty"` +} + +// BasicRetentionPolicyDescription describes basic retention policy. +type BasicRetentionPolicyDescription struct { + // RetentionDuration - It is the minimum duration for which a backup created, will remain stored in the storage and might get deleted after that span of time. It should be specified in ISO8601 format. + RetentionDuration *string `json:"RetentionDuration,omitempty"` + // MinimumNumberOfBackups - It is the minimum number of backups to be retained at any point of time. If specified with a non zero value, backups will not be deleted even if the backups have gone past retention duration and have number of backups less than or equal to it. + MinimumNumberOfBackups *int32 `json:"MinimumNumberOfBackups,omitempty"` + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicyDescription', 'RetentionPolicyTypeBasic1' + RetentionPolicyType RetentionPolicyTypeBasicBasicRetentionPolicyDescription `json:"RetentionPolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for BasicRetentionPolicyDescription. +func (brpd BasicRetentionPolicyDescription) MarshalJSON() ([]byte, error) { + brpd.RetentionPolicyType = RetentionPolicyTypeBasic1 + objectMap := make(map[string]interface{}) + if brpd.RetentionDuration != nil { + objectMap["RetentionDuration"] = brpd.RetentionDuration + } + if brpd.MinimumNumberOfBackups != nil { + objectMap["MinimumNumberOfBackups"] = brpd.MinimumNumberOfBackups + } + if brpd.RetentionPolicyType != "" { + objectMap["RetentionPolicyType"] = brpd.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsBasicRetentionPolicyDescription is the BasicBasicRetentionPolicyDescription implementation for BasicRetentionPolicyDescription. +func (brpd BasicRetentionPolicyDescription) AsBasicRetentionPolicyDescription() (*BasicRetentionPolicyDescription, bool) { + return &brpd, true +} + +// AsRetentionPolicyDescription is the BasicBasicRetentionPolicyDescription implementation for BasicRetentionPolicyDescription. +func (brpd BasicRetentionPolicyDescription) AsRetentionPolicyDescription() (*RetentionPolicyDescription, bool) { + return nil, false +} + +// AsBasicBasicRetentionPolicyDescription is the BasicBasicRetentionPolicyDescription implementation for BasicRetentionPolicyDescription. +func (brpd BasicRetentionPolicyDescription) AsBasicBasicRetentionPolicyDescription() (BasicBasicRetentionPolicyDescription, bool) { + return &brpd, true +} + +// BinaryPropertyValue describes a Service Fabric property value of type Binary. +type BinaryPropertyValue struct { + // Data - Array of bytes to be sent as an integer array. Each element of array is a number between 0 and 255. + Data *[]int32 `json:"Data,omitempty"` + // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' + Kind KindBasicPropertyValue `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for BinaryPropertyValue. +func (bpv BinaryPropertyValue) MarshalJSON() ([]byte, error) { + bpv.Kind = KindBinary + objectMap := make(map[string]interface{}) + if bpv.Data != nil { + objectMap["Data"] = bpv.Data + } + if bpv.Kind != "" { + objectMap["Kind"] = bpv.Kind + } + return json.Marshal(objectMap) +} + +// AsBinaryPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. +func (bpv BinaryPropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { + return &bpv, true +} + +// AsInt64PropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. +func (bpv BinaryPropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { + return nil, false +} + +// AsDoublePropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. +func (bpv BinaryPropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { + return nil, false +} + +// AsStringPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. +func (bpv BinaryPropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { + return nil, false +} + +// AsGUIDPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. +func (bpv BinaryPropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { + return nil, false +} + +// AsPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. +func (bpv BinaryPropertyValue) AsPropertyValue() (*PropertyValue, bool) { + return nil, false +} + +// AsBasicPropertyValue is the BasicPropertyValue implementation for BinaryPropertyValue. +func (bpv BinaryPropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { + return &bpv, true +} + +// Chaos contains a description of Chaos. +type Chaos struct { + autorest.Response `json:"-"` + // ChaosParameters - If Chaos is running, these are the parameters Chaos is running with. + ChaosParameters *ChaosParameters `json:"ChaosParameters,omitempty"` + // Status - Current status of the Chaos run. Possible values include: 'ChaosStatusInvalid', 'ChaosStatusRunning', 'ChaosStatusStopped' + Status ChaosStatus `json:"Status,omitempty"` + // ScheduleStatus - Current status of the schedule. Possible values include: 'ChaosScheduleStatusInvalid', 'ChaosScheduleStatusStopped', 'ChaosScheduleStatusActive', 'ChaosScheduleStatusExpired', 'ChaosScheduleStatusPending' + ScheduleStatus ChaosScheduleStatus `json:"ScheduleStatus,omitempty"` +} + +// ChaosCodePackageRestartScheduledEvent chaos Restart Code Package Fault Scheduled event. +type ChaosCodePackageRestartScheduledEvent struct { + // FaultGroupID - Id of fault group. + FaultGroupID *uuid.UUID `json:"FaultGroupId,omitempty"` + // FaultID - Id of fault. + FaultID *uuid.UUID `json:"FaultId,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // ServiceManifestName - Service manifest name. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // CodePackageName - Code package name. + CodePackageName *string `json:"CodePackageName,omitempty"` + // ServicePackageActivationID - Id of Service package activation. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) MarshalJSON() ([]byte, error) { + ccprse.Kind = KindChaosCodePackageRestartScheduled + objectMap := make(map[string]interface{}) + if ccprse.FaultGroupID != nil { + objectMap["FaultGroupId"] = ccprse.FaultGroupID + } + if ccprse.FaultID != nil { + objectMap["FaultId"] = ccprse.FaultID + } + if ccprse.NodeName != nil { + objectMap["NodeName"] = ccprse.NodeName + } + if ccprse.ServiceManifestName != nil { + objectMap["ServiceManifestName"] = ccprse.ServiceManifestName + } + if ccprse.CodePackageName != nil { + objectMap["CodePackageName"] = ccprse.CodePackageName + } + if ccprse.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = ccprse.ServicePackageActivationID + } + if ccprse.ApplicationID != nil { + objectMap["ApplicationId"] = ccprse.ApplicationID + } + if ccprse.EventInstanceID != nil { + objectMap["EventInstanceId"] = ccprse.EventInstanceID + } + if ccprse.Category != nil { + objectMap["Category"] = ccprse.Category + } + if ccprse.TimeStamp != nil { + objectMap["TimeStamp"] = ccprse.TimeStamp + } + if ccprse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ccprse.HasCorrelatedEvents + } + if ccprse.Kind != "" { + objectMap["Kind"] = ccprse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &ccprse, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return &ccprse, true +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosCodePackageRestartScheduledEvent. +func (ccprse ChaosCodePackageRestartScheduledEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ccprse, true +} + +// ChaosContext describes a map, which is a collection of (string, string) type key-value pairs. The map +// can be used to record information about +// the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most +// 4095 characters long. +// This map is set by the starter of the Chaos run to optionally store the context about the specific run. +type ChaosContext struct { + // Map - Describes a map that contains a collection of ChaosContextMapItem's. + Map map[string]*string `json:"Map"` +} + +// MarshalJSON is the custom marshaler for ChaosContext. +func (cc ChaosContext) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cc.Map != nil { + objectMap["Map"] = cc.Map + } + return json.Marshal(objectMap) +} + +// BasicChaosEvent represents an event generated during a Chaos run. +type BasicChaosEvent interface { + AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) + AsStartedChaosEvent() (*StartedChaosEvent, bool) + AsStoppedChaosEvent() (*StoppedChaosEvent, bool) + AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) + AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) + AsWaitingChaosEvent() (*WaitingChaosEvent, bool) + AsChaosEvent() (*ChaosEvent, bool) +} + +// ChaosEvent represents an event generated during a Chaos run. +type ChaosEvent struct { + // TimeStampUtc - The UTC timestamp when this Chaos event was generated. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' + Kind KindBasicChaosEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicChaosEvent(body []byte) (BasicChaosEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindExecutingFaults): + var efce ExecutingFaultsChaosEvent + err := json.Unmarshal(body, &efce) + return efce, err + case string(KindStarted): + var sce StartedChaosEvent + err := json.Unmarshal(body, &sce) + return sce, err + case string(KindStopped): + var sce StoppedChaosEvent + err := json.Unmarshal(body, &sce) + return sce, err + case string(KindTestError): + var tece TestErrorChaosEvent + err := json.Unmarshal(body, &tece) + return tece, err + case string(KindValidationFailed): + var vfce ValidationFailedChaosEvent + err := json.Unmarshal(body, &vfce) + return vfce, err + case string(KindWaiting): + var wce WaitingChaosEvent + err := json.Unmarshal(body, &wce) + return wce, err + default: + var ce ChaosEvent + err := json.Unmarshal(body, &ce) + return ce, err + } +} +func unmarshalBasicChaosEventArray(body []byte) ([]BasicChaosEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ceArray := make([]BasicChaosEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ce, err := unmarshalBasicChaosEvent(*rawMessage) + if err != nil { + return nil, err + } + ceArray[index] = ce + } + return ceArray, nil +} + +// MarshalJSON is the custom marshaler for ChaosEvent. +func (ce ChaosEvent) MarshalJSON() ([]byte, error) { + ce.Kind = KindChaosEvent + objectMap := make(map[string]interface{}) + if ce.TimeStampUtc != nil { + objectMap["TimeStampUtc"] = ce.TimeStampUtc + } + if ce.Kind != "" { + objectMap["Kind"] = ce.Kind + } + return json.Marshal(objectMap) +} + +// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { + return nil, false +} + +// AsStartedChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { + return nil, false +} + +// AsStoppedChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { + return nil, false +} + +// AsTestErrorChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { + return nil, false +} + +// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { + return nil, false +} + +// AsWaitingChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { + return nil, false +} + +// AsChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { + return &ce, true +} + +// AsBasicChaosEvent is the BasicChaosEvent implementation for ChaosEvent. +func (ce ChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { + return &ce, true +} + +// ChaosEventsSegment contains the list of Chaos events and the continuation token to get the next segment. +type ChaosEventsSegment struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // History - List of Chaos events that meet the user-supplied criteria. + History *[]ChaosEventWrapper `json:"History,omitempty"` +} + +// ChaosEventWrapper wrapper object for Chaos event. +type ChaosEventWrapper struct { + // ChaosEvent - Represents an event generated during a Chaos run. + ChaosEvent BasicChaosEvent `json:"ChaosEvent,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ChaosEventWrapper struct. +func (cew *ChaosEventWrapper) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ChaosEvent": + if v != nil { + chaosEvent, err := unmarshalBasicChaosEvent(*v) + if err != nil { + return err + } + cew.ChaosEvent = chaosEvent + } + } + } + + return nil +} + +// ChaosNodeRestartScheduledEvent chaos Restart Node Fault Scheduled event. +type ChaosNodeRestartScheduledEvent struct { + // NodeInstanceID - Id of Node instance. + NodeInstanceID *int64 `json:"NodeInstanceId,omitempty"` + // FaultGroupID - Id of fault group. + FaultGroupID *uuid.UUID `json:"FaultGroupId,omitempty"` + // FaultID - Id of fault. + FaultID *uuid.UUID `json:"FaultId,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) MarshalJSON() ([]byte, error) { + cnrse.Kind = KindChaosNodeRestartScheduled + objectMap := make(map[string]interface{}) + if cnrse.NodeInstanceID != nil { + objectMap["NodeInstanceId"] = cnrse.NodeInstanceID + } + if cnrse.FaultGroupID != nil { + objectMap["FaultGroupId"] = cnrse.FaultGroupID + } + if cnrse.FaultID != nil { + objectMap["FaultId"] = cnrse.FaultID + } + if cnrse.NodeName != nil { + objectMap["NodeName"] = cnrse.NodeName + } + if cnrse.EventInstanceID != nil { + objectMap["EventInstanceId"] = cnrse.EventInstanceID + } + if cnrse.Category != nil { + objectMap["Category"] = cnrse.Category + } + if cnrse.TimeStamp != nil { + objectMap["TimeStamp"] = cnrse.TimeStamp + } + if cnrse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cnrse.HasCorrelatedEvents + } + if cnrse.Kind != "" { + objectMap["Kind"] = cnrse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &cnrse, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return &cnrse, true +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosNodeRestartScheduledEvent. +func (cnrse ChaosNodeRestartScheduledEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cnrse, true +} + +// ChaosParameters defines all the parameters to configure a Chaos run. +type ChaosParameters struct { + // TimeToRunInSeconds - Total time (in seconds) for which Chaos will run before automatically stopping. The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). + TimeToRunInSeconds *string `json:"TimeToRunInSeconds,omitempty"` + // MaxClusterStabilizationTimeoutInSeconds - The maximum amount of time to wait for all cluster entities to become stable and healthy. Chaos executes in iterations and at the start of each iteration it validates the health of cluster entities. + // During validation if a cluster entity is not stable and healthy within MaxClusterStabilizationTimeoutInSeconds, Chaos generates a validation failed event. + MaxClusterStabilizationTimeoutInSeconds *int64 `json:"MaxClusterStabilizationTimeoutInSeconds,omitempty"` + // MaxConcurrentFaults - MaxConcurrentFaults is the maximum number of concurrent faults induced per iteration. + // Chaos executes in iterations and two consecutive iterations are separated by a validation phase. + // The higher the concurrency, the more aggressive the injection of faults, leading to inducing more complex series of states to uncover bugs. + // The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. + MaxConcurrentFaults *int64 `json:"MaxConcurrentFaults,omitempty"` + // EnableMoveReplicaFaults - Enables or disables the move primary and move secondary faults. + EnableMoveReplicaFaults *bool `json:"EnableMoveReplicaFaults,omitempty"` + // WaitTimeBetweenFaultsInSeconds - Wait time (in seconds) between consecutive faults within a single iteration. + // The larger the value, the lower the overlapping between faults and the simpler the sequence of state transitions that the cluster goes through. + // The recommendation is to start with a value between 1 and 5 and exercise caution while moving up. + WaitTimeBetweenFaultsInSeconds *int64 `json:"WaitTimeBetweenFaultsInSeconds,omitempty"` + // WaitTimeBetweenIterationsInSeconds - Time-separation (in seconds) between two consecutive iterations of Chaos. + // The larger the value, the lower the fault injection rate. + WaitTimeBetweenIterationsInSeconds *int64 `json:"WaitTimeBetweenIterationsInSeconds,omitempty"` + // ClusterHealthPolicy - Passed-in cluster health policy is used to validate health of the cluster in between Chaos iterations. If the cluster health is in error or if an unexpected exception happens during fault execution--to provide the cluster with some time to recuperate--Chaos will wait for 30 minutes before the next health-check. + ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` + // Context - Describes a map, which is a collection of (string, string) type key-value pairs. The map can be used to record information about + // the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 characters long. + // This map is set by the starter of the Chaos run to optionally store the context about the specific run. + Context *ChaosContext `json:"Context,omitempty"` + // ChaosTargetFilter - List of cluster entities to target for Chaos faults. + // This filter can be used to target Chaos faults only to certain node types or only to certain application instances. If ChaosTargetFilter is not used, Chaos faults all cluster entities. + // If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter specification. + ChaosTargetFilter *ChaosTargetFilter `json:"ChaosTargetFilter,omitempty"` +} + +// ChaosParametersDictionaryItem defines an item in ChaosParametersDictionary of the Chaos Schedule. +type ChaosParametersDictionaryItem struct { + // Key - The key identifying the Chaos Parameter in the dictionary. This key is referenced by Chaos Schedule Jobs. + Key *string `json:"Key,omitempty"` + // Value - Defines all the parameters to configure a Chaos run. + Value *ChaosParameters `json:"Value,omitempty"` +} + +// ChaosPartitionPrimaryMoveScheduledEvent chaos Move Primary Fault Scheduled event. +type ChaosPartitionPrimaryMoveScheduledEvent struct { + // FaultGroupID - Id of fault group. + FaultGroupID *uuid.UUID `json:"FaultGroupId,omitempty"` + // FaultID - Id of fault. + FaultID *uuid.UUID `json:"FaultId,omitempty"` + // ServiceName - Service name. + ServiceName *string `json:"ServiceName,omitempty"` + // NodeTo - The name of a Service Fabric node. + NodeTo *string `json:"NodeTo,omitempty"` + // ForcedMove - Indicates a forced move. + ForcedMove *bool `json:"ForcedMove,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) MarshalJSON() ([]byte, error) { + cppmse.Kind = KindChaosPartitionPrimaryMoveScheduled + objectMap := make(map[string]interface{}) + if cppmse.FaultGroupID != nil { + objectMap["FaultGroupId"] = cppmse.FaultGroupID + } + if cppmse.FaultID != nil { + objectMap["FaultId"] = cppmse.FaultID + } + if cppmse.ServiceName != nil { + objectMap["ServiceName"] = cppmse.ServiceName + } + if cppmse.NodeTo != nil { + objectMap["NodeTo"] = cppmse.NodeTo + } + if cppmse.ForcedMove != nil { + objectMap["ForcedMove"] = cppmse.ForcedMove + } + if cppmse.PartitionID != nil { + objectMap["PartitionId"] = cppmse.PartitionID + } + if cppmse.EventInstanceID != nil { + objectMap["EventInstanceId"] = cppmse.EventInstanceID + } + if cppmse.Category != nil { + objectMap["Category"] = cppmse.Category + } + if cppmse.TimeStamp != nil { + objectMap["TimeStamp"] = cppmse.TimeStamp + } + if cppmse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cppmse.HasCorrelatedEvents + } + if cppmse.Kind != "" { + objectMap["Kind"] = cppmse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &cppmse, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return &cppmse, true +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosPartitionPrimaryMoveScheduledEvent. +func (cppmse ChaosPartitionPrimaryMoveScheduledEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cppmse, true +} + +// ChaosPartitionSecondaryMoveScheduledEvent chaos Move Secondary Fault Scheduled event. +type ChaosPartitionSecondaryMoveScheduledEvent struct { + // FaultGroupID - Id of fault group. + FaultGroupID *uuid.UUID `json:"FaultGroupId,omitempty"` + // FaultID - Id of fault. + FaultID *uuid.UUID `json:"FaultId,omitempty"` + // ServiceName - Service name. + ServiceName *string `json:"ServiceName,omitempty"` + // SourceNode - The name of a Service Fabric node. + SourceNode *string `json:"SourceNode,omitempty"` + // DestinationNode - The name of a Service Fabric node. + DestinationNode *string `json:"DestinationNode,omitempty"` + // ForcedMove - Indicates a forced move. + ForcedMove *bool `json:"ForcedMove,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) MarshalJSON() ([]byte, error) { + cpsmse.Kind = KindChaosPartitionSecondaryMoveScheduled + objectMap := make(map[string]interface{}) + if cpsmse.FaultGroupID != nil { + objectMap["FaultGroupId"] = cpsmse.FaultGroupID + } + if cpsmse.FaultID != nil { + objectMap["FaultId"] = cpsmse.FaultID + } + if cpsmse.ServiceName != nil { + objectMap["ServiceName"] = cpsmse.ServiceName + } + if cpsmse.SourceNode != nil { + objectMap["SourceNode"] = cpsmse.SourceNode + } + if cpsmse.DestinationNode != nil { + objectMap["DestinationNode"] = cpsmse.DestinationNode + } + if cpsmse.ForcedMove != nil { + objectMap["ForcedMove"] = cpsmse.ForcedMove + } + if cpsmse.PartitionID != nil { + objectMap["PartitionId"] = cpsmse.PartitionID + } + if cpsmse.EventInstanceID != nil { + objectMap["EventInstanceId"] = cpsmse.EventInstanceID + } + if cpsmse.Category != nil { + objectMap["Category"] = cpsmse.Category + } + if cpsmse.TimeStamp != nil { + objectMap["TimeStamp"] = cpsmse.TimeStamp + } + if cpsmse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cpsmse.HasCorrelatedEvents + } + if cpsmse.Kind != "" { + objectMap["Kind"] = cpsmse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &cpsmse, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return &cpsmse, true +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosPartitionSecondaryMoveScheduledEvent. +func (cpsmse ChaosPartitionSecondaryMoveScheduledEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cpsmse, true +} + +// ChaosReplicaRemovalScheduledEvent chaos Remove Replica Fault Scheduled event. +type ChaosReplicaRemovalScheduledEvent struct { + // FaultGroupID - Id of fault group. + FaultGroupID *uuid.UUID `json:"FaultGroupId,omitempty"` + // FaultID - Id of fault. + FaultID *uuid.UUID `json:"FaultId,omitempty"` + // ServiceURI - Service name. + ServiceURI *string `json:"ServiceUri,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *int64 `json:"ReplicaId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) MarshalJSON() ([]byte, error) { + crrse.Kind = KindChaosReplicaRemovalScheduled + objectMap := make(map[string]interface{}) + if crrse.FaultGroupID != nil { + objectMap["FaultGroupId"] = crrse.FaultGroupID + } + if crrse.FaultID != nil { + objectMap["FaultId"] = crrse.FaultID + } + if crrse.ServiceURI != nil { + objectMap["ServiceUri"] = crrse.ServiceURI + } + if crrse.PartitionID != nil { + objectMap["PartitionId"] = crrse.PartitionID + } + if crrse.ReplicaID != nil { + objectMap["ReplicaId"] = crrse.ReplicaID + } + if crrse.EventInstanceID != nil { + objectMap["EventInstanceId"] = crrse.EventInstanceID + } + if crrse.Category != nil { + objectMap["Category"] = crrse.Category + } + if crrse.TimeStamp != nil { + objectMap["TimeStamp"] = crrse.TimeStamp + } + if crrse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = crrse.HasCorrelatedEvents + } + if crrse.Kind != "" { + objectMap["Kind"] = crrse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return &crrse, true +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return &crrse, true +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosReplicaRemovalScheduledEvent. +func (crrse ChaosReplicaRemovalScheduledEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &crrse, true +} + +// ChaosReplicaRestartScheduledEvent chaos Restart Replica Fault Scheduled event. +type ChaosReplicaRestartScheduledEvent struct { + // FaultGroupID - Id of fault group. + FaultGroupID *uuid.UUID `json:"FaultGroupId,omitempty"` + // FaultID - Id of fault. + FaultID *uuid.UUID `json:"FaultId,omitempty"` + // ServiceURI - Service name. + ServiceURI *string `json:"ServiceUri,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *int64 `json:"ReplicaId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) MarshalJSON() ([]byte, error) { + crrse.Kind = KindChaosReplicaRestartScheduled + objectMap := make(map[string]interface{}) + if crrse.FaultGroupID != nil { + objectMap["FaultGroupId"] = crrse.FaultGroupID + } + if crrse.FaultID != nil { + objectMap["FaultId"] = crrse.FaultID + } + if crrse.ServiceURI != nil { + objectMap["ServiceUri"] = crrse.ServiceURI + } + if crrse.PartitionID != nil { + objectMap["PartitionId"] = crrse.PartitionID + } + if crrse.ReplicaID != nil { + objectMap["ReplicaId"] = crrse.ReplicaID + } + if crrse.EventInstanceID != nil { + objectMap["EventInstanceId"] = crrse.EventInstanceID + } + if crrse.Category != nil { + objectMap["Category"] = crrse.Category + } + if crrse.TimeStamp != nil { + objectMap["TimeStamp"] = crrse.TimeStamp + } + if crrse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = crrse.HasCorrelatedEvents + } + if crrse.Kind != "" { + objectMap["Kind"] = crrse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return &crrse, true +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return &crrse, true +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosReplicaRestartScheduledEvent. +func (crrse ChaosReplicaRestartScheduledEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &crrse, true +} + +// ChaosSchedule defines the schedule used by Chaos. +type ChaosSchedule struct { + // StartDate - The date and time Chaos will start using this schedule. + StartDate *date.Time `json:"StartDate,omitempty"` + // ExpiryDate - The date and time Chaos will continue to use this schedule until. + ExpiryDate *date.Time `json:"ExpiryDate,omitempty"` + // ChaosParametersDictionary - A mapping of string names to Chaos Parameters to be referenced by Chaos Schedule Jobs. + ChaosParametersDictionary *[]ChaosParametersDictionaryItem `json:"ChaosParametersDictionary,omitempty"` + // Jobs - A list of all Chaos Schedule Jobs that will be automated by the schedule. + Jobs *[]ChaosScheduleJob `json:"Jobs,omitempty"` +} + +// ChaosScheduleDescription defines the Chaos Schedule used by Chaos and the version of the Chaos Schedule. +// The version value wraps back to 0 after surpassing 2,147,483,647. +type ChaosScheduleDescription struct { + autorest.Response `json:"-"` + // Version - The version number of the Schedule. + Version *int32 `json:"Version,omitempty"` + // Schedule - Defines the schedule used by Chaos. + Schedule *ChaosSchedule `json:"Schedule,omitempty"` +} + +// ChaosScheduleJob defines a repetition rule and parameters of Chaos to be used with the Chaos Schedule. +type ChaosScheduleJob struct { + // ChaosParameters - A reference to which Chaos Parameters of the Chaos Schedule to use. + ChaosParameters *string `json:"ChaosParameters,omitempty"` + // Days - Defines the days of the week that a Chaos Schedule Job will run for. + Days *ChaosScheduleJobActiveDaysOfWeek `json:"Days,omitempty"` + // Times - A list of Time Ranges that specify when during active days that this job will run. The times are interpreted as UTC. + Times *[]TimeRange `json:"Times,omitempty"` +} + +// ChaosScheduleJobActiveDaysOfWeek defines the days of the week that a Chaos Schedule Job will run for. +type ChaosScheduleJobActiveDaysOfWeek struct { + // Sunday - Indicates if the Chaos Schedule Job will run on Sunday + Sunday *bool `json:"Sunday,omitempty"` + // Monday - Indicates if the Chaos Schedule Job will run on Monday + Monday *bool `json:"Monday,omitempty"` + // Tuesday - Indicates if the Chaos Schedule Job will run on Tuesday + Tuesday *bool `json:"Tuesday,omitempty"` + // Wednesday - Indicates if the Chaos Schedule Job will run on Wednesday + Wednesday *bool `json:"Wednesday,omitempty"` + // Thursday - Indicates if the Chaos Schedule Job will run on Thursday + Thursday *bool `json:"Thursday,omitempty"` + // Friday - Indicates if the Chaos Schedule Job will run on Friday + Friday *bool `json:"Friday,omitempty"` + // Saturday - Indicates if the Chaos Schedule Job will run on Saturday + Saturday *bool `json:"Saturday,omitempty"` +} + +// ChaosStartedEvent chaos Started event. +type ChaosStartedEvent struct { + // MaxConcurrentFaults - Maximum number of concurrent faults. + MaxConcurrentFaults *int64 `json:"MaxConcurrentFaults,omitempty"` + // TimeToRunInSeconds - Time to run in seconds. + TimeToRunInSeconds *float64 `json:"TimeToRunInSeconds,omitempty"` + // MaxClusterStabilizationTimeoutInSeconds - Maximum timeout for cluster stabilization in seconds. + MaxClusterStabilizationTimeoutInSeconds *float64 `json:"MaxClusterStabilizationTimeoutInSeconds,omitempty"` + // WaitTimeBetweenIterationsInSeconds - Wait time between iterations in seconds. + WaitTimeBetweenIterationsInSeconds *float64 `json:"WaitTimeBetweenIterationsInSeconds,omitempty"` + // WaitTimeBetweenFaultsInSeconds - Wait time between faults in seconds. + WaitTimeBetweenFaultsInSeconds *float64 `json:"WaitTimeBetweenFaultsInSeconds,omitempty"` + // MoveReplicaFaultEnabled - Indicates MoveReplica fault is enabled. + MoveReplicaFaultEnabled *bool `json:"MoveReplicaFaultEnabled,omitempty"` + // IncludedNodeTypeList - List of included Node types. + IncludedNodeTypeList *string `json:"IncludedNodeTypeList,omitempty"` + // IncludedApplicationList - List of included Applications. + IncludedApplicationList *string `json:"IncludedApplicationList,omitempty"` + // ClusterHealthPolicy - Health policy. + ClusterHealthPolicy *string `json:"ClusterHealthPolicy,omitempty"` + // ChaosContext - Chaos Context. + ChaosContext *string `json:"ChaosContext,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosStartedEvent. +func (cse ChaosStartedEvent) MarshalJSON() ([]byte, error) { + cse.Kind = KindChaosStarted + objectMap := make(map[string]interface{}) + if cse.MaxConcurrentFaults != nil { + objectMap["MaxConcurrentFaults"] = cse.MaxConcurrentFaults + } + if cse.TimeToRunInSeconds != nil { + objectMap["TimeToRunInSeconds"] = cse.TimeToRunInSeconds + } + if cse.MaxClusterStabilizationTimeoutInSeconds != nil { + objectMap["MaxClusterStabilizationTimeoutInSeconds"] = cse.MaxClusterStabilizationTimeoutInSeconds + } + if cse.WaitTimeBetweenIterationsInSeconds != nil { + objectMap["WaitTimeBetweenIterationsInSeconds"] = cse.WaitTimeBetweenIterationsInSeconds + } + if cse.WaitTimeBetweenFaultsInSeconds != nil { + objectMap["WaitTimeBetweenFaultsInSeconds"] = cse.WaitTimeBetweenFaultsInSeconds + } + if cse.MoveReplicaFaultEnabled != nil { + objectMap["MoveReplicaFaultEnabled"] = cse.MoveReplicaFaultEnabled + } + if cse.IncludedNodeTypeList != nil { + objectMap["IncludedNodeTypeList"] = cse.IncludedNodeTypeList + } + if cse.IncludedApplicationList != nil { + objectMap["IncludedApplicationList"] = cse.IncludedApplicationList + } + if cse.ClusterHealthPolicy != nil { + objectMap["ClusterHealthPolicy"] = cse.ClusterHealthPolicy + } + if cse.ChaosContext != nil { + objectMap["ChaosContext"] = cse.ChaosContext + } + if cse.EventInstanceID != nil { + objectMap["EventInstanceId"] = cse.EventInstanceID + } + if cse.Category != nil { + objectMap["Category"] = cse.Category + } + if cse.TimeStamp != nil { + objectMap["TimeStamp"] = cse.TimeStamp + } + if cse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cse.HasCorrelatedEvents + } + if cse.Kind != "" { + objectMap["Kind"] = cse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &cse, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return &cse, true +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosStartedEvent. +func (cse ChaosStartedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cse, true +} + +// ChaosStoppedEvent chaos Stopped event. +type ChaosStoppedEvent struct { + // Reason - Describes reason. + Reason *string `json:"Reason,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) MarshalJSON() ([]byte, error) { + cse.Kind = KindChaosStopped + objectMap := make(map[string]interface{}) + if cse.Reason != nil { + objectMap["Reason"] = cse.Reason + } + if cse.EventInstanceID != nil { + objectMap["EventInstanceId"] = cse.EventInstanceID + } + if cse.Category != nil { + objectMap["Category"] = cse.Category + } + if cse.TimeStamp != nil { + objectMap["TimeStamp"] = cse.TimeStamp + } + if cse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cse.HasCorrelatedEvents + } + if cse.Kind != "" { + objectMap["Kind"] = cse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &cse, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return &cse, true +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ChaosStoppedEvent. +func (cse ChaosStoppedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cse, true +} + +// ChaosTargetFilter defines all filters for targeted Chaos faults, for example, faulting only certain node +// types or faulting only certain applications. +// If ChaosTargetFilter is not used, Chaos faults all cluster entities. If ChaosTargetFilter is used, Chaos +// faults only the entities that meet the ChaosTargetFilter +// specification. NodeTypeInclusionList and ApplicationInclusionList allow a union semantics only. It is +// not possible to specify an intersection +// of NodeTypeInclusionList and ApplicationInclusionList. For example, it is not possible to specify "fault +// this application only when it is on that node type." +// Once an entity is included in either NodeTypeInclusionList or ApplicationInclusionList, that entity +// cannot be excluded using ChaosTargetFilter. Even if +// applicationX does not appear in ApplicationInclusionList, in some Chaos iteration applicationX can be +// faulted because it happens to be on a node of nodeTypeY that is included +// in NodeTypeInclusionList. If both NodeTypeInclusionList and ApplicationInclusionList are null or empty, +// an ArgumentException is thrown. +type ChaosTargetFilter struct { + // NodeTypeInclusionList - A list of node types to include in Chaos faults. + // All types of faults (restart node, restart code package, remove replica, restart replica, move primary, and move secondary) are enabled for the nodes of these node types. + // If a node type (say NodeTypeX) does not appear in the NodeTypeInclusionList, then node level faults (like NodeRestart) will never be enabled for the nodes of + // NodeTypeX, but code package and replica faults can still be enabled for NodeTypeX if an application in the ApplicationInclusionList. + // happens to reside on a node of NodeTypeX. + // At most 100 node type names can be included in this list, to increase this number, a config upgrade is required for MaxNumberOfNodeTypesInChaosEntityFilter configuration. + NodeTypeInclusionList *[]string `json:"NodeTypeInclusionList,omitempty"` + // ApplicationInclusionList - A list of application URIs to include in Chaos faults. + // All replicas belonging to services of these applications are amenable to replica faults (restart replica, remove replica, move primary, and move secondary) by Chaos. + // Chaos may restart a code package only if the code package hosts replicas of these applications only. + // If an application does not appear in this list, it can still be faulted in some Chaos iteration if the application ends up on a node of a node type that is included in NodeTypeInclusionList. + // However, if applicationX is tied to nodeTypeY through placement constraints and applicationX is absent from ApplicationInclusionList and nodeTypeY is absent from NodeTypeInclusionList, then applicationX will never be faulted. + // At most 1000 application names can be included in this list, to increase this number, a config upgrade is required for MaxNumberOfApplicationsInChaosEntityFilter configuration. + ApplicationInclusionList *[]string `json:"ApplicationInclusionList,omitempty"` +} + +// CheckExistsPropertyBatchOperation represents a PropertyBatchOperation that compares the Boolean +// existence of a property with the Exists argument. +// The PropertyBatchOperation operation fails if the property's existence is not equal to the Exists +// argument. +// The CheckExistsPropertyBatchOperation is generally used as a precondition for the write operations in +// the batch. +// Note that if one PropertyBatchOperation in a PropertyBatch fails, +// the entire batch fails and cannot be committed in a transactional manner. +type CheckExistsPropertyBatchOperation struct { + // Exists - Whether or not the property should exist for the operation to pass. + Exists *bool `json:"Exists,omitempty"` + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' + Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) MarshalJSON() ([]byte, error) { + cepbo.Kind = KindCheckExists + objectMap := make(map[string]interface{}) + if cepbo.Exists != nil { + objectMap["Exists"] = cepbo.Exists + } + if cepbo.PropertyName != nil { + objectMap["PropertyName"] = cepbo.PropertyName + } + if cepbo.Kind != "" { + objectMap["Kind"] = cepbo.Kind + } + return json.Marshal(objectMap) +} + +// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { + return &cepbo, true +} + +// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { + return nil, false +} + +// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { + return nil, false +} + +// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { + return nil, false +} + +// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { + return nil, false +} + +// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { + return nil, false +} + +// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckExistsPropertyBatchOperation. +func (cepbo CheckExistsPropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { + return &cepbo, true +} + +// CheckSequencePropertyBatchOperation compares the Sequence Number of a property with the SequenceNumber +// argument. +// A property's sequence number can be thought of as that property's version. +// Every time the property is modified, its sequence number is increased. +// The sequence number can be found in a property's metadata. +// The comparison fails if the sequence numbers are not equal. +// CheckSequencePropertyBatchOperation is generally used as a precondition for the write operations in the +// batch. +// Note that if one PropertyBatchOperation in a PropertyBatch fails, +// the entire batch fails and cannot be committed in a transactional manner. +type CheckSequencePropertyBatchOperation struct { + // SequenceNumber - The expected sequence number. + SequenceNumber *string `json:"SequenceNumber,omitempty"` + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' + Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) MarshalJSON() ([]byte, error) { + cspbo.Kind = KindCheckSequence + objectMap := make(map[string]interface{}) + if cspbo.SequenceNumber != nil { + objectMap["SequenceNumber"] = cspbo.SequenceNumber + } + if cspbo.PropertyName != nil { + objectMap["PropertyName"] = cspbo.PropertyName + } + if cspbo.Kind != "" { + objectMap["Kind"] = cspbo.Kind + } + return json.Marshal(objectMap) +} + +// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { + return &cspbo, true +} + +// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { + return nil, false +} + +// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { + return nil, false +} + +// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { + return nil, false +} + +// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { + return nil, false +} + +// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { + return nil, false +} + +// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckSequencePropertyBatchOperation. +func (cspbo CheckSequencePropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { + return &cspbo, true +} + +// CheckValuePropertyBatchOperation represents a PropertyBatchOperation that compares the value of the +// property with the expected value. +// The CheckValuePropertyBatchOperation is generally used as a precondition for the write operations in the +// batch. +// Note that if one PropertyBatchOperation in a PropertyBatch fails, +// the entire batch fails and cannot be committed in a transactional manner. +type CheckValuePropertyBatchOperation struct { + // Value - The expected property value. + Value BasicPropertyValue `json:"Value,omitempty"` + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' + Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) MarshalJSON() ([]byte, error) { + cvpbo.Kind = KindCheckValue + objectMap := make(map[string]interface{}) + objectMap["Value"] = cvpbo.Value + if cvpbo.PropertyName != nil { + objectMap["PropertyName"] = cvpbo.PropertyName + } + if cvpbo.Kind != "" { + objectMap["Kind"] = cvpbo.Kind + } + return json.Marshal(objectMap) +} + +// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { + return &cvpbo, true +} + +// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { + return nil, false +} + +// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { + return nil, false +} + +// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { + return nil, false +} + +// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { + return nil, false +} + +// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for CheckValuePropertyBatchOperation. +func (cvpbo CheckValuePropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { + return &cvpbo, true +} + +// UnmarshalJSON is the custom unmarshaler for CheckValuePropertyBatchOperation struct. +func (cvpbo *CheckValuePropertyBatchOperation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "Value": + if v != nil { + value, err := unmarshalBasicPropertyValue(*v) + if err != nil { + return err + } + cvpbo.Value = value + } + case "PropertyName": + if v != nil { + var propertyName string + err = json.Unmarshal(*v, &propertyName) + if err != nil { + return err + } + cvpbo.PropertyName = &propertyName + } + case "Kind": + if v != nil { + var kind KindBasicPropertyBatchOperation + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + cvpbo.Kind = kind + } + } + } + + return nil +} + +// ClusterConfiguration information about the standalone cluster configuration. +type ClusterConfiguration struct { + autorest.Response `json:"-"` + // ClusterConfiguration - The contents of the cluster configuration file. + ClusterConfiguration *string `json:"ClusterConfiguration,omitempty"` +} + +// ClusterConfigurationUpgradeDescription describes the parameters for a standalone cluster configuration +// upgrade. +type ClusterConfigurationUpgradeDescription struct { + // ClusterConfig - The cluster configuration as a JSON string. For example, [this file](https://github.com/Azure-Samples/service-fabric-dotnet-standalone-cluster-configuration/blob/master/Samples/ClusterConfig.Unsecure.DevCluster.json) contains JSON describing the [nodes and other properties of the cluster](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-manifest). + ClusterConfig *string `json:"ClusterConfig,omitempty"` + // HealthCheckRetryTimeout - The length of time between attempts to perform health checks if the application or cluster is not healthy. + HealthCheckRetryTimeout *string `json:"HealthCheckRetryTimeout,omitempty"` + // HealthCheckWaitDurationInSeconds - The length of time to wait after completing an upgrade domain before starting the health checks process. + HealthCheckWaitDurationInSeconds *string `json:"HealthCheckWaitDurationInSeconds,omitempty"` + // HealthCheckStableDurationInSeconds - The length of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. + HealthCheckStableDurationInSeconds *string `json:"HealthCheckStableDurationInSeconds,omitempty"` + // UpgradeDomainTimeoutInSeconds - The timeout for the upgrade domain. + UpgradeDomainTimeoutInSeconds *string `json:"UpgradeDomainTimeoutInSeconds,omitempty"` + // UpgradeTimeoutInSeconds - The upgrade timeout. + UpgradeTimeoutInSeconds *string `json:"UpgradeTimeoutInSeconds,omitempty"` + // MaxPercentUnhealthyApplications - The maximum allowed percentage of unhealthy applications during the upgrade. Allowed values are integer values from zero to 100. + MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` + // MaxPercentUnhealthyNodes - The maximum allowed percentage of unhealthy nodes during the upgrade. Allowed values are integer values from zero to 100. + MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` + // MaxPercentDeltaUnhealthyNodes - The maximum allowed percentage of delta health degradation during the upgrade. Allowed values are integer values from zero to 100. + MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` + // MaxPercentUpgradeDomainDeltaUnhealthyNodes - The maximum allowed percentage of upgrade domain delta health degradation during the upgrade. Allowed values are integer values from zero to 100. + MaxPercentUpgradeDomainDeltaUnhealthyNodes *int32 `json:"MaxPercentUpgradeDomainDeltaUnhealthyNodes,omitempty"` + // ApplicationHealthPolicies - Defines the application health policy map used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicies *ApplicationHealthPolicies `json:"ApplicationHealthPolicies,omitempty"` +} + +// ClusterConfigurationUpgradeStatusInfo information about a standalone cluster configuration upgrade +// status. +type ClusterConfigurationUpgradeStatusInfo struct { + autorest.Response `json:"-"` + // UpgradeState - The state of the upgrade domain. Possible values include: 'UpgradeStateInvalid', 'UpgradeStateRollingBackInProgress', 'UpgradeStateRollingBackCompleted', 'UpgradeStateRollingForwardPending', 'UpgradeStateRollingForwardInProgress', 'UpgradeStateRollingForwardCompleted', 'UpgradeStateFailed' + UpgradeState UpgradeState `json:"UpgradeState,omitempty"` + // ProgressStatus - The cluster manifest version. + ProgressStatus *int32 `json:"ProgressStatus,omitempty"` + // ConfigVersion - The cluster configuration version. + ConfigVersion *string `json:"ConfigVersion,omitempty"` + // Details - The cluster upgrade status details. + Details *string `json:"Details,omitempty"` +} + +// BasicClusterEvent represents the base for all Cluster Events. +type BasicClusterEvent interface { + AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) + AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) + AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) + AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) + AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) + AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) + AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) + AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) + AsChaosStartedEvent() (*ChaosStartedEvent, bool) + AsClusterEvent() (*ClusterEvent, bool) +} + +// ClusterEvent represents the base for all Cluster Events. +type ClusterEvent struct { + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicClusterEvent(body []byte) (BasicClusterEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindClusterNewHealthReport): + var cnhre ClusterNewHealthReportEvent + err := json.Unmarshal(body, &cnhre) + return cnhre, err + case string(KindClusterHealthReportExpired): + var chree ClusterHealthReportExpiredEvent + err := json.Unmarshal(body, &chree) + return chree, err + case string(KindClusterUpgradeCompleted): + var cuce ClusterUpgradeCompletedEvent + err := json.Unmarshal(body, &cuce) + return cuce, err + case string(KindClusterUpgradeDomainCompleted): + var cudce ClusterUpgradeDomainCompletedEvent + err := json.Unmarshal(body, &cudce) + return cudce, err + case string(KindClusterUpgradeRollbackCompleted): + var curce ClusterUpgradeRollbackCompletedEvent + err := json.Unmarshal(body, &curce) + return curce, err + case string(KindClusterUpgradeRollbackStarted): + var curse ClusterUpgradeRollbackStartedEvent + err := json.Unmarshal(body, &curse) + return curse, err + case string(KindClusterUpgradeStarted): + var cuse ClusterUpgradeStartedEvent + err := json.Unmarshal(body, &cuse) + return cuse, err + case string(KindChaosStopped): + var cse ChaosStoppedEvent + err := json.Unmarshal(body, &cse) + return cse, err + case string(KindChaosStarted): + var cse ChaosStartedEvent + err := json.Unmarshal(body, &cse) + return cse, err + default: + var ce ClusterEvent + err := json.Unmarshal(body, &ce) + return ce, err + } +} +func unmarshalBasicClusterEventArray(body []byte) ([]BasicClusterEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ceArray := make([]BasicClusterEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ce, err := unmarshalBasicClusterEvent(*rawMessage) + if err != nil { + return nil, err + } + ceArray[index] = ce + } + return ceArray, nil +} + +// MarshalJSON is the custom marshaler for ClusterEvent. +func (ce ClusterEvent) MarshalJSON() ([]byte, error) { + ce.Kind = KindClusterEvent + objectMap := make(map[string]interface{}) + if ce.EventInstanceID != nil { + objectMap["EventInstanceId"] = ce.EventInstanceID + } + if ce.Category != nil { + objectMap["Category"] = ce.Category + } + if ce.TimeStamp != nil { + objectMap["TimeStamp"] = ce.TimeStamp + } + if ce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ce.HasCorrelatedEvents + } + if ce.Kind != "" { + objectMap["Kind"] = ce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterEvent() (*ClusterEvent, bool) { + return &ce, true +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &ce, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterEvent. +func (ce ClusterEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ce, true +} + +// ClusterHealth represents the health of the cluster. +// Contains the cluster aggregated health state, the cluster application and node health states as well as +// the health events and the unhealthy evaluations. +type ClusterHealth struct { + autorest.Response `json:"-"` + // NodeHealthStates - Cluster node health states as found in the health store. + NodeHealthStates *[]NodeHealthState `json:"NodeHealthStates,omitempty"` + // ApplicationHealthStates - Cluster application health states as found in the health store. + ApplicationHealthStates *[]ApplicationHealthState `json:"ApplicationHealthStates,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// ClusterHealthChunk represents the health chunk of the cluster. +// Contains the cluster aggregated health state, and the cluster entities that respect the input filter. +type ClusterHealthChunk struct { + autorest.Response `json:"-"` + // HealthState - The HealthState representing the aggregated health state of the cluster computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired cluster health policy and the application health policies. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // NodeHealthStateChunks - The list of node health state chunks in the cluster that respect the filters in the cluster health chunk query description. + NodeHealthStateChunks *NodeHealthStateChunkList `json:"NodeHealthStateChunks,omitempty"` + // ApplicationHealthStateChunks - The list of application health state chunks in the cluster that respect the filters in the cluster health chunk query description. + ApplicationHealthStateChunks *ApplicationHealthStateChunkList `json:"ApplicationHealthStateChunks,omitempty"` +} + +// ClusterHealthChunkQueryDescription the cluster health chunk query description, which can specify the +// health policies to evaluate cluster health and very expressive filters to select which cluster entities +// to include in response. +type ClusterHealthChunkQueryDescription struct { + // NodeFilters - Defines a list of filters that specify which nodes to be included in the returned cluster health chunk. + // If no filters are specified, no nodes are returned. All the nodes are used to evaluate the cluster's aggregated health state, regardless of the input filters. + // The cluster health chunk query may specify multiple node filters. + // For example, it can specify a filter to return all nodes with health state Error and another filter to always include a node identified by its NodeName. + NodeFilters *[]NodeHealthStateFilter `json:"NodeFilters,omitempty"` + // ApplicationFilters - Defines a list of filters that specify which applications to be included in the returned cluster health chunk. + // If no filters are specified, no applications are returned. All the applications are used to evaluate the cluster's aggregated health state, regardless of the input filters. + // The cluster health chunk query may specify multiple application filters. + // For example, it can specify a filter to return all applications with health state Error and another filter to always include applications of a specified application type. + ApplicationFilters *[]ApplicationHealthStateFilter `json:"ApplicationFilters,omitempty"` + // ClusterHealthPolicy - Defines a health policy used to evaluate the health of the cluster or of a cluster node. + ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` + // ApplicationHealthPolicies - Defines the application health policy map used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicies *ApplicationHealthPolicies `json:"ApplicationHealthPolicies,omitempty"` +} + +// ClusterHealthPolicies health policies to evaluate cluster health. +type ClusterHealthPolicies struct { + // ApplicationHealthPolicyMap - Defines a map that contains specific application health policies for different applications. + // Each entry specifies as key the application name and as value an ApplicationHealthPolicy used to evaluate the application health. + // If an application is not specified in the map, the application health evaluation uses the ApplicationHealthPolicy found in its application manifest or the default application health policy (if no health policy is defined in the manifest). + // The map is empty by default. + ApplicationHealthPolicyMap *[]ApplicationHealthPolicyMapItem `json:"ApplicationHealthPolicyMap,omitempty"` + // ClusterHealthPolicy - Defines a health policy used to evaluate the health of the cluster or of a cluster node. + ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` +} + +// ClusterHealthPolicy defines a health policy used to evaluate the health of the cluster or of a cluster +// node. +type ClusterHealthPolicy struct { + // ConsiderWarningAsError - Indicates whether warnings are treated with the same severity as errors. + ConsiderWarningAsError *bool `json:"ConsiderWarningAsError,omitempty"` + // MaxPercentUnhealthyNodes - The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. + // The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error. + // If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. + // The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster. + // The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + // In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. + MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` + // MaxPercentUnhealthyApplications - The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. + // The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. + // If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. + // This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. + // The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. + MaxPercentUnhealthyApplications *int32 `json:"MaxPercentUnhealthyApplications,omitempty"` + // ApplicationTypeHealthPolicyMap - Defines a map with max percentage unhealthy applications for specific application types. + // Each entry specifies as key the application type name and as value an integer that represents the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the specified application type. + // The application type health policy map can be used during cluster health evaluation to describe special application types. + // The application types included in the map are evaluated against the percentage specified in the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health policy. + // The applications of application types specified in the map are not counted against the global pool of applications. + // For example, if some applications of a type are critical, the cluster administrator can add an entry to the map for that application type + // and assign it a value of 0% (that is, do not tolerate any failures). + // All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to tolerate some failures out of the thousands of application instances. + // The application type health policy map is used only if the cluster manifest enables application type health evaluation using the configuration entry for HealthManager/EnableApplicationTypeHealthEvaluation. + ApplicationTypeHealthPolicyMap *[]ApplicationTypeHealthPolicyMapItem `json:"ApplicationTypeHealthPolicyMap,omitempty"` +} + +// ClusterHealthReportExpiredEvent cluster Health Report Expired event. +type ClusterHealthReportExpiredEvent struct { + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + chree.Kind = KindClusterHealthReportExpired + objectMap := make(map[string]interface{}) + if chree.SourceID != nil { + objectMap["SourceId"] = chree.SourceID + } + if chree.Property != nil { + objectMap["Property"] = chree.Property + } + if chree.HealthState != nil { + objectMap["HealthState"] = chree.HealthState + } + if chree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = chree.TimeToLiveMs + } + if chree.SequenceNumber != nil { + objectMap["SequenceNumber"] = chree.SequenceNumber + } + if chree.Description != nil { + objectMap["Description"] = chree.Description + } + if chree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = chree.RemoveWhenExpired + } + if chree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = chree.SourceUtcTimestamp + } + if chree.EventInstanceID != nil { + objectMap["EventInstanceId"] = chree.EventInstanceID + } + if chree.Category != nil { + objectMap["Category"] = chree.Category + } + if chree.TimeStamp != nil { + objectMap["TimeStamp"] = chree.TimeStamp + } + if chree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = chree.HasCorrelatedEvents + } + if chree.Kind != "" { + objectMap["Kind"] = chree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &chree, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return &chree, true +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterHealthReportExpiredEvent. +func (chree ClusterHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &chree, true +} + +// ClusterLoadInfo information about load in a Service Fabric cluster. It holds a summary of all metrics +// and their load in a cluster. +type ClusterLoadInfo struct { + autorest.Response `json:"-"` + // LastBalancingStartTimeUtc - The starting time of last resource balancing run. + LastBalancingStartTimeUtc *date.Time `json:"LastBalancingStartTimeUtc,omitempty"` + // LastBalancingEndTimeUtc - The end time of last resource balancing run. + LastBalancingEndTimeUtc *date.Time `json:"LastBalancingEndTimeUtc,omitempty"` + // LoadMetricInformation - List that contains metrics and their load information in this cluster. + LoadMetricInformation *[]LoadMetricInformation `json:"LoadMetricInformation,omitempty"` +} + +// ClusterManifest information about the cluster manifest. +type ClusterManifest struct { + autorest.Response `json:"-"` + // Manifest - The contents of the cluster manifest file. + Manifest *string `json:"Manifest,omitempty"` +} + +// ClusterNewHealthReportEvent cluster Health Report Created event. +type ClusterNewHealthReportEvent struct { + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) MarshalJSON() ([]byte, error) { + cnhre.Kind = KindClusterNewHealthReport + objectMap := make(map[string]interface{}) + if cnhre.SourceID != nil { + objectMap["SourceId"] = cnhre.SourceID + } + if cnhre.Property != nil { + objectMap["Property"] = cnhre.Property + } + if cnhre.HealthState != nil { + objectMap["HealthState"] = cnhre.HealthState + } + if cnhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = cnhre.TimeToLiveMs + } + if cnhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = cnhre.SequenceNumber + } + if cnhre.Description != nil { + objectMap["Description"] = cnhre.Description + } + if cnhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = cnhre.RemoveWhenExpired + } + if cnhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = cnhre.SourceUtcTimestamp + } + if cnhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = cnhre.EventInstanceID + } + if cnhre.Category != nil { + objectMap["Category"] = cnhre.Category + } + if cnhre.TimeStamp != nil { + objectMap["TimeStamp"] = cnhre.TimeStamp + } + if cnhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cnhre.HasCorrelatedEvents + } + if cnhre.Kind != "" { + objectMap["Kind"] = cnhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &cnhre, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return &cnhre, true +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterNewHealthReportEvent. +func (cnhre ClusterNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cnhre, true +} + +// ClusterUpgradeCompletedEvent cluster Upgrade Completed event. +type ClusterUpgradeCompletedEvent struct { + // TargetClusterVersion - Target Cluster version. + TargetClusterVersion *string `json:"TargetClusterVersion,omitempty"` + // OverallUpgradeElapsedTimeInMs - Overall duration of upgrade in milli-seconds. + OverallUpgradeElapsedTimeInMs *float64 `json:"OverallUpgradeElapsedTimeInMs,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) MarshalJSON() ([]byte, error) { + cuce.Kind = KindClusterUpgradeCompleted + objectMap := make(map[string]interface{}) + if cuce.TargetClusterVersion != nil { + objectMap["TargetClusterVersion"] = cuce.TargetClusterVersion + } + if cuce.OverallUpgradeElapsedTimeInMs != nil { + objectMap["OverallUpgradeElapsedTimeInMs"] = cuce.OverallUpgradeElapsedTimeInMs + } + if cuce.EventInstanceID != nil { + objectMap["EventInstanceId"] = cuce.EventInstanceID + } + if cuce.Category != nil { + objectMap["Category"] = cuce.Category + } + if cuce.TimeStamp != nil { + objectMap["TimeStamp"] = cuce.TimeStamp + } + if cuce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cuce.HasCorrelatedEvents + } + if cuce.Kind != "" { + objectMap["Kind"] = cuce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &cuce, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return &cuce, true +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeCompletedEvent. +func (cuce ClusterUpgradeCompletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cuce, true +} + +// ClusterUpgradeDescriptionObject represents a ServiceFabric cluster upgrade +type ClusterUpgradeDescriptionObject struct { + // ConfigVersion - The cluster configuration version (specified in the cluster manifest). + ConfigVersion *string `json:"ConfigVersion,omitempty"` + // CodeVersion - The ServiceFabric code version of the cluster. + CodeVersion *string `json:"CodeVersion,omitempty"` + // UpgradeKind - The kind of upgrade out of the following possible values. Possible values include: 'UpgradeKindInvalid', 'UpgradeKindRolling' + UpgradeKind UpgradeKind `json:"UpgradeKind,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // UpgradeReplicaSetCheckTimeoutInSeconds - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` + // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). + ForceRestart *bool `json:"ForceRestart,omitempty"` + // SortOrder - Defines the order in which an upgrade proceeds through the cluster. Possible values include: 'UpgradeSortOrderInvalid', 'UpgradeSortOrderDefault', 'UpgradeSortOrderNumeric', 'UpgradeSortOrderLexicographical', 'UpgradeSortOrderReverseNumeric', 'UpgradeSortOrderReverseLexicographical' + SortOrder UpgradeSortOrder `json:"SortOrder,omitempty"` + // EnableDeltaHealthEvaluation - When true, enables delta health evaluation rather than absolute health evaluation after completion of each upgrade domain. + EnableDeltaHealthEvaluation *bool `json:"EnableDeltaHealthEvaluation,omitempty"` + // MonitoringPolicy - Describes the parameters for monitoring an upgrade in Monitored mode. + MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` + // ClusterHealthPolicy - Defines a health policy used to evaluate the health of the cluster or of a cluster node. + ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` + // ClusterUpgradeHealthPolicy - Defines a health policy used to evaluate the health of the cluster during a cluster upgrade. + ClusterUpgradeHealthPolicy *ClusterUpgradeHealthPolicyObject `json:"ClusterUpgradeHealthPolicy,omitempty"` + // ApplicationHealthPolicyMap - Defines a map that contains specific application health policies for different applications. + // Each entry specifies as key the application name and as value an ApplicationHealthPolicy used to evaluate the application health. + // If an application is not specified in the map, the application health evaluation uses the ApplicationHealthPolicy found in its application manifest or the default application health policy (if no health policy is defined in the manifest). + // The map is empty by default. + ApplicationHealthPolicyMap *[]ApplicationHealthPolicyMapItem `json:"ApplicationHealthPolicyMap,omitempty"` +} + +// ClusterUpgradeDomainCompletedEvent cluster Upgrade Domain Completed event. +type ClusterUpgradeDomainCompletedEvent struct { + // TargetClusterVersion - Target Cluster version. + TargetClusterVersion *string `json:"TargetClusterVersion,omitempty"` + // UpgradeState - State of upgrade. + UpgradeState *string `json:"UpgradeState,omitempty"` + // UpgradeDomains - Upgrade domains. + UpgradeDomains *string `json:"UpgradeDomains,omitempty"` + // UpgradeDomainElapsedTimeInMs - Duration of domain upgrade in milli-seconds. + UpgradeDomainElapsedTimeInMs *float64 `json:"UpgradeDomainElapsedTimeInMs,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) MarshalJSON() ([]byte, error) { + cudce.Kind = KindClusterUpgradeDomainCompleted + objectMap := make(map[string]interface{}) + if cudce.TargetClusterVersion != nil { + objectMap["TargetClusterVersion"] = cudce.TargetClusterVersion + } + if cudce.UpgradeState != nil { + objectMap["UpgradeState"] = cudce.UpgradeState + } + if cudce.UpgradeDomains != nil { + objectMap["UpgradeDomains"] = cudce.UpgradeDomains + } + if cudce.UpgradeDomainElapsedTimeInMs != nil { + objectMap["UpgradeDomainElapsedTimeInMs"] = cudce.UpgradeDomainElapsedTimeInMs + } + if cudce.EventInstanceID != nil { + objectMap["EventInstanceId"] = cudce.EventInstanceID + } + if cudce.Category != nil { + objectMap["Category"] = cudce.Category + } + if cudce.TimeStamp != nil { + objectMap["TimeStamp"] = cudce.TimeStamp + } + if cudce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cudce.HasCorrelatedEvents + } + if cudce.Kind != "" { + objectMap["Kind"] = cudce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &cudce, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return &cudce, true +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeDomainCompletedEvent. +func (cudce ClusterUpgradeDomainCompletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cudce, true +} + +// ClusterUpgradeHealthPolicyObject defines a health policy used to evaluate the health of the cluster +// during a cluster upgrade. +type ClusterUpgradeHealthPolicyObject struct { + // MaxPercentDeltaUnhealthyNodes - The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. The default value is 10%. + MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` + // MaxPercentUpgradeDomainDeltaUnhealthyNodes - The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. The default value is 15%. + MaxPercentUpgradeDomainDeltaUnhealthyNodes *int32 `json:"MaxPercentUpgradeDomainDeltaUnhealthyNodes,omitempty"` +} + +// ClusterUpgradeProgressObject information about a cluster upgrade. +type ClusterUpgradeProgressObject struct { + autorest.Response `json:"-"` + // CodeVersion - The ServiceFabric code version of the cluster. + CodeVersion *string `json:"CodeVersion,omitempty"` + // ConfigVersion - The cluster configuration version (specified in the cluster manifest). + ConfigVersion *string `json:"ConfigVersion,omitempty"` + // UpgradeDomains - List of upgrade domains and their statuses. + UpgradeDomains *[]UpgradeDomainInfo `json:"UpgradeDomains,omitempty"` + // UpgradeState - The state of the upgrade domain. Possible values include: 'UpgradeStateInvalid', 'UpgradeStateRollingBackInProgress', 'UpgradeStateRollingBackCompleted', 'UpgradeStateRollingForwardPending', 'UpgradeStateRollingForwardInProgress', 'UpgradeStateRollingForwardCompleted', 'UpgradeStateFailed' + UpgradeState UpgradeState `json:"UpgradeState,omitempty"` + // NextUpgradeDomain - The name of the next upgrade domain to be processed. + NextUpgradeDomain *string `json:"NextUpgradeDomain,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // UpgradeDescription - Represents a ServiceFabric cluster upgrade + UpgradeDescription *ClusterUpgradeDescriptionObject `json:"UpgradeDescription,omitempty"` + // UpgradeDurationInMilliseconds - The estimated elapsed time spent processing the current overall upgrade. + UpgradeDurationInMilliseconds *string `json:"UpgradeDurationInMilliseconds,omitempty"` + // UpgradeDomainDurationInMilliseconds - The estimated elapsed time spent processing the current upgrade domain. + UpgradeDomainDurationInMilliseconds *string `json:"UpgradeDomainDurationInMilliseconds,omitempty"` + // UnhealthyEvaluations - List of health evaluations that resulted in the current aggregated health state. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // CurrentUpgradeDomainProgress - Information about the current in-progress upgrade domain. + CurrentUpgradeDomainProgress *CurrentUpgradeDomainProgressInfo `json:"CurrentUpgradeDomainProgress,omitempty"` + // StartTimestampUtc - The start time of the upgrade in UTC. + StartTimestampUtc *string `json:"StartTimestampUtc,omitempty"` + // FailureTimestampUtc - The failure time of the upgrade in UTC. + FailureTimestampUtc *string `json:"FailureTimestampUtc,omitempty"` + // FailureReason - The cause of an upgrade failure that resulted in FailureAction being executed. Possible values include: 'None', 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'OverallUpgradeTimeout' + FailureReason FailureReason `json:"FailureReason,omitempty"` + // UpgradeDomainProgressAtFailure - The detailed upgrade progress for nodes in the current upgrade domain at the point of failure. + UpgradeDomainProgressAtFailure *FailedUpgradeDomainProgressObject `json:"UpgradeDomainProgressAtFailure,omitempty"` +} + +// ClusterUpgradeRollbackCompletedEvent cluster Upgrade Rollback Completed event. +type ClusterUpgradeRollbackCompletedEvent struct { + // TargetClusterVersion - Target Cluster version. + TargetClusterVersion *string `json:"TargetClusterVersion,omitempty"` + // FailureReason - Describes failure. + FailureReason *string `json:"FailureReason,omitempty"` + // OverallUpgradeElapsedTimeInMs - Overall duration of upgrade in milli-seconds. + OverallUpgradeElapsedTimeInMs *float64 `json:"OverallUpgradeElapsedTimeInMs,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) MarshalJSON() ([]byte, error) { + curce.Kind = KindClusterUpgradeRollbackCompleted + objectMap := make(map[string]interface{}) + if curce.TargetClusterVersion != nil { + objectMap["TargetClusterVersion"] = curce.TargetClusterVersion + } + if curce.FailureReason != nil { + objectMap["FailureReason"] = curce.FailureReason + } + if curce.OverallUpgradeElapsedTimeInMs != nil { + objectMap["OverallUpgradeElapsedTimeInMs"] = curce.OverallUpgradeElapsedTimeInMs + } + if curce.EventInstanceID != nil { + objectMap["EventInstanceId"] = curce.EventInstanceID + } + if curce.Category != nil { + objectMap["Category"] = curce.Category + } + if curce.TimeStamp != nil { + objectMap["TimeStamp"] = curce.TimeStamp + } + if curce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = curce.HasCorrelatedEvents + } + if curce.Kind != "" { + objectMap["Kind"] = curce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &curce, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return &curce, true +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackCompletedEvent. +func (curce ClusterUpgradeRollbackCompletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &curce, true +} + +// ClusterUpgradeRollbackStartedEvent cluster Upgrade Rollback Started event. +type ClusterUpgradeRollbackStartedEvent struct { + // TargetClusterVersion - Target Cluster version. + TargetClusterVersion *string `json:"TargetClusterVersion,omitempty"` + // FailureReason - Describes failure. + FailureReason *string `json:"FailureReason,omitempty"` + // OverallUpgradeElapsedTimeInMs - Overall duration of upgrade in milli-seconds. + OverallUpgradeElapsedTimeInMs *float64 `json:"OverallUpgradeElapsedTimeInMs,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) MarshalJSON() ([]byte, error) { + curse.Kind = KindClusterUpgradeRollbackStarted + objectMap := make(map[string]interface{}) + if curse.TargetClusterVersion != nil { + objectMap["TargetClusterVersion"] = curse.TargetClusterVersion + } + if curse.FailureReason != nil { + objectMap["FailureReason"] = curse.FailureReason + } + if curse.OverallUpgradeElapsedTimeInMs != nil { + objectMap["OverallUpgradeElapsedTimeInMs"] = curse.OverallUpgradeElapsedTimeInMs + } + if curse.EventInstanceID != nil { + objectMap["EventInstanceId"] = curse.EventInstanceID + } + if curse.Category != nil { + objectMap["Category"] = curse.Category + } + if curse.TimeStamp != nil { + objectMap["TimeStamp"] = curse.TimeStamp + } + if curse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = curse.HasCorrelatedEvents + } + if curse.Kind != "" { + objectMap["Kind"] = curse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &curse, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return &curse, true +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeRollbackStartedEvent. +func (curse ClusterUpgradeRollbackStartedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &curse, true +} + +// ClusterUpgradeStartedEvent cluster Upgrade Started event. +type ClusterUpgradeStartedEvent struct { + // CurrentClusterVersion - Current Cluster version. + CurrentClusterVersion *string `json:"CurrentClusterVersion,omitempty"` + // TargetClusterVersion - Target Cluster version. + TargetClusterVersion *string `json:"TargetClusterVersion,omitempty"` + // UpgradeType - Type of upgrade. + UpgradeType *string `json:"UpgradeType,omitempty"` + // RollingUpgradeMode - Mode of upgrade. + RollingUpgradeMode *string `json:"RollingUpgradeMode,omitempty"` + // FailureAction - Action if failed. + FailureAction *string `json:"FailureAction,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) MarshalJSON() ([]byte, error) { + cuse.Kind = KindClusterUpgradeStarted + objectMap := make(map[string]interface{}) + if cuse.CurrentClusterVersion != nil { + objectMap["CurrentClusterVersion"] = cuse.CurrentClusterVersion + } + if cuse.TargetClusterVersion != nil { + objectMap["TargetClusterVersion"] = cuse.TargetClusterVersion + } + if cuse.UpgradeType != nil { + objectMap["UpgradeType"] = cuse.UpgradeType + } + if cuse.RollingUpgradeMode != nil { + objectMap["RollingUpgradeMode"] = cuse.RollingUpgradeMode + } + if cuse.FailureAction != nil { + objectMap["FailureAction"] = cuse.FailureAction + } + if cuse.EventInstanceID != nil { + objectMap["EventInstanceId"] = cuse.EventInstanceID + } + if cuse.Category != nil { + objectMap["Category"] = cuse.Category + } + if cuse.TimeStamp != nil { + objectMap["TimeStamp"] = cuse.TimeStamp + } + if cuse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cuse.HasCorrelatedEvents + } + if cuse.Kind != "" { + objectMap["Kind"] = cuse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return &cuse, true +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return &cuse, true +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ClusterUpgradeStartedEvent. +func (cuse ClusterUpgradeStartedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cuse, true +} + +// ClusterVersion the cluster version. +type ClusterVersion struct { + autorest.Response `json:"-"` + // Version - The Service Fabric cluster runtime version. + Version *string `json:"Version,omitempty"` +} + +// CodePackageEntryPoint information about setup or main entry point of a code package deployed on a +// Service Fabric node. +type CodePackageEntryPoint struct { + // EntryPointLocation - The location of entry point executable on the node. + EntryPointLocation *string `json:"EntryPointLocation,omitempty"` + // ProcessID - The process ID of the entry point. + ProcessID *string `json:"ProcessId,omitempty"` + // RunAsUserName - The user name under which entry point executable is run on the node. + RunAsUserName *string `json:"RunAsUserName,omitempty"` + // CodePackageEntryPointStatistics - Statistics about setup or main entry point of a code package deployed on a Service Fabric node. + CodePackageEntryPointStatistics *CodePackageEntryPointStatistics `json:"CodePackageEntryPointStatistics,omitempty"` + // Status - Specifies the status of the code package entry point deployed on a Service Fabric node. Possible values include: 'EntryPointStatusInvalid', 'EntryPointStatusPending', 'EntryPointStatusStarting', 'EntryPointStatusStarted', 'EntryPointStatusStopping', 'EntryPointStatusStopped' + Status EntryPointStatus `json:"Status,omitempty"` + // NextActivationTime - The time (in UTC) when the entry point executable will be run next. + NextActivationTime *date.Time `json:"NextActivationTime,omitempty"` + // InstanceID - The instance ID for current running entry point. For a code package setup entry point (if specified) runs first and after it finishes main entry point is started. Each time entry point executable is run, its instance id will change. + InstanceID *string `json:"InstanceId,omitempty"` +} + +// CodePackageEntryPointStatistics statistics about setup or main entry point of a code package deployed +// on a Service Fabric node. +type CodePackageEntryPointStatistics struct { + // LastExitCode - The last exit code of the entry point. + LastExitCode *string `json:"LastExitCode,omitempty"` + // LastActivationTime - The last time (in UTC) when Service Fabric attempted to run the entry point. + LastActivationTime *date.Time `json:"LastActivationTime,omitempty"` + // LastExitTime - The last time (in UTC) when the entry point finished running. + LastExitTime *date.Time `json:"LastExitTime,omitempty"` + // LastSuccessfulActivationTime - The last time (in UTC) when the entry point ran successfully. + LastSuccessfulActivationTime *date.Time `json:"LastSuccessfulActivationTime,omitempty"` + // LastSuccessfulExitTime - The last time (in UTC) when the entry point finished running gracefully. + LastSuccessfulExitTime *date.Time `json:"LastSuccessfulExitTime,omitempty"` + // ActivationCount - Number of times the entry point has run. + ActivationCount *string `json:"ActivationCount,omitempty"` + // ActivationFailureCount - Number of times the entry point failed to run. + ActivationFailureCount *string `json:"ActivationFailureCount,omitempty"` + // ContinuousActivationFailureCount - Number of times the entry point continuously failed to run. + ContinuousActivationFailureCount *string `json:"ContinuousActivationFailureCount,omitempty"` + // ExitCount - Number of times the entry point finished running. + ExitCount *string `json:"ExitCount,omitempty"` + // ExitFailureCount - Number of times the entry point failed to exit gracefully. + ExitFailureCount *string `json:"ExitFailureCount,omitempty"` + // ContinuousExitFailureCount - Number of times the entry point continuously failed to exit gracefully. + ContinuousExitFailureCount *string `json:"ContinuousExitFailureCount,omitempty"` +} + +// ComposeDeploymentStatusInfo information about a Service Fabric compose deployment. +type ComposeDeploymentStatusInfo struct { + autorest.Response `json:"-"` + // Name - The name of the deployment. + Name *string `json:"Name,omitempty"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // Status - The status of the compose deployment. Possible values include: 'ComposeDeploymentStatusInvalid', 'ComposeDeploymentStatusProvisioning', 'ComposeDeploymentStatusCreating', 'ComposeDeploymentStatusReady', 'ComposeDeploymentStatusUnprovisioning', 'ComposeDeploymentStatusDeleting', 'ComposeDeploymentStatusFailed', 'ComposeDeploymentStatusUpgrading' + Status ComposeDeploymentStatus `json:"Status,omitempty"` + // StatusDetails - The status details of compose deployment including failure message. + StatusDetails *string `json:"StatusDetails,omitempty"` +} + +// ComposeDeploymentUpgradeDescription describes the parameters for a compose deployment upgrade. +type ComposeDeploymentUpgradeDescription struct { + // DeploymentName - The name of the deployment. + DeploymentName *string `json:"DeploymentName,omitempty"` + // ComposeFileContent - The content of the compose file that describes the deployment to create. + ComposeFileContent *string `json:"ComposeFileContent,omitempty"` + // RegistryCredential - Credential information to connect to container registry. + RegistryCredential *RegistryCredential `json:"RegistryCredential,omitempty"` + // UpgradeKind - The kind of upgrade out of the following possible values. Possible values include: 'UpgradeKindInvalid', 'UpgradeKindRolling' + UpgradeKind UpgradeKind `json:"UpgradeKind,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // UpgradeReplicaSetCheckTimeoutInSeconds - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` + // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). + ForceRestart *bool `json:"ForceRestart,omitempty"` + // MonitoringPolicy - Describes the parameters for monitoring an upgrade in Monitored mode. + MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` + // ApplicationHealthPolicy - Defines a health policy used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` +} + +// ComposeDeploymentUpgradeProgressInfo describes the parameters for a compose deployment upgrade. +type ComposeDeploymentUpgradeProgressInfo struct { + autorest.Response `json:"-"` + // DeploymentName - The name of the target deployment. + DeploymentName *string `json:"DeploymentName,omitempty"` + // ApplicationName - The name of the target application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // UpgradeState - The state of the compose deployment upgrade. Possible values include: 'ComposeDeploymentUpgradeStateInvalid', 'ComposeDeploymentUpgradeStateProvisioningTarget', 'ComposeDeploymentUpgradeStateRollingForwardInProgress', 'ComposeDeploymentUpgradeStateRollingForwardPending', 'ComposeDeploymentUpgradeStateUnprovisioningCurrent', 'ComposeDeploymentUpgradeStateRollingForwardCompleted', 'ComposeDeploymentUpgradeStateRollingBackInProgress', 'ComposeDeploymentUpgradeStateUnprovisioningTarget', 'ComposeDeploymentUpgradeStateRollingBackCompleted', 'ComposeDeploymentUpgradeStateFailed' + UpgradeState ComposeDeploymentUpgradeState `json:"UpgradeState,omitempty"` + // UpgradeStatusDetails - Additional detailed information about the status of the pending upgrade. + UpgradeStatusDetails *string `json:"UpgradeStatusDetails,omitempty"` + // UpgradeKind - The kind of upgrade out of the following possible values. Possible values include: 'UpgradeKindInvalid', 'UpgradeKindRolling' + UpgradeKind UpgradeKind `json:"UpgradeKind,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). + ForceRestart *bool `json:"ForceRestart,omitempty"` + // UpgradeReplicaSetCheckTimeoutInSeconds - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` + // MonitoringPolicy - Describes the parameters for monitoring an upgrade in Monitored mode. + MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` + // ApplicationHealthPolicy - Defines a health policy used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicy *ApplicationHealthPolicy `json:"ApplicationHealthPolicy,omitempty"` + // TargetApplicationTypeVersion - The target application type version (found in the application manifest) for the application upgrade. + TargetApplicationTypeVersion *string `json:"TargetApplicationTypeVersion,omitempty"` + // UpgradeDuration - The estimated amount of time that the overall upgrade elapsed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + UpgradeDuration *string `json:"UpgradeDuration,omitempty"` + // CurrentUpgradeDomainDuration - The estimated amount of time spent processing current Upgrade Domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + CurrentUpgradeDomainDuration *string `json:"CurrentUpgradeDomainDuration,omitempty"` + // ApplicationUnhealthyEvaluations - List of health evaluations that resulted in the current aggregated health state. + ApplicationUnhealthyEvaluations *[]HealthEvaluationWrapper `json:"ApplicationUnhealthyEvaluations,omitempty"` + // CurrentUpgradeDomainProgress - Information about the current in-progress upgrade domain. + CurrentUpgradeDomainProgress *CurrentUpgradeDomainProgressInfo `json:"CurrentUpgradeDomainProgress,omitempty"` + // StartTimestampUtc - The estimated UTC datetime when the upgrade started. + StartTimestampUtc *string `json:"StartTimestampUtc,omitempty"` + // FailureTimestampUtc - The estimated UTC datetime when the upgrade failed and FailureAction was executed. + FailureTimestampUtc *string `json:"FailureTimestampUtc,omitempty"` + // FailureReason - The cause of an upgrade failure that resulted in FailureAction being executed. Possible values include: 'None', 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'OverallUpgradeTimeout' + FailureReason FailureReason `json:"FailureReason,omitempty"` + // UpgradeDomainProgressAtFailure - Information about the upgrade domain progress at the time of upgrade failure. + UpgradeDomainProgressAtFailure *FailureUpgradeDomainProgressInfo `json:"UpgradeDomainProgressAtFailure,omitempty"` + // ApplicationUpgradeStatusDetails - Additional details of application upgrade including failure message. + ApplicationUpgradeStatusDetails *string `json:"ApplicationUpgradeStatusDetails,omitempty"` +} + +// ConfigParameterOverride information about a configuration parameter override. +type ConfigParameterOverride struct { + // SectionName - Name of the section for the parameter override. + SectionName *string `json:"SectionName,omitempty"` + // ParameterName - Name of the parameter that has been overridden. + ParameterName *string `json:"ParameterName,omitempty"` + // ParameterValue - Value of the overridden parameter. + ParameterValue *string `json:"ParameterValue,omitempty"` + // Timeout - The duration until config override is considered as valid. + Timeout *string `json:"Timeout,omitempty"` + // PersistAcrossUpgrade - A value that indicates whether config override will be removed on upgrade or will still be considered as valid. + PersistAcrossUpgrade *bool `json:"PersistAcrossUpgrade,omitempty"` +} + +// ContainerAPIRequestBody parameters for making container API call. +type ContainerAPIRequestBody struct { + // HTTPVerb - HTTP verb of container REST API, defaults to "GET" + HTTPVerb *string `json:"HttpVerb,omitempty"` + // URIPath - URI path of container REST API + URIPath *string `json:"UriPath,omitempty"` + // ContentType - Content type of container REST API request, defaults to "application/json" + ContentType *string `json:"Content-Type,omitempty"` + // Body - HTTP request body of container REST API + Body *string `json:"Body,omitempty"` +} + +// ContainerAPIResponse response body that wraps container API result. +type ContainerAPIResponse struct { + autorest.Response `json:"-"` + // ContainerAPIResult - Container API result. + ContainerAPIResult *ContainerAPIResult `json:"ContainerApiResult,omitempty"` +} + +// ContainerAPIResult container API result. +type ContainerAPIResult struct { + // Status - HTTP status code returned by the target container API + Status *int32 `json:"Status,omitempty"` + // ContentType - HTTP content type + ContentType *string `json:"Content-Type,omitempty"` + // ContentEncoding - HTTP content encoding + ContentEncoding *string `json:"Content-Encoding,omitempty"` + // Body - container API result body + Body *string `json:"Body,omitempty"` +} + +// ContainerCodePackageProperties describes a container and its runtime properties. +type ContainerCodePackageProperties struct { + // Name - The name of the code package. + Name *string `json:"name,omitempty"` + // Image - The Container image to use. + Image *string `json:"image,omitempty"` + // ImageRegistryCredential - Image registry credential. + ImageRegistryCredential *ImageRegistryCredential `json:"imageRegistryCredential,omitempty"` + // Entrypoint - Override for the default entry point in the container. + Entrypoint *string `json:"entrypoint,omitempty"` + // Commands - Command array to execute within the container in exec form. + Commands *[]string `json:"commands,omitempty"` + // EnvironmentVariables - The environment variables to set in this container + EnvironmentVariables *[]EnvironmentVariable `json:"environmentVariables,omitempty"` + // Settings - The settings to set in this container. The setting file path can be fetched from environment variable "Fabric_SettingPath". The path for Windows container is "C:\\secrets". The path for Linux container is "/var/secrets". + Settings *[]Setting `json:"settings,omitempty"` + // Labels - The labels to set in this container. + Labels *[]ContainerLabel `json:"labels,omitempty"` + // Endpoints - The endpoints exposed by this container. + Endpoints *[]EndpointProperties `json:"endpoints,omitempty"` + // Resources - The resources required by this container. + Resources *ResourceRequirements `json:"resources,omitempty"` + // VolumeRefs - Volumes to be attached to the container. The lifetime of these volumes is independent of the application's lifetime. + VolumeRefs *[]VolumeReference `json:"volumeRefs,omitempty"` + // Volumes - Volumes to be attached to the container. The lifetime of these volumes is scoped to the application's lifetime. + Volumes *[]ApplicationScopedVolume `json:"volumes,omitempty"` + // Diagnostics - Reference to sinks in DiagnosticsDescription. + Diagnostics *DiagnosticsRef `json:"diagnostics,omitempty"` + // ReliableCollectionsRefs - A list of ReliableCollection resources used by this particular code package. Please refer to ReliableCollectionsRef for more details. + ReliableCollectionsRefs *[]ReliableCollectionsRef `json:"reliableCollectionsRefs,omitempty"` + // InstanceView - READ-ONLY; Runtime information of a container instance. + InstanceView *ContainerInstanceView `json:"instanceView,omitempty"` + // LivenessProbe - An array of liveness probes for a code package. It determines when to restart a code package. + LivenessProbe *[]Probe `json:"livenessProbe,omitempty"` + // ReadinessProbe - An array of readiness probes for a code package. It determines when to unpublish an endpoint. + ReadinessProbe *[]Probe `json:"readinessProbe,omitempty"` +} + +// ContainerEvent a container event. +type ContainerEvent struct { + // Name - The name of the container event. + Name *string `json:"name,omitempty"` + // Count - The count of the event. + Count *int32 `json:"count,omitempty"` + // FirstTimestamp - Date/time of the first event. + FirstTimestamp *string `json:"firstTimestamp,omitempty"` + // LastTimestamp - Date/time of the last event. + LastTimestamp *string `json:"lastTimestamp,omitempty"` + // Message - The event message + Message *string `json:"message,omitempty"` + // Type - The event type. + Type *string `json:"type,omitempty"` +} + +// ContainerInstanceEvent represents the base for all Container Events. +type ContainerInstanceEvent struct { + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) MarshalJSON() ([]byte, error) { + cie.Kind = KindContainerInstanceEvent + objectMap := make(map[string]interface{}) + if cie.EventInstanceID != nil { + objectMap["EventInstanceId"] = cie.EventInstanceID + } + if cie.Category != nil { + objectMap["Category"] = cie.Category + } + if cie.TimeStamp != nil { + objectMap["TimeStamp"] = cie.TimeStamp + } + if cie.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = cie.HasCorrelatedEvents + } + if cie.Kind != "" { + objectMap["Kind"] = cie.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return &cie, true +} + +// AsNodeEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ContainerInstanceEvent. +func (cie ContainerInstanceEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &cie, true +} + +// ContainerInstanceView runtime information of a container instance. +type ContainerInstanceView struct { + // RestartCount - The number of times the container has been restarted. + RestartCount *int32 `json:"restartCount,omitempty"` + // CurrentState - Current container instance state. + CurrentState *ContainerState `json:"currentState,omitempty"` + // PreviousState - Previous container instance state. + PreviousState *ContainerState `json:"previousState,omitempty"` + // Events - The events of this container instance. + Events *[]ContainerEvent `json:"events,omitempty"` +} + +// ContainerLabel describes a container label. +type ContainerLabel struct { + // Name - The name of the container label. + Name *string `json:"name,omitempty"` + // Value - The value of the container label. + Value *string `json:"value,omitempty"` +} + +// ContainerLogs container logs. +type ContainerLogs struct { + autorest.Response `json:"-"` + // Content - Container logs. + Content *string `json:"Content,omitempty"` +} + +// ContainerState the container state. +type ContainerState struct { + // State - The state of this container + State *string `json:"state,omitempty"` + // StartTime - Date/time when the container state started. + StartTime *date.Time `json:"startTime,omitempty"` + // ExitCode - The container exit code. + ExitCode *string `json:"exitCode,omitempty"` + // FinishTime - Date/time when the container state finished. + FinishTime *date.Time `json:"finishTime,omitempty"` + // DetailStatus - Human-readable status of this state. + DetailStatus *string `json:"detailStatus,omitempty"` +} + +// CreateComposeDeploymentDescription defines description for creating a Service Fabric compose deployment. +type CreateComposeDeploymentDescription struct { + // DeploymentName - The name of the deployment. + DeploymentName *string `json:"DeploymentName,omitempty"` + // ComposeFileContent - The content of the compose file that describes the deployment to create. + ComposeFileContent *string `json:"ComposeFileContent,omitempty"` + // RegistryCredential - Credential information to connect to container registry. + RegistryCredential *RegistryCredential `json:"RegistryCredential,omitempty"` +} + +// CurrentUpgradeDomainProgressInfo information about the current in-progress upgrade domain. +type CurrentUpgradeDomainProgressInfo struct { + // DomainName - The name of the upgrade domain + DomainName *string `json:"DomainName,omitempty"` + // NodeUpgradeProgressList - List of upgrading nodes and their statuses + NodeUpgradeProgressList *[]NodeUpgradeProgressInfo `json:"NodeUpgradeProgressList,omitempty"` +} + +// DeactivationIntentDescription describes the intent or reason for deactivating the node. +type DeactivationIntentDescription struct { + // DeactivationIntent - Describes the intent or reason for deactivating the node. The possible values are following. Possible values include: 'Pause', 'Restart', 'RemoveData' + DeactivationIntent DeactivationIntent `json:"DeactivationIntent,omitempty"` +} + +// DeletePropertyBatchOperation represents a PropertyBatchOperation that deletes a specified property if it +// exists. +// Note that if one PropertyBatchOperation in a PropertyBatch fails, +// the entire batch fails and cannot be committed in a transactional manner. +type DeletePropertyBatchOperation struct { + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' + Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) MarshalJSON() ([]byte, error) { + dpbo.Kind = KindDelete + objectMap := make(map[string]interface{}) + if dpbo.PropertyName != nil { + objectMap["PropertyName"] = dpbo.PropertyName + } + if dpbo.Kind != "" { + objectMap["Kind"] = dpbo.Kind + } + return json.Marshal(objectMap) +} + +// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { + return nil, false +} + +// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { + return &dpbo, true +} + +// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { + return nil, false +} + +// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { + return nil, false +} + +// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { + return nil, false +} + +// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for DeletePropertyBatchOperation. +func (dpbo DeletePropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { + return &dpbo, true +} + +// DeltaNodesCheckHealthEvaluation represents health evaluation for delta nodes, containing health +// evaluations for each unhealthy node that impacted current aggregated health state. +// Can be returned during cluster upgrade when the aggregated health state of the cluster is Warning or +// Error. +type DeltaNodesCheckHealthEvaluation struct { + // BaselineErrorCount - Number of nodes with aggregated heath state Error in the health store at the beginning of the cluster upgrade. + BaselineErrorCount *int64 `json:"BaselineErrorCount,omitempty"` + // BaselineTotalCount - Total number of nodes in the health store at the beginning of the cluster upgrade. + BaselineTotalCount *int64 `json:"BaselineTotalCount,omitempty"` + // MaxPercentDeltaUnhealthyNodes - Maximum allowed percentage of delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` + // TotalCount - Total number of nodes in the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. + // Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) MarshalJSON() ([]byte, error) { + dnche.Kind = KindDeltaNodesCheck + objectMap := make(map[string]interface{}) + if dnche.BaselineErrorCount != nil { + objectMap["BaselineErrorCount"] = dnche.BaselineErrorCount + } + if dnche.BaselineTotalCount != nil { + objectMap["BaselineTotalCount"] = dnche.BaselineTotalCount + } + if dnche.MaxPercentDeltaUnhealthyNodes != nil { + objectMap["MaxPercentDeltaUnhealthyNodes"] = dnche.MaxPercentDeltaUnhealthyNodes + } + if dnche.TotalCount != nil { + objectMap["TotalCount"] = dnche.TotalCount + } + if dnche.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = dnche.UnhealthyEvaluations + } + if dnche.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = dnche.AggregatedHealthState + } + if dnche.Description != nil { + objectMap["Description"] = dnche.Description + } + if dnche.Kind != "" { + objectMap["Kind"] = dnche.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return &dnche, true +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeltaNodesCheckHealthEvaluation. +func (dnche DeltaNodesCheckHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &dnche, true +} + +// DeployedApplicationHealth information about the health of an application deployed on a Service Fabric +// node. +type DeployedApplicationHealth struct { + autorest.Response `json:"-"` + // Name - Name of the application deployed on the node whose health information is described by this object. + Name *string `json:"Name,omitempty"` + // NodeName - Name of the node where this application is deployed. + NodeName *string `json:"NodeName,omitempty"` + // DeployedServicePackageHealthStates - Deployed service package health states for the current deployed application as found in the health store. + DeployedServicePackageHealthStates *[]DeployedServicePackageHealthState `json:"DeployedServicePackageHealthStates,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// DeployedApplicationHealthEvaluation represents health evaluation for a deployed application, containing +// information about the data and the algorithm used by the health store to evaluate health. +type DeployedApplicationHealthEvaluation struct { + // NodeName - Name of the node where the application is deployed to. + NodeName *string `json:"NodeName,omitempty"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state of the deployed application. + // The types of the unhealthy evaluations can be DeployedServicePackagesHealthEvaluation or EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) MarshalJSON() ([]byte, error) { + dahe.Kind = KindDeployedApplication + objectMap := make(map[string]interface{}) + if dahe.NodeName != nil { + objectMap["NodeName"] = dahe.NodeName + } + if dahe.ApplicationName != nil { + objectMap["ApplicationName"] = dahe.ApplicationName + } + if dahe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = dahe.UnhealthyEvaluations + } + if dahe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = dahe.AggregatedHealthState + } + if dahe.Description != nil { + objectMap["Description"] = dahe.Description + } + if dahe.Kind != "" { + objectMap["Kind"] = dahe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return &dahe, true +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationHealthEvaluation. +func (dahe DeployedApplicationHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &dahe, true +} + +// DeployedApplicationHealthReportExpiredEvent deployed Application Health Report Expired event. +type DeployedApplicationHealthReportExpiredEvent struct { + // ApplicationInstanceID - Id of Application instance. + ApplicationInstanceID *int64 `json:"ApplicationInstanceId,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + dahree.Kind = KindDeployedApplicationHealthReportExpired + objectMap := make(map[string]interface{}) + if dahree.ApplicationInstanceID != nil { + objectMap["ApplicationInstanceId"] = dahree.ApplicationInstanceID + } + if dahree.NodeName != nil { + objectMap["NodeName"] = dahree.NodeName + } + if dahree.SourceID != nil { + objectMap["SourceId"] = dahree.SourceID + } + if dahree.Property != nil { + objectMap["Property"] = dahree.Property + } + if dahree.HealthState != nil { + objectMap["HealthState"] = dahree.HealthState + } + if dahree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = dahree.TimeToLiveMs + } + if dahree.SequenceNumber != nil { + objectMap["SequenceNumber"] = dahree.SequenceNumber + } + if dahree.Description != nil { + objectMap["Description"] = dahree.Description + } + if dahree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = dahree.RemoveWhenExpired + } + if dahree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = dahree.SourceUtcTimestamp + } + if dahree.ApplicationID != nil { + objectMap["ApplicationId"] = dahree.ApplicationID + } + if dahree.EventInstanceID != nil { + objectMap["EventInstanceId"] = dahree.EventInstanceID + } + if dahree.Category != nil { + objectMap["Category"] = dahree.Category + } + if dahree.TimeStamp != nil { + objectMap["TimeStamp"] = dahree.TimeStamp + } + if dahree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = dahree.HasCorrelatedEvents + } + if dahree.Kind != "" { + objectMap["Kind"] = dahree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &dahree, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return &dahree, true +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for DeployedApplicationHealthReportExpiredEvent. +func (dahree DeployedApplicationHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &dahree, true +} + +// DeployedApplicationHealthState represents the health state of a deployed application, which contains the +// entity identifier and the aggregated health state. +type DeployedApplicationHealthState struct { + // NodeName - Name of the node on which the service package is deployed. + NodeName *string `json:"NodeName,omitempty"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// DeployedApplicationHealthStateChunk represents the health state chunk of a deployed application, which +// contains the node where the application is deployed, the aggregated health state and any deployed +// service packages that respect the chunk query description filters. +type DeployedApplicationHealthStateChunk struct { + // NodeName - The name of node where the application is deployed. + NodeName *string `json:"NodeName,omitempty"` + // DeployedServicePackageHealthStateChunks - The list of deployed service package health state chunks belonging to the deployed application that respect the filters in the cluster health chunk query description. + DeployedServicePackageHealthStateChunks *DeployedServicePackageHealthStateChunkList `json:"DeployedServicePackageHealthStateChunks,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// DeployedApplicationHealthStateChunkList the list of deployed application health state chunks that +// respect the input filters in the chunk query. Returned by get cluster health state chunks query. +type DeployedApplicationHealthStateChunkList struct { + // Items - The list of deployed application health state chunks that respect the input filters in the chunk query. + Items *[]DeployedApplicationHealthStateChunk `json:"Items,omitempty"` +} + +// DeployedApplicationHealthStateFilter defines matching criteria to determine whether a deployed +// application should be included as a child of an application in the cluster health chunk. +// The deployed applications are only returned if the parent application matches a filter specified in the +// cluster health chunk query description. +// One filter can match zero, one or multiple deployed applications, depending on its properties. +type DeployedApplicationHealthStateFilter struct { + // NodeNameFilter - The name of the node where the application is deployed in order to match the filter. + // If specified, the filter is applied only to the application deployed on the specified node. + // If the application is not deployed on the node with the specified name, no deployed application is returned in the cluster health chunk based on this filter. + // Otherwise, the deployed application is included in the cluster health chunk if it respects the other filter properties. + // If not specified, all deployed applications that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. + NodeNameFilter *string `json:"NodeNameFilter,omitempty"` + // HealthStateFilter - The filter for the health state of the deployed applications. It allows selecting deployed applications if they match the desired health states. + // The possible values are integer value of one of the following health states. Only deployed applications that match the filter are returned. All deployed applications are used to evaluate the cluster aggregated health state. + // If not specified, default value is None, unless the node name is specified. If the filter has default value and node name is specified, the matching deployed application is returned. + // The state values are flag-based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. + // For example, if the provided value is 6, it matches deployed applications with HealthState value of OK (2) and Warning (4). + // - Default - Default value. Matches any HealthState. The value is zero. + // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. + // - Ok - Filter that matches input with HealthState value Ok. The value is 2. + // - Warning - Filter that matches input with HealthState value Warning. The value is 4. + // - Error - Filter that matches input with HealthState value Error. The value is 8. + // - All - Filter that matches input with any HealthState value. The value is 65535. + HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` + // DeployedServicePackageFilters - Defines a list of filters that specify which deployed service packages to be included in the returned cluster health chunk as children of the parent deployed application. The deployed service packages are returned only if the parent deployed application matches a filter. + // If the list is empty, no deployed service packages are returned. All the deployed service packages are used to evaluate the parent deployed application aggregated health state, regardless of the input filters. + // The deployed application filter may specify multiple deployed service package filters. + // For example, it can specify a filter to return all deployed service packages with health state Error and another filter to always include a deployed service package on a node. + DeployedServicePackageFilters *[]DeployedServicePackageHealthStateFilter `json:"DeployedServicePackageFilters,omitempty"` +} + +// DeployedApplicationInfo information about application deployed on the node. +type DeployedApplicationInfo struct { + autorest.Response `json:"-"` + // ID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ID *string `json:"Id,omitempty"` + // Name - The name of the application, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TypeName - The application type name as defined in the application manifest. + TypeName *string `json:"TypeName,omitempty"` + // Status - The status of the application deployed on the node. Following are the possible values. Possible values include: 'DeployedApplicationStatusInvalid', 'DeployedApplicationStatusDownloading', 'DeployedApplicationStatusActivating', 'DeployedApplicationStatusActive', 'DeployedApplicationStatusUpgrading', 'DeployedApplicationStatusDeactivating' + Status DeployedApplicationStatus `json:"Status,omitempty"` + // WorkDirectory - The work directory of the application on the node. The work directory can be used to store application data. + WorkDirectory *string `json:"WorkDirectory,omitempty"` + // LogDirectory - The log directory of the application on the node. The log directory can be used to store application logs. + LogDirectory *string `json:"LogDirectory,omitempty"` + // TempDirectory - The temp directory of the application on the node. The code packages belonging to the application are forked with this directory set as their temporary directory. + TempDirectory *string `json:"TempDirectory,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// DeployedApplicationNewHealthReportEvent deployed Application Health Report Created event. +type DeployedApplicationNewHealthReportEvent struct { + // ApplicationInstanceID - Id of Application instance. + ApplicationInstanceID *int64 `json:"ApplicationInstanceId,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) MarshalJSON() ([]byte, error) { + danhre.Kind = KindDeployedApplicationNewHealthReport + objectMap := make(map[string]interface{}) + if danhre.ApplicationInstanceID != nil { + objectMap["ApplicationInstanceId"] = danhre.ApplicationInstanceID + } + if danhre.NodeName != nil { + objectMap["NodeName"] = danhre.NodeName + } + if danhre.SourceID != nil { + objectMap["SourceId"] = danhre.SourceID + } + if danhre.Property != nil { + objectMap["Property"] = danhre.Property + } + if danhre.HealthState != nil { + objectMap["HealthState"] = danhre.HealthState + } + if danhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = danhre.TimeToLiveMs + } + if danhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = danhre.SequenceNumber + } + if danhre.Description != nil { + objectMap["Description"] = danhre.Description + } + if danhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = danhre.RemoveWhenExpired + } + if danhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = danhre.SourceUtcTimestamp + } + if danhre.ApplicationID != nil { + objectMap["ApplicationId"] = danhre.ApplicationID + } + if danhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = danhre.EventInstanceID + } + if danhre.Category != nil { + objectMap["Category"] = danhre.Category + } + if danhre.TimeStamp != nil { + objectMap["TimeStamp"] = danhre.TimeStamp + } + if danhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = danhre.HasCorrelatedEvents + } + if danhre.Kind != "" { + objectMap["Kind"] = danhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &danhre, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return &danhre, true +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for DeployedApplicationNewHealthReportEvent. +func (danhre DeployedApplicationNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &danhre, true +} + +// DeployedApplicationsHealthEvaluation represents health evaluation for deployed applications, containing +// health evaluations for each unhealthy deployed application that impacted current aggregated health +// state. +// Can be returned when evaluating application health and the aggregated health state is either Error or +// Warning. +type DeployedApplicationsHealthEvaluation struct { + // MaxPercentUnhealthyDeployedApplications - Maximum allowed percentage of unhealthy deployed applications from the ApplicationHealthPolicy. + MaxPercentUnhealthyDeployedApplications *int32 `json:"MaxPercentUnhealthyDeployedApplications,omitempty"` + // TotalCount - Total number of deployed applications of the application in the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy DeployedApplicationHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) MarshalJSON() ([]byte, error) { + dahe.Kind = KindDeployedApplications + objectMap := make(map[string]interface{}) + if dahe.MaxPercentUnhealthyDeployedApplications != nil { + objectMap["MaxPercentUnhealthyDeployedApplications"] = dahe.MaxPercentUnhealthyDeployedApplications + } + if dahe.TotalCount != nil { + objectMap["TotalCount"] = dahe.TotalCount + } + if dahe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = dahe.UnhealthyEvaluations + } + if dahe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = dahe.AggregatedHealthState + } + if dahe.Description != nil { + objectMap["Description"] = dahe.Description + } + if dahe.Kind != "" { + objectMap["Kind"] = dahe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return &dahe, true +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedApplicationsHealthEvaluation. +func (dahe DeployedApplicationsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &dahe, true +} + +// DeployedCodePackageInfo information about code package deployed on a Service Fabric node. +type DeployedCodePackageInfo struct { + // Name - The name of the code package. + Name *string `json:"Name,omitempty"` + // Version - The version of the code package specified in service manifest. + Version *string `json:"Version,omitempty"` + // ServiceManifestName - The name of service manifest that specified this code package. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // HostType - Specifies the type of host for main entry point of a code package as specified in service manifest. Possible values include: 'HostTypeInvalid', 'HostTypeExeHost', 'HostTypeContainerHost' + HostType HostType `json:"HostType,omitempty"` + // HostIsolationMode - Specifies the isolation mode of main entry point of a code package when it's host type is ContainerHost. This is specified as part of container host policies in application manifest while importing service manifest. Possible values include: 'HostIsolationModeNone', 'HostIsolationModeProcess', 'HostIsolationModeHyperV' + HostIsolationMode HostIsolationMode `json:"HostIsolationMode,omitempty"` + // Status - Specifies the status of a deployed application or service package on a Service Fabric node. Possible values include: 'DeploymentStatusInvalid', 'DeploymentStatusDownloading', 'DeploymentStatusActivating', 'DeploymentStatusActive', 'DeploymentStatusUpgrading', 'DeploymentStatusDeactivating', 'DeploymentStatusRanToCompletion', 'DeploymentStatusFailed' + Status DeploymentStatus `json:"Status,omitempty"` + // RunFrequencyInterval - The interval at which code package is run. This is used for periodic code package. + RunFrequencyInterval *string `json:"RunFrequencyInterval,omitempty"` + // SetupEntryPoint - Information about setup or main entry point of a code package deployed on a Service Fabric node. + SetupEntryPoint *CodePackageEntryPoint `json:"SetupEntryPoint,omitempty"` + // MainEntryPoint - Information about setup or main entry point of a code package deployed on a Service Fabric node. + MainEntryPoint *CodePackageEntryPoint `json:"MainEntryPoint,omitempty"` +} + +// DeployedServicePackageHealth information about the health of a service package for a specific +// application deployed on a Service Fabric node. +type DeployedServicePackageHealth struct { + autorest.Response `json:"-"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceManifestName - Name of the service manifest. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // NodeName - Name of the node where this service package is deployed. + NodeName *string `json:"NodeName,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// DeployedServicePackageHealthEvaluation represents health evaluation for a deployed service package, +// containing information about the data and the algorithm used by health store to evaluate health. The +// evaluation is returned only when the aggregated health state is either Error or Warning. +type DeployedServicePackageHealthEvaluation struct { + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceManifestName - The name of the service manifest. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state. The type of the unhealthy evaluations can be EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) MarshalJSON() ([]byte, error) { + dsphe.Kind = KindDeployedServicePackage + objectMap := make(map[string]interface{}) + if dsphe.NodeName != nil { + objectMap["NodeName"] = dsphe.NodeName + } + if dsphe.ApplicationName != nil { + objectMap["ApplicationName"] = dsphe.ApplicationName + } + if dsphe.ServiceManifestName != nil { + objectMap["ServiceManifestName"] = dsphe.ServiceManifestName + } + if dsphe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = dsphe.UnhealthyEvaluations + } + if dsphe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = dsphe.AggregatedHealthState + } + if dsphe.Description != nil { + objectMap["Description"] = dsphe.Description + } + if dsphe.Kind != "" { + objectMap["Kind"] = dsphe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return &dsphe, true +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackageHealthEvaluation. +func (dsphe DeployedServicePackageHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &dsphe, true +} + +// DeployedServicePackageHealthReportExpiredEvent deployed Service Health Report Expired event. +type DeployedServicePackageHealthReportExpiredEvent struct { + // ServiceManifest - Service manifest name. + ServiceManifest *string `json:"ServiceManifest,omitempty"` + // ServicePackageInstanceID - Id of Service package instance. + ServicePackageInstanceID *int64 `json:"ServicePackageInstanceId,omitempty"` + // ServicePackageActivationID - Id of Service package activation. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + dsphree.Kind = KindDeployedServicePackageHealthReportExpired + objectMap := make(map[string]interface{}) + if dsphree.ServiceManifest != nil { + objectMap["ServiceManifest"] = dsphree.ServiceManifest + } + if dsphree.ServicePackageInstanceID != nil { + objectMap["ServicePackageInstanceId"] = dsphree.ServicePackageInstanceID + } + if dsphree.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = dsphree.ServicePackageActivationID + } + if dsphree.NodeName != nil { + objectMap["NodeName"] = dsphree.NodeName + } + if dsphree.SourceID != nil { + objectMap["SourceId"] = dsphree.SourceID + } + if dsphree.Property != nil { + objectMap["Property"] = dsphree.Property + } + if dsphree.HealthState != nil { + objectMap["HealthState"] = dsphree.HealthState + } + if dsphree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = dsphree.TimeToLiveMs + } + if dsphree.SequenceNumber != nil { + objectMap["SequenceNumber"] = dsphree.SequenceNumber + } + if dsphree.Description != nil { + objectMap["Description"] = dsphree.Description + } + if dsphree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = dsphree.RemoveWhenExpired + } + if dsphree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = dsphree.SourceUtcTimestamp + } + if dsphree.ApplicationID != nil { + objectMap["ApplicationId"] = dsphree.ApplicationID + } + if dsphree.EventInstanceID != nil { + objectMap["EventInstanceId"] = dsphree.EventInstanceID + } + if dsphree.Category != nil { + objectMap["Category"] = dsphree.Category + } + if dsphree.TimeStamp != nil { + objectMap["TimeStamp"] = dsphree.TimeStamp + } + if dsphree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = dsphree.HasCorrelatedEvents + } + if dsphree.Kind != "" { + objectMap["Kind"] = dsphree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &dsphree, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return &dsphree, true +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for DeployedServicePackageHealthReportExpiredEvent. +func (dsphree DeployedServicePackageHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &dsphree, true +} + +// DeployedServicePackageHealthState represents the health state of a deployed service package, containing +// the entity identifier and the aggregated health state. +type DeployedServicePackageHealthState struct { + // NodeName - Name of the node on which the service package is deployed. + NodeName *string `json:"NodeName,omitempty"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceManifestName - Name of the manifest describing the service package. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// DeployedServicePackageHealthStateChunk represents the health state chunk of a deployed service package, +// which contains the service manifest name and the service package aggregated health state. +type DeployedServicePackageHealthStateChunk struct { + // ServiceManifestName - The name of the service manifest. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// DeployedServicePackageHealthStateChunkList the list of deployed service package health state chunks that +// respect the input filters in the chunk query. Returned by get cluster health state chunks query. +type DeployedServicePackageHealthStateChunkList struct { + // Items - The list of deployed service package health state chunks that respect the input filters in the chunk query. + Items *[]DeployedServicePackageHealthStateChunk `json:"Items,omitempty"` +} + +// DeployedServicePackageHealthStateFilter defines matching criteria to determine whether a deployed +// service package should be included as a child of a deployed application in the cluster health chunk. +// The deployed service packages are only returned if the parent entities match a filter specified in the +// cluster health chunk query description. The parent deployed application and its parent application must +// be included in the cluster health chunk. +// One filter can match zero, one or multiple deployed service packages, depending on its properties. +type DeployedServicePackageHealthStateFilter struct { + // ServiceManifestNameFilter - The name of the service manifest which identifies the deployed service packages that matches the filter. + // If specified, the filter is applied only to the specified deployed service packages, if any. + // If no deployed service packages with specified manifest name exist, nothing is returned in the cluster health chunk based on this filter. + // If any deployed service package exists, they are included in the cluster health chunk if it respects the other filter properties. + // If not specified, all deployed service packages that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. + ServiceManifestNameFilter *string `json:"ServiceManifestNameFilter,omitempty"` + // ServicePackageActivationIDFilter - The activation ID of a deployed service package that matches the filter. + // If not specified, the filter applies to all deployed service packages that match the other parameters. + // If specified, the filter matches only the deployed service package with the specified activation ID. + ServicePackageActivationIDFilter *string `json:"ServicePackageActivationIdFilter,omitempty"` + // HealthStateFilter - The filter for the health state of the deployed service packages. It allows selecting deployed service packages if they match the desired health states. + // The possible values are integer value of one of the following health states. Only deployed service packages that match the filter are returned. All deployed service packages are used to evaluate the parent deployed application aggregated health state. + // If not specified, default value is None, unless the deployed service package ID is specified. If the filter has default value and deployed service package ID is specified, the matching deployed service package is returned. + // The state values are flag-based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. + // For example, if the provided value is 6, it matches deployed service packages with HealthState value of OK (2) and Warning (4). + // - Default - Default value. Matches any HealthState. The value is zero. + // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. + // - Ok - Filter that matches input with HealthState value Ok. The value is 2. + // - Warning - Filter that matches input with HealthState value Warning. The value is 4. + // - Error - Filter that matches input with HealthState value Error. The value is 8. + // - All - Filter that matches input with any HealthState value. The value is 65535. + HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` +} + +// DeployedServicePackageInfo information about service package deployed on a Service Fabric node. +type DeployedServicePackageInfo struct { + // Name - The name of the service package as specified in the service manifest. + Name *string `json:"Name,omitempty"` + // Version - The version of the service package specified in service manifest. + Version *string `json:"Version,omitempty"` + // Status - Specifies the status of a deployed application or service package on a Service Fabric node. Possible values include: 'DeploymentStatusInvalid', 'DeploymentStatusDownloading', 'DeploymentStatusActivating', 'DeploymentStatusActive', 'DeploymentStatusUpgrading', 'DeploymentStatusDeactivating', 'DeploymentStatusRanToCompletion', 'DeploymentStatusFailed' + Status DeploymentStatus `json:"Status,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` +} + +// DeployedServicePackageNewHealthReportEvent deployed Service Health Report Created event. +type DeployedServicePackageNewHealthReportEvent struct { + // ServiceManifestName - Service manifest name. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // ServicePackageInstanceID - Id of Service package instance. + ServicePackageInstanceID *int64 `json:"ServicePackageInstanceId,omitempty"` + // ServicePackageActivationID - Id of Service package activation. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ApplicationID - The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the application name is "fabric:/myapp/app1", + // the application identity would be "myapp\~app1" in 6.0+ and "myapp/app1" in previous versions. + ApplicationID *string `json:"ApplicationId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) MarshalJSON() ([]byte, error) { + dspnhre.Kind = KindDeployedServicePackageNewHealthReport + objectMap := make(map[string]interface{}) + if dspnhre.ServiceManifestName != nil { + objectMap["ServiceManifestName"] = dspnhre.ServiceManifestName + } + if dspnhre.ServicePackageInstanceID != nil { + objectMap["ServicePackageInstanceId"] = dspnhre.ServicePackageInstanceID + } + if dspnhre.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = dspnhre.ServicePackageActivationID + } + if dspnhre.NodeName != nil { + objectMap["NodeName"] = dspnhre.NodeName + } + if dspnhre.SourceID != nil { + objectMap["SourceId"] = dspnhre.SourceID + } + if dspnhre.Property != nil { + objectMap["Property"] = dspnhre.Property + } + if dspnhre.HealthState != nil { + objectMap["HealthState"] = dspnhre.HealthState + } + if dspnhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = dspnhre.TimeToLiveMs + } + if dspnhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = dspnhre.SequenceNumber + } + if dspnhre.Description != nil { + objectMap["Description"] = dspnhre.Description + } + if dspnhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = dspnhre.RemoveWhenExpired + } + if dspnhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = dspnhre.SourceUtcTimestamp + } + if dspnhre.ApplicationID != nil { + objectMap["ApplicationId"] = dspnhre.ApplicationID + } + if dspnhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = dspnhre.EventInstanceID + } + if dspnhre.Category != nil { + objectMap["Category"] = dspnhre.Category + } + if dspnhre.TimeStamp != nil { + objectMap["TimeStamp"] = dspnhre.TimeStamp + } + if dspnhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = dspnhre.HasCorrelatedEvents + } + if dspnhre.Kind != "" { + objectMap["Kind"] = dspnhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return &dspnhre, true +} + +// AsClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return &dspnhre, true +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for DeployedServicePackageNewHealthReportEvent. +func (dspnhre DeployedServicePackageNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &dspnhre, true +} + +// DeployedServicePackagesHealthEvaluation represents health evaluation for deployed service packages, +// containing health evaluations for each unhealthy deployed service package that impacted current +// aggregated health state. Can be returned when evaluating deployed application health and the aggregated +// health state is either Error or Warning. +type DeployedServicePackagesHealthEvaluation struct { + // TotalCount - Total number of deployed service packages of the deployed application in the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy DeployedServicePackageHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) MarshalJSON() ([]byte, error) { + dsphe.Kind = KindDeployedServicePackages + objectMap := make(map[string]interface{}) + if dsphe.TotalCount != nil { + objectMap["TotalCount"] = dsphe.TotalCount + } + if dsphe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = dsphe.UnhealthyEvaluations + } + if dsphe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = dsphe.AggregatedHealthState + } + if dsphe.Description != nil { + objectMap["Description"] = dsphe.Description + } + if dsphe.Kind != "" { + objectMap["Kind"] = dsphe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return &dsphe, true +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for DeployedServicePackagesHealthEvaluation. +func (dsphe DeployedServicePackagesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &dsphe, true +} + +// BasicDeployedServiceReplicaDetailInfo information about a Service Fabric service replica deployed on a node. +type BasicDeployedServiceReplicaDetailInfo interface { + AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) + AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) + AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) +} + +// DeployedServiceReplicaDetailInfo information about a Service Fabric service replica deployed on a node. +type DeployedServiceReplicaDetailInfo struct { + autorest.Response `json:"-"` + // ServiceName - Full hierarchical name of the service in URI format starting with `fabric:`. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // CurrentServiceOperation - Specifies the current active life-cycle operation on a stateful service replica or stateless service instance. Possible values include: 'ServiceOperationNameUnknown', 'ServiceOperationNameNone', 'ServiceOperationNameOpen', 'ServiceOperationNameChangeRole', 'ServiceOperationNameClose', 'ServiceOperationNameAbort' + CurrentServiceOperation ServiceOperationName `json:"CurrentServiceOperation,omitempty"` + // CurrentServiceOperationStartTimeUtc - The start time of the current service operation in UTC format. + CurrentServiceOperationStartTimeUtc *date.Time `json:"CurrentServiceOperationStartTimeUtc,omitempty"` + // ReportedLoad - List of load reported by replica. + ReportedLoad *[]LoadMetricReportInfo `json:"ReportedLoad,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindDeployedServiceReplicaDetailInfo', 'ServiceKindStateful1', 'ServiceKindStateless1' + ServiceKind ServiceKindBasicDeployedServiceReplicaDetailInfo `json:"ServiceKind,omitempty"` +} + +func unmarshalBasicDeployedServiceReplicaDetailInfo(body []byte) (BasicDeployedServiceReplicaDetailInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindStateful1): + var dssrdi DeployedStatefulServiceReplicaDetailInfo + err := json.Unmarshal(body, &dssrdi) + return dssrdi, err + case string(ServiceKindStateless1): + var dssidi DeployedStatelessServiceInstanceDetailInfo + err := json.Unmarshal(body, &dssidi) + return dssidi, err + default: + var dsrdi DeployedServiceReplicaDetailInfo + err := json.Unmarshal(body, &dsrdi) + return dsrdi, err + } +} +func unmarshalBasicDeployedServiceReplicaDetailInfoArray(body []byte) ([]BasicDeployedServiceReplicaDetailInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dsrdiArray := make([]BasicDeployedServiceReplicaDetailInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dsrdi, err := unmarshalBasicDeployedServiceReplicaDetailInfo(*rawMessage) + if err != nil { + return nil, err + } + dsrdiArray[index] = dsrdi + } + return dsrdiArray, nil +} + +// MarshalJSON is the custom marshaler for DeployedServiceReplicaDetailInfo. +func (dsrdi DeployedServiceReplicaDetailInfo) MarshalJSON() ([]byte, error) { + dsrdi.ServiceKind = ServiceKindDeployedServiceReplicaDetailInfo + objectMap := make(map[string]interface{}) + if dsrdi.ServiceName != nil { + objectMap["ServiceName"] = dsrdi.ServiceName + } + if dsrdi.PartitionID != nil { + objectMap["PartitionId"] = dsrdi.PartitionID + } + if dsrdi.CurrentServiceOperation != "" { + objectMap["CurrentServiceOperation"] = dsrdi.CurrentServiceOperation + } + if dsrdi.CurrentServiceOperationStartTimeUtc != nil { + objectMap["CurrentServiceOperationStartTimeUtc"] = dsrdi.CurrentServiceOperationStartTimeUtc + } + if dsrdi.ReportedLoad != nil { + objectMap["ReportedLoad"] = dsrdi.ReportedLoad + } + if dsrdi.ServiceKind != "" { + objectMap["ServiceKind"] = dsrdi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsDeployedStatefulServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. +func (dsrdi DeployedServiceReplicaDetailInfo) AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) { + return nil, false +} + +// AsDeployedStatelessServiceInstanceDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. +func (dsrdi DeployedServiceReplicaDetailInfo) AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) { + return nil, false +} + +// AsDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. +func (dsrdi DeployedServiceReplicaDetailInfo) AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) { + return &dsrdi, true +} + +// AsBasicDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedServiceReplicaDetailInfo. +func (dsrdi DeployedServiceReplicaDetailInfo) AsBasicDeployedServiceReplicaDetailInfo() (BasicDeployedServiceReplicaDetailInfo, bool) { + return &dsrdi, true +} + +// DeployedServiceReplicaDetailInfoModel ... +type DeployedServiceReplicaDetailInfoModel struct { + autorest.Response `json:"-"` + Value BasicDeployedServiceReplicaDetailInfo `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DeployedServiceReplicaDetailInfoModel struct. +func (dsrdim *DeployedServiceReplicaDetailInfoModel) UnmarshalJSON(body []byte) error { + dsrdi, err := unmarshalBasicDeployedServiceReplicaDetailInfo(body) + if err != nil { + return err + } + dsrdim.Value = dsrdi + + return nil +} + +// BasicDeployedServiceReplicaInfo information about a Service Fabric service replica deployed on a node. +type BasicDeployedServiceReplicaInfo interface { + AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) + AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) + AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) +} + +// DeployedServiceReplicaInfo information about a Service Fabric service replica deployed on a node. +type DeployedServiceReplicaInfo struct { + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // ServiceManifestName - The name of the service manifest in which this service type is defined. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // CodePackageName - The name of the code package that hosts this replica. + CodePackageName *string `json:"CodePackageName,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaStatus - The status of a replica of a service. Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' + ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` + // Address - The last address returned by the replica in Open or ChangeRole. + Address *string `json:"Address,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // HostProcessID - Host process ID of the process that is hosting the replica. This will be zero if the replica is down. In hyper-v containers this host process ID will be from different kernel. + HostProcessID *string `json:"HostProcessId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindDeployedServiceReplicaInfo', 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful', 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless' + ServiceKind ServiceKindBasicDeployedServiceReplicaInfo `json:"ServiceKind,omitempty"` +} + +func unmarshalBasicDeployedServiceReplicaInfo(body []byte) (BasicDeployedServiceReplicaInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful): + var dssri DeployedStatefulServiceReplicaInfo + err := json.Unmarshal(body, &dssri) + return dssri, err + case string(ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless): + var dssii DeployedStatelessServiceInstanceInfo + err := json.Unmarshal(body, &dssii) + return dssii, err + default: + var dsri DeployedServiceReplicaInfo + err := json.Unmarshal(body, &dsri) + return dsri, err + } +} +func unmarshalBasicDeployedServiceReplicaInfoArray(body []byte) ([]BasicDeployedServiceReplicaInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dsriArray := make([]BasicDeployedServiceReplicaInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dsri, err := unmarshalBasicDeployedServiceReplicaInfo(*rawMessage) + if err != nil { + return nil, err + } + dsriArray[index] = dsri + } + return dsriArray, nil +} + +// MarshalJSON is the custom marshaler for DeployedServiceReplicaInfo. +func (dsri DeployedServiceReplicaInfo) MarshalJSON() ([]byte, error) { + dsri.ServiceKind = ServiceKindBasicDeployedServiceReplicaInfoServiceKindDeployedServiceReplicaInfo + objectMap := make(map[string]interface{}) + if dsri.ServiceName != nil { + objectMap["ServiceName"] = dsri.ServiceName + } + if dsri.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = dsri.ServiceTypeName + } + if dsri.ServiceManifestName != nil { + objectMap["ServiceManifestName"] = dsri.ServiceManifestName + } + if dsri.CodePackageName != nil { + objectMap["CodePackageName"] = dsri.CodePackageName + } + if dsri.PartitionID != nil { + objectMap["PartitionId"] = dsri.PartitionID + } + if dsri.ReplicaStatus != "" { + objectMap["ReplicaStatus"] = dsri.ReplicaStatus + } + if dsri.Address != nil { + objectMap["Address"] = dsri.Address + } + if dsri.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = dsri.ServicePackageActivationID + } + if dsri.HostProcessID != nil { + objectMap["HostProcessId"] = dsri.HostProcessID + } + if dsri.ServiceKind != "" { + objectMap["ServiceKind"] = dsri.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsDeployedStatefulServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. +func (dsri DeployedServiceReplicaInfo) AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) { + return nil, false +} + +// AsDeployedStatelessServiceInstanceInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. +func (dsri DeployedServiceReplicaInfo) AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) { + return nil, false +} + +// AsDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. +func (dsri DeployedServiceReplicaInfo) AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) { + return &dsri, true +} + +// AsBasicDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedServiceReplicaInfo. +func (dsri DeployedServiceReplicaInfo) AsBasicDeployedServiceReplicaInfo() (BasicDeployedServiceReplicaInfo, bool) { + return &dsri, true +} + +// DeployedServiceTypeInfo information about service type deployed on a node, information such as the +// status of the service type registration on a node. +type DeployedServiceTypeInfo struct { + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // ServiceManifestName - The name of the service manifest in which this service type is defined. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // CodePackageName - The name of the code package that registered the service type. + CodePackageName *string `json:"CodePackageName,omitempty"` + // Status - The status of the service type registration on the node. Possible values include: 'ServiceTypeRegistrationStatusInvalid', 'ServiceTypeRegistrationStatusDisabled', 'ServiceTypeRegistrationStatusEnabled', 'ServiceTypeRegistrationStatusRegistered' + Status ServiceTypeRegistrationStatus `json:"Status,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` +} + +// DeployedStatefulServiceReplicaDetailInfo information about a stateful replica running in a code package. +// Note DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, ServiceName, +// PartitionId and replicaId. +type DeployedStatefulServiceReplicaDetailInfo struct { + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *string `json:"ReplicaId,omitempty"` + // CurrentReplicatorOperation - Specifies the operation currently being executed by the Replicator. Possible values include: 'ReplicatorOperationNameInvalid', 'ReplicatorOperationNameNone', 'ReplicatorOperationNameOpen', 'ReplicatorOperationNameChangeRole', 'ReplicatorOperationNameUpdateEpoch', 'ReplicatorOperationNameClose', 'ReplicatorOperationNameAbort', 'ReplicatorOperationNameOnDataLoss', 'ReplicatorOperationNameWaitForCatchup', 'ReplicatorOperationNameBuild' + CurrentReplicatorOperation ReplicatorOperationName `json:"CurrentReplicatorOperation,omitempty"` + // ReadStatus - Specifies the access status of the partition. Possible values include: 'PartitionAccessStatusInvalid', 'PartitionAccessStatusGranted', 'PartitionAccessStatusReconfigurationPending', 'PartitionAccessStatusNotPrimary', 'PartitionAccessStatusNoWriteQuorum' + ReadStatus PartitionAccessStatus `json:"ReadStatus,omitempty"` + // WriteStatus - Specifies the access status of the partition. Possible values include: 'PartitionAccessStatusInvalid', 'PartitionAccessStatusGranted', 'PartitionAccessStatusReconfigurationPending', 'PartitionAccessStatusNotPrimary', 'PartitionAccessStatusNoWriteQuorum' + WriteStatus PartitionAccessStatus `json:"WriteStatus,omitempty"` + // ReplicatorStatus - Represents a base class for primary or secondary replicator status. + // Contains information about the service fabric replicator like the replication/copy queue utilization, last acknowledgement received timestamp, etc. + ReplicatorStatus BasicReplicatorStatus `json:"ReplicatorStatus,omitempty"` + // ReplicaStatus - Key value store related information for the replica. + ReplicaStatus *KeyValueStoreReplicaStatus `json:"ReplicaStatus,omitempty"` + // DeployedServiceReplicaQueryResult - Information about a stateful service replica deployed on a node. + DeployedServiceReplicaQueryResult *DeployedStatefulServiceReplicaInfo `json:"DeployedServiceReplicaQueryResult,omitempty"` + // ServiceName - Full hierarchical name of the service in URI format starting with `fabric:`. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // CurrentServiceOperation - Specifies the current active life-cycle operation on a stateful service replica or stateless service instance. Possible values include: 'ServiceOperationNameUnknown', 'ServiceOperationNameNone', 'ServiceOperationNameOpen', 'ServiceOperationNameChangeRole', 'ServiceOperationNameClose', 'ServiceOperationNameAbort' + CurrentServiceOperation ServiceOperationName `json:"CurrentServiceOperation,omitempty"` + // CurrentServiceOperationStartTimeUtc - The start time of the current service operation in UTC format. + CurrentServiceOperationStartTimeUtc *date.Time `json:"CurrentServiceOperationStartTimeUtc,omitempty"` + // ReportedLoad - List of load reported by replica. + ReportedLoad *[]LoadMetricReportInfo `json:"ReportedLoad,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindDeployedServiceReplicaDetailInfo', 'ServiceKindStateful1', 'ServiceKindStateless1' + ServiceKind ServiceKindBasicDeployedServiceReplicaDetailInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedStatefulServiceReplicaDetailInfo. +func (dssrdi DeployedStatefulServiceReplicaDetailInfo) MarshalJSON() ([]byte, error) { + dssrdi.ServiceKind = ServiceKindStateful1 + objectMap := make(map[string]interface{}) + if dssrdi.ReplicaID != nil { + objectMap["ReplicaId"] = dssrdi.ReplicaID + } + if dssrdi.CurrentReplicatorOperation != "" { + objectMap["CurrentReplicatorOperation"] = dssrdi.CurrentReplicatorOperation + } + if dssrdi.ReadStatus != "" { + objectMap["ReadStatus"] = dssrdi.ReadStatus + } + if dssrdi.WriteStatus != "" { + objectMap["WriteStatus"] = dssrdi.WriteStatus + } + objectMap["ReplicatorStatus"] = dssrdi.ReplicatorStatus + if dssrdi.ReplicaStatus != nil { + objectMap["ReplicaStatus"] = dssrdi.ReplicaStatus + } + if dssrdi.DeployedServiceReplicaQueryResult != nil { + objectMap["DeployedServiceReplicaQueryResult"] = dssrdi.DeployedServiceReplicaQueryResult + } + if dssrdi.ServiceName != nil { + objectMap["ServiceName"] = dssrdi.ServiceName + } + if dssrdi.PartitionID != nil { + objectMap["PartitionId"] = dssrdi.PartitionID + } + if dssrdi.CurrentServiceOperation != "" { + objectMap["CurrentServiceOperation"] = dssrdi.CurrentServiceOperation + } + if dssrdi.CurrentServiceOperationStartTimeUtc != nil { + objectMap["CurrentServiceOperationStartTimeUtc"] = dssrdi.CurrentServiceOperationStartTimeUtc + } + if dssrdi.ReportedLoad != nil { + objectMap["ReportedLoad"] = dssrdi.ReportedLoad + } + if dssrdi.ServiceKind != "" { + objectMap["ServiceKind"] = dssrdi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsDeployedStatefulServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. +func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) { + return &dssrdi, true +} + +// AsDeployedStatelessServiceInstanceDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. +func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) { + return nil, false +} + +// AsDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. +func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) { + return nil, false +} + +// AsBasicDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatefulServiceReplicaDetailInfo. +func (dssrdi DeployedStatefulServiceReplicaDetailInfo) AsBasicDeployedServiceReplicaDetailInfo() (BasicDeployedServiceReplicaDetailInfo, bool) { + return &dssrdi, true +} + +// UnmarshalJSON is the custom unmarshaler for DeployedStatefulServiceReplicaDetailInfo struct. +func (dssrdi *DeployedStatefulServiceReplicaDetailInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ReplicaId": + if v != nil { + var replicaID string + err = json.Unmarshal(*v, &replicaID) + if err != nil { + return err + } + dssrdi.ReplicaID = &replicaID + } + case "CurrentReplicatorOperation": + if v != nil { + var currentReplicatorOperation ReplicatorOperationName + err = json.Unmarshal(*v, ¤tReplicatorOperation) + if err != nil { + return err + } + dssrdi.CurrentReplicatorOperation = currentReplicatorOperation + } + case "ReadStatus": + if v != nil { + var readStatus PartitionAccessStatus + err = json.Unmarshal(*v, &readStatus) + if err != nil { + return err + } + dssrdi.ReadStatus = readStatus + } + case "WriteStatus": + if v != nil { + var writeStatus PartitionAccessStatus + err = json.Unmarshal(*v, &writeStatus) + if err != nil { + return err + } + dssrdi.WriteStatus = writeStatus + } + case "ReplicatorStatus": + if v != nil { + replicatorStatus, err := unmarshalBasicReplicatorStatus(*v) + if err != nil { + return err + } + dssrdi.ReplicatorStatus = replicatorStatus + } + case "ReplicaStatus": + if v != nil { + var replicaStatus KeyValueStoreReplicaStatus + err = json.Unmarshal(*v, &replicaStatus) + if err != nil { + return err + } + dssrdi.ReplicaStatus = &replicaStatus + } + case "DeployedServiceReplicaQueryResult": + if v != nil { + var deployedServiceReplicaQueryResult DeployedStatefulServiceReplicaInfo + err = json.Unmarshal(*v, &deployedServiceReplicaQueryResult) + if err != nil { + return err + } + dssrdi.DeployedServiceReplicaQueryResult = &deployedServiceReplicaQueryResult + } + case "ServiceName": + if v != nil { + var serviceName string + err = json.Unmarshal(*v, &serviceName) + if err != nil { + return err + } + dssrdi.ServiceName = &serviceName + } + case "PartitionId": + if v != nil { + var partitionID uuid.UUID + err = json.Unmarshal(*v, &partitionID) + if err != nil { + return err + } + dssrdi.PartitionID = &partitionID + } + case "CurrentServiceOperation": + if v != nil { + var currentServiceOperation ServiceOperationName + err = json.Unmarshal(*v, ¤tServiceOperation) + if err != nil { + return err + } + dssrdi.CurrentServiceOperation = currentServiceOperation + } + case "CurrentServiceOperationStartTimeUtc": + if v != nil { + var currentServiceOperationStartTimeUtc date.Time + err = json.Unmarshal(*v, ¤tServiceOperationStartTimeUtc) + if err != nil { + return err + } + dssrdi.CurrentServiceOperationStartTimeUtc = ¤tServiceOperationStartTimeUtc + } + case "ReportedLoad": + if v != nil { + var reportedLoad []LoadMetricReportInfo + err = json.Unmarshal(*v, &reportedLoad) + if err != nil { + return err + } + dssrdi.ReportedLoad = &reportedLoad + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicDeployedServiceReplicaDetailInfo + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + dssrdi.ServiceKind = serviceKind + } + } + } + + return nil +} + +// DeployedStatefulServiceReplicaInfo information about a stateful service replica deployed on a node. +type DeployedStatefulServiceReplicaInfo struct { + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *string `json:"ReplicaId,omitempty"` + // ReplicaRole - The role of a replica of a stateful service. Possible values include: 'ReplicaRoleUnknown', 'ReplicaRoleNone', 'ReplicaRolePrimary', 'ReplicaRoleIdleSecondary', 'ReplicaRoleActiveSecondary' + ReplicaRole ReplicaRole `json:"ReplicaRole,omitempty"` + // ReconfigurationInformation - Information about current reconfiguration like phase, type, previous configuration role of replica and reconfiguration start date time. + ReconfigurationInformation *ReconfigurationInformation `json:"ReconfigurationInformation,omitempty"` + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // ServiceManifestName - The name of the service manifest in which this service type is defined. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // CodePackageName - The name of the code package that hosts this replica. + CodePackageName *string `json:"CodePackageName,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaStatus - The status of a replica of a service. Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' + ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` + // Address - The last address returned by the replica in Open or ChangeRole. + Address *string `json:"Address,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // HostProcessID - Host process ID of the process that is hosting the replica. This will be zero if the replica is down. In hyper-v containers this host process ID will be from different kernel. + HostProcessID *string `json:"HostProcessId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindDeployedServiceReplicaInfo', 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful', 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless' + ServiceKind ServiceKindBasicDeployedServiceReplicaInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedStatefulServiceReplicaInfo. +func (dssri DeployedStatefulServiceReplicaInfo) MarshalJSON() ([]byte, error) { + dssri.ServiceKind = ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful + objectMap := make(map[string]interface{}) + if dssri.ReplicaID != nil { + objectMap["ReplicaId"] = dssri.ReplicaID + } + if dssri.ReplicaRole != "" { + objectMap["ReplicaRole"] = dssri.ReplicaRole + } + if dssri.ReconfigurationInformation != nil { + objectMap["ReconfigurationInformation"] = dssri.ReconfigurationInformation + } + if dssri.ServiceName != nil { + objectMap["ServiceName"] = dssri.ServiceName + } + if dssri.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = dssri.ServiceTypeName + } + if dssri.ServiceManifestName != nil { + objectMap["ServiceManifestName"] = dssri.ServiceManifestName + } + if dssri.CodePackageName != nil { + objectMap["CodePackageName"] = dssri.CodePackageName + } + if dssri.PartitionID != nil { + objectMap["PartitionId"] = dssri.PartitionID + } + if dssri.ReplicaStatus != "" { + objectMap["ReplicaStatus"] = dssri.ReplicaStatus + } + if dssri.Address != nil { + objectMap["Address"] = dssri.Address + } + if dssri.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = dssri.ServicePackageActivationID + } + if dssri.HostProcessID != nil { + objectMap["HostProcessId"] = dssri.HostProcessID + } + if dssri.ServiceKind != "" { + objectMap["ServiceKind"] = dssri.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsDeployedStatefulServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. +func (dssri DeployedStatefulServiceReplicaInfo) AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) { + return &dssri, true +} + +// AsDeployedStatelessServiceInstanceInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. +func (dssri DeployedStatefulServiceReplicaInfo) AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) { + return nil, false +} + +// AsDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. +func (dssri DeployedStatefulServiceReplicaInfo) AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) { + return nil, false +} + +// AsBasicDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatefulServiceReplicaInfo. +func (dssri DeployedStatefulServiceReplicaInfo) AsBasicDeployedServiceReplicaInfo() (BasicDeployedServiceReplicaInfo, bool) { + return &dssri, true +} + +// DeployedStatelessServiceInstanceDetailInfo information about a stateless instance running in a code +// package. Note that DeployedServiceReplicaQueryResult will contain duplicate data like ServiceKind, +// ServiceName, PartitionId and InstanceId. +type DeployedStatelessServiceInstanceDetailInfo struct { + // InstanceID - Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely identify an instance of a partition of a stateless service. It is unique within a partition and does not change for the lifetime of the instance. If the instance has failed over on the same or different node, it will get a different value for the InstanceId. + InstanceID *string `json:"InstanceId,omitempty"` + // DeployedServiceReplicaQueryResult - Information about a stateless service instance deployed on a node. + DeployedServiceReplicaQueryResult *DeployedStatelessServiceInstanceInfo `json:"DeployedServiceReplicaQueryResult,omitempty"` + // ServiceName - Full hierarchical name of the service in URI format starting with `fabric:`. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // CurrentServiceOperation - Specifies the current active life-cycle operation on a stateful service replica or stateless service instance. Possible values include: 'ServiceOperationNameUnknown', 'ServiceOperationNameNone', 'ServiceOperationNameOpen', 'ServiceOperationNameChangeRole', 'ServiceOperationNameClose', 'ServiceOperationNameAbort' + CurrentServiceOperation ServiceOperationName `json:"CurrentServiceOperation,omitempty"` + // CurrentServiceOperationStartTimeUtc - The start time of the current service operation in UTC format. + CurrentServiceOperationStartTimeUtc *date.Time `json:"CurrentServiceOperationStartTimeUtc,omitempty"` + // ReportedLoad - List of load reported by replica. + ReportedLoad *[]LoadMetricReportInfo `json:"ReportedLoad,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindDeployedServiceReplicaDetailInfo', 'ServiceKindStateful1', 'ServiceKindStateless1' + ServiceKind ServiceKindBasicDeployedServiceReplicaDetailInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedStatelessServiceInstanceDetailInfo. +func (dssidi DeployedStatelessServiceInstanceDetailInfo) MarshalJSON() ([]byte, error) { + dssidi.ServiceKind = ServiceKindStateless1 + objectMap := make(map[string]interface{}) + if dssidi.InstanceID != nil { + objectMap["InstanceId"] = dssidi.InstanceID + } + if dssidi.DeployedServiceReplicaQueryResult != nil { + objectMap["DeployedServiceReplicaQueryResult"] = dssidi.DeployedServiceReplicaQueryResult + } + if dssidi.ServiceName != nil { + objectMap["ServiceName"] = dssidi.ServiceName + } + if dssidi.PartitionID != nil { + objectMap["PartitionId"] = dssidi.PartitionID + } + if dssidi.CurrentServiceOperation != "" { + objectMap["CurrentServiceOperation"] = dssidi.CurrentServiceOperation + } + if dssidi.CurrentServiceOperationStartTimeUtc != nil { + objectMap["CurrentServiceOperationStartTimeUtc"] = dssidi.CurrentServiceOperationStartTimeUtc + } + if dssidi.ReportedLoad != nil { + objectMap["ReportedLoad"] = dssidi.ReportedLoad + } + if dssidi.ServiceKind != "" { + objectMap["ServiceKind"] = dssidi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsDeployedStatefulServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. +func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsDeployedStatefulServiceReplicaDetailInfo() (*DeployedStatefulServiceReplicaDetailInfo, bool) { + return nil, false +} + +// AsDeployedStatelessServiceInstanceDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. +func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsDeployedStatelessServiceInstanceDetailInfo() (*DeployedStatelessServiceInstanceDetailInfo, bool) { + return &dssidi, true +} + +// AsDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. +func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsDeployedServiceReplicaDetailInfo() (*DeployedServiceReplicaDetailInfo, bool) { + return nil, false +} + +// AsBasicDeployedServiceReplicaDetailInfo is the BasicDeployedServiceReplicaDetailInfo implementation for DeployedStatelessServiceInstanceDetailInfo. +func (dssidi DeployedStatelessServiceInstanceDetailInfo) AsBasicDeployedServiceReplicaDetailInfo() (BasicDeployedServiceReplicaDetailInfo, bool) { + return &dssidi, true +} + +// DeployedStatelessServiceInstanceInfo information about a stateless service instance deployed on a node. +type DeployedStatelessServiceInstanceInfo struct { + // InstanceID - Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely identify an instance of a partition of a stateless service. It is unique within a partition and does not change for the lifetime of the instance. If the instance has failed over on the same or different node, it will get a different value for the InstanceId. + InstanceID *string `json:"InstanceId,omitempty"` + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // ServiceManifestName - The name of the service manifest in which this service type is defined. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // CodePackageName - The name of the code package that hosts this replica. + CodePackageName *string `json:"CodePackageName,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaStatus - The status of a replica of a service. Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' + ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` + // Address - The last address returned by the replica in Open or ChangeRole. + Address *string `json:"Address,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // HostProcessID - Host process ID of the process that is hosting the replica. This will be zero if the replica is down. In hyper-v containers this host process ID will be from different kernel. + HostProcessID *string `json:"HostProcessId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindDeployedServiceReplicaInfo', 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateful', 'ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless' + ServiceKind ServiceKindBasicDeployedServiceReplicaInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DeployedStatelessServiceInstanceInfo. +func (dssii DeployedStatelessServiceInstanceInfo) MarshalJSON() ([]byte, error) { + dssii.ServiceKind = ServiceKindBasicDeployedServiceReplicaInfoServiceKindStateless + objectMap := make(map[string]interface{}) + if dssii.InstanceID != nil { + objectMap["InstanceId"] = dssii.InstanceID + } + if dssii.ServiceName != nil { + objectMap["ServiceName"] = dssii.ServiceName + } + if dssii.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = dssii.ServiceTypeName + } + if dssii.ServiceManifestName != nil { + objectMap["ServiceManifestName"] = dssii.ServiceManifestName + } + if dssii.CodePackageName != nil { + objectMap["CodePackageName"] = dssii.CodePackageName + } + if dssii.PartitionID != nil { + objectMap["PartitionId"] = dssii.PartitionID + } + if dssii.ReplicaStatus != "" { + objectMap["ReplicaStatus"] = dssii.ReplicaStatus + } + if dssii.Address != nil { + objectMap["Address"] = dssii.Address + } + if dssii.ServicePackageActivationID != nil { + objectMap["ServicePackageActivationId"] = dssii.ServicePackageActivationID + } + if dssii.HostProcessID != nil { + objectMap["HostProcessId"] = dssii.HostProcessID + } + if dssii.ServiceKind != "" { + objectMap["ServiceKind"] = dssii.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsDeployedStatefulServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. +func (dssii DeployedStatelessServiceInstanceInfo) AsDeployedStatefulServiceReplicaInfo() (*DeployedStatefulServiceReplicaInfo, bool) { + return nil, false +} + +// AsDeployedStatelessServiceInstanceInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. +func (dssii DeployedStatelessServiceInstanceInfo) AsDeployedStatelessServiceInstanceInfo() (*DeployedStatelessServiceInstanceInfo, bool) { + return &dssii, true +} + +// AsDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. +func (dssii DeployedStatelessServiceInstanceInfo) AsDeployedServiceReplicaInfo() (*DeployedServiceReplicaInfo, bool) { + return nil, false +} + +// AsBasicDeployedServiceReplicaInfo is the BasicDeployedServiceReplicaInfo implementation for DeployedStatelessServiceInstanceInfo. +func (dssii DeployedStatelessServiceInstanceInfo) AsBasicDeployedServiceReplicaInfo() (BasicDeployedServiceReplicaInfo, bool) { + return &dssii, true +} + +// DeployServicePackageToNodeDescription defines description for downloading packages associated with a +// service manifest to image cache on a Service Fabric node. +type DeployServicePackageToNodeDescription struct { + // ServiceManifestName - The name of service manifest whose packages need to be downloaded. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // ApplicationTypeName - The application type name as defined in the application manifest. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ApplicationTypeVersion - The version of the application type as defined in the application manifest. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // PackageSharingPolicy - List of package sharing policy information. + PackageSharingPolicy *[]PackageSharingPolicyInfo `json:"PackageSharingPolicy,omitempty"` +} + +// DiagnosticsDescription describes the diagnostics options available +type DiagnosticsDescription struct { + // Sinks - List of supported sinks that can be referenced. + Sinks *[]BasicDiagnosticsSinkProperties `json:"sinks,omitempty"` + // Enabled - Status of whether or not sinks are enabled. + Enabled *bool `json:"enabled,omitempty"` + // DefaultSinkRefs - The sinks to be used if diagnostics is enabled. Sink choices can be overridden at the service and code package level. + DefaultSinkRefs *[]string `json:"defaultSinkRefs,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DiagnosticsDescription struct. +func (dd *DiagnosticsDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "sinks": + if v != nil { + sinks, err := unmarshalBasicDiagnosticsSinkPropertiesArray(*v) + if err != nil { + return err + } + dd.Sinks = &sinks + } + case "enabled": + if v != nil { + var enabled bool + err = json.Unmarshal(*v, &enabled) + if err != nil { + return err + } + dd.Enabled = &enabled + } + case "defaultSinkRefs": + if v != nil { + var defaultSinkRefs []string + err = json.Unmarshal(*v, &defaultSinkRefs) + if err != nil { + return err + } + dd.DefaultSinkRefs = &defaultSinkRefs + } + } + } + + return nil +} + +// DiagnosticsRef reference to sinks in DiagnosticsDescription. +type DiagnosticsRef struct { + // Enabled - Status of whether or not sinks are enabled. + Enabled *bool `json:"enabled,omitempty"` + // SinkRefs - List of sinks to be used if enabled. References the list of sinks in DiagnosticsDescription. + SinkRefs *[]string `json:"sinkRefs,omitempty"` +} + +// BasicDiagnosticsSinkProperties properties of a DiagnosticsSink. +type BasicDiagnosticsSinkProperties interface { + AsAzureInternalMonitoringPipelineSinkDescription() (*AzureInternalMonitoringPipelineSinkDescription, bool) + AsDiagnosticsSinkProperties() (*DiagnosticsSinkProperties, bool) +} + +// DiagnosticsSinkProperties properties of a DiagnosticsSink. +type DiagnosticsSinkProperties struct { + // Name - Name of the sink. This value is referenced by DiagnosticsReferenceDescription + Name *string `json:"name,omitempty"` + // Description - A description of the sink. + Description *string `json:"description,omitempty"` + // Kind - Possible values include: 'KindDiagnosticsSinkProperties', 'KindAzureInternalMonitoringPipeline' + Kind KindBasicDiagnosticsSinkProperties `json:"kind,omitempty"` +} + +func unmarshalBasicDiagnosticsSinkProperties(body []byte) (BasicDiagnosticsSinkProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindAzureInternalMonitoringPipeline): + var aimpsd AzureInternalMonitoringPipelineSinkDescription + err := json.Unmarshal(body, &aimpsd) + return aimpsd, err + default: + var dsp DiagnosticsSinkProperties + err := json.Unmarshal(body, &dsp) + return dsp, err + } +} +func unmarshalBasicDiagnosticsSinkPropertiesArray(body []byte) ([]BasicDiagnosticsSinkProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dspArray := make([]BasicDiagnosticsSinkProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dsp, err := unmarshalBasicDiagnosticsSinkProperties(*rawMessage) + if err != nil { + return nil, err + } + dspArray[index] = dsp + } + return dspArray, nil +} + +// MarshalJSON is the custom marshaler for DiagnosticsSinkProperties. +func (dsp DiagnosticsSinkProperties) MarshalJSON() ([]byte, error) { + dsp.Kind = KindDiagnosticsSinkProperties + objectMap := make(map[string]interface{}) + if dsp.Name != nil { + objectMap["name"] = dsp.Name + } + if dsp.Description != nil { + objectMap["description"] = dsp.Description + } + if dsp.Kind != "" { + objectMap["kind"] = dsp.Kind + } + return json.Marshal(objectMap) +} + +// AsAzureInternalMonitoringPipelineSinkDescription is the BasicDiagnosticsSinkProperties implementation for DiagnosticsSinkProperties. +func (dsp DiagnosticsSinkProperties) AsAzureInternalMonitoringPipelineSinkDescription() (*AzureInternalMonitoringPipelineSinkDescription, bool) { + return nil, false +} + +// AsDiagnosticsSinkProperties is the BasicDiagnosticsSinkProperties implementation for DiagnosticsSinkProperties. +func (dsp DiagnosticsSinkProperties) AsDiagnosticsSinkProperties() (*DiagnosticsSinkProperties, bool) { + return &dsp, true +} + +// AsBasicDiagnosticsSinkProperties is the BasicDiagnosticsSinkProperties implementation for DiagnosticsSinkProperties. +func (dsp DiagnosticsSinkProperties) AsBasicDiagnosticsSinkProperties() (BasicDiagnosticsSinkProperties, bool) { + return &dsp, true +} + +// DisableBackupDescription it describes the body parameters while disabling backup of a backup +// entity(Application/Service/Partition). +type DisableBackupDescription struct { + // CleanBackup - Boolean flag to delete backups. It can be set to true for deleting all the backups which were created for the backup entity that is getting disabled for backup. + CleanBackup *bool `json:"CleanBackup,omitempty"` +} + +// DiskInfo information about the disk +type DiskInfo struct { + // Capacity - the disk size in bytes + Capacity *string `json:"Capacity,omitempty"` + // AvailableSpace - the available disk space in bytes + AvailableSpace *string `json:"AvailableSpace,omitempty"` +} + +// DoublePropertyValue describes a Service Fabric property value of type Double. +type DoublePropertyValue struct { + // Data - The data of the property value. + Data *float64 `json:"Data,omitempty"` + // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' + Kind KindBasicPropertyValue `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for DoublePropertyValue. +func (dpv DoublePropertyValue) MarshalJSON() ([]byte, error) { + dpv.Kind = KindDouble + objectMap := make(map[string]interface{}) + if dpv.Data != nil { + objectMap["Data"] = dpv.Data + } + if dpv.Kind != "" { + objectMap["Kind"] = dpv.Kind + } + return json.Marshal(objectMap) +} + +// AsBinaryPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. +func (dpv DoublePropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { + return nil, false +} + +// AsInt64PropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. +func (dpv DoublePropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { + return nil, false +} + +// AsDoublePropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. +func (dpv DoublePropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { + return &dpv, true +} + +// AsStringPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. +func (dpv DoublePropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { + return nil, false +} + +// AsGUIDPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. +func (dpv DoublePropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { + return nil, false +} + +// AsPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. +func (dpv DoublePropertyValue) AsPropertyValue() (*PropertyValue, bool) { + return nil, false +} + +// AsBasicPropertyValue is the BasicPropertyValue implementation for DoublePropertyValue. +func (dpv DoublePropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { + return &dpv, true +} + +// EnableBackupDescription specifies the parameters needed to enable periodic backup. +type EnableBackupDescription struct { + // BackupPolicyName - Name of the backup policy to be used for enabling periodic backups. + BackupPolicyName *string `json:"BackupPolicyName,omitempty"` +} + +// EndpointProperties describes a container endpoint. +type EndpointProperties struct { + // Name - The name of the endpoint. + Name *string `json:"name,omitempty"` + // Port - Port used by the container. + Port *int32 `json:"port,omitempty"` +} + +// EndpointRef describes a reference to a service endpoint. +type EndpointRef struct { + // Name - Name of the endpoint. + Name *string `json:"name,omitempty"` +} + +// EnsureAvailabilitySafetyCheck safety check that waits to ensure the availability of the partition. It +// waits until there are replicas available such that bringing down this replica will not cause +// availability loss for the partition. +type EnsureAvailabilitySafetyCheck struct { + // PartitionID - Id of the partition which is undergoing the safety check. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) MarshalJSON() ([]byte, error) { + easc.Kind = KindEnsureAvailability + objectMap := make(map[string]interface{}) + if easc.PartitionID != nil { + objectMap["PartitionId"] = easc.PartitionID + } + if easc.Kind != "" { + objectMap["Kind"] = easc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return &easc, true +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return &easc, true +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for EnsureAvailabilitySafetyCheck. +func (easc EnsureAvailabilitySafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &easc, true +} + +// EnsurePartitionQuorumSafetyCheck safety check that ensures that a quorum of replicas are not lost for a +// partition. +type EnsurePartitionQuorumSafetyCheck struct { + // PartitionID - Id of the partition which is undergoing the safety check. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) MarshalJSON() ([]byte, error) { + epqsc.Kind = KindEnsurePartitionQuorum + objectMap := make(map[string]interface{}) + if epqsc.PartitionID != nil { + objectMap["PartitionId"] = epqsc.PartitionID + } + if epqsc.Kind != "" { + objectMap["Kind"] = epqsc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return &epqsc, true +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return &epqsc, true +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for EnsurePartitionQuorumSafetyCheck. +func (epqsc EnsurePartitionQuorumSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &epqsc, true +} + +// EntityHealth health information common to all entities in the cluster. It contains the aggregated health +// state, health events and unhealthy evaluation. +type EntityHealth struct { + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// EntityHealthState a base type for the health state of various entities in the cluster. It contains the +// aggregated health state. +type EntityHealthState struct { + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// EntityHealthStateChunk a base type for the health state chunk of various entities in the cluster. It +// contains the aggregated health state. +type EntityHealthStateChunk struct { + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// EntityHealthStateChunkList a base type for the list of health state chunks found in the cluster. It +// contains the total number of health states that match the input filters. +type EntityHealthStateChunkList struct { + // TotalCount - Total number of entity health state objects that match the specified filters from the cluster health chunk query description. + TotalCount *int64 `json:"TotalCount,omitempty"` +} + +// EntityKindHealthStateCount represents health state count for entities of the specified entity kind. +type EntityKindHealthStateCount struct { + // EntityKind - The entity kind for which health states are evaluated. Possible values include: 'EntityKindInvalid', 'EntityKindNode', 'EntityKindPartition', 'EntityKindService', 'EntityKindApplication', 'EntityKindReplica', 'EntityKindDeployedApplication', 'EntityKindDeployedServicePackage', 'EntityKindCluster' + EntityKind EntityKind `json:"EntityKind,omitempty"` + // HealthStateCount - The health state count for the entities of the specified kind. + HealthStateCount *HealthStateCount `json:"HealthStateCount,omitempty"` +} + +// EnvironmentVariable describes an environment variable for the container. +type EnvironmentVariable struct { + // Type - The type of the environment variable being given in value. Possible values include: 'ClearText', 'KeyVaultReference', 'SecretValueReference' + Type EnvironmentVariableType `json:"type,omitempty"` + // Name - The name of the environment variable. + Name *string `json:"name,omitempty"` + // Value - The value of the environment variable, will be processed based on the type provided. + Value *string `json:"value,omitempty"` +} + +// Epoch an Epoch is a configuration number for the partition as a whole. When the configuration of the +// replica set changes, for example when the Primary replica changes, the operations that are replicated +// from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary +// replica. +type Epoch struct { + // ConfigurationVersion - The current configuration number of this Epoch. The configuration number is an increasing value that is updated whenever the configuration of this replica set changes. + ConfigurationVersion *string `json:"ConfigurationVersion,omitempty"` + // DataLossVersion - The current data loss number of this Epoch. The data loss number property is an increasing value which is updated whenever data loss is suspected, as when loss of a quorum of replicas in the replica set that includes the Primary replica. + DataLossVersion *string `json:"DataLossVersion,omitempty"` +} + +// EventHealthEvaluation represents health evaluation of a HealthEvent that was reported on the entity. +// The health evaluation is returned when evaluating health of an entity results in Error or Warning. +type EventHealthEvaluation struct { + // ConsiderWarningAsError - Indicates whether warnings are treated with the same severity as errors. The field is specified in the health policy used to evaluate the entity. + ConsiderWarningAsError *bool `json:"ConsiderWarningAsError,omitempty"` + // UnhealthyEvent - Represents health information reported on a health entity, such as cluster, application or node, with additional metadata added by the Health Manager. + UnhealthyEvent *HealthEvent `json:"UnhealthyEvent,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for EventHealthEvaluation. +func (ehe EventHealthEvaluation) MarshalJSON() ([]byte, error) { + ehe.Kind = KindEvent + objectMap := make(map[string]interface{}) + if ehe.ConsiderWarningAsError != nil { + objectMap["ConsiderWarningAsError"] = ehe.ConsiderWarningAsError + } + if ehe.UnhealthyEvent != nil { + objectMap["UnhealthyEvent"] = ehe.UnhealthyEvent + } + if ehe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = ehe.AggregatedHealthState + } + if ehe.Description != nil { + objectMap["Description"] = ehe.Description + } + if ehe.Kind != "" { + objectMap["Kind"] = ehe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return &ehe, true +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for EventHealthEvaluation. +func (ehe EventHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &ehe, true +} + +// ExecutingFaultsChaosEvent describes a Chaos event that gets generated when Chaos has decided on the +// faults for an iteration. This Chaos event contains the details of the faults as a list of strings. +type ExecutingFaultsChaosEvent struct { + // Faults - List of string description of the faults that Chaos decided to execute in an iteration. + Faults *[]string `json:"Faults,omitempty"` + // TimeStampUtc - The UTC timestamp when this Chaos event was generated. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' + Kind KindBasicChaosEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) MarshalJSON() ([]byte, error) { + efce.Kind = KindExecutingFaults + objectMap := make(map[string]interface{}) + if efce.Faults != nil { + objectMap["Faults"] = efce.Faults + } + if efce.TimeStampUtc != nil { + objectMap["TimeStampUtc"] = efce.TimeStampUtc + } + if efce.Kind != "" { + objectMap["Kind"] = efce.Kind + } + return json.Marshal(objectMap) +} + +// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { + return &efce, true +} + +// AsStartedChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { + return nil, false +} + +// AsStoppedChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { + return nil, false +} + +// AsTestErrorChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { + return nil, false +} + +// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { + return nil, false +} + +// AsWaitingChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { + return nil, false +} + +// AsChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { + return nil, false +} + +// AsBasicChaosEvent is the BasicChaosEvent implementation for ExecutingFaultsChaosEvent. +func (efce ExecutingFaultsChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { + return &efce, true +} + +// BasicExecutionPolicy the execution policy of the service +type BasicExecutionPolicy interface { + AsRunToCompletionExecutionPolicy() (*RunToCompletionExecutionPolicy, bool) + AsExecutionPolicy() (*ExecutionPolicy, bool) +} + +// ExecutionPolicy the execution policy of the service +type ExecutionPolicy struct { + // Type - Possible values include: 'TypeExecutionPolicy', 'TypeRunToCompletion' + Type TypeBasicExecutionPolicy `json:"type,omitempty"` +} + +func unmarshalBasicExecutionPolicy(body []byte) (BasicExecutionPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeRunToCompletion): + var rtcep RunToCompletionExecutionPolicy + err := json.Unmarshal(body, &rtcep) + return rtcep, err + default: + var ep ExecutionPolicy + err := json.Unmarshal(body, &ep) + return ep, err + } +} +func unmarshalBasicExecutionPolicyArray(body []byte) ([]BasicExecutionPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + epArray := make([]BasicExecutionPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ep, err := unmarshalBasicExecutionPolicy(*rawMessage) + if err != nil { + return nil, err + } + epArray[index] = ep + } + return epArray, nil +} + +// MarshalJSON is the custom marshaler for ExecutionPolicy. +func (ep ExecutionPolicy) MarshalJSON() ([]byte, error) { + ep.Type = TypeExecutionPolicy + objectMap := make(map[string]interface{}) + if ep.Type != "" { + objectMap["type"] = ep.Type + } + return json.Marshal(objectMap) +} + +// AsRunToCompletionExecutionPolicy is the BasicExecutionPolicy implementation for ExecutionPolicy. +func (ep ExecutionPolicy) AsRunToCompletionExecutionPolicy() (*RunToCompletionExecutionPolicy, bool) { + return nil, false +} + +// AsExecutionPolicy is the BasicExecutionPolicy implementation for ExecutionPolicy. +func (ep ExecutionPolicy) AsExecutionPolicy() (*ExecutionPolicy, bool) { + return &ep, true +} + +// AsBasicExecutionPolicy is the BasicExecutionPolicy implementation for ExecutionPolicy. +func (ep ExecutionPolicy) AsBasicExecutionPolicy() (BasicExecutionPolicy, bool) { + return &ep, true +} + +// ExternalStoreProvisionApplicationTypeDescription describes the operation to register or provision an +// application type using an application package from an external store instead of a package uploaded to +// the Service Fabric image store. +type ExternalStoreProvisionApplicationTypeDescription struct { + // ApplicationPackageDownloadURI - The path to the '.sfpkg' application package from where the application package can be downloaded using HTTP or HTTPS protocols. The application package can be stored in an external store that provides GET operation to download the file. Supported protocols are HTTP and HTTPS, and the path must allow READ access. + ApplicationPackageDownloadURI *string `json:"ApplicationPackageDownloadUri,omitempty"` + // ApplicationTypeName - The application type name represents the name of the application type found in the application manifest. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ApplicationTypeVersion - The application type version represents the version of the application type found in the application manifest. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // Async - Indicates whether or not provisioning should occur asynchronously. When set to true, the provision operation returns when the request is accepted by the system, and the provision operation continues without any timeout limit. The default value is false. For large application packages, we recommend setting the value to true. + Async *bool `json:"Async,omitempty"` + // Kind - Possible values include: 'KindProvisionApplicationTypeDescriptionBase', 'KindImageStorePath', 'KindExternalStore' + Kind KindBasicProvisionApplicationTypeDescriptionBase `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExternalStoreProvisionApplicationTypeDescription. +func (espatd ExternalStoreProvisionApplicationTypeDescription) MarshalJSON() ([]byte, error) { + espatd.Kind = KindExternalStore + objectMap := make(map[string]interface{}) + if espatd.ApplicationPackageDownloadURI != nil { + objectMap["ApplicationPackageDownloadUri"] = espatd.ApplicationPackageDownloadURI + } + if espatd.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = espatd.ApplicationTypeName + } + if espatd.ApplicationTypeVersion != nil { + objectMap["ApplicationTypeVersion"] = espatd.ApplicationTypeVersion + } + if espatd.Async != nil { + objectMap["Async"] = espatd.Async + } + if espatd.Kind != "" { + objectMap["Kind"] = espatd.Kind + } + return json.Marshal(objectMap) +} + +// AsProvisionApplicationTypeDescription is the BasicProvisionApplicationTypeDescriptionBase implementation for ExternalStoreProvisionApplicationTypeDescription. +func (espatd ExternalStoreProvisionApplicationTypeDescription) AsProvisionApplicationTypeDescription() (*ProvisionApplicationTypeDescription, bool) { + return nil, false +} + +// AsExternalStoreProvisionApplicationTypeDescription is the BasicProvisionApplicationTypeDescriptionBase implementation for ExternalStoreProvisionApplicationTypeDescription. +func (espatd ExternalStoreProvisionApplicationTypeDescription) AsExternalStoreProvisionApplicationTypeDescription() (*ExternalStoreProvisionApplicationTypeDescription, bool) { + return &espatd, true +} + +// AsProvisionApplicationTypeDescriptionBase is the BasicProvisionApplicationTypeDescriptionBase implementation for ExternalStoreProvisionApplicationTypeDescription. +func (espatd ExternalStoreProvisionApplicationTypeDescription) AsProvisionApplicationTypeDescriptionBase() (*ProvisionApplicationTypeDescriptionBase, bool) { + return nil, false +} + +// AsBasicProvisionApplicationTypeDescriptionBase is the BasicProvisionApplicationTypeDescriptionBase implementation for ExternalStoreProvisionApplicationTypeDescription. +func (espatd ExternalStoreProvisionApplicationTypeDescription) AsBasicProvisionApplicationTypeDescriptionBase() (BasicProvisionApplicationTypeDescriptionBase, bool) { + return &espatd, true +} + +// FabricCodeVersionInfo information about a Service Fabric code version. +type FabricCodeVersionInfo struct { + // CodeVersion - The product version of Service Fabric. + CodeVersion *string `json:"CodeVersion,omitempty"` +} + +// FabricConfigVersionInfo information about a Service Fabric config version. +type FabricConfigVersionInfo struct { + // ConfigVersion - The config version of Service Fabric. + ConfigVersion *string `json:"ConfigVersion,omitempty"` +} + +// FabricError the REST API operations for Service Fabric return standard HTTP status codes. This type +// defines the additional information returned from the Service Fabric API operations that are not +// successful. +type FabricError struct { + // Error - Error object containing error code and error message. + Error *FabricErrorError `json:"Error,omitempty"` +} + +// FabricErrorError error object containing error code and error message. +type FabricErrorError struct { + // Code - Defines the fabric error codes that be returned as part of the error object in response to Service Fabric API operations that are not successful. Following are the error code values that can be returned for a specific HTTP status code. + // - Possible values of the error code for HTTP status code 400 (Bad Request) + // - "FABRIC_E_INVALID_PARTITION_KEY" + // - "FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR" + // - "FABRIC_E_INVALID_ADDRESS" + // - "FABRIC_E_APPLICATION_NOT_UPGRADING" + // - "FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR" + // - "FABRIC_E_FABRIC_NOT_UPGRADING" + // - "FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR" + // - "FABRIC_E_INVALID_CONFIGURATION" + // - "FABRIC_E_INVALID_NAME_URI" + // - "FABRIC_E_PATH_TOO_LONG" + // - "FABRIC_E_KEY_TOO_LARGE" + // - "FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED" + // - "FABRIC_E_INVALID_ATOMIC_GROUP" + // - "FABRIC_E_VALUE_EMPTY" + // - "FABRIC_E_BACKUP_IS_ENABLED" + // - "FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH" + // - "FABRIC_E_INVALID_FOR_STATELESS_SERVICES" + // - "FABRIC_E_INVALID_SERVICE_SCALING_POLICY" + // - "E_INVALIDARG" + // - Possible values of the error code for HTTP status code 404 (Not Found) + // - "FABRIC_E_NODE_NOT_FOUND" + // - "FABRIC_E_APPLICATION_TYPE_NOT_FOUND" + // - "FABRIC_E_APPLICATION_NOT_FOUND" + // - "FABRIC_E_SERVICE_TYPE_NOT_FOUND" + // - "FABRIC_E_SERVICE_DOES_NOT_EXIST" + // - "FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND" + // - "FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND" + // - "FABRIC_E_PARTITION_NOT_FOUND" + // - "FABRIC_E_REPLICA_DOES_NOT_EXIST" + // - "FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST" + // - "FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND" + // - "FABRIC_E_DIRECTORY_NOT_FOUND" + // - "FABRIC_E_FABRIC_VERSION_NOT_FOUND" + // - "FABRIC_E_FILE_NOT_FOUND" + // - "FABRIC_E_NAME_DOES_NOT_EXIST" + // - "FABRIC_E_PROPERTY_DOES_NOT_EXIST" + // - "FABRIC_E_ENUMERATION_COMPLETED" + // - "FABRIC_E_SERVICE_MANIFEST_NOT_FOUND" + // - "FABRIC_E_KEY_NOT_FOUND" + // - "FABRIC_E_HEALTH_ENTITY_NOT_FOUND" + // - "FABRIC_E_BACKUP_NOT_ENABLED" + // - "FABRIC_E_BACKUP_POLICY_NOT_EXISTING" + // - "FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_EXISTING" + // - "FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR" + // - Possible values of the error code for HTTP status code 409 (Conflict) + // - "FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS" + // - "FABRIC_E_APPLICATION_ALREADY_EXISTS" + // - "FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION" + // - "FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS" + // - "FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS" + // - "FABRIC_E_SERVICE_ALREADY_EXISTS" + // - "FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS" + // - "FABRIC_E_APPLICATION_TYPE_IN_USE" + // - "FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION" + // - "FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS" + // - "FABRIC_E_FABRIC_VERSION_IN_USE" + // - "FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS" + // - "FABRIC_E_NAME_ALREADY_EXISTS" + // - "FABRIC_E_NAME_NOT_EMPTY" + // - "FABRIC_E_PROPERTY_CHECK_FAILED" + // - "FABRIC_E_SERVICE_METADATA_MISMATCH" + // - "FABRIC_E_SERVICE_TYPE_MISMATCH" + // - "FABRIC_E_HEALTH_STALE_REPORT" + // - "FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED" + // - "FABRIC_E_NODE_HAS_NOT_STOPPED_YET" + // - "FABRIC_E_INSTANCE_ID_MISMATCH" + // - "FABRIC_E_BACKUP_IN_PROGRESS" + // - "FABRIC_E_RESTORE_IN_PROGRESS" + // - "FABRIC_E_BACKUP_POLICY_ALREADY_EXISTING" + // - Possible values of the error code for HTTP status code 413 (Request Entity Too Large) + // - "FABRIC_E_VALUE_TOO_LARGE" + // - Possible values of the error code for HTTP status code 500 (Internal Server Error) + // - "FABRIC_E_NODE_IS_UP" + // - "E_FAIL" + // - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS" + // - "FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND" + // - "FABRIC_E_VOLUME_ALREADY_EXISTS" + // - "FABRIC_E_VOLUME_NOT_FOUND" + // - "SerializationError" + // - Possible values of the error code for HTTP status code 503 (Service Unavailable) + // - "FABRIC_E_NO_WRITE_QUORUM" + // - "FABRIC_E_NOT_PRIMARY" + // - "FABRIC_E_NOT_READY" + // - "FABRIC_E_RECONFIGURATION_PENDING" + // - "FABRIC_E_SERVICE_OFFLINE" + // - "E_ABORT" + // - "FABRIC_E_VALUE_TOO_LARGE" + // - Possible values of the error code for HTTP status code 504 (Gateway Timeout) + // - "FABRIC_E_COMMUNICATION_ERROR" + // - "FABRIC_E_OPERATION_NOT_COMPLETE" + // - "FABRIC_E_TIMEOUT". Possible values include: 'FABRICEINVALIDPARTITIONKEY', 'FABRICEIMAGEBUILDERVALIDATIONERROR', 'FABRICEINVALIDADDRESS', 'FABRICEAPPLICATIONNOTUPGRADING', 'FABRICEAPPLICATIONUPGRADEVALIDATIONERROR', 'FABRICEFABRICNOTUPGRADING', 'FABRICEFABRICUPGRADEVALIDATIONERROR', 'FABRICEINVALIDCONFIGURATION', 'FABRICEINVALIDNAMEURI', 'FABRICEPATHTOOLONG', 'FABRICEKEYTOOLARGE', 'FABRICESERVICEAFFINITYCHAINNOTSUPPORTED', 'FABRICEINVALIDATOMICGROUP', 'FABRICEVALUEEMPTY', 'FABRICENODENOTFOUND', 'FABRICEAPPLICATIONTYPENOTFOUND', 'FABRICEAPPLICATIONNOTFOUND', 'FABRICESERVICETYPENOTFOUND', 'FABRICESERVICEDOESNOTEXIST', 'FABRICESERVICETYPETEMPLATENOTFOUND', 'FABRICECONFIGURATIONSECTIONNOTFOUND', 'FABRICEPARTITIONNOTFOUND', 'FABRICEREPLICADOESNOTEXIST', 'FABRICESERVICEGROUPDOESNOTEXIST', 'FABRICECONFIGURATIONPARAMETERNOTFOUND', 'FABRICEDIRECTORYNOTFOUND', 'FABRICEFABRICVERSIONNOTFOUND', 'FABRICEFILENOTFOUND', 'FABRICENAMEDOESNOTEXIST', 'FABRICEPROPERTYDOESNOTEXIST', 'FABRICEENUMERATIONCOMPLETED', 'FABRICESERVICEMANIFESTNOTFOUND', 'FABRICEKEYNOTFOUND', 'FABRICEHEALTHENTITYNOTFOUND', 'FABRICEAPPLICATIONTYPEALREADYEXISTS', 'FABRICEAPPLICATIONALREADYEXISTS', 'FABRICEAPPLICATIONALREADYINTARGETVERSION', 'FABRICEAPPLICATIONTYPEPROVISIONINPROGRESS', 'FABRICEAPPLICATIONUPGRADEINPROGRESS', 'FABRICESERVICEALREADYEXISTS', 'FABRICESERVICEGROUPALREADYEXISTS', 'FABRICEAPPLICATIONTYPEINUSE', 'FABRICEFABRICALREADYINTARGETVERSION', 'FABRICEFABRICVERSIONALREADYEXISTS', 'FABRICEFABRICVERSIONINUSE', 'FABRICEFABRICUPGRADEINPROGRESS', 'FABRICENAMEALREADYEXISTS', 'FABRICENAMENOTEMPTY', 'FABRICEPROPERTYCHECKFAILED', 'FABRICESERVICEMETADATAMISMATCH', 'FABRICESERVICETYPEMISMATCH', 'FABRICEHEALTHSTALEREPORT', 'FABRICESEQUENCENUMBERCHECKFAILED', 'FABRICENODEHASNOTSTOPPEDYET', 'FABRICEINSTANCEIDMISMATCH', 'FABRICEVALUETOOLARGE', 'FABRICENOWRITEQUORUM', 'FABRICENOTPRIMARY', 'FABRICENOTREADY', 'FABRICERECONFIGURATIONPENDING', 'FABRICESERVICEOFFLINE', 'EABORT', 'FABRICECOMMUNICATIONERROR', 'FABRICEOPERATIONNOTCOMPLETE', 'FABRICETIMEOUT', 'FABRICENODEISUP', 'EFAIL', 'FABRICEBACKUPISENABLED', 'FABRICERESTORESOURCETARGETPARTITIONMISMATCH', 'FABRICEINVALIDFORSTATELESSSERVICES', 'FABRICEBACKUPNOTENABLED', 'FABRICEBACKUPPOLICYNOTEXISTING', 'FABRICEFAULTANALYSISSERVICENOTEXISTING', 'FABRICEBACKUPINPROGRESS', 'FABRICERESTOREINPROGRESS', 'FABRICEBACKUPPOLICYALREADYEXISTING', 'FABRICEINVALIDSERVICESCALINGPOLICY', 'EINVALIDARG', 'FABRICESINGLEINSTANCEAPPLICATIONALREADYEXISTS', 'FABRICESINGLEINSTANCEAPPLICATIONNOTFOUND', 'FABRICEVOLUMEALREADYEXISTS', 'FABRICEVOLUMENOTFOUND', 'SerializationError', 'FABRICEIMAGEBUILDERRESERVEDDIRECTORYERROR' + Code FabricErrorCodes `json:"Code,omitempty"` + // Message - Error message. + Message *string `json:"Message,omitempty"` +} + +// BasicFabricEvent represents the base for all Fabric Events. +type BasicFabricEvent interface { + AsApplicationEvent() (*ApplicationEvent, bool) + AsBasicApplicationEvent() (BasicApplicationEvent, bool) + AsClusterEvent() (*ClusterEvent, bool) + AsBasicClusterEvent() (BasicClusterEvent, bool) + AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) + AsNodeEvent() (*NodeEvent, bool) + AsBasicNodeEvent() (BasicNodeEvent, bool) + AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) + AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) + AsPartitionEvent() (*PartitionEvent, bool) + AsBasicPartitionEvent() (BasicPartitionEvent, bool) + AsReplicaEvent() (*ReplicaEvent, bool) + AsBasicReplicaEvent() (BasicReplicaEvent, bool) + AsServiceEvent() (*ServiceEvent, bool) + AsBasicServiceEvent() (BasicServiceEvent, bool) + AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) + AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) + AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) + AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) + AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) + AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) + AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) + AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) + AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) + AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) + AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) + AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) + AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) + AsNodeAbortedEvent() (*NodeAbortedEvent, bool) + AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) + AsNodeClosedEvent() (*NodeClosedEvent, bool) + AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) + AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) + AsNodeDownEvent() (*NodeDownEvent, bool) + AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) + AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) + AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) + AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) + AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) + AsNodeUpEvent() (*NodeUpEvent, bool) + AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) + AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) + AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) + AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) + AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) + AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) + AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) + AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) + AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) + AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) + AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) + AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) + AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) + AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) + AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) + AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) + AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) + AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) + AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) + AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) + AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) + AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) + AsChaosStartedEvent() (*ChaosStartedEvent, bool) + AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) + AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) + AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) + AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) + AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) + AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) + AsFabricEvent() (*FabricEvent, bool) +} + +// FabricEvent represents the base for all Fabric Events. +type FabricEvent struct { + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicFabricEvent(body []byte) (BasicFabricEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindApplicationEvent): + var ae ApplicationEvent + err := json.Unmarshal(body, &ae) + return ae, err + case string(KindClusterEvent): + var ce ClusterEvent + err := json.Unmarshal(body, &ce) + return ce, err + case string(KindContainerInstanceEvent): + var cie ContainerInstanceEvent + err := json.Unmarshal(body, &cie) + return cie, err + case string(KindNodeEvent): + var ne NodeEvent + err := json.Unmarshal(body, &ne) + return ne, err + case string(KindPartitionAnalysisEvent): + var pae PartitionAnalysisEvent + err := json.Unmarshal(body, &pae) + return pae, err + case string(KindPartitionEvent): + var peVar PartitionEvent + err := json.Unmarshal(body, &peVar) + return peVar, err + case string(KindReplicaEvent): + var re ReplicaEvent + err := json.Unmarshal(body, &re) + return re, err + case string(KindServiceEvent): + var se ServiceEvent + err := json.Unmarshal(body, &se) + return se, err + case string(KindApplicationCreated): + var ace ApplicationCreatedEvent + err := json.Unmarshal(body, &ace) + return ace, err + case string(KindApplicationDeleted): + var ade ApplicationDeletedEvent + err := json.Unmarshal(body, &ade) + return ade, err + case string(KindApplicationNewHealthReport): + var anhre ApplicationNewHealthReportEvent + err := json.Unmarshal(body, &anhre) + return anhre, err + case string(KindApplicationHealthReportExpired): + var ahree ApplicationHealthReportExpiredEvent + err := json.Unmarshal(body, &ahree) + return ahree, err + case string(KindApplicationUpgradeCompleted): + var auce ApplicationUpgradeCompletedEvent + err := json.Unmarshal(body, &auce) + return auce, err + case string(KindApplicationUpgradeDomainCompleted): + var audce ApplicationUpgradeDomainCompletedEvent + err := json.Unmarshal(body, &audce) + return audce, err + case string(KindApplicationUpgradeRollbackCompleted): + var aurce ApplicationUpgradeRollbackCompletedEvent + err := json.Unmarshal(body, &aurce) + return aurce, err + case string(KindApplicationUpgradeRollbackStarted): + var aurse ApplicationUpgradeRollbackStartedEvent + err := json.Unmarshal(body, &aurse) + return aurse, err + case string(KindApplicationUpgradeStarted): + var ause ApplicationUpgradeStartedEvent + err := json.Unmarshal(body, &ause) + return ause, err + case string(KindDeployedApplicationNewHealthReport): + var danhre DeployedApplicationNewHealthReportEvent + err := json.Unmarshal(body, &danhre) + return danhre, err + case string(KindDeployedApplicationHealthReportExpired): + var dahree DeployedApplicationHealthReportExpiredEvent + err := json.Unmarshal(body, &dahree) + return dahree, err + case string(KindApplicationProcessExited): + var apee ApplicationProcessExitedEvent + err := json.Unmarshal(body, &apee) + return apee, err + case string(KindApplicationContainerInstanceExited): + var aciee ApplicationContainerInstanceExitedEvent + err := json.Unmarshal(body, &aciee) + return aciee, err + case string(KindNodeAborted): + var nae NodeAbortedEvent + err := json.Unmarshal(body, &nae) + return nae, err + case string(KindNodeAddedToCluster): + var natce NodeAddedToClusterEvent + err := json.Unmarshal(body, &natce) + return natce, err + case string(KindNodeClosed): + var nce NodeClosedEvent + err := json.Unmarshal(body, &nce) + return nce, err + case string(KindNodeDeactivateCompleted): + var ndce NodeDeactivateCompletedEvent + err := json.Unmarshal(body, &ndce) + return ndce, err + case string(KindNodeDeactivateStarted): + var ndse NodeDeactivateStartedEvent + err := json.Unmarshal(body, &ndse) + return ndse, err + case string(KindNodeDown): + var nde NodeDownEvent + err := json.Unmarshal(body, &nde) + return nde, err + case string(KindNodeNewHealthReport): + var nnhre NodeNewHealthReportEvent + err := json.Unmarshal(body, &nnhre) + return nnhre, err + case string(KindNodeHealthReportExpired): + var nhree NodeHealthReportExpiredEvent + err := json.Unmarshal(body, &nhree) + return nhree, err + case string(KindNodeOpenSucceeded): + var nose NodeOpenSucceededEvent + err := json.Unmarshal(body, &nose) + return nose, err + case string(KindNodeOpenFailed): + var nofe NodeOpenFailedEvent + err := json.Unmarshal(body, &nofe) + return nofe, err + case string(KindNodeRemovedFromCluster): + var nrfce NodeRemovedFromClusterEvent + err := json.Unmarshal(body, &nrfce) + return nrfce, err + case string(KindNodeUp): + var nue NodeUpEvent + err := json.Unmarshal(body, &nue) + return nue, err + case string(KindPartitionNewHealthReport): + var pnhre PartitionNewHealthReportEvent + err := json.Unmarshal(body, &pnhre) + return pnhre, err + case string(KindPartitionHealthReportExpired): + var phree PartitionHealthReportExpiredEvent + err := json.Unmarshal(body, &phree) + return phree, err + case string(KindPartitionReconfigured): + var pre PartitionReconfiguredEvent + err := json.Unmarshal(body, &pre) + return pre, err + case string(KindPartitionPrimaryMoveAnalysis): + var ppmae PartitionPrimaryMoveAnalysisEvent + err := json.Unmarshal(body, &ppmae) + return ppmae, err + case string(KindServiceCreated): + var sce ServiceCreatedEvent + err := json.Unmarshal(body, &sce) + return sce, err + case string(KindServiceDeleted): + var sde ServiceDeletedEvent + err := json.Unmarshal(body, &sde) + return sde, err + case string(KindServiceNewHealthReport): + var snhre ServiceNewHealthReportEvent + err := json.Unmarshal(body, &snhre) + return snhre, err + case string(KindServiceHealthReportExpired): + var shree ServiceHealthReportExpiredEvent + err := json.Unmarshal(body, &shree) + return shree, err + case string(KindDeployedServicePackageNewHealthReport): + var dspnhre DeployedServicePackageNewHealthReportEvent + err := json.Unmarshal(body, &dspnhre) + return dspnhre, err + case string(KindDeployedServicePackageHealthReportExpired): + var dsphree DeployedServicePackageHealthReportExpiredEvent + err := json.Unmarshal(body, &dsphree) + return dsphree, err + case string(KindStatefulReplicaNewHealthReport): + var srnhre StatefulReplicaNewHealthReportEvent + err := json.Unmarshal(body, &srnhre) + return srnhre, err + case string(KindStatefulReplicaHealthReportExpired): + var srhree StatefulReplicaHealthReportExpiredEvent + err := json.Unmarshal(body, &srhree) + return srhree, err + case string(KindStatelessReplicaNewHealthReport): + var srnhre StatelessReplicaNewHealthReportEvent + err := json.Unmarshal(body, &srnhre) + return srnhre, err + case string(KindStatelessReplicaHealthReportExpired): + var srhree StatelessReplicaHealthReportExpiredEvent + err := json.Unmarshal(body, &srhree) + return srhree, err + case string(KindClusterNewHealthReport): + var cnhre ClusterNewHealthReportEvent + err := json.Unmarshal(body, &cnhre) + return cnhre, err + case string(KindClusterHealthReportExpired): + var chree ClusterHealthReportExpiredEvent + err := json.Unmarshal(body, &chree) + return chree, err + case string(KindClusterUpgradeCompleted): + var cuce ClusterUpgradeCompletedEvent + err := json.Unmarshal(body, &cuce) + return cuce, err + case string(KindClusterUpgradeDomainCompleted): + var cudce ClusterUpgradeDomainCompletedEvent + err := json.Unmarshal(body, &cudce) + return cudce, err + case string(KindClusterUpgradeRollbackCompleted): + var curce ClusterUpgradeRollbackCompletedEvent + err := json.Unmarshal(body, &curce) + return curce, err + case string(KindClusterUpgradeRollbackStarted): + var curse ClusterUpgradeRollbackStartedEvent + err := json.Unmarshal(body, &curse) + return curse, err + case string(KindClusterUpgradeStarted): + var cuse ClusterUpgradeStartedEvent + err := json.Unmarshal(body, &cuse) + return cuse, err + case string(KindChaosStopped): + var cse ChaosStoppedEvent + err := json.Unmarshal(body, &cse) + return cse, err + case string(KindChaosStarted): + var cse ChaosStartedEvent + err := json.Unmarshal(body, &cse) + return cse, err + case string(KindChaosCodePackageRestartScheduled): + var ccprse ChaosCodePackageRestartScheduledEvent + err := json.Unmarshal(body, &ccprse) + return ccprse, err + case string(KindChaosReplicaRemovalScheduled): + var crrse ChaosReplicaRemovalScheduledEvent + err := json.Unmarshal(body, &crrse) + return crrse, err + case string(KindChaosPartitionSecondaryMoveScheduled): + var cpsmse ChaosPartitionSecondaryMoveScheduledEvent + err := json.Unmarshal(body, &cpsmse) + return cpsmse, err + case string(KindChaosPartitionPrimaryMoveScheduled): + var cppmse ChaosPartitionPrimaryMoveScheduledEvent + err := json.Unmarshal(body, &cppmse) + return cppmse, err + case string(KindChaosReplicaRestartScheduled): + var crrse ChaosReplicaRestartScheduledEvent + err := json.Unmarshal(body, &crrse) + return crrse, err + case string(KindChaosNodeRestartScheduled): + var cnrse ChaosNodeRestartScheduledEvent + err := json.Unmarshal(body, &cnrse) + return cnrse, err + default: + var fe FabricEvent + err := json.Unmarshal(body, &fe) + return fe, err + } +} +func unmarshalBasicFabricEventArray(body []byte) ([]BasicFabricEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + feArray := make([]BasicFabricEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fe, err := unmarshalBasicFabricEvent(*rawMessage) + if err != nil { + return nil, err + } + feArray[index] = fe + } + return feArray, nil +} + +// MarshalJSON is the custom marshaler for FabricEvent. +func (fe FabricEvent) MarshalJSON() ([]byte, error) { + fe.Kind = KindFabricEvent + objectMap := make(map[string]interface{}) + if fe.EventInstanceID != nil { + objectMap["EventInstanceId"] = fe.EventInstanceID + } + if fe.Category != nil { + objectMap["Category"] = fe.Category + } + if fe.TimeStamp != nil { + objectMap["TimeStamp"] = fe.TimeStamp + } + if fe.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = fe.HasCorrelatedEvents + } + if fe.Kind != "" { + objectMap["Kind"] = fe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsFabricEvent() (*FabricEvent, bool) { + return &fe, true +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for FabricEvent. +func (fe FabricEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &fe, true +} + +// FailedPropertyBatchInfo derived from PropertyBatchInfo. Represents the property batch failing. Contains +// information about the specific batch failure. +type FailedPropertyBatchInfo struct { + // ErrorMessage - The error message of the failed operation. Describes the exception thrown due to the first unsuccessful operation in the property batch. + ErrorMessage *string `json:"ErrorMessage,omitempty"` + // OperationIndex - The index of the unsuccessful operation in the property batch. + OperationIndex *int32 `json:"OperationIndex,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchInfo', 'KindSuccessful', 'KindFailed' + Kind KindBasicPropertyBatchInfo `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for FailedPropertyBatchInfo. +func (fpbi FailedPropertyBatchInfo) MarshalJSON() ([]byte, error) { + fpbi.Kind = KindFailed + objectMap := make(map[string]interface{}) + if fpbi.ErrorMessage != nil { + objectMap["ErrorMessage"] = fpbi.ErrorMessage + } + if fpbi.OperationIndex != nil { + objectMap["OperationIndex"] = fpbi.OperationIndex + } + if fpbi.Kind != "" { + objectMap["Kind"] = fpbi.Kind + } + return json.Marshal(objectMap) +} + +// AsSuccessfulPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. +func (fpbi FailedPropertyBatchInfo) AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) { + return nil, false +} + +// AsFailedPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. +func (fpbi FailedPropertyBatchInfo) AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) { + return &fpbi, true +} + +// AsPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. +func (fpbi FailedPropertyBatchInfo) AsPropertyBatchInfo() (*PropertyBatchInfo, bool) { + return nil, false +} + +// AsBasicPropertyBatchInfo is the BasicPropertyBatchInfo implementation for FailedPropertyBatchInfo. +func (fpbi FailedPropertyBatchInfo) AsBasicPropertyBatchInfo() (BasicPropertyBatchInfo, bool) { + return &fpbi, true +} + +// FailedUpgradeDomainProgressObject the detailed upgrade progress for nodes in the current upgrade domain +// at the point of failure. +type FailedUpgradeDomainProgressObject struct { + // DomainName - The name of the upgrade domain + DomainName *string `json:"DomainName,omitempty"` + // NodeUpgradeProgressList - List of upgrading nodes and their statuses + NodeUpgradeProgressList *[]NodeUpgradeProgressInfo `json:"NodeUpgradeProgressList,omitempty"` +} + +// FailureUpgradeDomainProgressInfo information about the upgrade domain progress at the time of upgrade +// failure. +type FailureUpgradeDomainProgressInfo struct { + // DomainName - The name of the upgrade domain + DomainName *string `json:"DomainName,omitempty"` + // NodeUpgradeProgressList - List of upgrading nodes and their statuses + NodeUpgradeProgressList *[]NodeUpgradeProgressInfo `json:"NodeUpgradeProgressList,omitempty"` +} + +// FileInfo information about a image store file. +type FileInfo struct { + // FileSize - The size of file in bytes. + FileSize *string `json:"FileSize,omitempty"` + // FileVersion - Information about the version of image store file. + FileVersion *FileVersion `json:"FileVersion,omitempty"` + // ModifiedDate - The date and time when the image store file was last modified. + ModifiedDate *date.Time `json:"ModifiedDate,omitempty"` + // StoreRelativePath - The file path relative to the image store root path. + StoreRelativePath *string `json:"StoreRelativePath,omitempty"` +} + +// FileShareBackupStorageDescription describes the parameters for file share storage used for storing or +// enumerating backups. +type FileShareBackupStorageDescription struct { + // Path - UNC path of the file share where to store or enumerate backups from. + Path *string `json:"Path,omitempty"` + // PrimaryUserName - Primary user name to access the file share. + PrimaryUserName *string `json:"PrimaryUserName,omitempty"` + // PrimaryPassword - Primary password to access the share location. + PrimaryPassword *string `json:"PrimaryPassword,omitempty"` + // SecondaryUserName - Secondary user name to access the file share. + SecondaryUserName *string `json:"SecondaryUserName,omitempty"` + // SecondaryPassword - Secondary password to access the share location + SecondaryPassword *string `json:"SecondaryPassword,omitempty"` + // FriendlyName - Friendly name for this backup storage. + FriendlyName *string `json:"FriendlyName,omitempty"` + // StorageKind - Possible values include: 'StorageKindBackupStorageDescription', 'StorageKindAzureBlobStore', 'StorageKindFileShare' + StorageKind StorageKind `json:"StorageKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for FileShareBackupStorageDescription. +func (fsbsd FileShareBackupStorageDescription) MarshalJSON() ([]byte, error) { + fsbsd.StorageKind = StorageKindFileShare + objectMap := make(map[string]interface{}) + if fsbsd.Path != nil { + objectMap["Path"] = fsbsd.Path + } + if fsbsd.PrimaryUserName != nil { + objectMap["PrimaryUserName"] = fsbsd.PrimaryUserName + } + if fsbsd.PrimaryPassword != nil { + objectMap["PrimaryPassword"] = fsbsd.PrimaryPassword + } + if fsbsd.SecondaryUserName != nil { + objectMap["SecondaryUserName"] = fsbsd.SecondaryUserName + } + if fsbsd.SecondaryPassword != nil { + objectMap["SecondaryPassword"] = fsbsd.SecondaryPassword + } + if fsbsd.FriendlyName != nil { + objectMap["FriendlyName"] = fsbsd.FriendlyName + } + if fsbsd.StorageKind != "" { + objectMap["StorageKind"] = fsbsd.StorageKind + } + return json.Marshal(objectMap) +} + +// AsAzureBlobBackupStorageDescription is the BasicBackupStorageDescription implementation for FileShareBackupStorageDescription. +func (fsbsd FileShareBackupStorageDescription) AsAzureBlobBackupStorageDescription() (*AzureBlobBackupStorageDescription, bool) { + return nil, false +} + +// AsFileShareBackupStorageDescription is the BasicBackupStorageDescription implementation for FileShareBackupStorageDescription. +func (fsbsd FileShareBackupStorageDescription) AsFileShareBackupStorageDescription() (*FileShareBackupStorageDescription, bool) { + return &fsbsd, true +} + +// AsBackupStorageDescription is the BasicBackupStorageDescription implementation for FileShareBackupStorageDescription. +func (fsbsd FileShareBackupStorageDescription) AsBackupStorageDescription() (*BackupStorageDescription, bool) { + return nil, false +} + +// AsBasicBackupStorageDescription is the BasicBackupStorageDescription implementation for FileShareBackupStorageDescription. +func (fsbsd FileShareBackupStorageDescription) AsBasicBackupStorageDescription() (BasicBackupStorageDescription, bool) { + return &fsbsd, true +} + +// FileVersion information about the version of image store file. +type FileVersion struct { + // VersionNumber - The current image store version number for the file is used in image store for checking whether it need to be updated. + VersionNumber *string `json:"VersionNumber,omitempty"` + // EpochDataLossNumber - The epoch data loss number of image store replica when this file entry was updated or created. + EpochDataLossNumber *string `json:"EpochDataLossNumber,omitempty"` + // EpochConfigurationNumber - The epoch configuration version number of the image store replica when this file entry was created or updated. + EpochConfigurationNumber *string `json:"EpochConfigurationNumber,omitempty"` +} + +// FolderInfo information about a image store folder. It includes how many files this folder contains and +// its image store relative path. +type FolderInfo struct { + // StoreRelativePath - The remote location within image store. This path is relative to the image store root. + StoreRelativePath *string `json:"StoreRelativePath,omitempty"` + // FileCount - The number of files from within the image store folder. + FileCount *string `json:"FileCount,omitempty"` +} + +// FolderSizeInfo information of a image store folder size +type FolderSizeInfo struct { + autorest.Response `json:"-"` + // StoreRelativePath - The remote location within image store. This path is relative to the image store root. + StoreRelativePath *string `json:"StoreRelativePath,omitempty"` + // FolderSize - The size of folder in bytes. + FolderSize *string `json:"FolderSize,omitempty"` +} + +// FrequencyBasedBackupScheduleDescription describes the frequency based backup schedule. +type FrequencyBasedBackupScheduleDescription struct { + // Interval - Defines the interval with which backups are periodically taken. It should be specified in ISO8601 format. Timespan in seconds is not supported and will be ignored while creating the policy. + Interval *string `json:"Interval,omitempty"` + // ScheduleKind - Possible values include: 'ScheduleKindBackupScheduleDescription', 'ScheduleKindFrequencyBased', 'ScheduleKindTimeBased' + ScheduleKind ScheduleKind `json:"ScheduleKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for FrequencyBasedBackupScheduleDescription. +func (fbbsd FrequencyBasedBackupScheduleDescription) MarshalJSON() ([]byte, error) { + fbbsd.ScheduleKind = ScheduleKindFrequencyBased + objectMap := make(map[string]interface{}) + if fbbsd.Interval != nil { + objectMap["Interval"] = fbbsd.Interval + } + if fbbsd.ScheduleKind != "" { + objectMap["ScheduleKind"] = fbbsd.ScheduleKind + } + return json.Marshal(objectMap) +} + +// AsFrequencyBasedBackupScheduleDescription is the BasicBackupScheduleDescription implementation for FrequencyBasedBackupScheduleDescription. +func (fbbsd FrequencyBasedBackupScheduleDescription) AsFrequencyBasedBackupScheduleDescription() (*FrequencyBasedBackupScheduleDescription, bool) { + return &fbbsd, true +} + +// AsTimeBasedBackupScheduleDescription is the BasicBackupScheduleDescription implementation for FrequencyBasedBackupScheduleDescription. +func (fbbsd FrequencyBasedBackupScheduleDescription) AsTimeBasedBackupScheduleDescription() (*TimeBasedBackupScheduleDescription, bool) { + return nil, false +} + +// AsBackupScheduleDescription is the BasicBackupScheduleDescription implementation for FrequencyBasedBackupScheduleDescription. +func (fbbsd FrequencyBasedBackupScheduleDescription) AsBackupScheduleDescription() (*BackupScheduleDescription, bool) { + return nil, false +} + +// AsBasicBackupScheduleDescription is the BasicBackupScheduleDescription implementation for FrequencyBasedBackupScheduleDescription. +func (fbbsd FrequencyBasedBackupScheduleDescription) AsBasicBackupScheduleDescription() (BasicBackupScheduleDescription, bool) { + return &fbbsd, true +} + +// GatewayDestination describes destination endpoint for routing traffic. +type GatewayDestination struct { + // ApplicationName - Name of the service fabric Mesh application. + ApplicationName *string `json:"applicationName,omitempty"` + // ServiceName - service that contains the endpoint. + ServiceName *string `json:"serviceName,omitempty"` + // EndpointName - name of the endpoint in the service. + EndpointName *string `json:"endpointName,omitempty"` +} + +// GatewayProperties describes properties of a gateway resource. +type GatewayProperties struct { + // Description - User readable description of the gateway. + Description *string `json:"description,omitempty"` + // SourceNetwork - Network the gateway should listen on for requests. + SourceNetwork *NetworkRef `json:"sourceNetwork,omitempty"` + // DestinationNetwork - Network that the Application is using. + DestinationNetwork *NetworkRef `json:"destinationNetwork,omitempty"` + // TCP - Configuration for tcp connectivity for this gateway. + TCP *[]TCPConfig `json:"tcp,omitempty"` + // HTTP - Configuration for http connectivity for this gateway. + HTTP *[]HTTPConfig `json:"http,omitempty"` + // Status - READ-ONLY; Status of the resource. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the gateway. + StatusDetails *string `json:"statusDetails,omitempty"` + // IPAddress - READ-ONLY; IP address of the gateway. This is populated in the response and is ignored for incoming requests. + IPAddress *string `json:"ipAddress,omitempty"` +} + +// GatewayResourceDescription this type describes a gateway resource. +type GatewayResourceDescription struct { + autorest.Response `json:"-"` + // Name - Name of the Gateway resource. + Name *string `json:"name,omitempty"` + // GatewayProperties - Describes properties of a gateway resource. + *GatewayProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for GatewayResourceDescription. +func (grd GatewayResourceDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if grd.Name != nil { + objectMap["name"] = grd.Name + } + if grd.GatewayProperties != nil { + objectMap["properties"] = grd.GatewayProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for GatewayResourceDescription struct. +func (grd *GatewayResourceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + grd.Name = &name + } + case "properties": + if v != nil { + var gatewayProperties GatewayProperties + err = json.Unmarshal(*v, &gatewayProperties) + if err != nil { + return err + } + grd.GatewayProperties = &gatewayProperties + } + } + } + + return nil +} + +// GetBackupByStorageQueryDescription describes additional filters to be applied, while listing backups, +// and backup storage details from where to fetch the backups. +type GetBackupByStorageQueryDescription struct { + // StartDateTimeFilter - Specifies the start date time in ISO8601 from which to enumerate backups. If not specified, backups are enumerated from the beginning. + StartDateTimeFilter *date.Time `json:"StartDateTimeFilter,omitempty"` + // EndDateTimeFilter - Specifies the end date time in ISO8601 till which to enumerate backups. If not specified, backups are enumerated till the end. + EndDateTimeFilter *date.Time `json:"EndDateTimeFilter,omitempty"` + // Latest - If specified as true, gets the most recent backup (within the specified time range) for every partition under the specified backup entity. + Latest *bool `json:"Latest,omitempty"` + // Storage - Describes the parameters for the backup storage from where to enumerate backups. This is optional and by default backups are enumerated from the backup storage where this backup entity is currently being backed up (as specified in backup policy). This parameter is useful to be able to enumerate backups from another cluster where you may intend to restore. + Storage BasicBackupStorageDescription `json:"Storage,omitempty"` + // BackupEntity - Indicates the entity for which to enumerate backups. + BackupEntity BasicBackupEntity `json:"BackupEntity,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for GetBackupByStorageQueryDescription struct. +func (gbbsqd *GetBackupByStorageQueryDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "StartDateTimeFilter": + if v != nil { + var startDateTimeFilter date.Time + err = json.Unmarshal(*v, &startDateTimeFilter) + if err != nil { + return err + } + gbbsqd.StartDateTimeFilter = &startDateTimeFilter + } + case "EndDateTimeFilter": + if v != nil { + var endDateTimeFilter date.Time + err = json.Unmarshal(*v, &endDateTimeFilter) + if err != nil { + return err + } + gbbsqd.EndDateTimeFilter = &endDateTimeFilter + } + case "Latest": + if v != nil { + var latest bool + err = json.Unmarshal(*v, &latest) + if err != nil { + return err + } + gbbsqd.Latest = &latest + } + case "Storage": + if v != nil { + storage, err := unmarshalBasicBackupStorageDescription(*v) + if err != nil { + return err + } + gbbsqd.Storage = storage + } + case "BackupEntity": + if v != nil { + backupEntity, err := unmarshalBasicBackupEntity(*v) + if err != nil { + return err + } + gbbsqd.BackupEntity = backupEntity + } + } + } + + return nil +} + +// GetPropertyBatchOperation represents a PropertyBatchOperation that gets the specified property if it +// exists. +// Note that if one PropertyBatchOperation in a PropertyBatch fails, +// the entire batch fails and cannot be committed in a transactional manner. +type GetPropertyBatchOperation struct { + // IncludeValue - Whether or not to return the property value with the metadata. + // True if values should be returned with the metadata; False to return only property metadata. + IncludeValue *bool `json:"IncludeValue,omitempty"` + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' + Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) MarshalJSON() ([]byte, error) { + gpbo.Kind = KindGet + objectMap := make(map[string]interface{}) + if gpbo.IncludeValue != nil { + objectMap["IncludeValue"] = gpbo.IncludeValue + } + if gpbo.PropertyName != nil { + objectMap["PropertyName"] = gpbo.PropertyName + } + if gpbo.Kind != "" { + objectMap["Kind"] = gpbo.Kind + } + return json.Marshal(objectMap) +} + +// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { + return nil, false +} + +// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { + return nil, false +} + +// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { + return &gpbo, true +} + +// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { + return nil, false +} + +// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { + return nil, false +} + +// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for GetPropertyBatchOperation. +func (gpbo GetPropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { + return &gpbo, true +} + +// GUIDPropertyValue describes a Service Fabric property value of type Guid. +type GUIDPropertyValue struct { + // Data - The data of the property value. + Data *uuid.UUID `json:"Data,omitempty"` + // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' + Kind KindBasicPropertyValue `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for GUIDPropertyValue. +func (gpv GUIDPropertyValue) MarshalJSON() ([]byte, error) { + gpv.Kind = KindGUID + objectMap := make(map[string]interface{}) + if gpv.Data != nil { + objectMap["Data"] = gpv.Data + } + if gpv.Kind != "" { + objectMap["Kind"] = gpv.Kind + } + return json.Marshal(objectMap) +} + +// AsBinaryPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. +func (gpv GUIDPropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { + return nil, false +} + +// AsInt64PropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. +func (gpv GUIDPropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { + return nil, false +} + +// AsDoublePropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. +func (gpv GUIDPropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { + return nil, false +} + +// AsStringPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. +func (gpv GUIDPropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { + return nil, false +} + +// AsGUIDPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. +func (gpv GUIDPropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { + return &gpv, true +} + +// AsPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. +func (gpv GUIDPropertyValue) AsPropertyValue() (*PropertyValue, bool) { + return nil, false +} + +// AsBasicPropertyValue is the BasicPropertyValue implementation for GUIDPropertyValue. +func (gpv GUIDPropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { + return &gpv, true +} + +// BasicHealthEvaluation represents a health evaluation which describes the data and the algorithm used by health +// manager to evaluate the health of an entity. +type BasicHealthEvaluation interface { + AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) + AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) + AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) + AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) + AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) + AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) + AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) + AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) + AsEventHealthEvaluation() (*EventHealthEvaluation, bool) + AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) + AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) + AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) + AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) + AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) + AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) + AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) + AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) + AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) + AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) + AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) + AsHealthEvaluation() (*HealthEvaluation, bool) +} + +// HealthEvaluation represents a health evaluation which describes the data and the algorithm used by health +// manager to evaluate the health of an entity. +type HealthEvaluation struct { + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +func unmarshalBasicHealthEvaluation(body []byte) (BasicHealthEvaluation, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindApplication): + var ahe ApplicationHealthEvaluation + err := json.Unmarshal(body, &ahe) + return ahe, err + case string(KindApplications): + var ahe ApplicationsHealthEvaluation + err := json.Unmarshal(body, &ahe) + return ahe, err + case string(KindApplicationTypeApplications): + var atahe ApplicationTypeApplicationsHealthEvaluation + err := json.Unmarshal(body, &atahe) + return atahe, err + case string(KindDeltaNodesCheck): + var dnche DeltaNodesCheckHealthEvaluation + err := json.Unmarshal(body, &dnche) + return dnche, err + case string(KindDeployedApplication): + var dahe DeployedApplicationHealthEvaluation + err := json.Unmarshal(body, &dahe) + return dahe, err + case string(KindDeployedApplications): + var dahe DeployedApplicationsHealthEvaluation + err := json.Unmarshal(body, &dahe) + return dahe, err + case string(KindDeployedServicePackage): + var dsphe DeployedServicePackageHealthEvaluation + err := json.Unmarshal(body, &dsphe) + return dsphe, err + case string(KindDeployedServicePackages): + var dsphe DeployedServicePackagesHealthEvaluation + err := json.Unmarshal(body, &dsphe) + return dsphe, err + case string(KindEvent): + var ehe EventHealthEvaluation + err := json.Unmarshal(body, &ehe) + return ehe, err + case string(KindNode): + var nhe NodeHealthEvaluation + err := json.Unmarshal(body, &nhe) + return nhe, err + case string(KindNodes): + var nhe NodesHealthEvaluation + err := json.Unmarshal(body, &nhe) + return nhe, err + case string(KindPartition): + var phe PartitionHealthEvaluation + err := json.Unmarshal(body, &phe) + return phe, err + case string(KindPartitions): + var phe PartitionsHealthEvaluation + err := json.Unmarshal(body, &phe) + return phe, err + case string(KindReplica): + var rhe ReplicaHealthEvaluation + err := json.Unmarshal(body, &rhe) + return rhe, err + case string(KindReplicas): + var rhe ReplicasHealthEvaluation + err := json.Unmarshal(body, &rhe) + return rhe, err + case string(KindService): + var she ServiceHealthEvaluation + err := json.Unmarshal(body, &she) + return she, err + case string(KindServices): + var she ServicesHealthEvaluation + err := json.Unmarshal(body, &she) + return she, err + case string(KindSystemApplication): + var sahe SystemApplicationHealthEvaluation + err := json.Unmarshal(body, &sahe) + return sahe, err + case string(KindUpgradeDomainDeltaNodesCheck): + var uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation + err := json.Unmarshal(body, &uddnche) + return uddnche, err + case string(KindUpgradeDomainNodes): + var udnhe UpgradeDomainNodesHealthEvaluation + err := json.Unmarshal(body, &udnhe) + return udnhe, err + default: + var he HealthEvaluation + err := json.Unmarshal(body, &he) + return he, err + } +} +func unmarshalBasicHealthEvaluationArray(body []byte) ([]BasicHealthEvaluation, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + heArray := make([]BasicHealthEvaluation, len(rawMessages)) + + for index, rawMessage := range rawMessages { + he, err := unmarshalBasicHealthEvaluation(*rawMessage) + if err != nil { + return nil, err + } + heArray[index] = he + } + return heArray, nil +} + +// MarshalJSON is the custom marshaler for HealthEvaluation. +func (he HealthEvaluation) MarshalJSON() ([]byte, error) { + he.Kind = KindHealthEvaluation + objectMap := make(map[string]interface{}) + if he.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = he.AggregatedHealthState + } + if he.Description != nil { + objectMap["Description"] = he.Description + } + if he.Kind != "" { + objectMap["Kind"] = he.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return &he, true +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for HealthEvaluation. +func (he HealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &he, true +} + +// HealthEvaluationWrapper wrapper object for health evaluation. +type HealthEvaluationWrapper struct { + // HealthEvaluation - Represents a health evaluation which describes the data and the algorithm used by health manager to evaluate the health of an entity. + HealthEvaluation BasicHealthEvaluation `json:"HealthEvaluation,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for HealthEvaluationWrapper struct. +func (hew *HealthEvaluationWrapper) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "HealthEvaluation": + if v != nil { + healthEvaluation, err := unmarshalBasicHealthEvaluation(*v) + if err != nil { + return err + } + hew.HealthEvaluation = healthEvaluation + } + } + } + + return nil +} + +// HealthEvent represents health information reported on a health entity, such as cluster, application or +// node, with additional metadata added by the Health Manager. +type HealthEvent struct { + // IsExpired - Returns true if the health event is expired, otherwise false. + IsExpired *bool `json:"IsExpired,omitempty"` + // SourceUtcTimestamp - The date and time when the health report was sent by the source. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // LastModifiedUtcTimestamp - The date and time when the health report was last modified by the health store. + LastModifiedUtcTimestamp *date.Time `json:"LastModifiedUtcTimestamp,omitempty"` + // LastOkTransitionAt - If the current health state is 'Ok', this property returns the time at which the health report was first reported with 'Ok'. + // For periodic reporting, many reports with the same state may have been generated. + // This property returns the date and time when the first 'Ok' health report was received. + // If the current health state is 'Error' or 'Warning', returns the date and time at which the health state was last in 'Ok', before transitioning to a different state. + // If the health state was never 'Ok', the value will be zero date-time. + LastOkTransitionAt *date.Time `json:"LastOkTransitionAt,omitempty"` + // LastWarningTransitionAt - If the current health state is 'Warning', this property returns the time at which the health report was first reported with 'Warning'. For periodic reporting, many reports with the same state may have been generated however, this property returns only the date and time at the first 'Warning' health report was received. + // If the current health state is 'Ok' or 'Error', returns the date and time at which the health state was last in 'Warning', before transitioning to a different state. + // If the health state was never 'Warning', the value will be zero date-time. + LastWarningTransitionAt *date.Time `json:"LastWarningTransitionAt,omitempty"` + // LastErrorTransitionAt - If the current health state is 'Error', this property returns the time at which the health report was first reported with 'Error'. For periodic reporting, many reports with the same state may have been generated however, this property returns only the date and time at the first 'Error' health report was received. + // If the current health state is 'Ok' or 'Warning', returns the date and time at which the health state was last in 'Error', before transitioning to a different state. + // If the health state was never 'Error', the value will be zero date-time. + LastErrorTransitionAt *date.Time `json:"LastErrorTransitionAt,omitempty"` + // SourceID - The source name that identifies the client/watchdog/system component that generated the health information. + SourceID *string `json:"SourceId,omitempty"` + // Property - The property of the health information. An entity can have health reports for different properties. + // The property is a string and not a fixed enumeration to allow the reporter flexibility to categorize the state condition that triggers the report. + // For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available disk on a node, + // so it can report "AvailableDisk" property on that node. + // The same reporter can monitor the node connectivity, so it can report a property "Connectivity" on the same node. + // In the health store, these reports are treated as separate health events for the specified node. + // Together with the SourceId, the property uniquely identifies the health information. + Property *string `json:"Property,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // TimeToLiveInMilliSeconds - The duration for which this health report is valid. This field uses ISO8601 format for specifying the duration. + // When clients report periodically, they should send reports with higher frequency than time to live. + // If clients report on transition, they can set the time to live to infinite. + // When time to live expires, the health event that contains the health information + // is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired false. + // If not specified, time to live defaults to infinite value. + TimeToLiveInMilliSeconds *string `json:"TimeToLiveInMilliSeconds,omitempty"` + // Description - The description of the health information. It represents free text used to add human readable information about the report. + // The maximum string length for the description is 4096 characters. + // If the provided string is longer, it will be automatically truncated. + // When truncated, the last characters of the description contain a marker "[Truncated]", and total string size is 4096 characters. + // The presence of the marker indicates to users that truncation occurred. + // Note that when truncated, the description has less than 4096 characters from the original string. + Description *string `json:"Description,omitempty"` + // SequenceNumber - The sequence number for this health report as a numeric string. + // The report sequence number is used by the health store to detect stale reports. + // If not specified, a sequence number is auto-generated by the health client when a report is added. + SequenceNumber *string `json:"SequenceNumber,omitempty"` + // RemoveWhenExpired - Value that indicates whether the report is removed from health store when it expires. + // If set to true, the report is removed from the health store after it expires. + // If set to false, the report is treated as an error when expired. The value of this property is false by default. + // When clients report periodically, they should set RemoveWhenExpired false (default). + // This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated at error when the health report expires. + // This flags the entity as being in Error health state. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // HealthReportID - A health report ID which identifies the health report and can be used to find more detailed information about a specific health event at + // aka.ms/sfhealthid + HealthReportID *string `json:"HealthReportId,omitempty"` +} + +// HealthInformation represents common health report information. It is included in all health reports sent +// to health store and in all health events returned by health queries. +type HealthInformation struct { + // SourceID - The source name that identifies the client/watchdog/system component that generated the health information. + SourceID *string `json:"SourceId,omitempty"` + // Property - The property of the health information. An entity can have health reports for different properties. + // The property is a string and not a fixed enumeration to allow the reporter flexibility to categorize the state condition that triggers the report. + // For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available disk on a node, + // so it can report "AvailableDisk" property on that node. + // The same reporter can monitor the node connectivity, so it can report a property "Connectivity" on the same node. + // In the health store, these reports are treated as separate health events for the specified node. + // Together with the SourceId, the property uniquely identifies the health information. + Property *string `json:"Property,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // TimeToLiveInMilliSeconds - The duration for which this health report is valid. This field uses ISO8601 format for specifying the duration. + // When clients report periodically, they should send reports with higher frequency than time to live. + // If clients report on transition, they can set the time to live to infinite. + // When time to live expires, the health event that contains the health information + // is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired false. + // If not specified, time to live defaults to infinite value. + TimeToLiveInMilliSeconds *string `json:"TimeToLiveInMilliSeconds,omitempty"` + // Description - The description of the health information. It represents free text used to add human readable information about the report. + // The maximum string length for the description is 4096 characters. + // If the provided string is longer, it will be automatically truncated. + // When truncated, the last characters of the description contain a marker "[Truncated]", and total string size is 4096 characters. + // The presence of the marker indicates to users that truncation occurred. + // Note that when truncated, the description has less than 4096 characters from the original string. + Description *string `json:"Description,omitempty"` + // SequenceNumber - The sequence number for this health report as a numeric string. + // The report sequence number is used by the health store to detect stale reports. + // If not specified, a sequence number is auto-generated by the health client when a report is added. + SequenceNumber *string `json:"SequenceNumber,omitempty"` + // RemoveWhenExpired - Value that indicates whether the report is removed from health store when it expires. + // If set to true, the report is removed from the health store after it expires. + // If set to false, the report is treated as an error when expired. The value of this property is false by default. + // When clients report periodically, they should set RemoveWhenExpired false (default). + // This way, if the reporter has issues (e.g. deadlock) and can't report, the entity is evaluated at error when the health report expires. + // This flags the entity as being in Error health state. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // HealthReportID - A health report ID which identifies the health report and can be used to find more detailed information about a specific health event at + // aka.ms/sfhealthid + HealthReportID *string `json:"HealthReportId,omitempty"` +} + +// HealthStateCount represents information about how many health entities are in Ok, Warning and Error +// health state. +type HealthStateCount struct { + // OkCount - The number of health entities with aggregated health state Ok. + OkCount *int64 `json:"OkCount,omitempty"` + // WarningCount - The number of health entities with aggregated health state Warning. + WarningCount *int64 `json:"WarningCount,omitempty"` + // ErrorCount - The number of health entities with aggregated health state Error. + ErrorCount *int64 `json:"ErrorCount,omitempty"` +} + +// HealthStatistics the health statistics of an entity, returned as part of the health query result when +// the query description is configured to include statistics. +// The statistics include health state counts for all children types of the current entity. +// For example, for cluster, the health statistics include health state counts for nodes, applications, +// services, partitions, replicas, deployed applications and deployed service packages. +// For partition, the health statistics include health counts for replicas. +type HealthStatistics struct { + // HealthStateCountList - List of health state counts per entity kind, which keeps track of how many children of the queried entity are in Ok, Warning and Error state. + HealthStateCountList *[]EntityKindHealthStateCount `json:"HealthStateCountList,omitempty"` +} + +// HTTPConfig describes the http configuration for external connectivity for this network. +type HTTPConfig struct { + // Name - http gateway config name. + Name *string `json:"name,omitempty"` + // Port - Specifies the port at which the service endpoint below needs to be exposed. + Port *int32 `json:"port,omitempty"` + // Hosts - description for routing. + Hosts *[]HTTPHostConfig `json:"hosts,omitempty"` +} + +// HTTPHostConfig describes the hostname properties for http routing. +type HTTPHostConfig struct { + // Name - http hostname config name. + Name *string `json:"name,omitempty"` + // Routes - Route information to use for routing. Routes are processed in the order they are specified. Specify routes that are more specific before routes that can handle general cases. + Routes *[]HTTPRouteConfig `json:"routes,omitempty"` +} + +// HTTPRouteConfig describes the hostname properties for http routing. +type HTTPRouteConfig struct { + // Name - http route name. + Name *string `json:"name,omitempty"` + // Match - Describes a rule for http route matching. + Match *HTTPRouteMatchRule `json:"match,omitempty"` + // Destination - Describes destination endpoint for routing traffic. + Destination *GatewayDestination `json:"destination,omitempty"` +} + +// HTTPRouteMatchHeader describes header information for http route matching. +type HTTPRouteMatchHeader struct { + // Name - Name of header to match in request. + Name *string `json:"name,omitempty"` + // Value - Value of header to match in request. + Value *string `json:"value,omitempty"` + // Type - how to match header value. Possible values include: 'Exact' + Type HeaderMatchType `json:"type,omitempty"` +} + +// HTTPRouteMatchPath path to match for routing. +type HTTPRouteMatchPath struct { + // Value - Uri path to match for request. + Value *string `json:"value,omitempty"` + // Rewrite - replacement string for matched part of the Uri. + Rewrite *string `json:"rewrite,omitempty"` + // Type - how to match value in the Uri + Type *string `json:"type,omitempty"` +} + +// HTTPRouteMatchRule describes a rule for http route matching. +type HTTPRouteMatchRule struct { + // Path - Path to match for routing. + Path *HTTPRouteMatchPath `json:"path,omitempty"` + // Headers - headers and their values to match in request. + Headers *[]HTTPRouteMatchHeader `json:"headers,omitempty"` +} + +// IdentityDescription information describing the identities associated with this application. +type IdentityDescription struct { + // TokenServiceEndpoint - the endpoint for the token service managing this identity + TokenServiceEndpoint *string `json:"tokenServiceEndpoint,omitempty"` + // Type - the types of identities associated with this resource; currently restricted to 'SystemAssigned and UserAssigned' + Type *string `json:"type,omitempty"` + // TenantID - the identifier of the tenant containing the application's identity. + TenantID *string `json:"tenantId,omitempty"` + // PrincipalID - the object identifier of the Service Principal of the identity associated with this resource. + PrincipalID *string `json:"principalId,omitempty"` + // UserAssignedIdentities - represents user assigned identities map. + UserAssignedIdentities map[string]*IdentityItemDescription `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for IdentityDescription. +func (ID IdentityDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ID.TokenServiceEndpoint != nil { + objectMap["tokenServiceEndpoint"] = ID.TokenServiceEndpoint + } + if ID.Type != nil { + objectMap["type"] = ID.Type + } + if ID.TenantID != nil { + objectMap["tenantId"] = ID.TenantID + } + if ID.PrincipalID != nil { + objectMap["principalId"] = ID.PrincipalID + } + if ID.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = ID.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// IdentityItemDescription describes a single user-assigned identity associated with the application. +type IdentityItemDescription struct { + // PrincipalID - the object identifier of the Service Principal which this identity represents. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - the client identifier of the Service Principal which this identity represents. + ClientID *string `json:"clientId,omitempty"` +} + +// ImageRegistryCredential image registry credential. +type ImageRegistryCredential struct { + // Server - Docker image registry server, without protocol such as `http` and `https`. + Server *string `json:"server,omitempty"` + // Username - The username for the private registry. + Username *string `json:"username,omitempty"` + // PasswordType - The type of the image registry password being given in password. Possible values include: 'ImageRegistryPasswordTypeClearText', 'ImageRegistryPasswordTypeKeyVaultReference', 'ImageRegistryPasswordTypeSecretValueReference' + PasswordType ImageRegistryPasswordType `json:"passwordType,omitempty"` + // Password - The password for the private registry. The password is required for create or update operations, however it is not returned in the get or list operations. Will be processed based on the type provided. + Password *string `json:"password,omitempty"` +} + +// ImageStoreContent information about the image store content. +type ImageStoreContent struct { + autorest.Response `json:"-"` + // StoreFiles - The list of image store file info objects represents files found under the given image store relative path. + StoreFiles *[]FileInfo `json:"StoreFiles,omitempty"` + // StoreFolders - The list of image store folder info objects represents subfolders found under the given image store relative path. + StoreFolders *[]FolderInfo `json:"StoreFolders,omitempty"` +} + +// ImageStoreCopyDescription information about how to copy image store content from one image store +// relative path to another image store relative path. +type ImageStoreCopyDescription struct { + // RemoteSource - The relative path of source image store content to be copied from. + RemoteSource *string `json:"RemoteSource,omitempty"` + // RemoteDestination - The relative path of destination image store content to be copied to. + RemoteDestination *string `json:"RemoteDestination,omitempty"` + // SkipFiles - The list of the file names to be skipped for copying. + SkipFiles *[]string `json:"SkipFiles,omitempty"` + // CheckMarkFile - Indicates whether to check mark file during copying. The property is true if checking mark file is required, false otherwise. The mark file is used to check whether the folder is well constructed. If the property is true and mark file does not exist, the copy is skipped. + CheckMarkFile *bool `json:"CheckMarkFile,omitempty"` +} + +// ImageStoreInfo information about the ImageStore's resource usage +type ImageStoreInfo struct { + autorest.Response `json:"-"` + // DiskInfo - disk capacity and available disk space on the node where the ImageStore primary is placed. + DiskInfo *DiskInfo `json:"DiskInfo,omitempty"` + // UsedByMetadata - the ImageStore's file system usage for metadata. + UsedByMetadata *UsageInfo `json:"UsedByMetadata,omitempty"` + // UsedByStaging - The ImageStore's file system usage for staging files that are being uploaded. + UsedByStaging *UsageInfo `json:"UsedByStaging,omitempty"` + // UsedByCopy - the ImageStore's file system usage for copied application and cluster packages. [Removing application and cluster packages](https://docs.microsoft.com/en-us/rest/api/servicefabric/sfclient-api-deleteimagestorecontent) will free up this space. + UsedByCopy *UsageInfo `json:"UsedByCopy,omitempty"` + // UsedByRegister - the ImageStore's file system usage for registered and cluster packages. [Unregistering application](https://docs.microsoft.com/en-us/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) and [cluster packages](https://docs.microsoft.com/en-us/rest/api/servicefabric/sfclient-api-unprovisionapplicationtype) will free up this space. + UsedByRegister *UsageInfo `json:"UsedByRegister,omitempty"` +} + +// InlinedValueSecretResourceProperties describes the properties of a secret resource whose value is +// provided explicitly as plaintext. The secret resource may have multiple values, each being uniquely +// versioned. The secret value of each version is stored encrypted, and delivered as plaintext into the +// context of applications referencing it. +type InlinedValueSecretResourceProperties struct { + // Description - User readable description of the secret. + Description *string `json:"description,omitempty"` + // Status - READ-ONLY; Status of the resource. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the secret. + StatusDetails *string `json:"statusDetails,omitempty"` + // ContentType - The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + ContentType *string `json:"contentType,omitempty"` + // Kind - Possible values include: 'KindSecretResourcePropertiesBase', 'KindSecretResourceProperties', 'KindInlinedValue' + Kind KindBasicSecretResourcePropertiesBase `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for InlinedValueSecretResourceProperties. +func (ivsrp InlinedValueSecretResourceProperties) MarshalJSON() ([]byte, error) { + ivsrp.Kind = KindInlinedValue + objectMap := make(map[string]interface{}) + if ivsrp.Description != nil { + objectMap["description"] = ivsrp.Description + } + if ivsrp.ContentType != nil { + objectMap["contentType"] = ivsrp.ContentType + } + if ivsrp.Kind != "" { + objectMap["kind"] = ivsrp.Kind + } + return json.Marshal(objectMap) +} + +// AsSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for InlinedValueSecretResourceProperties. +func (ivsrp InlinedValueSecretResourceProperties) AsSecretResourceProperties() (*SecretResourceProperties, bool) { + return nil, false +} + +// AsBasicSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for InlinedValueSecretResourceProperties. +func (ivsrp InlinedValueSecretResourceProperties) AsBasicSecretResourceProperties() (BasicSecretResourceProperties, bool) { + return &ivsrp, true +} + +// AsInlinedValueSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for InlinedValueSecretResourceProperties. +func (ivsrp InlinedValueSecretResourceProperties) AsInlinedValueSecretResourceProperties() (*InlinedValueSecretResourceProperties, bool) { + return &ivsrp, true +} + +// AsSecretResourcePropertiesBase is the BasicSecretResourcePropertiesBase implementation for InlinedValueSecretResourceProperties. +func (ivsrp InlinedValueSecretResourceProperties) AsSecretResourcePropertiesBase() (*SecretResourcePropertiesBase, bool) { + return nil, false +} + +// AsBasicSecretResourcePropertiesBase is the BasicSecretResourcePropertiesBase implementation for InlinedValueSecretResourceProperties. +func (ivsrp InlinedValueSecretResourceProperties) AsBasicSecretResourcePropertiesBase() (BasicSecretResourcePropertiesBase, bool) { + return &ivsrp, true +} + +// Int64PropertyValue describes a Service Fabric property value of type Int64. +type Int64PropertyValue struct { + // Data - The data of the property value. + Data *string `json:"Data,omitempty"` + // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' + Kind KindBasicPropertyValue `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for Int64PropertyValue. +func (i6pv Int64PropertyValue) MarshalJSON() ([]byte, error) { + i6pv.Kind = KindInt64 + objectMap := make(map[string]interface{}) + if i6pv.Data != nil { + objectMap["Data"] = i6pv.Data + } + if i6pv.Kind != "" { + objectMap["Kind"] = i6pv.Kind + } + return json.Marshal(objectMap) +} + +// AsBinaryPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. +func (i6pv Int64PropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { + return nil, false +} + +// AsInt64PropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. +func (i6pv Int64PropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { + return &i6pv, true +} + +// AsDoublePropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. +func (i6pv Int64PropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { + return nil, false +} + +// AsStringPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. +func (i6pv Int64PropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { + return nil, false +} + +// AsGUIDPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. +func (i6pv Int64PropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { + return nil, false +} + +// AsPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. +func (i6pv Int64PropertyValue) AsPropertyValue() (*PropertyValue, bool) { + return nil, false +} + +// AsBasicPropertyValue is the BasicPropertyValue implementation for Int64PropertyValue. +func (i6pv Int64PropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { + return &i6pv, true +} + +// Int64RangePartitionInformation describes the partition information for the integer range that is based +// on partition schemes. +type Int64RangePartitionInformation struct { + // LowKey - Specifies the minimum key value handled by this partition. + LowKey *string `json:"LowKey,omitempty"` + // HighKey - Specifies the maximum key value handled by this partition. + HighKey *string `json:"HighKey,omitempty"` + // ID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + ID *uuid.UUID `json:"Id,omitempty"` + // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range1', 'ServicePartitionKindNamed1', 'ServicePartitionKindSingleton1' + ServicePartitionKind ServicePartitionKindBasicPartitionInformation `json:"ServicePartitionKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for Int64RangePartitionInformation. +func (i6rpi Int64RangePartitionInformation) MarshalJSON() ([]byte, error) { + i6rpi.ServicePartitionKind = ServicePartitionKindInt64Range1 + objectMap := make(map[string]interface{}) + if i6rpi.LowKey != nil { + objectMap["LowKey"] = i6rpi.LowKey + } + if i6rpi.HighKey != nil { + objectMap["HighKey"] = i6rpi.HighKey + } + if i6rpi.ID != nil { + objectMap["Id"] = i6rpi.ID + } + if i6rpi.ServicePartitionKind != "" { + objectMap["ServicePartitionKind"] = i6rpi.ServicePartitionKind + } + return json.Marshal(objectMap) +} + +// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. +func (i6rpi Int64RangePartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { + return &i6rpi, true +} + +// AsNamedPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. +func (i6rpi Int64RangePartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { + return nil, false +} + +// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. +func (i6rpi Int64RangePartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { + return nil, false +} + +// AsPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. +func (i6rpi Int64RangePartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { + return nil, false +} + +// AsBasicPartitionInformation is the BasicPartitionInformation implementation for Int64RangePartitionInformation. +func (i6rpi Int64RangePartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { + return &i6rpi, true +} + +// InvokeDataLossResult represents information about an operation in a terminal state (Completed or +// Faulted). +type InvokeDataLossResult struct { + // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // SelectedPartition - This class returns information about the partition that the user-induced operation acted upon. + SelectedPartition *SelectedPartition `json:"SelectedPartition,omitempty"` +} + +// InvokeQuorumLossResult represents information about an operation in a terminal state (Completed or +// Faulted). +type InvokeQuorumLossResult struct { + // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // SelectedPartition - This class returns information about the partition that the user-induced operation acted upon. + SelectedPartition *SelectedPartition `json:"SelectedPartition,omitempty"` +} + +// KeyValueStoreReplicaStatus key value store related information for the replica. +type KeyValueStoreReplicaStatus struct { + // DatabaseRowCountEstimate - Value indicating the estimated number of rows in the underlying database. + DatabaseRowCountEstimate *string `json:"DatabaseRowCountEstimate,omitempty"` + // DatabaseLogicalSizeEstimate - Value indicating the estimated size of the underlying database. + DatabaseLogicalSizeEstimate *string `json:"DatabaseLogicalSizeEstimate,omitempty"` + // CopyNotificationCurrentKeyFilter - Value indicating the latest key-prefix filter applied to enumeration during the callback. Null if there is no pending callback. + CopyNotificationCurrentKeyFilter *string `json:"CopyNotificationCurrentKeyFilter,omitempty"` + // CopyNotificationCurrentProgress - Value indicating the latest number of keys enumerated during the callback. 0 if there is no pending callback. + CopyNotificationCurrentProgress *string `json:"CopyNotificationCurrentProgress,omitempty"` + // StatusDetails - Value indicating the current status details of the replica. + StatusDetails *string `json:"StatusDetails,omitempty"` + // Kind - Possible values include: 'KindReplicaStatusBase', 'KindKeyValueStore' + Kind KindBasicReplicaStatusBase `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for KeyValueStoreReplicaStatus. +func (kvsrs KeyValueStoreReplicaStatus) MarshalJSON() ([]byte, error) { + kvsrs.Kind = KindKeyValueStore + objectMap := make(map[string]interface{}) + if kvsrs.DatabaseRowCountEstimate != nil { + objectMap["DatabaseRowCountEstimate"] = kvsrs.DatabaseRowCountEstimate + } + if kvsrs.DatabaseLogicalSizeEstimate != nil { + objectMap["DatabaseLogicalSizeEstimate"] = kvsrs.DatabaseLogicalSizeEstimate + } + if kvsrs.CopyNotificationCurrentKeyFilter != nil { + objectMap["CopyNotificationCurrentKeyFilter"] = kvsrs.CopyNotificationCurrentKeyFilter + } + if kvsrs.CopyNotificationCurrentProgress != nil { + objectMap["CopyNotificationCurrentProgress"] = kvsrs.CopyNotificationCurrentProgress + } + if kvsrs.StatusDetails != nil { + objectMap["StatusDetails"] = kvsrs.StatusDetails + } + if kvsrs.Kind != "" { + objectMap["Kind"] = kvsrs.Kind + } + return json.Marshal(objectMap) +} + +// AsKeyValueStoreReplicaStatus is the BasicReplicaStatusBase implementation for KeyValueStoreReplicaStatus. +func (kvsrs KeyValueStoreReplicaStatus) AsKeyValueStoreReplicaStatus() (*KeyValueStoreReplicaStatus, bool) { + return &kvsrs, true +} + +// AsReplicaStatusBase is the BasicReplicaStatusBase implementation for KeyValueStoreReplicaStatus. +func (kvsrs KeyValueStoreReplicaStatus) AsReplicaStatusBase() (*ReplicaStatusBase, bool) { + return nil, false +} + +// AsBasicReplicaStatusBase is the BasicReplicaStatusBase implementation for KeyValueStoreReplicaStatus. +func (kvsrs KeyValueStoreReplicaStatus) AsBasicReplicaStatusBase() (BasicReplicaStatusBase, bool) { + return &kvsrs, true +} + +// ListApplicationEvent ... +type ListApplicationEvent struct { + autorest.Response `json:"-"` + Value *[]BasicApplicationEvent `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListApplicationEvent struct. +func (lae *ListApplicationEvent) UnmarshalJSON(body []byte) error { + ae, err := unmarshalBasicApplicationEventArray(body) + if err != nil { + return err + } + lae.Value = &ae + + return nil +} + +// ListClusterEvent ... +type ListClusterEvent struct { + autorest.Response `json:"-"` + Value *[]BasicClusterEvent `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListClusterEvent struct. +func (lce *ListClusterEvent) UnmarshalJSON(body []byte) error { + ce, err := unmarshalBasicClusterEventArray(body) + if err != nil { + return err + } + lce.Value = &ce + + return nil +} + +// ListConfigParameterOverride ... +type ListConfigParameterOverride struct { + autorest.Response `json:"-"` + Value *[]ConfigParameterOverride `json:"value,omitempty"` +} + +// ListContainerInstanceEvent ... +type ListContainerInstanceEvent struct { + autorest.Response `json:"-"` + Value *[]ContainerInstanceEvent `json:"value,omitempty"` +} + +// ListDeployedCodePackageInfo ... +type ListDeployedCodePackageInfo struct { + autorest.Response `json:"-"` + Value *[]DeployedCodePackageInfo `json:"value,omitempty"` +} + +// ListDeployedServicePackageInfo ... +type ListDeployedServicePackageInfo struct { + autorest.Response `json:"-"` + Value *[]DeployedServicePackageInfo `json:"value,omitempty"` +} + +// ListDeployedServiceReplicaInfo ... +type ListDeployedServiceReplicaInfo struct { + autorest.Response `json:"-"` + Value *[]BasicDeployedServiceReplicaInfo `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListDeployedServiceReplicaInfo struct. +func (ldsri *ListDeployedServiceReplicaInfo) UnmarshalJSON(body []byte) error { + dsri, err := unmarshalBasicDeployedServiceReplicaInfoArray(body) + if err != nil { + return err + } + ldsri.Value = &dsri + + return nil +} + +// ListDeployedServiceTypeInfo ... +type ListDeployedServiceTypeInfo struct { + autorest.Response `json:"-"` + Value *[]DeployedServiceTypeInfo `json:"value,omitempty"` +} + +// ListFabricCodeVersionInfo ... +type ListFabricCodeVersionInfo struct { + autorest.Response `json:"-"` + Value *[]FabricCodeVersionInfo `json:"value,omitempty"` +} + +// ListFabricConfigVersionInfo ... +type ListFabricConfigVersionInfo struct { + autorest.Response `json:"-"` + Value *[]FabricConfigVersionInfo `json:"value,omitempty"` +} + +// ListFabricEvent ... +type ListFabricEvent struct { + autorest.Response `json:"-"` + Value *[]BasicFabricEvent `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListFabricEvent struct. +func (lfe *ListFabricEvent) UnmarshalJSON(body []byte) error { + fe, err := unmarshalBasicFabricEventArray(body) + if err != nil { + return err + } + lfe.Value = &fe + + return nil +} + +// ListNodeEvent ... +type ListNodeEvent struct { + autorest.Response `json:"-"` + Value *[]BasicNodeEvent `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListNodeEvent struct. +func (lne *ListNodeEvent) UnmarshalJSON(body []byte) error { + ne, err := unmarshalBasicNodeEventArray(body) + if err != nil { + return err + } + lne.Value = &ne + + return nil +} + +// ListOperationStatus ... +type ListOperationStatus struct { + autorest.Response `json:"-"` + Value *[]OperationStatus `json:"value,omitempty"` +} + +// ListPartitionEvent ... +type ListPartitionEvent struct { + autorest.Response `json:"-"` + Value *[]BasicPartitionEvent `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListPartitionEvent struct. +func (lpe *ListPartitionEvent) UnmarshalJSON(body []byte) error { + peVar, err := unmarshalBasicPartitionEventArray(body) + if err != nil { + return err + } + lpe.Value = &peVar + + return nil +} + +// ListRepairTask ... +type ListRepairTask struct { + autorest.Response `json:"-"` + Value *[]RepairTask `json:"value,omitempty"` +} + +// ListReplicaEvent ... +type ListReplicaEvent struct { + autorest.Response `json:"-"` + Value *[]BasicReplicaEvent `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListReplicaEvent struct. +func (lre *ListReplicaEvent) UnmarshalJSON(body []byte) error { + re, err := unmarshalBasicReplicaEventArray(body) + if err != nil { + return err + } + lre.Value = &re + + return nil +} + +// ListServiceEvent ... +type ListServiceEvent struct { + autorest.Response `json:"-"` + Value *[]BasicServiceEvent `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ListServiceEvent struct. +func (lse *ListServiceEvent) UnmarshalJSON(body []byte) error { + se, err := unmarshalBasicServiceEventArray(body) + if err != nil { + return err + } + lse.Value = &se + + return nil +} + +// ListServiceTypeInfo ... +type ListServiceTypeInfo struct { + autorest.Response `json:"-"` + Value *[]ServiceTypeInfo `json:"value,omitempty"` +} + +// LoadMetricInformation represents data structure that contains load information for a certain metric in a +// cluster. +type LoadMetricInformation struct { + // Name - Name of the metric for which this load information is provided. + Name *string `json:"Name,omitempty"` + // IsBalancedBefore - Value that indicates whether the metrics is balanced or not before resource balancer run + IsBalancedBefore *bool `json:"IsBalancedBefore,omitempty"` + // IsBalancedAfter - Value that indicates whether the metrics is balanced or not after resource balancer run. + IsBalancedAfter *bool `json:"IsBalancedAfter,omitempty"` + // DeviationBefore - The standard average deviation of the metrics before resource balancer run. + DeviationBefore *string `json:"DeviationBefore,omitempty"` + // DeviationAfter - The standard average deviation of the metrics after resource balancer run. + DeviationAfter *string `json:"DeviationAfter,omitempty"` + // BalancingThreshold - The balancing threshold for a certain metric. + BalancingThreshold *string `json:"BalancingThreshold,omitempty"` + // Action - The current action being taken with regard to this metric + Action *string `json:"Action,omitempty"` + // ActivityThreshold - The Activity Threshold specified for this metric in the system Cluster Manifest. + ActivityThreshold *string `json:"ActivityThreshold,omitempty"` + // ClusterCapacity - The total cluster capacity for a given metric + ClusterCapacity *string `json:"ClusterCapacity,omitempty"` + // ClusterLoad - The total cluster load. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentClusterLoad. + ClusterLoad *string `json:"ClusterLoad,omitempty"` + // CurrentClusterLoad - The total cluster load. + CurrentClusterLoad *string `json:"CurrentClusterLoad,omitempty"` + // ClusterRemainingCapacity - The remaining capacity for the metric in the cluster. In future releases of Service Fabric this parameter will be deprecated in favor of ClusterCapacityRemaining. + ClusterRemainingCapacity *string `json:"ClusterRemainingCapacity,omitempty"` + // ClusterCapacityRemaining - The remaining capacity for the metric in the cluster. + ClusterCapacityRemaining *string `json:"ClusterCapacityRemaining,omitempty"` + // IsClusterCapacityViolation - Indicates that the metric is currently over capacity in the cluster. + IsClusterCapacityViolation *bool `json:"IsClusterCapacityViolation,omitempty"` + // NodeBufferPercentage - The reserved percentage of total node capacity for this metric. + NodeBufferPercentage *string `json:"NodeBufferPercentage,omitempty"` + // ClusterBufferedCapacity - Remaining capacity in the cluster excluding the reserved space. In future releases of Service Fabric this parameter will be deprecated in favor of BufferedClusterCapacityRemaining. + ClusterBufferedCapacity *string `json:"ClusterBufferedCapacity,omitempty"` + // BufferedClusterCapacityRemaining - Remaining capacity in the cluster excluding the reserved space. + BufferedClusterCapacityRemaining *string `json:"BufferedClusterCapacityRemaining,omitempty"` + // ClusterRemainingBufferedCapacity - The remaining percentage of cluster total capacity for this metric. + ClusterRemainingBufferedCapacity *string `json:"ClusterRemainingBufferedCapacity,omitempty"` + // MinNodeLoadValue - The minimum load on any node for this metric. In future releases of Service Fabric this parameter will be deprecated in favor of MinimumNodeLoad. + MinNodeLoadValue *string `json:"MinNodeLoadValue,omitempty"` + // MinimumNodeLoad - The minimum load on any node for this metric. + MinimumNodeLoad *string `json:"MinimumNodeLoad,omitempty"` + // MinNodeLoadNodeID - The node id of the node with the minimum load for this metric. + MinNodeLoadNodeID *NodeID `json:"MinNodeLoadNodeId,omitempty"` + // MaxNodeLoadValue - The maximum load on any node for this metric. In future releases of Service Fabric this parameter will be deprecated in favor of MaximumNodeLoad. + MaxNodeLoadValue *string `json:"MaxNodeLoadValue,omitempty"` + // MaximumNodeLoad - The maximum load on any node for this metric. + MaximumNodeLoad *string `json:"MaximumNodeLoad,omitempty"` + // MaxNodeLoadNodeID - The node id of the node with the maximum load for this metric. + MaxNodeLoadNodeID *NodeID `json:"MaxNodeLoadNodeId,omitempty"` + // PlannedLoadRemoval - This value represents the load of the replicas that are planned to be removed in the future within the cluster. + // This kind of load is reported for replicas that are currently being moving to other nodes and for replicas that are currently being dropped but still use the load on the source node. + PlannedLoadRemoval *string `json:"PlannedLoadRemoval,omitempty"` +} + +// LoadMetricReport represents the load metric report which contains the time metric was reported, its name +// and value. +type LoadMetricReport struct { + // LastReportedUtc - Gets the UTC time when the load was reported. + LastReportedUtc *date.Time `json:"LastReportedUtc,omitempty"` + // Name - The name of the load metric. + Name *string `json:"Name,omitempty"` + // Value - The value of the load metric. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentValue. + Value *string `json:"Value,omitempty"` + // CurrentValue - The value of the load metric. + CurrentValue *string `json:"CurrentValue,omitempty"` +} + +// LoadMetricReportInfo information about load reported by replica. +type LoadMetricReportInfo struct { + // Name - The name of the metric. + Name *string `json:"Name,omitempty"` + // Value - The value of the load for the metric. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentValue. + Value *int32 `json:"Value,omitempty"` + // CurrentValue - The double value of the load for the metric. + CurrentValue *string `json:"CurrentValue,omitempty"` + // LastReportedUtc - The UTC time when the load is reported. + LastReportedUtc *date.Time `json:"LastReportedUtc,omitempty"` +} + +// LocalNetworkResourceProperties information about a Service Fabric container network local to a single +// Service Fabric cluster. +type LocalNetworkResourceProperties struct { + // NetworkAddressPrefix - Address space for the local container network. + NetworkAddressPrefix *string `json:"networkAddressPrefix,omitempty"` + // Description - User readable description of the network. + Description *string `json:"description,omitempty"` + // Status - READ-ONLY; Status of the network. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the network. + StatusDetails *string `json:"statusDetails,omitempty"` + // Kind - Possible values include: 'KindNetworkResourcePropertiesBase', 'KindNetworkResourceProperties', 'KindLocal' + Kind KindBasicNetworkResourcePropertiesBase `json:"kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocalNetworkResourceProperties. +func (lnrp LocalNetworkResourceProperties) MarshalJSON() ([]byte, error) { + lnrp.Kind = KindLocal + objectMap := make(map[string]interface{}) + if lnrp.NetworkAddressPrefix != nil { + objectMap["networkAddressPrefix"] = lnrp.NetworkAddressPrefix + } + if lnrp.Description != nil { + objectMap["description"] = lnrp.Description + } + if lnrp.Kind != "" { + objectMap["kind"] = lnrp.Kind + } + return json.Marshal(objectMap) +} + +// AsNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for LocalNetworkResourceProperties. +func (lnrp LocalNetworkResourceProperties) AsNetworkResourceProperties() (*NetworkResourceProperties, bool) { + return nil, false +} + +// AsBasicNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for LocalNetworkResourceProperties. +func (lnrp LocalNetworkResourceProperties) AsBasicNetworkResourceProperties() (BasicNetworkResourceProperties, bool) { + return &lnrp, true +} + +// AsLocalNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for LocalNetworkResourceProperties. +func (lnrp LocalNetworkResourceProperties) AsLocalNetworkResourceProperties() (*LocalNetworkResourceProperties, bool) { + return &lnrp, true +} + +// AsNetworkResourcePropertiesBase is the BasicNetworkResourcePropertiesBase implementation for LocalNetworkResourceProperties. +func (lnrp LocalNetworkResourceProperties) AsNetworkResourcePropertiesBase() (*NetworkResourcePropertiesBase, bool) { + return nil, false +} + +// AsBasicNetworkResourcePropertiesBase is the BasicNetworkResourcePropertiesBase implementation for LocalNetworkResourceProperties. +func (lnrp LocalNetworkResourceProperties) AsBasicNetworkResourcePropertiesBase() (BasicNetworkResourcePropertiesBase, bool) { + return &lnrp, true +} + +// ManagedApplicationIdentity describes a managed application identity. +type ManagedApplicationIdentity struct { + // Name - The name of the identity. + Name *string `json:"Name,omitempty"` + // PrincipalID - The identity's PrincipalId. + PrincipalID *string `json:"PrincipalId,omitempty"` +} + +// ManagedApplicationIdentityDescription managed application identity description. +type ManagedApplicationIdentityDescription struct { + // TokenServiceEndpoint - Token service endpoint. + TokenServiceEndpoint *string `json:"TokenServiceEndpoint,omitempty"` + // ManagedIdentities - A list of managed application identity objects. + ManagedIdentities *[]ManagedApplicationIdentity `json:"ManagedIdentities,omitempty"` +} + +// MonitoringPolicyDescription describes the parameters for monitoring an upgrade in Monitored mode. +type MonitoringPolicyDescription struct { + // FailureAction - The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. + // Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. + // Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible values include: 'FailureActionInvalid', 'FailureActionRollback', 'FailureActionManual' + FailureAction FailureAction `json:"FailureAction,omitempty"` + // HealthCheckWaitDurationInMilliseconds - The amount of time to wait after completing an upgrade domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + HealthCheckWaitDurationInMilliseconds *string `json:"HealthCheckWaitDurationInMilliseconds,omitempty"` + // HealthCheckStableDurationInMilliseconds - The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + HealthCheckStableDurationInMilliseconds *string `json:"HealthCheckStableDurationInMilliseconds,omitempty"` + // HealthCheckRetryTimeoutInMilliseconds - The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + HealthCheckRetryTimeoutInMilliseconds *string `json:"HealthCheckRetryTimeoutInMilliseconds,omitempty"` + // UpgradeTimeoutInMilliseconds - The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + UpgradeTimeoutInMilliseconds *string `json:"UpgradeTimeoutInMilliseconds,omitempty"` + // UpgradeDomainTimeoutInMilliseconds - The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + UpgradeDomainTimeoutInMilliseconds *string `json:"UpgradeDomainTimeoutInMilliseconds,omitempty"` +} + +// NameDescription describes a Service Fabric name. +type NameDescription struct { + // Name - The Service Fabric name, including the 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` +} + +// NamedPartitionInformation describes the partition information for the name as a string that is based on +// partition schemes. +type NamedPartitionInformation struct { + // Name - Name of the partition. + Name *string `json:"Name,omitempty"` + // ID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + ID *uuid.UUID `json:"Id,omitempty"` + // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range1', 'ServicePartitionKindNamed1', 'ServicePartitionKindSingleton1' + ServicePartitionKind ServicePartitionKindBasicPartitionInformation `json:"ServicePartitionKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NamedPartitionInformation. +func (npi NamedPartitionInformation) MarshalJSON() ([]byte, error) { + npi.ServicePartitionKind = ServicePartitionKindNamed1 + objectMap := make(map[string]interface{}) + if npi.Name != nil { + objectMap["Name"] = npi.Name + } + if npi.ID != nil { + objectMap["Id"] = npi.ID + } + if npi.ServicePartitionKind != "" { + objectMap["ServicePartitionKind"] = npi.ServicePartitionKind + } + return json.Marshal(objectMap) +} + +// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. +func (npi NamedPartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { + return nil, false +} + +// AsNamedPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. +func (npi NamedPartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { + return &npi, true +} + +// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. +func (npi NamedPartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { + return nil, false +} + +// AsPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. +func (npi NamedPartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { + return nil, false +} + +// AsBasicPartitionInformation is the BasicPartitionInformation implementation for NamedPartitionInformation. +func (npi NamedPartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { + return &npi, true +} + +// NamedPartitionSchemeDescription describes the named partition scheme of the service. +type NamedPartitionSchemeDescription struct { + // Count - The number of partitions. + Count *int32 `json:"Count,omitempty"` + // Names - Array of size specified by the ‘Count’ parameter, for the names of the partitions. + Names *[]string `json:"Names,omitempty"` + // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed1', 'PartitionSchemeSingleton1', 'PartitionSchemeUniformInt64Range1' + PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"` +} + +// MarshalJSON is the custom marshaler for NamedPartitionSchemeDescription. +func (npsd NamedPartitionSchemeDescription) MarshalJSON() ([]byte, error) { + npsd.PartitionScheme = PartitionSchemeNamed1 + objectMap := make(map[string]interface{}) + if npsd.Count != nil { + objectMap["Count"] = npsd.Count + } + if npsd.Names != nil { + objectMap["Names"] = npsd.Names + } + if npsd.PartitionScheme != "" { + objectMap["PartitionScheme"] = npsd.PartitionScheme + } + return json.Marshal(objectMap) +} + +// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. +func (npsd NamedPartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { + return &npsd, true +} + +// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. +func (npsd NamedPartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { + return nil, false +} + +// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. +func (npsd NamedPartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { + return nil, false +} + +// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. +func (npsd NamedPartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { + return nil, false +} + +// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for NamedPartitionSchemeDescription. +func (npsd NamedPartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { + return &npsd, true +} + +// NetworkRef describes a network reference in a service. +type NetworkRef struct { + // Name - Name of the network + Name *string `json:"name,omitempty"` + // EndpointRefs - A list of endpoints that are exposed on this network. + EndpointRefs *[]EndpointRef `json:"endpointRefs,omitempty"` +} + +// NetworkResourceDescription this type describes a network resource. +type NetworkResourceDescription struct { + autorest.Response `json:"-"` + // Name - Name of the Network resource. + Name *string `json:"name,omitempty"` + // Properties - Describes properties of a network resource. + Properties BasicNetworkResourceProperties `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for NetworkResourceDescription struct. +func (nrd *NetworkResourceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + nrd.Name = &name + } + case "properties": + if v != nil { + properties, err := unmarshalBasicNetworkResourceProperties(*v) + if err != nil { + return err + } + nrd.Properties = properties + } + } + } + + return nil +} + +// BasicNetworkResourceProperties describes properties of a network resource. +type BasicNetworkResourceProperties interface { + AsLocalNetworkResourceProperties() (*LocalNetworkResourceProperties, bool) + AsNetworkResourceProperties() (*NetworkResourceProperties, bool) +} + +// NetworkResourceProperties describes properties of a network resource. +type NetworkResourceProperties struct { + // Description - User readable description of the network. + Description *string `json:"description,omitempty"` + // Status - READ-ONLY; Status of the network. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the network. + StatusDetails *string `json:"statusDetails,omitempty"` + // Kind - Possible values include: 'KindNetworkResourcePropertiesBase', 'KindNetworkResourceProperties', 'KindLocal' + Kind KindBasicNetworkResourcePropertiesBase `json:"kind,omitempty"` +} + +func unmarshalBasicNetworkResourceProperties(body []byte) (BasicNetworkResourceProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindLocal): + var lnrp LocalNetworkResourceProperties + err := json.Unmarshal(body, &lnrp) + return lnrp, err + default: + var nrp NetworkResourceProperties + err := json.Unmarshal(body, &nrp) + return nrp, err + } +} +func unmarshalBasicNetworkResourcePropertiesArray(body []byte) ([]BasicNetworkResourceProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + nrpArray := make([]BasicNetworkResourceProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + nrp, err := unmarshalBasicNetworkResourceProperties(*rawMessage) + if err != nil { + return nil, err + } + nrpArray[index] = nrp + } + return nrpArray, nil +} + +// MarshalJSON is the custom marshaler for NetworkResourceProperties. +func (nrp NetworkResourceProperties) MarshalJSON() ([]byte, error) { + nrp.Kind = KindNetworkResourceProperties + objectMap := make(map[string]interface{}) + if nrp.Description != nil { + objectMap["description"] = nrp.Description + } + if nrp.Kind != "" { + objectMap["kind"] = nrp.Kind + } + return json.Marshal(objectMap) +} + +// AsNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for NetworkResourceProperties. +func (nrp NetworkResourceProperties) AsNetworkResourceProperties() (*NetworkResourceProperties, bool) { + return &nrp, true +} + +// AsBasicNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for NetworkResourceProperties. +func (nrp NetworkResourceProperties) AsBasicNetworkResourceProperties() (BasicNetworkResourceProperties, bool) { + return &nrp, true +} + +// AsLocalNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for NetworkResourceProperties. +func (nrp NetworkResourceProperties) AsLocalNetworkResourceProperties() (*LocalNetworkResourceProperties, bool) { + return nil, false +} + +// AsNetworkResourcePropertiesBase is the BasicNetworkResourcePropertiesBase implementation for NetworkResourceProperties. +func (nrp NetworkResourceProperties) AsNetworkResourcePropertiesBase() (*NetworkResourcePropertiesBase, bool) { + return nil, false +} + +// AsBasicNetworkResourcePropertiesBase is the BasicNetworkResourcePropertiesBase implementation for NetworkResourceProperties. +func (nrp NetworkResourceProperties) AsBasicNetworkResourcePropertiesBase() (BasicNetworkResourcePropertiesBase, bool) { + return &nrp, true +} + +// BasicNetworkResourcePropertiesBase this type describes the properties of a network resource, including its kind. +type BasicNetworkResourcePropertiesBase interface { + AsNetworkResourceProperties() (*NetworkResourceProperties, bool) + AsBasicNetworkResourceProperties() (BasicNetworkResourceProperties, bool) + AsLocalNetworkResourceProperties() (*LocalNetworkResourceProperties, bool) + AsNetworkResourcePropertiesBase() (*NetworkResourcePropertiesBase, bool) +} + +// NetworkResourcePropertiesBase this type describes the properties of a network resource, including its kind. +type NetworkResourcePropertiesBase struct { + // Kind - Possible values include: 'KindNetworkResourcePropertiesBase', 'KindNetworkResourceProperties', 'KindLocal' + Kind KindBasicNetworkResourcePropertiesBase `json:"kind,omitempty"` +} + +func unmarshalBasicNetworkResourcePropertiesBase(body []byte) (BasicNetworkResourcePropertiesBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindNetworkResourceProperties): + var nrp NetworkResourceProperties + err := json.Unmarshal(body, &nrp) + return nrp, err + case string(KindLocal): + var lnrp LocalNetworkResourceProperties + err := json.Unmarshal(body, &lnrp) + return lnrp, err + default: + var nrpb NetworkResourcePropertiesBase + err := json.Unmarshal(body, &nrpb) + return nrpb, err + } +} +func unmarshalBasicNetworkResourcePropertiesBaseArray(body []byte) ([]BasicNetworkResourcePropertiesBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + nrpbArray := make([]BasicNetworkResourcePropertiesBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + nrpb, err := unmarshalBasicNetworkResourcePropertiesBase(*rawMessage) + if err != nil { + return nil, err + } + nrpbArray[index] = nrpb + } + return nrpbArray, nil +} + +// MarshalJSON is the custom marshaler for NetworkResourcePropertiesBase. +func (nrpb NetworkResourcePropertiesBase) MarshalJSON() ([]byte, error) { + nrpb.Kind = KindNetworkResourcePropertiesBase + objectMap := make(map[string]interface{}) + if nrpb.Kind != "" { + objectMap["kind"] = nrpb.Kind + } + return json.Marshal(objectMap) +} + +// AsNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for NetworkResourcePropertiesBase. +func (nrpb NetworkResourcePropertiesBase) AsNetworkResourceProperties() (*NetworkResourceProperties, bool) { + return nil, false +} + +// AsBasicNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for NetworkResourcePropertiesBase. +func (nrpb NetworkResourcePropertiesBase) AsBasicNetworkResourceProperties() (BasicNetworkResourceProperties, bool) { + return nil, false +} + +// AsLocalNetworkResourceProperties is the BasicNetworkResourcePropertiesBase implementation for NetworkResourcePropertiesBase. +func (nrpb NetworkResourcePropertiesBase) AsLocalNetworkResourceProperties() (*LocalNetworkResourceProperties, bool) { + return nil, false +} + +// AsNetworkResourcePropertiesBase is the BasicNetworkResourcePropertiesBase implementation for NetworkResourcePropertiesBase. +func (nrpb NetworkResourcePropertiesBase) AsNetworkResourcePropertiesBase() (*NetworkResourcePropertiesBase, bool) { + return &nrpb, true +} + +// AsBasicNetworkResourcePropertiesBase is the BasicNetworkResourcePropertiesBase implementation for NetworkResourcePropertiesBase. +func (nrpb NetworkResourcePropertiesBase) AsBasicNetworkResourcePropertiesBase() (BasicNetworkResourcePropertiesBase, bool) { + return &nrpb, true +} + +// NodeAbortedEvent node Aborted event. +type NodeAbortedEvent struct { + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // NodeID - Id of Node. + NodeID *string `json:"NodeId,omitempty"` + // UpgradeDomain - Upgrade domain of Node. + UpgradeDomain *string `json:"UpgradeDomain,omitempty"` + // FaultDomain - Fault domain of Node. + FaultDomain *string `json:"FaultDomain,omitempty"` + // IPAddressOrFQDN - IP address or FQDN. + IPAddressOrFQDN *string `json:"IpAddressOrFQDN,omitempty"` + // Hostname - Name of Host. + Hostname *string `json:"Hostname,omitempty"` + // IsSeedNode - Indicates if it is seed node. + IsSeedNode *bool `json:"IsSeedNode,omitempty"` + // NodeVersion - Version of Node. + NodeVersion *string `json:"NodeVersion,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeAbortedEvent. +func (nae NodeAbortedEvent) MarshalJSON() ([]byte, error) { + nae.Kind = KindNodeAborted + objectMap := make(map[string]interface{}) + if nae.NodeInstance != nil { + objectMap["NodeInstance"] = nae.NodeInstance + } + if nae.NodeID != nil { + objectMap["NodeId"] = nae.NodeID + } + if nae.UpgradeDomain != nil { + objectMap["UpgradeDomain"] = nae.UpgradeDomain + } + if nae.FaultDomain != nil { + objectMap["FaultDomain"] = nae.FaultDomain + } + if nae.IPAddressOrFQDN != nil { + objectMap["IpAddressOrFQDN"] = nae.IPAddressOrFQDN + } + if nae.Hostname != nil { + objectMap["Hostname"] = nae.Hostname + } + if nae.IsSeedNode != nil { + objectMap["IsSeedNode"] = nae.IsSeedNode + } + if nae.NodeVersion != nil { + objectMap["NodeVersion"] = nae.NodeVersion + } + if nae.NodeName != nil { + objectMap["NodeName"] = nae.NodeName + } + if nae.EventInstanceID != nil { + objectMap["EventInstanceId"] = nae.EventInstanceID + } + if nae.Category != nil { + objectMap["Category"] = nae.Category + } + if nae.TimeStamp != nil { + objectMap["TimeStamp"] = nae.TimeStamp + } + if nae.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nae.HasCorrelatedEvents + } + if nae.Kind != "" { + objectMap["Kind"] = nae.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nae, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return &nae, true +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeAbortedEvent. +func (nae NodeAbortedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nae, true +} + +// NodeAddedToClusterEvent node Added event. +type NodeAddedToClusterEvent struct { + // NodeID - Id of Node. + NodeID *string `json:"NodeId,omitempty"` + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // NodeType - Type of Node. + NodeType *string `json:"NodeType,omitempty"` + // FabricVersion - Fabric version. + FabricVersion *string `json:"FabricVersion,omitempty"` + // IPAddressOrFQDN - IP address or FQDN. + IPAddressOrFQDN *string `json:"IpAddressOrFQDN,omitempty"` + // NodeCapacities - Capacities. + NodeCapacities *string `json:"NodeCapacities,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) MarshalJSON() ([]byte, error) { + natce.Kind = KindNodeAddedToCluster + objectMap := make(map[string]interface{}) + if natce.NodeID != nil { + objectMap["NodeId"] = natce.NodeID + } + if natce.NodeInstance != nil { + objectMap["NodeInstance"] = natce.NodeInstance + } + if natce.NodeType != nil { + objectMap["NodeType"] = natce.NodeType + } + if natce.FabricVersion != nil { + objectMap["FabricVersion"] = natce.FabricVersion + } + if natce.IPAddressOrFQDN != nil { + objectMap["IpAddressOrFQDN"] = natce.IPAddressOrFQDN + } + if natce.NodeCapacities != nil { + objectMap["NodeCapacities"] = natce.NodeCapacities + } + if natce.NodeName != nil { + objectMap["NodeName"] = natce.NodeName + } + if natce.EventInstanceID != nil { + objectMap["EventInstanceId"] = natce.EventInstanceID + } + if natce.Category != nil { + objectMap["Category"] = natce.Category + } + if natce.TimeStamp != nil { + objectMap["TimeStamp"] = natce.TimeStamp + } + if natce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = natce.HasCorrelatedEvents + } + if natce.Kind != "" { + objectMap["Kind"] = natce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &natce, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return &natce, true +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeAddedToClusterEvent. +func (natce NodeAddedToClusterEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &natce, true +} + +// NodeClosedEvent node Closed event. +type NodeClosedEvent struct { + // NodeID - Id of Node. + NodeID *string `json:"NodeId,omitempty"` + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // Error - Describes error. + Error *string `json:"Error,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeClosedEvent. +func (nce NodeClosedEvent) MarshalJSON() ([]byte, error) { + nce.Kind = KindNodeClosed + objectMap := make(map[string]interface{}) + if nce.NodeID != nil { + objectMap["NodeId"] = nce.NodeID + } + if nce.NodeInstance != nil { + objectMap["NodeInstance"] = nce.NodeInstance + } + if nce.Error != nil { + objectMap["Error"] = nce.Error + } + if nce.NodeName != nil { + objectMap["NodeName"] = nce.NodeName + } + if nce.EventInstanceID != nil { + objectMap["EventInstanceId"] = nce.EventInstanceID + } + if nce.Category != nil { + objectMap["Category"] = nce.Category + } + if nce.TimeStamp != nil { + objectMap["TimeStamp"] = nce.TimeStamp + } + if nce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nce.HasCorrelatedEvents + } + if nce.Kind != "" { + objectMap["Kind"] = nce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nce, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return &nce, true +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeClosedEvent. +func (nce NodeClosedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nce, true +} + +// NodeDeactivateCompletedEvent node Deactivate Completed event. +type NodeDeactivateCompletedEvent struct { + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // EffectiveDeactivateIntent - Describes deactivate intent. + EffectiveDeactivateIntent *string `json:"EffectiveDeactivateIntent,omitempty"` + // BatchIdsWithDeactivateIntent - Batch Ids. + BatchIdsWithDeactivateIntent *string `json:"BatchIdsWithDeactivateIntent,omitempty"` + // StartTime - Start time. + StartTime *date.Time `json:"StartTime,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) MarshalJSON() ([]byte, error) { + ndce.Kind = KindNodeDeactivateCompleted + objectMap := make(map[string]interface{}) + if ndce.NodeInstance != nil { + objectMap["NodeInstance"] = ndce.NodeInstance + } + if ndce.EffectiveDeactivateIntent != nil { + objectMap["EffectiveDeactivateIntent"] = ndce.EffectiveDeactivateIntent + } + if ndce.BatchIdsWithDeactivateIntent != nil { + objectMap["BatchIdsWithDeactivateIntent"] = ndce.BatchIdsWithDeactivateIntent + } + if ndce.StartTime != nil { + objectMap["StartTime"] = ndce.StartTime + } + if ndce.NodeName != nil { + objectMap["NodeName"] = ndce.NodeName + } + if ndce.EventInstanceID != nil { + objectMap["EventInstanceId"] = ndce.EventInstanceID + } + if ndce.Category != nil { + objectMap["Category"] = ndce.Category + } + if ndce.TimeStamp != nil { + objectMap["TimeStamp"] = ndce.TimeStamp + } + if ndce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ndce.HasCorrelatedEvents + } + if ndce.Kind != "" { + objectMap["Kind"] = ndce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &ndce, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return &ndce, true +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeDeactivateCompletedEvent. +func (ndce NodeDeactivateCompletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ndce, true +} + +// NodeDeactivateStartedEvent node Deactivate Started event. +type NodeDeactivateStartedEvent struct { + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // BatchID - Batch Id. + BatchID *string `json:"BatchId,omitempty"` + // DeactivateIntent - Describes deactivate intent. + DeactivateIntent *string `json:"DeactivateIntent,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) MarshalJSON() ([]byte, error) { + ndse.Kind = KindNodeDeactivateStarted + objectMap := make(map[string]interface{}) + if ndse.NodeInstance != nil { + objectMap["NodeInstance"] = ndse.NodeInstance + } + if ndse.BatchID != nil { + objectMap["BatchId"] = ndse.BatchID + } + if ndse.DeactivateIntent != nil { + objectMap["DeactivateIntent"] = ndse.DeactivateIntent + } + if ndse.NodeName != nil { + objectMap["NodeName"] = ndse.NodeName + } + if ndse.EventInstanceID != nil { + objectMap["EventInstanceId"] = ndse.EventInstanceID + } + if ndse.Category != nil { + objectMap["Category"] = ndse.Category + } + if ndse.TimeStamp != nil { + objectMap["TimeStamp"] = ndse.TimeStamp + } + if ndse.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ndse.HasCorrelatedEvents + } + if ndse.Kind != "" { + objectMap["Kind"] = ndse.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &ndse, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return &ndse, true +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeDeactivateStartedEvent. +func (ndse NodeDeactivateStartedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ndse, true +} + +// NodeDeactivationInfo information about the node deactivation. This information is valid for a node that +// is undergoing deactivation or has already been deactivated. +type NodeDeactivationInfo struct { + // NodeDeactivationIntent - The intent or the reason for deactivating the node. Following are the possible values for it. Possible values include: 'NodeDeactivationIntentInvalid', 'NodeDeactivationIntentPause', 'NodeDeactivationIntentRestart', 'NodeDeactivationIntentRemoveData', 'NodeDeactivationIntentRemoveNode' + NodeDeactivationIntent NodeDeactivationIntent `json:"NodeDeactivationIntent,omitempty"` + // NodeDeactivationStatus - The status of node deactivation operation. Following are the possible values. Possible values include: 'NodeDeactivationStatusNone', 'NodeDeactivationStatusSafetyCheckInProgress', 'NodeDeactivationStatusSafetyCheckComplete', 'NodeDeactivationStatusCompleted' + NodeDeactivationStatus NodeDeactivationStatus `json:"NodeDeactivationStatus,omitempty"` + // NodeDeactivationTask - List of tasks representing the deactivation operation on the node. + NodeDeactivationTask *[]NodeDeactivationTask `json:"NodeDeactivationTask,omitempty"` + // PendingSafetyChecks - List of pending safety checks + PendingSafetyChecks *[]SafetyCheckWrapper `json:"PendingSafetyChecks,omitempty"` +} + +// NodeDeactivationTask the task representing the deactivation operation on the node. +type NodeDeactivationTask struct { + // NodeDeactivationTaskID - Identity of the task related to deactivation operation on the node. + NodeDeactivationTaskID *NodeDeactivationTaskID `json:"NodeDeactivationTaskId,omitempty"` + // NodeDeactivationIntent - The intent or the reason for deactivating the node. Following are the possible values for it. Possible values include: 'NodeDeactivationIntentInvalid', 'NodeDeactivationIntentPause', 'NodeDeactivationIntentRestart', 'NodeDeactivationIntentRemoveData', 'NodeDeactivationIntentRemoveNode' + NodeDeactivationIntent NodeDeactivationIntent `json:"NodeDeactivationIntent,omitempty"` +} + +// NodeDeactivationTaskID identity of the task related to deactivation operation on the node. +type NodeDeactivationTaskID struct { + // ID - Value of the task id. + ID *string `json:"Id,omitempty"` + // NodeDeactivationTaskType - The type of the task that performed the node deactivation. Following are the possible values. Possible values include: 'NodeDeactivationTaskTypeInvalid', 'NodeDeactivationTaskTypeInfrastructure', 'NodeDeactivationTaskTypeRepair', 'NodeDeactivationTaskTypeClient' + NodeDeactivationTaskType NodeDeactivationTaskType `json:"NodeDeactivationTaskType,omitempty"` +} + +// NodeDownEvent node Down event. +type NodeDownEvent struct { + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // LastNodeUpAt - Time when Node was last up. + LastNodeUpAt *date.Time `json:"LastNodeUpAt,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeDownEvent. +func (nde NodeDownEvent) MarshalJSON() ([]byte, error) { + nde.Kind = KindNodeDown + objectMap := make(map[string]interface{}) + if nde.NodeInstance != nil { + objectMap["NodeInstance"] = nde.NodeInstance + } + if nde.LastNodeUpAt != nil { + objectMap["LastNodeUpAt"] = nde.LastNodeUpAt + } + if nde.NodeName != nil { + objectMap["NodeName"] = nde.NodeName + } + if nde.EventInstanceID != nil { + objectMap["EventInstanceId"] = nde.EventInstanceID + } + if nde.Category != nil { + objectMap["Category"] = nde.Category + } + if nde.TimeStamp != nil { + objectMap["TimeStamp"] = nde.TimeStamp + } + if nde.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nde.HasCorrelatedEvents + } + if nde.Kind != "" { + objectMap["Kind"] = nde.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nde, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return &nde, true +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeDownEvent. +func (nde NodeDownEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nde, true +} + +// BasicNodeEvent represents the base for all Node Events. +type BasicNodeEvent interface { + AsNodeAbortedEvent() (*NodeAbortedEvent, bool) + AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) + AsNodeClosedEvent() (*NodeClosedEvent, bool) + AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) + AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) + AsNodeDownEvent() (*NodeDownEvent, bool) + AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) + AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) + AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) + AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) + AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) + AsNodeUpEvent() (*NodeUpEvent, bool) + AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) + AsNodeEvent() (*NodeEvent, bool) +} + +// NodeEvent represents the base for all Node Events. +type NodeEvent struct { + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicNodeEvent(body []byte) (BasicNodeEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindNodeAborted): + var nae NodeAbortedEvent + err := json.Unmarshal(body, &nae) + return nae, err + case string(KindNodeAddedToCluster): + var natce NodeAddedToClusterEvent + err := json.Unmarshal(body, &natce) + return natce, err + case string(KindNodeClosed): + var nce NodeClosedEvent + err := json.Unmarshal(body, &nce) + return nce, err + case string(KindNodeDeactivateCompleted): + var ndce NodeDeactivateCompletedEvent + err := json.Unmarshal(body, &ndce) + return ndce, err + case string(KindNodeDeactivateStarted): + var ndse NodeDeactivateStartedEvent + err := json.Unmarshal(body, &ndse) + return ndse, err + case string(KindNodeDown): + var nde NodeDownEvent + err := json.Unmarshal(body, &nde) + return nde, err + case string(KindNodeNewHealthReport): + var nnhre NodeNewHealthReportEvent + err := json.Unmarshal(body, &nnhre) + return nnhre, err + case string(KindNodeHealthReportExpired): + var nhree NodeHealthReportExpiredEvent + err := json.Unmarshal(body, &nhree) + return nhree, err + case string(KindNodeOpenSucceeded): + var nose NodeOpenSucceededEvent + err := json.Unmarshal(body, &nose) + return nose, err + case string(KindNodeOpenFailed): + var nofe NodeOpenFailedEvent + err := json.Unmarshal(body, &nofe) + return nofe, err + case string(KindNodeRemovedFromCluster): + var nrfce NodeRemovedFromClusterEvent + err := json.Unmarshal(body, &nrfce) + return nrfce, err + case string(KindNodeUp): + var nue NodeUpEvent + err := json.Unmarshal(body, &nue) + return nue, err + case string(KindChaosNodeRestartScheduled): + var cnrse ChaosNodeRestartScheduledEvent + err := json.Unmarshal(body, &cnrse) + return cnrse, err + default: + var ne NodeEvent + err := json.Unmarshal(body, &ne) + return ne, err + } +} +func unmarshalBasicNodeEventArray(body []byte) ([]BasicNodeEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + neArray := make([]BasicNodeEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ne, err := unmarshalBasicNodeEvent(*rawMessage) + if err != nil { + return nil, err + } + neArray[index] = ne + } + return neArray, nil +} + +// MarshalJSON is the custom marshaler for NodeEvent. +func (ne NodeEvent) MarshalJSON() ([]byte, error) { + ne.Kind = KindNodeEvent + objectMap := make(map[string]interface{}) + if ne.NodeName != nil { + objectMap["NodeName"] = ne.NodeName + } + if ne.EventInstanceID != nil { + objectMap["EventInstanceId"] = ne.EventInstanceID + } + if ne.Category != nil { + objectMap["Category"] = ne.Category + } + if ne.TimeStamp != nil { + objectMap["TimeStamp"] = ne.TimeStamp + } + if ne.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ne.HasCorrelatedEvents + } + if ne.Kind != "" { + objectMap["Kind"] = ne.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeEvent() (*NodeEvent, bool) { + return &ne, true +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &ne, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeEvent. +func (ne NodeEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ne, true +} + +// NodeHealth information about the health of a Service Fabric node. +type NodeHealth struct { + autorest.Response `json:"-"` + // Name - Name of the node whose health information is described by this object. + Name *string `json:"Name,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// NodeHealthEvaluation represents health evaluation for a node, containing information about the data and +// the algorithm used by health store to evaluate health. The evaluation is returned only when the +// aggregated health state is either Error or Warning. +type NodeHealthEvaluation struct { + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state of the node. The types of the unhealthy evaluations can be EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) MarshalJSON() ([]byte, error) { + nhe.Kind = KindNode + objectMap := make(map[string]interface{}) + if nhe.NodeName != nil { + objectMap["NodeName"] = nhe.NodeName + } + if nhe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = nhe.UnhealthyEvaluations + } + if nhe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = nhe.AggregatedHealthState + } + if nhe.Description != nil { + objectMap["Description"] = nhe.Description + } + if nhe.Kind != "" { + objectMap["Kind"] = nhe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return &nhe, true +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for NodeHealthEvaluation. +func (nhe NodeHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &nhe, true +} + +// NodeHealthReportExpiredEvent node Health Report Expired event. +type NodeHealthReportExpiredEvent struct { + // NodeInstanceID - Id of Node instance. + NodeInstanceID *int64 `json:"NodeInstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + nhree.Kind = KindNodeHealthReportExpired + objectMap := make(map[string]interface{}) + if nhree.NodeInstanceID != nil { + objectMap["NodeInstanceId"] = nhree.NodeInstanceID + } + if nhree.SourceID != nil { + objectMap["SourceId"] = nhree.SourceID + } + if nhree.Property != nil { + objectMap["Property"] = nhree.Property + } + if nhree.HealthState != nil { + objectMap["HealthState"] = nhree.HealthState + } + if nhree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = nhree.TimeToLiveMs + } + if nhree.SequenceNumber != nil { + objectMap["SequenceNumber"] = nhree.SequenceNumber + } + if nhree.Description != nil { + objectMap["Description"] = nhree.Description + } + if nhree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = nhree.RemoveWhenExpired + } + if nhree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = nhree.SourceUtcTimestamp + } + if nhree.NodeName != nil { + objectMap["NodeName"] = nhree.NodeName + } + if nhree.EventInstanceID != nil { + objectMap["EventInstanceId"] = nhree.EventInstanceID + } + if nhree.Category != nil { + objectMap["Category"] = nhree.Category + } + if nhree.TimeStamp != nil { + objectMap["TimeStamp"] = nhree.TimeStamp + } + if nhree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nhree.HasCorrelatedEvents + } + if nhree.Kind != "" { + objectMap["Kind"] = nhree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nhree, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return &nhree, true +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeHealthReportExpiredEvent. +func (nhree NodeHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nhree, true +} + +// NodeHealthState represents the health state of a node, which contains the node identifier and its +// aggregated health state. +type NodeHealthState struct { + // Name - The name of a Service Fabric node. + Name *string `json:"Name,omitempty"` + // ID - An internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically generated from node name. + ID *NodeID `json:"Id,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// NodeHealthStateChunk represents the health state chunk of a node, which contains the node name and its +// aggregated health state. +type NodeHealthStateChunk struct { + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// NodeHealthStateChunkList the list of node health state chunks in the cluster that respect the input +// filters in the chunk query. Returned by get cluster health state chunks query. +type NodeHealthStateChunkList struct { + // Items - The list of node health state chunks that respect the input filters in the chunk query. + Items *[]NodeHealthStateChunk `json:"Items,omitempty"` + // TotalCount - Total number of entity health state objects that match the specified filters from the cluster health chunk query description. + TotalCount *int64 `json:"TotalCount,omitempty"` +} + +// NodeHealthStateFilter defines matching criteria to determine whether a node should be included in the +// returned cluster health chunk. +// One filter can match zero, one or multiple nodes, depending on its properties. +// Can be specified in the cluster health chunk query description. +type NodeHealthStateFilter struct { + // NodeNameFilter - Name of the node that matches the filter. The filter is applied only to the specified node, if it exists. + // If the node doesn't exist, no node is returned in the cluster health chunk based on this filter. + // If the node exists, it is included in the cluster health chunk if the health state matches the other filter properties. + // If not specified, all nodes that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. + NodeNameFilter *string `json:"NodeNameFilter,omitempty"` + // HealthStateFilter - The filter for the health state of the nodes. It allows selecting nodes if they match the desired health states. + // The possible values are integer value of one of the following health states. Only nodes that match the filter are returned. All nodes are used to evaluate the cluster aggregated health state. + // If not specified, default value is None, unless the node name is specified. If the filter has default value and node name is specified, the matching node is returned. + // The state values are flag-based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. + // For example, if the provided value is 6, it matches nodes with HealthState value of OK (2) and Warning (4). + // - Default - Default value. Matches any HealthState. The value is zero. + // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. + // - Ok - Filter that matches input with HealthState value Ok. The value is 2. + // - Warning - Filter that matches input with HealthState value Warning. The value is 4. + // - Error - Filter that matches input with HealthState value Error. The value is 8. + // - All - Filter that matches input with any HealthState value. The value is 65535. + HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` +} + +// NodeID an internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically +// generated from node name. +type NodeID struct { + // ID - Value of the node Id. This is a 128 bit integer. + ID *string `json:"Id,omitempty"` +} + +// NodeImpact describes the expected impact of a repair to a particular node. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type NodeImpact struct { + // NodeName - The name of the impacted node. + NodeName *string `json:"NodeName,omitempty"` + // ImpactLevel - The level of impact expected. Possible values include: 'ImpactLevelInvalid', 'ImpactLevelNone', 'ImpactLevelRestart', 'ImpactLevelRemoveData', 'ImpactLevelRemoveNode' + ImpactLevel ImpactLevel `json:"ImpactLevel,omitempty"` +} + +// NodeInfo information about a node in Service Fabric cluster. +type NodeInfo struct { + autorest.Response `json:"-"` + // Name - The name of a Service Fabric node. + Name *string `json:"Name,omitempty"` + // IPAddressOrFQDN - The IP address or fully qualified domain name of the node. + IPAddressOrFQDN *string `json:"IpAddressOrFQDN,omitempty"` + // Type - The type of the node. + Type *string `json:"Type,omitempty"` + // CodeVersion - The version of Service Fabric binaries that the node is running. + CodeVersion *string `json:"CodeVersion,omitempty"` + // ConfigVersion - The version of Service Fabric cluster manifest that the node is using. + ConfigVersion *string `json:"ConfigVersion,omitempty"` + // NodeStatus - The status of the node. Possible values include: 'NodeStatusInvalid', 'NodeStatusUp', 'NodeStatusDown', 'NodeStatusEnabling', 'NodeStatusDisabling', 'NodeStatusDisabled', 'NodeStatusUnknown', 'NodeStatusRemoved' + NodeStatus NodeStatus `json:"NodeStatus,omitempty"` + // NodeUpTimeInSeconds - Time in seconds since the node has been in NodeStatus Up. Value zero indicates that the node is not Up. + NodeUpTimeInSeconds *string `json:"NodeUpTimeInSeconds,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // IsSeedNode - Indicates if the node is a seed node or not. Returns true if the node is a seed node, otherwise false. A quorum of seed nodes are required for proper operation of Service Fabric cluster. + IsSeedNode *bool `json:"IsSeedNode,omitempty"` + // UpgradeDomain - The upgrade domain of the node. + UpgradeDomain *string `json:"UpgradeDomain,omitempty"` + // FaultDomain - The fault domain of the node. + FaultDomain *string `json:"FaultDomain,omitempty"` + // ID - An internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically generated from node name. + ID *NodeID `json:"Id,omitempty"` + // InstanceID - The ID representing the node instance. While the ID of the node is deterministically generated from the node name and remains same across restarts, the InstanceId changes every time node restarts. + InstanceID *string `json:"InstanceId,omitempty"` + // NodeDeactivationInfo - Information about the node deactivation. This information is valid for a node that is undergoing deactivation or has already been deactivated. + NodeDeactivationInfo *NodeDeactivationInfo `json:"NodeDeactivationInfo,omitempty"` + // IsStopped - Indicates if the node is stopped by calling stop node API or not. Returns true if the node is stopped, otherwise false. + IsStopped *bool `json:"IsStopped,omitempty"` + // NodeDownTimeInSeconds - Time in seconds since the node has been in NodeStatus Down. Value zero indicates node is not NodeStatus Down. + NodeDownTimeInSeconds *string `json:"NodeDownTimeInSeconds,omitempty"` + // NodeUpAt - Date time in UTC when the node came up. If the node has never been up then this value will be zero date time. + NodeUpAt *date.Time `json:"NodeUpAt,omitempty"` + // NodeDownAt - Date time in UTC when the node went down. If node has never been down then this value will be zero date time. + NodeDownAt *date.Time `json:"NodeDownAt,omitempty"` +} + +// NodeLoadInfo information about load on a Service Fabric node. It holds a summary of all metrics and +// their load on a node. +type NodeLoadInfo struct { + autorest.Response `json:"-"` + // NodeName - Name of the node for which the load information is provided by this object. + NodeName *string `json:"NodeName,omitempty"` + // NodeLoadMetricInformation - List that contains metrics and their load information on this node. + NodeLoadMetricInformation *[]NodeLoadMetricInformation `json:"NodeLoadMetricInformation,omitempty"` +} + +// NodeLoadMetricInformation represents data structure that contains load information for a certain metric +// on a node. +type NodeLoadMetricInformation struct { + // Name - Name of the metric for which this load information is provided. + Name *string `json:"Name,omitempty"` + // NodeCapacity - Total capacity on the node for this metric. + NodeCapacity *string `json:"NodeCapacity,omitempty"` + // NodeLoad - Current load on the node for this metric. In future releases of Service Fabric this parameter will be deprecated in favor of CurrentNodeLoad. + NodeLoad *string `json:"NodeLoad,omitempty"` + // NodeRemainingCapacity - The remaining capacity on the node for this metric. In future releases of Service Fabric this parameter will be deprecated in favor of NodeCapacityRemaining. + NodeRemainingCapacity *string `json:"NodeRemainingCapacity,omitempty"` + // IsCapacityViolation - Indicates if there is a capacity violation for this metric on the node. + IsCapacityViolation *bool `json:"IsCapacityViolation,omitempty"` + // NodeBufferedCapacity - The value that indicates the reserved capacity for this metric on the node. + NodeBufferedCapacity *string `json:"NodeBufferedCapacity,omitempty"` + // NodeRemainingBufferedCapacity - The remaining reserved capacity for this metric on the node. In future releases of Service Fabric this parameter will be deprecated in favor of BufferedNodeCapacityRemaining. + NodeRemainingBufferedCapacity *string `json:"NodeRemainingBufferedCapacity,omitempty"` + // CurrentNodeLoad - Current load on the node for this metric. + CurrentNodeLoad *string `json:"CurrentNodeLoad,omitempty"` + // NodeCapacityRemaining - The remaining capacity on the node for the metric. + NodeCapacityRemaining *string `json:"NodeCapacityRemaining,omitempty"` + // BufferedNodeCapacityRemaining - The remaining capacity which is not reserved by NodeBufferPercentage for this metric on the node. + BufferedNodeCapacityRemaining *string `json:"BufferedNodeCapacityRemaining,omitempty"` + // PlannedNodeLoadRemoval - This value represents the load of the replicas that are planned to be removed in the future. + // This kind of load is reported for replicas that are currently being moving to other nodes and for replicas that are currently being dropped but still use the load on the source node. + PlannedNodeLoadRemoval *string `json:"PlannedNodeLoadRemoval,omitempty"` +} + +// NodeNewHealthReportEvent node Health Report Created event. +type NodeNewHealthReportEvent struct { + // NodeInstanceID - Id of Node instance. + NodeInstanceID *int64 `json:"NodeInstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) MarshalJSON() ([]byte, error) { + nnhre.Kind = KindNodeNewHealthReport + objectMap := make(map[string]interface{}) + if nnhre.NodeInstanceID != nil { + objectMap["NodeInstanceId"] = nnhre.NodeInstanceID + } + if nnhre.SourceID != nil { + objectMap["SourceId"] = nnhre.SourceID + } + if nnhre.Property != nil { + objectMap["Property"] = nnhre.Property + } + if nnhre.HealthState != nil { + objectMap["HealthState"] = nnhre.HealthState + } + if nnhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = nnhre.TimeToLiveMs + } + if nnhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = nnhre.SequenceNumber + } + if nnhre.Description != nil { + objectMap["Description"] = nnhre.Description + } + if nnhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = nnhre.RemoveWhenExpired + } + if nnhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = nnhre.SourceUtcTimestamp + } + if nnhre.NodeName != nil { + objectMap["NodeName"] = nnhre.NodeName + } + if nnhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = nnhre.EventInstanceID + } + if nnhre.Category != nil { + objectMap["Category"] = nnhre.Category + } + if nnhre.TimeStamp != nil { + objectMap["TimeStamp"] = nnhre.TimeStamp + } + if nnhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nnhre.HasCorrelatedEvents + } + if nnhre.Kind != "" { + objectMap["Kind"] = nnhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nnhre, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return &nnhre, true +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeNewHealthReportEvent. +func (nnhre NodeNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nnhre, true +} + +// NodeOpenFailedEvent node Open Failed event. +type NodeOpenFailedEvent struct { + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // NodeID - Id of Node. + NodeID *string `json:"NodeId,omitempty"` + // UpgradeDomain - Upgrade domain of Node. + UpgradeDomain *string `json:"UpgradeDomain,omitempty"` + // FaultDomain - Fault domain of Node. + FaultDomain *string `json:"FaultDomain,omitempty"` + // IPAddressOrFQDN - IP address or FQDN. + IPAddressOrFQDN *string `json:"IpAddressOrFQDN,omitempty"` + // Hostname - Name of Host. + Hostname *string `json:"Hostname,omitempty"` + // IsSeedNode - Indicates if it is seed node. + IsSeedNode *bool `json:"IsSeedNode,omitempty"` + // NodeVersion - Version of Node. + NodeVersion *string `json:"NodeVersion,omitempty"` + // Error - Describes the error. + Error *string `json:"Error,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) MarshalJSON() ([]byte, error) { + nofe.Kind = KindNodeOpenFailed + objectMap := make(map[string]interface{}) + if nofe.NodeInstance != nil { + objectMap["NodeInstance"] = nofe.NodeInstance + } + if nofe.NodeID != nil { + objectMap["NodeId"] = nofe.NodeID + } + if nofe.UpgradeDomain != nil { + objectMap["UpgradeDomain"] = nofe.UpgradeDomain + } + if nofe.FaultDomain != nil { + objectMap["FaultDomain"] = nofe.FaultDomain + } + if nofe.IPAddressOrFQDN != nil { + objectMap["IpAddressOrFQDN"] = nofe.IPAddressOrFQDN + } + if nofe.Hostname != nil { + objectMap["Hostname"] = nofe.Hostname + } + if nofe.IsSeedNode != nil { + objectMap["IsSeedNode"] = nofe.IsSeedNode + } + if nofe.NodeVersion != nil { + objectMap["NodeVersion"] = nofe.NodeVersion + } + if nofe.Error != nil { + objectMap["Error"] = nofe.Error + } + if nofe.NodeName != nil { + objectMap["NodeName"] = nofe.NodeName + } + if nofe.EventInstanceID != nil { + objectMap["EventInstanceId"] = nofe.EventInstanceID + } + if nofe.Category != nil { + objectMap["Category"] = nofe.Category + } + if nofe.TimeStamp != nil { + objectMap["TimeStamp"] = nofe.TimeStamp + } + if nofe.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nofe.HasCorrelatedEvents + } + if nofe.Kind != "" { + objectMap["Kind"] = nofe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nofe, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return &nofe, true +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeOpenFailedEvent. +func (nofe NodeOpenFailedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nofe, true +} + +// NodeOpenSucceededEvent node Opened Succeeded event. +type NodeOpenSucceededEvent struct { + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // NodeID - Id of Node. + NodeID *string `json:"NodeId,omitempty"` + // UpgradeDomain - Upgrade domain of Node. + UpgradeDomain *string `json:"UpgradeDomain,omitempty"` + // FaultDomain - Fault domain of Node. + FaultDomain *string `json:"FaultDomain,omitempty"` + // IPAddressOrFQDN - IP address or FQDN. + IPAddressOrFQDN *string `json:"IpAddressOrFQDN,omitempty"` + // Hostname - Name of Host. + Hostname *string `json:"Hostname,omitempty"` + // IsSeedNode - Indicates if it is seed node. + IsSeedNode *bool `json:"IsSeedNode,omitempty"` + // NodeVersion - Version of Node. + NodeVersion *string `json:"NodeVersion,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) MarshalJSON() ([]byte, error) { + nose.Kind = KindNodeOpenSucceeded + objectMap := make(map[string]interface{}) + if nose.NodeInstance != nil { + objectMap["NodeInstance"] = nose.NodeInstance + } + if nose.NodeID != nil { + objectMap["NodeId"] = nose.NodeID + } + if nose.UpgradeDomain != nil { + objectMap["UpgradeDomain"] = nose.UpgradeDomain + } + if nose.FaultDomain != nil { + objectMap["FaultDomain"] = nose.FaultDomain + } + if nose.IPAddressOrFQDN != nil { + objectMap["IpAddressOrFQDN"] = nose.IPAddressOrFQDN + } + if nose.Hostname != nil { + objectMap["Hostname"] = nose.Hostname + } + if nose.IsSeedNode != nil { + objectMap["IsSeedNode"] = nose.IsSeedNode + } + if nose.NodeVersion != nil { + objectMap["NodeVersion"] = nose.NodeVersion + } + if nose.NodeName != nil { + objectMap["NodeName"] = nose.NodeName + } + if nose.EventInstanceID != nil { + objectMap["EventInstanceId"] = nose.EventInstanceID + } + if nose.Category != nil { + objectMap["Category"] = nose.Category + } + if nose.TimeStamp != nil { + objectMap["TimeStamp"] = nose.TimeStamp + } + if nose.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nose.HasCorrelatedEvents + } + if nose.Kind != "" { + objectMap["Kind"] = nose.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nose, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return &nose, true +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeOpenSucceededEvent. +func (nose NodeOpenSucceededEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nose, true +} + +// NodeRemovedFromClusterEvent node Removed event. +type NodeRemovedFromClusterEvent struct { + // NodeID - Id of Node. + NodeID *string `json:"NodeId,omitempty"` + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // NodeType - Type of Node. + NodeType *string `json:"NodeType,omitempty"` + // FabricVersion - Fabric version. + FabricVersion *string `json:"FabricVersion,omitempty"` + // IPAddressOrFQDN - IP address or FQDN. + IPAddressOrFQDN *string `json:"IpAddressOrFQDN,omitempty"` + // NodeCapacities - Capacities. + NodeCapacities *string `json:"NodeCapacities,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) MarshalJSON() ([]byte, error) { + nrfce.Kind = KindNodeRemovedFromCluster + objectMap := make(map[string]interface{}) + if nrfce.NodeID != nil { + objectMap["NodeId"] = nrfce.NodeID + } + if nrfce.NodeInstance != nil { + objectMap["NodeInstance"] = nrfce.NodeInstance + } + if nrfce.NodeType != nil { + objectMap["NodeType"] = nrfce.NodeType + } + if nrfce.FabricVersion != nil { + objectMap["FabricVersion"] = nrfce.FabricVersion + } + if nrfce.IPAddressOrFQDN != nil { + objectMap["IpAddressOrFQDN"] = nrfce.IPAddressOrFQDN + } + if nrfce.NodeCapacities != nil { + objectMap["NodeCapacities"] = nrfce.NodeCapacities + } + if nrfce.NodeName != nil { + objectMap["NodeName"] = nrfce.NodeName + } + if nrfce.EventInstanceID != nil { + objectMap["EventInstanceId"] = nrfce.EventInstanceID + } + if nrfce.Category != nil { + objectMap["Category"] = nrfce.Category + } + if nrfce.TimeStamp != nil { + objectMap["TimeStamp"] = nrfce.TimeStamp + } + if nrfce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nrfce.HasCorrelatedEvents + } + if nrfce.Kind != "" { + objectMap["Kind"] = nrfce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nrfce, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return &nrfce, true +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeRemovedFromClusterEvent. +func (nrfce NodeRemovedFromClusterEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nrfce, true +} + +// NodeRepairImpactDescription describes the expected impact of a repair on a set of nodes. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type NodeRepairImpactDescription struct { + // NodeImpactList - The list of nodes impacted by a repair action and their respective expected impact. + NodeImpactList *[]NodeImpact `json:"NodeImpactList,omitempty"` + // Kind - Possible values include: 'KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase', 'KindBasicRepairImpactDescriptionBaseKindNode' + Kind KindBasicRepairImpactDescriptionBase `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeRepairImpactDescription. +func (nrid NodeRepairImpactDescription) MarshalJSON() ([]byte, error) { + nrid.Kind = KindBasicRepairImpactDescriptionBaseKindNode + objectMap := make(map[string]interface{}) + if nrid.NodeImpactList != nil { + objectMap["NodeImpactList"] = nrid.NodeImpactList + } + if nrid.Kind != "" { + objectMap["Kind"] = nrid.Kind + } + return json.Marshal(objectMap) +} + +// AsNodeRepairImpactDescription is the BasicRepairImpactDescriptionBase implementation for NodeRepairImpactDescription. +func (nrid NodeRepairImpactDescription) AsNodeRepairImpactDescription() (*NodeRepairImpactDescription, bool) { + return &nrid, true +} + +// AsRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for NodeRepairImpactDescription. +func (nrid NodeRepairImpactDescription) AsRepairImpactDescriptionBase() (*RepairImpactDescriptionBase, bool) { + return nil, false +} + +// AsBasicRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for NodeRepairImpactDescription. +func (nrid NodeRepairImpactDescription) AsBasicRepairImpactDescriptionBase() (BasicRepairImpactDescriptionBase, bool) { + return &nrid, true +} + +// NodeRepairTargetDescription describes the list of nodes targeted by a repair action. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type NodeRepairTargetDescription struct { + // NodeNames - The list of nodes targeted by a repair action. + NodeNames *[]string `json:"NodeNames,omitempty"` + // Kind - Possible values include: 'KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase', 'KindBasicRepairTargetDescriptionBaseKindNode' + Kind KindBasicRepairTargetDescriptionBase `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeRepairTargetDescription. +func (nrtd NodeRepairTargetDescription) MarshalJSON() ([]byte, error) { + nrtd.Kind = KindBasicRepairTargetDescriptionBaseKindNode + objectMap := make(map[string]interface{}) + if nrtd.NodeNames != nil { + objectMap["NodeNames"] = nrtd.NodeNames + } + if nrtd.Kind != "" { + objectMap["Kind"] = nrtd.Kind + } + return json.Marshal(objectMap) +} + +// AsNodeRepairTargetDescription is the BasicRepairTargetDescriptionBase implementation for NodeRepairTargetDescription. +func (nrtd NodeRepairTargetDescription) AsNodeRepairTargetDescription() (*NodeRepairTargetDescription, bool) { + return &nrtd, true +} + +// AsRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for NodeRepairTargetDescription. +func (nrtd NodeRepairTargetDescription) AsRepairTargetDescriptionBase() (*RepairTargetDescriptionBase, bool) { + return nil, false +} + +// AsBasicRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for NodeRepairTargetDescription. +func (nrtd NodeRepairTargetDescription) AsBasicRepairTargetDescriptionBase() (BasicRepairTargetDescriptionBase, bool) { + return &nrtd, true +} + +// NodeResult contains information about a node that was targeted by a user-induced operation. +type NodeResult struct { + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // NodeInstanceID - The node instance id. + NodeInstanceID *string `json:"NodeInstanceId,omitempty"` +} + +// NodesHealthEvaluation represents health evaluation for nodes, containing health evaluations for each +// unhealthy node that impacted current aggregated health state. Can be returned when evaluating cluster +// health and the aggregated health state is either Error or Warning. +type NodesHealthEvaluation struct { + // MaxPercentUnhealthyNodes - Maximum allowed percentage of unhealthy nodes from the ClusterHealthPolicy. + MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` + // TotalCount - Total number of nodes found in the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) MarshalJSON() ([]byte, error) { + nhe.Kind = KindNodes + objectMap := make(map[string]interface{}) + if nhe.MaxPercentUnhealthyNodes != nil { + objectMap["MaxPercentUnhealthyNodes"] = nhe.MaxPercentUnhealthyNodes + } + if nhe.TotalCount != nil { + objectMap["TotalCount"] = nhe.TotalCount + } + if nhe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = nhe.UnhealthyEvaluations + } + if nhe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = nhe.AggregatedHealthState + } + if nhe.Description != nil { + objectMap["Description"] = nhe.Description + } + if nhe.Kind != "" { + objectMap["Kind"] = nhe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return &nhe, true +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for NodesHealthEvaluation. +func (nhe NodesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &nhe, true +} + +// NodeTransitionProgress information about an NodeTransition operation. This class contains an +// OperationState and a NodeTransitionResult. The NodeTransitionResult is not valid until OperationState +// is Completed or Faulted. +type NodeTransitionProgress struct { + autorest.Response `json:"-"` + // State - The state of the operation. Possible values include: 'OperationStateInvalid', 'OperationStateRunning', 'OperationStateRollingBack', 'OperationStateCompleted', 'OperationStateFaulted', 'OperationStateCancelled', 'OperationStateForceCancelled' + State OperationState `json:"State,omitempty"` + // NodeTransitionResult - Represents information about an operation in a terminal state (Completed or Faulted). + NodeTransitionResult *NodeTransitionResult `json:"NodeTransitionResult,omitempty"` +} + +// NodeTransitionResult represents information about an operation in a terminal state (Completed or +// Faulted). +type NodeTransitionResult struct { + // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // NodeResult - Contains information about a node that was targeted by a user-induced operation. + NodeResult *NodeResult `json:"NodeResult,omitempty"` +} + +// NodeUpEvent node Up event. +type NodeUpEvent struct { + // NodeInstance - Id of Node instance. + NodeInstance *int64 `json:"NodeInstance,omitempty"` + // LastNodeDownAt - Time when Node was last down. + LastNodeDownAt *date.Time `json:"LastNodeDownAt,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for NodeUpEvent. +func (nue NodeUpEvent) MarshalJSON() ([]byte, error) { + nue.Kind = KindNodeUp + objectMap := make(map[string]interface{}) + if nue.NodeInstance != nil { + objectMap["NodeInstance"] = nue.NodeInstance + } + if nue.LastNodeDownAt != nil { + objectMap["LastNodeDownAt"] = nue.LastNodeDownAt + } + if nue.NodeName != nil { + objectMap["NodeName"] = nue.NodeName + } + if nue.EventInstanceID != nil { + objectMap["EventInstanceId"] = nue.EventInstanceID + } + if nue.Category != nil { + objectMap["Category"] = nue.Category + } + if nue.TimeStamp != nil { + objectMap["TimeStamp"] = nue.TimeStamp + } + if nue.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = nue.HasCorrelatedEvents + } + if nue.Kind != "" { + objectMap["Kind"] = nue.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return &nue, true +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return &nue, true +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for NodeUpEvent. +func (nue NodeUpEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &nue, true +} + +// NodeUpgradeProgressInfo information about the upgrading node and its status +type NodeUpgradeProgressInfo struct { + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // UpgradePhase - The state of the upgrading node. Possible values include: 'NodeUpgradePhaseInvalid', 'NodeUpgradePhasePreUpgradeSafetyCheck', 'NodeUpgradePhaseUpgrading', 'NodeUpgradePhasePostUpgradeSafetyCheck' + UpgradePhase NodeUpgradePhase `json:"UpgradePhase,omitempty"` + // PendingSafetyChecks - List of pending safety checks + PendingSafetyChecks *[]SafetyCheckWrapper `json:"PendingSafetyChecks,omitempty"` +} + +// OperationStatus contains the OperationId, OperationState, and OperationType for user-induced operations. +type OperationStatus struct { + // OperationID - A GUID that identifies a call to this API. This is also passed into the corresponding GetProgress API. + OperationID *uuid.UUID `json:"OperationId,omitempty"` + // State - The state of the operation. Possible values include: 'OperationStateInvalid', 'OperationStateRunning', 'OperationStateRollingBack', 'OperationStateCompleted', 'OperationStateFaulted', 'OperationStateCancelled', 'OperationStateForceCancelled' + State OperationState `json:"State,omitempty"` + // Type - The type of the operation. Possible values include: 'OperationTypeInvalid', 'OperationTypePartitionDataLoss', 'OperationTypePartitionQuorumLoss', 'OperationTypePartitionRestart', 'OperationTypeNodeTransition' + Type OperationType `json:"Type,omitempty"` +} + +// PackageSharingPolicyInfo represents a policy for the package sharing. +type PackageSharingPolicyInfo struct { + // SharedPackageName - The name of code, configuration or data package that should be shared. + SharedPackageName *string `json:"SharedPackageName,omitempty"` + // PackageSharingScope - Represents the scope for PackageSharingPolicy. This is specified during DeployServicePackageToNode operation. Possible values include: 'PackageSharingPolicyScopeNone', 'PackageSharingPolicyScopeAll', 'PackageSharingPolicyScopeCode', 'PackageSharingPolicyScopeConfig', 'PackageSharingPolicyScopeData' + PackageSharingScope PackageSharingPolicyScope `json:"PackageSharingScope,omitempty"` +} + +// PagedApplicationInfoList the list of applications in the cluster. The list is paged when all of the +// results cannot fit in a single message. The next set of results can be obtained by executing the same +// query with the continuation token provided in this list. +type PagedApplicationInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of application information. + Items *[]ApplicationInfo `json:"Items,omitempty"` +} + +// PagedApplicationResourceDescriptionList the list of application resources. The list is paged when all of +// the results cannot fit in a single message. The next set of results can be obtained by executing the +// same query with the continuation token provided in this list. +type PagedApplicationResourceDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - One page of the list. + Items *[]ApplicationResourceDescription `json:"Items,omitempty"` +} + +// PagedApplicationTypeInfoList the list of application types that are provisioned or being provisioned in +// the cluster. The list is paged when all of the results cannot fit in a single message. The next set of +// results can be obtained by executing the same query with the continuation token provided in this list. +type PagedApplicationTypeInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of application type information. + Items *[]ApplicationTypeInfo `json:"Items,omitempty"` +} + +// PagedBackupConfigurationInfoList the list of backup configuration information. The list is paged when +// all of the results cannot fit in a single message. The next set of results can be obtained by executing +// the same query with the continuation token provided in this list. +type PagedBackupConfigurationInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of backup configuration information. + Items *[]BasicBackupConfigurationInfo `json:"Items,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PagedBackupConfigurationInfoList struct. +func (pbcil *PagedBackupConfigurationInfoList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ContinuationToken": + if v != nil { + var continuationToken string + err = json.Unmarshal(*v, &continuationToken) + if err != nil { + return err + } + pbcil.ContinuationToken = &continuationToken + } + case "Items": + if v != nil { + items, err := unmarshalBasicBackupConfigurationInfoArray(*v) + if err != nil { + return err + } + pbcil.Items = &items + } + } + } + + return nil +} + +// PagedBackupEntityList the list of backup entities that are being periodically backed. The list is paged +// when all of the results cannot fit in a single message. The next set of results can be obtained by +// executing the same query with the continuation token provided in this list. +type PagedBackupEntityList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of backup entity information. + Items *[]BasicBackupEntity `json:"Items,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PagedBackupEntityList struct. +func (pbel *PagedBackupEntityList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ContinuationToken": + if v != nil { + var continuationToken string + err = json.Unmarshal(*v, &continuationToken) + if err != nil { + return err + } + pbel.ContinuationToken = &continuationToken + } + case "Items": + if v != nil { + items, err := unmarshalBasicBackupEntityArray(*v) + if err != nil { + return err + } + pbel.Items = &items + } + } + } + + return nil +} + +// PagedBackupInfoList the list of backups. The list is paged when all of the results cannot fit in a +// single message. The next set of results can be obtained by executing the same query with the +// continuation token provided in this list. +type PagedBackupInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of backup information. + Items *[]BackupInfo `json:"Items,omitempty"` +} + +// PagedBackupPolicyDescriptionList the list of backup policies configured in the cluster. The list is +// paged when all of the results cannot fit in a single message. The next set of results can be obtained by +// executing the same query with the continuation token provided in this list. +type PagedBackupPolicyDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - The list of backup policies information. + Items *[]BackupPolicyDescription `json:"Items,omitempty"` +} + +// PagedComposeDeploymentStatusInfoList the list of compose deployments in the cluster. The list is paged +// when all of the results cannot fit in a single message. The next set of results can be obtained by +// executing the same query with the continuation token provided in this list. +type PagedComposeDeploymentStatusInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of compose deployment status information. + Items *[]ComposeDeploymentStatusInfo `json:"Items,omitempty"` +} + +// PagedDeployedApplicationInfoList the list of deployed applications in activating, downloading, or active +// states on a node. +// The list is paged when all of the results cannot fit in a single message. +// The next set of results can be obtained by executing the same query with the continuation token provided +// in this list. +type PagedDeployedApplicationInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of deployed application information. + Items *[]DeployedApplicationInfo `json:"Items,omitempty"` +} + +// PagedGatewayResourceDescriptionList the list of gateway resources. The list is paged when all of the +// results cannot fit in a single message. The next set of results can be obtained by executing the same +// query with the continuation token provided in this list. +type PagedGatewayResourceDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - One page of the list. + Items *[]GatewayResourceDescription `json:"Items,omitempty"` +} + +// PagedNetworkResourceDescriptionList the list of network resources. The list is paged when all of the +// results cannot fit in a single message. The next set of results can be obtained by executing the same +// query with the continuation token provided in this list. +type PagedNetworkResourceDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - One page of the list. + Items *[]NetworkResourceDescription `json:"Items,omitempty"` +} + +// PagedNodeInfoList the list of nodes in the cluster. The list is paged when all of the results cannot fit +// in a single message. The next set of results can be obtained by executing the same query with the +// continuation token provided in this list. +type PagedNodeInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of node information. + Items *[]NodeInfo `json:"Items,omitempty"` +} + +// PagedPropertyInfoList the paged list of Service Fabric properties under a given name. The list is paged +// when all of the results cannot fit in a single message. The next set of results can be obtained by +// executing the same query with the continuation token provided in this list. +type PagedPropertyInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // IsConsistent - Indicates whether any property under the given name has been modified during the enumeration. If there was a modification, this property value is false. + IsConsistent *bool `json:"IsConsistent,omitempty"` + // Properties - List of property information. + Properties *[]PropertyInfo `json:"Properties,omitempty"` +} + +// PagedReplicaInfoList the list of replicas in the cluster for a given partition. The list is paged when +// all of the results cannot fit in a single message. The next set of results can be obtained by executing +// the same query with the continuation token provided in this list. +type PagedReplicaInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of replica information. + Items *[]BasicReplicaInfo `json:"Items,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PagedReplicaInfoList struct. +func (pril *PagedReplicaInfoList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ContinuationToken": + if v != nil { + var continuationToken string + err = json.Unmarshal(*v, &continuationToken) + if err != nil { + return err + } + pril.ContinuationToken = &continuationToken + } + case "Items": + if v != nil { + items, err := unmarshalBasicReplicaInfoArray(*v) + if err != nil { + return err + } + pril.Items = &items + } + } + } + + return nil +} + +// PagedSecretResourceDescriptionList the list of secret resources. The list is paged when all of the +// results cannot fit in a single message. The next set of results can be obtained by executing the same +// query with the continuation token provided in this list. +type PagedSecretResourceDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - One page of the list. + Items *[]SecretResourceDescription `json:"Items,omitempty"` +} + +// PagedSecretValueResourceDescriptionList the list of values of a secret resource, paged if the number of +// results exceeds the limits of a single message. The next set of results can be obtained by executing the +// same query with the continuation token provided in the previous page. +type PagedSecretValueResourceDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - One page of the list. + Items *[]SecretValueResourceDescription `json:"Items,omitempty"` +} + +// PagedServiceInfoList the list of services in the cluster for an application. The list is paged when all +// of the results cannot fit in a single message. The next set of results can be obtained by executing the +// same query with the continuation token provided in this list. +type PagedServiceInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of service information. + Items *[]BasicServiceInfo `json:"Items,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PagedServiceInfoList struct. +func (psil *PagedServiceInfoList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ContinuationToken": + if v != nil { + var continuationToken string + err = json.Unmarshal(*v, &continuationToken) + if err != nil { + return err + } + psil.ContinuationToken = &continuationToken + } + case "Items": + if v != nil { + items, err := unmarshalBasicServiceInfoArray(*v) + if err != nil { + return err + } + psil.Items = &items + } + } + } + + return nil +} + +// PagedServicePartitionInfoList the list of partition in the cluster for a service. The list is paged when +// all of the results cannot fit in a single message. The next set of results can be obtained by executing +// the same query with the continuation token provided in this list. +type PagedServicePartitionInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of service partition information. + Items *[]BasicServicePartitionInfo `json:"Items,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PagedServicePartitionInfoList struct. +func (pspil *PagedServicePartitionInfoList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ContinuationToken": + if v != nil { + var continuationToken string + err = json.Unmarshal(*v, &continuationToken) + if err != nil { + return err + } + pspil.ContinuationToken = &continuationToken + } + case "Items": + if v != nil { + items, err := unmarshalBasicServicePartitionInfoArray(*v) + if err != nil { + return err + } + pspil.Items = &items + } + } + } + + return nil +} + +// PagedServiceReplicaDescriptionList the list of service resource replicas in the cluster. The list is +// paged when all of the results cannot fit in a single message. The next set of results can be obtained by +// executing the same query with the continuation token provided in this list. +type PagedServiceReplicaDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - List of service resource replica description. + Items *[]ServiceReplicaDescription `json:"Items,omitempty"` +} + +// PagedServiceResourceDescriptionList the list of service resources. The list is paged when all of the +// results cannot fit in a single message. The next set of results can be obtained by executing the same +// query with the continuation token provided in this list. +type PagedServiceResourceDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - One page of the list. + Items *[]ServiceResourceDescription `json:"Items,omitempty"` +} + +// PagedSubNameInfoList a paged list of Service Fabric names. The list is paged when all of the results +// cannot fit in a single message. The next set of results can be obtained by executing the same query with +// the continuation token provided in this list. +type PagedSubNameInfoList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // IsConsistent - Indicates whether any name under the given name has been modified during the enumeration. If there was a modification, this property value is false. + IsConsistent *bool `json:"IsConsistent,omitempty"` + // SubNames - List of the child names. + SubNames *[]string `json:"SubNames,omitempty"` +} + +// PagedVolumeResourceDescriptionList the list of volume resources. The list is paged when all of the +// results cannot fit in a single message. The next set of results can be obtained by executing the same +// query with the continuation token provided in this list. +type PagedVolumeResourceDescriptionList struct { + autorest.Response `json:"-"` + // ContinuationToken - The continuation token parameter is used to obtain next set of results. The continuation token is included in the response of the API when the results from the system do not fit in a single response. When this value is passed to the next API call, the API returns next set of results. If there are no further results, then the continuation token is not included in the response. + ContinuationToken *string `json:"ContinuationToken,omitempty"` + // Items - One page of the list. + Items *[]VolumeResourceDescription `json:"Items,omitempty"` +} + +// BasicPartitionAnalysisEvent represents the base for all Partition Analysis Events. +type BasicPartitionAnalysisEvent interface { + AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) + AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) +} + +// PartitionAnalysisEvent represents the base for all Partition Analysis Events. +type PartitionAnalysisEvent struct { + // Metadata - Metadata about an Analysis Event. + Metadata *AnalysisEventMetadata `json:"Metadata,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicPartitionAnalysisEvent(body []byte) (BasicPartitionAnalysisEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindPartitionPrimaryMoveAnalysis): + var ppmae PartitionPrimaryMoveAnalysisEvent + err := json.Unmarshal(body, &ppmae) + return ppmae, err + default: + var pae PartitionAnalysisEvent + err := json.Unmarshal(body, &pae) + return pae, err + } +} +func unmarshalBasicPartitionAnalysisEventArray(body []byte) ([]BasicPartitionAnalysisEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + paeArray := make([]BasicPartitionAnalysisEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pae, err := unmarshalBasicPartitionAnalysisEvent(*rawMessage) + if err != nil { + return nil, err + } + paeArray[index] = pae + } + return paeArray, nil +} + +// MarshalJSON is the custom marshaler for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) MarshalJSON() ([]byte, error) { + pae.Kind = KindPartitionAnalysisEvent + objectMap := make(map[string]interface{}) + if pae.Metadata != nil { + objectMap["Metadata"] = pae.Metadata + } + if pae.PartitionID != nil { + objectMap["PartitionId"] = pae.PartitionID + } + if pae.EventInstanceID != nil { + objectMap["EventInstanceId"] = pae.EventInstanceID + } + if pae.Category != nil { + objectMap["Category"] = pae.Category + } + if pae.TimeStamp != nil { + objectMap["TimeStamp"] = pae.TimeStamp + } + if pae.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = pae.HasCorrelatedEvents + } + if pae.Kind != "" { + objectMap["Kind"] = pae.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return &pae, true +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return &pae, true +} + +// AsPartitionEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &pae, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for PartitionAnalysisEvent. +func (pae PartitionAnalysisEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &pae, true +} + +// PartitionBackupConfigurationInfo backup configuration information, for a specific partition, specifying +// what backup policy is being applied and suspend description, if any. +type PartitionBackupConfigurationInfo struct { + autorest.Response `json:"-"` + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionID - The partition ID identifying the partition. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // PolicyName - The name of the backup policy which is applicable to this Service Fabric application or service or partition. + PolicyName *string `json:"PolicyName,omitempty"` + // PolicyInheritedFrom - Specifies the scope at which the backup policy is applied. Possible values include: 'BackupPolicyScopeInvalid', 'BackupPolicyScopePartition', 'BackupPolicyScopeService', 'BackupPolicyScopeApplication' + PolicyInheritedFrom BackupPolicyScope `json:"PolicyInheritedFrom,omitempty"` + // SuspensionInfo - Describes the backup suspension details. + SuspensionInfo *BackupSuspensionInfo `json:"SuspensionInfo,omitempty"` + // Kind - Possible values include: 'KindBasicBackupConfigurationInfoKindBackupConfigurationInfo', 'KindBasicBackupConfigurationInfoKindApplication', 'KindBasicBackupConfigurationInfoKindService', 'KindBasicBackupConfigurationInfoKindPartition' + Kind KindBasicBackupConfigurationInfo `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionBackupConfigurationInfo. +func (pbci PartitionBackupConfigurationInfo) MarshalJSON() ([]byte, error) { + pbci.Kind = KindBasicBackupConfigurationInfoKindPartition + objectMap := make(map[string]interface{}) + if pbci.ServiceName != nil { + objectMap["ServiceName"] = pbci.ServiceName + } + if pbci.PartitionID != nil { + objectMap["PartitionId"] = pbci.PartitionID + } + if pbci.PolicyName != nil { + objectMap["PolicyName"] = pbci.PolicyName + } + if pbci.PolicyInheritedFrom != "" { + objectMap["PolicyInheritedFrom"] = pbci.PolicyInheritedFrom + } + if pbci.SuspensionInfo != nil { + objectMap["SuspensionInfo"] = pbci.SuspensionInfo + } + if pbci.Kind != "" { + objectMap["Kind"] = pbci.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for PartitionBackupConfigurationInfo. +func (pbci PartitionBackupConfigurationInfo) AsApplicationBackupConfigurationInfo() (*ApplicationBackupConfigurationInfo, bool) { + return nil, false +} + +// AsServiceBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for PartitionBackupConfigurationInfo. +func (pbci PartitionBackupConfigurationInfo) AsServiceBackupConfigurationInfo() (*ServiceBackupConfigurationInfo, bool) { + return nil, false +} + +// AsPartitionBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for PartitionBackupConfigurationInfo. +func (pbci PartitionBackupConfigurationInfo) AsPartitionBackupConfigurationInfo() (*PartitionBackupConfigurationInfo, bool) { + return &pbci, true +} + +// AsBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for PartitionBackupConfigurationInfo. +func (pbci PartitionBackupConfigurationInfo) AsBackupConfigurationInfo() (*BackupConfigurationInfo, bool) { + return nil, false +} + +// AsBasicBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for PartitionBackupConfigurationInfo. +func (pbci PartitionBackupConfigurationInfo) AsBasicBackupConfigurationInfo() (BasicBackupConfigurationInfo, bool) { + return &pbci, true +} + +// PartitionBackupEntity identifies the Service Fabric stateful partition which is being backed up. +type PartitionBackupEntity struct { + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionID - The partition ID identifying the partition. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EntityKind - Possible values include: 'EntityKindBackupEntity', 'EntityKindApplication1', 'EntityKindService1', 'EntityKindPartition1' + EntityKind EntityKindBasicBackupEntity `json:"EntityKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionBackupEntity. +func (pbe PartitionBackupEntity) MarshalJSON() ([]byte, error) { + pbe.EntityKind = EntityKindPartition1 + objectMap := make(map[string]interface{}) + if pbe.ServiceName != nil { + objectMap["ServiceName"] = pbe.ServiceName + } + if pbe.PartitionID != nil { + objectMap["PartitionId"] = pbe.PartitionID + } + if pbe.EntityKind != "" { + objectMap["EntityKind"] = pbe.EntityKind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupEntity is the BasicBackupEntity implementation for PartitionBackupEntity. +func (pbe PartitionBackupEntity) AsApplicationBackupEntity() (*ApplicationBackupEntity, bool) { + return nil, false +} + +// AsServiceBackupEntity is the BasicBackupEntity implementation for PartitionBackupEntity. +func (pbe PartitionBackupEntity) AsServiceBackupEntity() (*ServiceBackupEntity, bool) { + return nil, false +} + +// AsPartitionBackupEntity is the BasicBackupEntity implementation for PartitionBackupEntity. +func (pbe PartitionBackupEntity) AsPartitionBackupEntity() (*PartitionBackupEntity, bool) { + return &pbe, true +} + +// AsBackupEntity is the BasicBackupEntity implementation for PartitionBackupEntity. +func (pbe PartitionBackupEntity) AsBackupEntity() (*BackupEntity, bool) { + return nil, false +} + +// AsBasicBackupEntity is the BasicBackupEntity implementation for PartitionBackupEntity. +func (pbe PartitionBackupEntity) AsBasicBackupEntity() (BasicBackupEntity, bool) { + return &pbe, true +} + +// PartitionDataLossProgress information about a partition data loss user-induced operation. +type PartitionDataLossProgress struct { + autorest.Response `json:"-"` + // State - The state of the operation. Possible values include: 'OperationStateInvalid', 'OperationStateRunning', 'OperationStateRollingBack', 'OperationStateCompleted', 'OperationStateFaulted', 'OperationStateCancelled', 'OperationStateForceCancelled' + State OperationState `json:"State,omitempty"` + // InvokeDataLossResult - Represents information about an operation in a terminal state (Completed or Faulted). + InvokeDataLossResult *InvokeDataLossResult `json:"InvokeDataLossResult,omitempty"` +} + +// BasicPartitionEvent represents the base for all Partition Events. +type BasicPartitionEvent interface { + AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) + AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) + AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) + AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) + AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) + AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) + AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) + AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) + AsPartitionEvent() (*PartitionEvent, bool) +} + +// PartitionEvent represents the base for all Partition Events. +type PartitionEvent struct { + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicPartitionEvent(body []byte) (BasicPartitionEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindPartitionAnalysisEvent): + var pae PartitionAnalysisEvent + err := json.Unmarshal(body, &pae) + return pae, err + case string(KindPartitionNewHealthReport): + var pnhre PartitionNewHealthReportEvent + err := json.Unmarshal(body, &pnhre) + return pnhre, err + case string(KindPartitionHealthReportExpired): + var phree PartitionHealthReportExpiredEvent + err := json.Unmarshal(body, &phree) + return phree, err + case string(KindPartitionReconfigured): + var pre PartitionReconfiguredEvent + err := json.Unmarshal(body, &pre) + return pre, err + case string(KindPartitionPrimaryMoveAnalysis): + var ppmae PartitionPrimaryMoveAnalysisEvent + err := json.Unmarshal(body, &ppmae) + return ppmae, err + case string(KindChaosPartitionSecondaryMoveScheduled): + var cpsmse ChaosPartitionSecondaryMoveScheduledEvent + err := json.Unmarshal(body, &cpsmse) + return cpsmse, err + case string(KindChaosPartitionPrimaryMoveScheduled): + var cppmse ChaosPartitionPrimaryMoveScheduledEvent + err := json.Unmarshal(body, &cppmse) + return cppmse, err + default: + var peVar PartitionEvent + err := json.Unmarshal(body, &peVar) + return peVar, err + } +} +func unmarshalBasicPartitionEventArray(body []byte) ([]BasicPartitionEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + peVarArray := make([]BasicPartitionEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + peVar, err := unmarshalBasicPartitionEvent(*rawMessage) + if err != nil { + return nil, err + } + peVarArray[index] = peVar + } + return peVarArray, nil +} + +// MarshalJSON is the custom marshaler for PartitionEvent. +func (peVar PartitionEvent) MarshalJSON() ([]byte, error) { + peVar.Kind = KindPartitionEvent + objectMap := make(map[string]interface{}) + if peVar.PartitionID != nil { + objectMap["PartitionId"] = peVar.PartitionID + } + if peVar.EventInstanceID != nil { + objectMap["EventInstanceId"] = peVar.EventInstanceID + } + if peVar.Category != nil { + objectMap["Category"] = peVar.Category + } + if peVar.TimeStamp != nil { + objectMap["TimeStamp"] = peVar.TimeStamp + } + if peVar.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = peVar.HasCorrelatedEvents + } + if peVar.Kind != "" { + objectMap["Kind"] = peVar.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return &peVar, true +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &peVar, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for PartitionEvent. +func (peVar PartitionEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &peVar, true +} + +// PartitionHealth information about the health of a Service Fabric partition. +type PartitionHealth struct { + autorest.Response `json:"-"` + // PartitionID - ID of the partition whose health information is described by this object. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaHealthStates - The list of replica health states associated with the partition. + ReplicaHealthStates *[]BasicReplicaHealthState `json:"ReplicaHealthStates,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PartitionHealth struct. +func (ph *PartitionHealth) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "PartitionId": + if v != nil { + var partitionID uuid.UUID + err = json.Unmarshal(*v, &partitionID) + if err != nil { + return err + } + ph.PartitionID = &partitionID + } + case "ReplicaHealthStates": + if v != nil { + replicaHealthStates, err := unmarshalBasicReplicaHealthStateArray(*v) + if err != nil { + return err + } + ph.ReplicaHealthStates = &replicaHealthStates + } + case "AggregatedHealthState": + if v != nil { + var aggregatedHealthState HealthState + err = json.Unmarshal(*v, &aggregatedHealthState) + if err != nil { + return err + } + ph.AggregatedHealthState = aggregatedHealthState + } + case "HealthEvents": + if v != nil { + var healthEvents []HealthEvent + err = json.Unmarshal(*v, &healthEvents) + if err != nil { + return err + } + ph.HealthEvents = &healthEvents + } + case "UnhealthyEvaluations": + if v != nil { + var unhealthyEvaluations []HealthEvaluationWrapper + err = json.Unmarshal(*v, &unhealthyEvaluations) + if err != nil { + return err + } + ph.UnhealthyEvaluations = &unhealthyEvaluations + } + case "HealthStatistics": + if v != nil { + var healthStatistics HealthStatistics + err = json.Unmarshal(*v, &healthStatistics) + if err != nil { + return err + } + ph.HealthStatistics = &healthStatistics + } + } + } + + return nil +} + +// PartitionHealthEvaluation represents health evaluation for a partition, containing information about the +// data and the algorithm used by health store to evaluate health. The evaluation is returned only when the +// aggregated health state is either Error or Warning. +type PartitionHealthEvaluation struct { + // PartitionID - Id of the partition whose health evaluation is described by this object. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state of the partition. The types of the unhealthy evaluations can be ReplicasHealthEvaluation or EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) MarshalJSON() ([]byte, error) { + phe.Kind = KindPartition + objectMap := make(map[string]interface{}) + if phe.PartitionID != nil { + objectMap["PartitionId"] = phe.PartitionID + } + if phe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = phe.UnhealthyEvaluations + } + if phe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = phe.AggregatedHealthState + } + if phe.Description != nil { + objectMap["Description"] = phe.Description + } + if phe.Kind != "" { + objectMap["Kind"] = phe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return &phe, true +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for PartitionHealthEvaluation. +func (phe PartitionHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &phe, true +} + +// PartitionHealthReportExpiredEvent partition Health Report Expired event. +type PartitionHealthReportExpiredEvent struct { + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + phree.Kind = KindPartitionHealthReportExpired + objectMap := make(map[string]interface{}) + if phree.SourceID != nil { + objectMap["SourceId"] = phree.SourceID + } + if phree.Property != nil { + objectMap["Property"] = phree.Property + } + if phree.HealthState != nil { + objectMap["HealthState"] = phree.HealthState + } + if phree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = phree.TimeToLiveMs + } + if phree.SequenceNumber != nil { + objectMap["SequenceNumber"] = phree.SequenceNumber + } + if phree.Description != nil { + objectMap["Description"] = phree.Description + } + if phree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = phree.RemoveWhenExpired + } + if phree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = phree.SourceUtcTimestamp + } + if phree.PartitionID != nil { + objectMap["PartitionId"] = phree.PartitionID + } + if phree.EventInstanceID != nil { + objectMap["EventInstanceId"] = phree.EventInstanceID + } + if phree.Category != nil { + objectMap["Category"] = phree.Category + } + if phree.TimeStamp != nil { + objectMap["TimeStamp"] = phree.TimeStamp + } + if phree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = phree.HasCorrelatedEvents + } + if phree.Kind != "" { + objectMap["Kind"] = phree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &phree, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return &phree, true +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for PartitionHealthReportExpiredEvent. +func (phree PartitionHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &phree, true +} + +// PartitionHealthState represents the health state of a partition, which contains the partition identifier +// and its aggregated health state. +type PartitionHealthState struct { + // PartitionID - Id of the partition whose health state is described by this object. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// PartitionHealthStateChunk represents the health state chunk of a partition, which contains the partition +// ID, its aggregated health state and any replicas that respect the filters in the cluster health chunk +// query description. +type PartitionHealthStateChunk struct { + // PartitionID - The Id of the partition. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaHealthStateChunks - The list of replica health state chunks belonging to the partition that respect the filters in the cluster health chunk query description. + ReplicaHealthStateChunks *ReplicaHealthStateChunkList `json:"ReplicaHealthStateChunks,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// PartitionHealthStateChunkList the list of partition health state chunks that respect the input filters +// in the chunk query description. +// Returned by get cluster health state chunks query as part of the parent application hierarchy. +type PartitionHealthStateChunkList struct { + // Items - The list of partition health state chunks that respect the input filters in the chunk query. + Items *[]PartitionHealthStateChunk `json:"Items,omitempty"` +} + +// PartitionHealthStateFilter defines matching criteria to determine whether a partition should be included +// as a child of a service in the cluster health chunk. +// The partitions are only returned if the parent entities match a filter specified in the cluster health +// chunk query description. The parent service and application must be included in the cluster health +// chunk. +// One filter can match zero, one or multiple partitions, depending on its properties. +type PartitionHealthStateFilter struct { + // PartitionIDFilter - ID of the partition that matches the filter. The filter is applied only to the specified partition, if it exists. + // If the partition doesn't exist, no partition is returned in the cluster health chunk based on this filter. + // If the partition exists, it is included in the cluster health chunk if it respects the other filter properties. + // If not specified, all partitions that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. + PartitionIDFilter *uuid.UUID `json:"PartitionIdFilter,omitempty"` + // HealthStateFilter - The filter for the health state of the partitions. It allows selecting partitions if they match the desired health states. + // The possible values are integer value of one of the following health states. Only partitions that match the filter are returned. All partitions are used to evaluate the cluster aggregated health state. + // If not specified, default value is None, unless the partition ID is specified. If the filter has default value and partition ID is specified, the matching partition is returned. + // The state values are flag-based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. + // For example, if the provided value is 6, it matches partitions with HealthState value of OK (2) and Warning (4). + // - Default - Default value. Matches any HealthState. The value is zero. + // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. + // - Ok - Filter that matches input with HealthState value Ok. The value is 2. + // - Warning - Filter that matches input with HealthState value Warning. The value is 4. + // - Error - Filter that matches input with HealthState value Error. The value is 8. + // - All - Filter that matches input with any HealthState value. The value is 65535. + HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` + // ReplicaFilters - Defines a list of filters that specify which replicas to be included in the returned cluster health chunk as children of the parent partition. The replicas are returned only if the parent partition matches a filter. + // If the list is empty, no replicas are returned. All the replicas are used to evaluate the parent partition aggregated health state, regardless of the input filters. + // The partition filter may specify multiple replica filters. + // For example, it can specify a filter to return all replicas with health state Error and another filter to always include a replica identified by its replica id. + ReplicaFilters *[]ReplicaHealthStateFilter `json:"ReplicaFilters,omitempty"` +} + +// BasicPartitionInformation information about the partition identity, partitioning scheme and keys supported by it. +type BasicPartitionInformation interface { + AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) + AsNamedPartitionInformation() (*NamedPartitionInformation, bool) + AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) + AsPartitionInformation() (*PartitionInformation, bool) +} + +// PartitionInformation information about the partition identity, partitioning scheme and keys supported by it. +type PartitionInformation struct { + // ID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + ID *uuid.UUID `json:"Id,omitempty"` + // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range1', 'ServicePartitionKindNamed1', 'ServicePartitionKindSingleton1' + ServicePartitionKind ServicePartitionKindBasicPartitionInformation `json:"ServicePartitionKind,omitempty"` +} + +func unmarshalBasicPartitionInformation(body []byte) (BasicPartitionInformation, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServicePartitionKind"] { + case string(ServicePartitionKindInt64Range1): + var i6rpi Int64RangePartitionInformation + err := json.Unmarshal(body, &i6rpi) + return i6rpi, err + case string(ServicePartitionKindNamed1): + var npi NamedPartitionInformation + err := json.Unmarshal(body, &npi) + return npi, err + case string(ServicePartitionKindSingleton1): + var spi SingletonPartitionInformation + err := json.Unmarshal(body, &spi) + return spi, err + default: + var pi PartitionInformation + err := json.Unmarshal(body, &pi) + return pi, err + } +} +func unmarshalBasicPartitionInformationArray(body []byte) ([]BasicPartitionInformation, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + piArray := make([]BasicPartitionInformation, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pi, err := unmarshalBasicPartitionInformation(*rawMessage) + if err != nil { + return nil, err + } + piArray[index] = pi + } + return piArray, nil +} + +// MarshalJSON is the custom marshaler for PartitionInformation. +func (pi PartitionInformation) MarshalJSON() ([]byte, error) { + pi.ServicePartitionKind = ServicePartitionKindPartitionInformation + objectMap := make(map[string]interface{}) + if pi.ID != nil { + objectMap["Id"] = pi.ID + } + if pi.ServicePartitionKind != "" { + objectMap["ServicePartitionKind"] = pi.ServicePartitionKind + } + return json.Marshal(objectMap) +} + +// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. +func (pi PartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { + return nil, false +} + +// AsNamedPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. +func (pi PartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { + return nil, false +} + +// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. +func (pi PartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { + return nil, false +} + +// AsPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. +func (pi PartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { + return &pi, true +} + +// AsBasicPartitionInformation is the BasicPartitionInformation implementation for PartitionInformation. +func (pi PartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { + return &pi, true +} + +// PartitionInstanceCountScaleMechanism represents a scaling mechanism for adding or removing instances of +// stateless service partition. +type PartitionInstanceCountScaleMechanism struct { + // MinInstanceCount - Minimum number of instances of the partition. + MinInstanceCount *int32 `json:"MinInstanceCount,omitempty"` + // MaxInstanceCount - Maximum number of instances of the partition. + MaxInstanceCount *int32 `json:"MaxInstanceCount,omitempty"` + // ScaleIncrement - The number of instances to add or remove during a scaling operation. + ScaleIncrement *int32 `json:"ScaleIncrement,omitempty"` + // Kind - Possible values include: 'KindScalingMechanismDescription', 'KindPartitionInstanceCount', 'KindAddRemoveIncrementalNamedPartition' + Kind KindBasicScalingMechanismDescription `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionInstanceCountScaleMechanism. +func (picsm PartitionInstanceCountScaleMechanism) MarshalJSON() ([]byte, error) { + picsm.Kind = KindPartitionInstanceCount + objectMap := make(map[string]interface{}) + if picsm.MinInstanceCount != nil { + objectMap["MinInstanceCount"] = picsm.MinInstanceCount + } + if picsm.MaxInstanceCount != nil { + objectMap["MaxInstanceCount"] = picsm.MaxInstanceCount + } + if picsm.ScaleIncrement != nil { + objectMap["ScaleIncrement"] = picsm.ScaleIncrement + } + if picsm.Kind != "" { + objectMap["Kind"] = picsm.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionInstanceCountScaleMechanism is the BasicScalingMechanismDescription implementation for PartitionInstanceCountScaleMechanism. +func (picsm PartitionInstanceCountScaleMechanism) AsPartitionInstanceCountScaleMechanism() (*PartitionInstanceCountScaleMechanism, bool) { + return &picsm, true +} + +// AsAddRemoveIncrementalNamedPartitionScalingMechanism is the BasicScalingMechanismDescription implementation for PartitionInstanceCountScaleMechanism. +func (picsm PartitionInstanceCountScaleMechanism) AsAddRemoveIncrementalNamedPartitionScalingMechanism() (*AddRemoveIncrementalNamedPartitionScalingMechanism, bool) { + return nil, false +} + +// AsScalingMechanismDescription is the BasicScalingMechanismDescription implementation for PartitionInstanceCountScaleMechanism. +func (picsm PartitionInstanceCountScaleMechanism) AsScalingMechanismDescription() (*ScalingMechanismDescription, bool) { + return nil, false +} + +// AsBasicScalingMechanismDescription is the BasicScalingMechanismDescription implementation for PartitionInstanceCountScaleMechanism. +func (picsm PartitionInstanceCountScaleMechanism) AsBasicScalingMechanismDescription() (BasicScalingMechanismDescription, bool) { + return &picsm, true +} + +// PartitionLoadInformation represents load information for a partition, which contains the primary and +// secondary reported load metrics. +// In case there is no load reported, PartitionLoadInformation will contain the default load for the +// service of the partition. +// For default loads, LoadMetricReport's LastReportedUtc is set to 0. +type PartitionLoadInformation struct { + autorest.Response `json:"-"` + // PartitionID - Id of the partition. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // PrimaryLoadMetricReports - Array of load reports from the primary replica for this partition. + PrimaryLoadMetricReports *[]LoadMetricReport `json:"PrimaryLoadMetricReports,omitempty"` + // SecondaryLoadMetricReports - Array of aggregated load reports from all secondary replicas for this partition. + // Array only contains the latest reported load for each metric. + SecondaryLoadMetricReports *[]LoadMetricReport `json:"SecondaryLoadMetricReports,omitempty"` +} + +// PartitionNewHealthReportEvent partition Health Report Created event. +type PartitionNewHealthReportEvent struct { + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) MarshalJSON() ([]byte, error) { + pnhre.Kind = KindPartitionNewHealthReport + objectMap := make(map[string]interface{}) + if pnhre.SourceID != nil { + objectMap["SourceId"] = pnhre.SourceID + } + if pnhre.Property != nil { + objectMap["Property"] = pnhre.Property + } + if pnhre.HealthState != nil { + objectMap["HealthState"] = pnhre.HealthState + } + if pnhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = pnhre.TimeToLiveMs + } + if pnhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = pnhre.SequenceNumber + } + if pnhre.Description != nil { + objectMap["Description"] = pnhre.Description + } + if pnhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = pnhre.RemoveWhenExpired + } + if pnhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = pnhre.SourceUtcTimestamp + } + if pnhre.PartitionID != nil { + objectMap["PartitionId"] = pnhre.PartitionID + } + if pnhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = pnhre.EventInstanceID + } + if pnhre.Category != nil { + objectMap["Category"] = pnhre.Category + } + if pnhre.TimeStamp != nil { + objectMap["TimeStamp"] = pnhre.TimeStamp + } + if pnhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = pnhre.HasCorrelatedEvents + } + if pnhre.Kind != "" { + objectMap["Kind"] = pnhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &pnhre, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return &pnhre, true +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for PartitionNewHealthReportEvent. +func (pnhre PartitionNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &pnhre, true +} + +// PartitionPrimaryMoveAnalysisEvent partition Primary Move Analysis event. +type PartitionPrimaryMoveAnalysisEvent struct { + // WhenMoveCompleted - Time when the move was completed. + WhenMoveCompleted *date.Time `json:"WhenMoveCompleted,omitempty"` + // PreviousNode - The name of a Service Fabric node. + PreviousNode *string `json:"PreviousNode,omitempty"` + // CurrentNode - The name of a Service Fabric node. + CurrentNode *string `json:"CurrentNode,omitempty"` + // MoveReason - Move reason. + MoveReason *string `json:"MoveReason,omitempty"` + // RelevantTraces - Relevant traces. + RelevantTraces *string `json:"RelevantTraces,omitempty"` + // Metadata - Metadata about an Analysis Event. + Metadata *AnalysisEventMetadata `json:"Metadata,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) MarshalJSON() ([]byte, error) { + ppmae.Kind = KindPartitionPrimaryMoveAnalysis + objectMap := make(map[string]interface{}) + if ppmae.WhenMoveCompleted != nil { + objectMap["WhenMoveCompleted"] = ppmae.WhenMoveCompleted + } + if ppmae.PreviousNode != nil { + objectMap["PreviousNode"] = ppmae.PreviousNode + } + if ppmae.CurrentNode != nil { + objectMap["CurrentNode"] = ppmae.CurrentNode + } + if ppmae.MoveReason != nil { + objectMap["MoveReason"] = ppmae.MoveReason + } + if ppmae.RelevantTraces != nil { + objectMap["RelevantTraces"] = ppmae.RelevantTraces + } + if ppmae.Metadata != nil { + objectMap["Metadata"] = ppmae.Metadata + } + if ppmae.PartitionID != nil { + objectMap["PartitionId"] = ppmae.PartitionID + } + if ppmae.EventInstanceID != nil { + objectMap["EventInstanceId"] = ppmae.EventInstanceID + } + if ppmae.Category != nil { + objectMap["Category"] = ppmae.Category + } + if ppmae.TimeStamp != nil { + objectMap["TimeStamp"] = ppmae.TimeStamp + } + if ppmae.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = ppmae.HasCorrelatedEvents + } + if ppmae.Kind != "" { + objectMap["Kind"] = ppmae.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return &ppmae, true +} + +// AsPartitionEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &ppmae, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return &ppmae, true +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for PartitionPrimaryMoveAnalysisEvent. +func (ppmae PartitionPrimaryMoveAnalysisEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &ppmae, true +} + +// PartitionQuorumLossProgress information about a partition quorum loss user-induced operation. +type PartitionQuorumLossProgress struct { + autorest.Response `json:"-"` + // State - The state of the operation. Possible values include: 'OperationStateInvalid', 'OperationStateRunning', 'OperationStateRollingBack', 'OperationStateCompleted', 'OperationStateFaulted', 'OperationStateCancelled', 'OperationStateForceCancelled' + State OperationState `json:"State,omitempty"` + // InvokeQuorumLossResult - Represents information about an operation in a terminal state (Completed or Faulted). + InvokeQuorumLossResult *InvokeQuorumLossResult `json:"InvokeQuorumLossResult,omitempty"` +} + +// PartitionReconfiguredEvent partition Reconfiguration event. +type PartitionReconfiguredEvent struct { + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // NodeInstanceID - Id of Node instance. + NodeInstanceID *string `json:"NodeInstanceId,omitempty"` + // ServiceType - Type of Service. + ServiceType *string `json:"ServiceType,omitempty"` + // CcEpochDataLossVersion - CcEpochDataLoss version. + CcEpochDataLossVersion *int64 `json:"CcEpochDataLossVersion,omitempty"` + // CcEpochConfigVersion - CcEpochConfig version. + CcEpochConfigVersion *int64 `json:"CcEpochConfigVersion,omitempty"` + // ReconfigType - Type of reconfiguration. + ReconfigType *string `json:"ReconfigType,omitempty"` + // Result - Describes reconfiguration result. + Result *string `json:"Result,omitempty"` + // Phase0DurationMs - Duration of Phase0 in milli-seconds. + Phase0DurationMs *float64 `json:"Phase0DurationMs,omitempty"` + // Phase1DurationMs - Duration of Phase1 in milli-seconds. + Phase1DurationMs *float64 `json:"Phase1DurationMs,omitempty"` + // Phase2DurationMs - Duration of Phase2 in milli-seconds. + Phase2DurationMs *float64 `json:"Phase2DurationMs,omitempty"` + // Phase3DurationMs - Duration of Phase3 in milli-seconds. + Phase3DurationMs *float64 `json:"Phase3DurationMs,omitempty"` + // Phase4DurationMs - Duration of Phase4 in milli-seconds. + Phase4DurationMs *float64 `json:"Phase4DurationMs,omitempty"` + // TotalDurationMs - Total duration in milli-seconds. + TotalDurationMs *float64 `json:"TotalDurationMs,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) MarshalJSON() ([]byte, error) { + pre.Kind = KindPartitionReconfigured + objectMap := make(map[string]interface{}) + if pre.NodeName != nil { + objectMap["NodeName"] = pre.NodeName + } + if pre.NodeInstanceID != nil { + objectMap["NodeInstanceId"] = pre.NodeInstanceID + } + if pre.ServiceType != nil { + objectMap["ServiceType"] = pre.ServiceType + } + if pre.CcEpochDataLossVersion != nil { + objectMap["CcEpochDataLossVersion"] = pre.CcEpochDataLossVersion + } + if pre.CcEpochConfigVersion != nil { + objectMap["CcEpochConfigVersion"] = pre.CcEpochConfigVersion + } + if pre.ReconfigType != nil { + objectMap["ReconfigType"] = pre.ReconfigType + } + if pre.Result != nil { + objectMap["Result"] = pre.Result + } + if pre.Phase0DurationMs != nil { + objectMap["Phase0DurationMs"] = pre.Phase0DurationMs + } + if pre.Phase1DurationMs != nil { + objectMap["Phase1DurationMs"] = pre.Phase1DurationMs + } + if pre.Phase2DurationMs != nil { + objectMap["Phase2DurationMs"] = pre.Phase2DurationMs + } + if pre.Phase3DurationMs != nil { + objectMap["Phase3DurationMs"] = pre.Phase3DurationMs + } + if pre.Phase4DurationMs != nil { + objectMap["Phase4DurationMs"] = pre.Phase4DurationMs + } + if pre.TotalDurationMs != nil { + objectMap["TotalDurationMs"] = pre.TotalDurationMs + } + if pre.PartitionID != nil { + objectMap["PartitionId"] = pre.PartitionID + } + if pre.EventInstanceID != nil { + objectMap["EventInstanceId"] = pre.EventInstanceID + } + if pre.Category != nil { + objectMap["Category"] = pre.Category + } + if pre.TimeStamp != nil { + objectMap["TimeStamp"] = pre.TimeStamp + } + if pre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = pre.HasCorrelatedEvents + } + if pre.Kind != "" { + objectMap["Kind"] = pre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return &pre, true +} + +// AsReplicaEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return &pre, true +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for PartitionReconfiguredEvent. +func (pre PartitionReconfiguredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &pre, true +} + +// PartitionRestartProgress information about a partition restart user-induced operation. +type PartitionRestartProgress struct { + autorest.Response `json:"-"` + // State - The state of the operation. Possible values include: 'OperationStateInvalid', 'OperationStateRunning', 'OperationStateRollingBack', 'OperationStateCompleted', 'OperationStateFaulted', 'OperationStateCancelled', 'OperationStateForceCancelled' + State OperationState `json:"State,omitempty"` + // RestartPartitionResult - Represents information about an operation in a terminal state (Completed or Faulted). + RestartPartitionResult *RestartPartitionResult `json:"RestartPartitionResult,omitempty"` +} + +// BasicPartitionSafetyCheck represents a safety check for the service partition being performed by service fabric +// before continuing with operations. +type BasicPartitionSafetyCheck interface { + AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) + AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) + AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) + AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) + AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) + AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) + AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) +} + +// PartitionSafetyCheck represents a safety check for the service partition being performed by service fabric +// before continuing with operations. +type PartitionSafetyCheck struct { + // PartitionID - Id of the partition which is undergoing the safety check. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +func unmarshalBasicPartitionSafetyCheck(body []byte) (BasicPartitionSafetyCheck, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindEnsureAvailability): + var easc EnsureAvailabilitySafetyCheck + err := json.Unmarshal(body, &easc) + return easc, err + case string(KindEnsurePartitionQuorum): + var epqsc EnsurePartitionQuorumSafetyCheck + err := json.Unmarshal(body, &epqsc) + return epqsc, err + case string(KindWaitForInbuildReplica): + var wfirsc WaitForInbuildReplicaSafetyCheck + err := json.Unmarshal(body, &wfirsc) + return wfirsc, err + case string(KindWaitForPrimaryPlacement): + var wfppsc WaitForPrimaryPlacementSafetyCheck + err := json.Unmarshal(body, &wfppsc) + return wfppsc, err + case string(KindWaitForPrimarySwap): + var wfpssc WaitForPrimarySwapSafetyCheck + err := json.Unmarshal(body, &wfpssc) + return wfpssc, err + case string(KindWaitForReconfiguration): + var wfrsc WaitForReconfigurationSafetyCheck + err := json.Unmarshal(body, &wfrsc) + return wfrsc, err + default: + var psc PartitionSafetyCheck + err := json.Unmarshal(body, &psc) + return psc, err + } +} +func unmarshalBasicPartitionSafetyCheckArray(body []byte) ([]BasicPartitionSafetyCheck, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pscArray := make([]BasicPartitionSafetyCheck, len(rawMessages)) + + for index, rawMessage := range rawMessages { + psc, err := unmarshalBasicPartitionSafetyCheck(*rawMessage) + if err != nil { + return nil, err + } + pscArray[index] = psc + } + return pscArray, nil +} + +// MarshalJSON is the custom marshaler for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) MarshalJSON() ([]byte, error) { + psc.Kind = KindPartitionSafetyCheck + objectMap := make(map[string]interface{}) + if psc.PartitionID != nil { + objectMap["PartitionId"] = psc.PartitionID + } + if psc.Kind != "" { + objectMap["Kind"] = psc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return &psc, true +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return &psc, true +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for PartitionSafetyCheck. +func (psc PartitionSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &psc, true +} + +// BasicPartitionSchemeDescription describes how the service is partitioned. +type BasicPartitionSchemeDescription interface { + AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) + AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) + AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) + AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) +} + +// PartitionSchemeDescription describes how the service is partitioned. +type PartitionSchemeDescription struct { + // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed1', 'PartitionSchemeSingleton1', 'PartitionSchemeUniformInt64Range1' + PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"` +} + +func unmarshalBasicPartitionSchemeDescription(body []byte) (BasicPartitionSchemeDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["PartitionScheme"] { + case string(PartitionSchemeNamed1): + var npsd NamedPartitionSchemeDescription + err := json.Unmarshal(body, &npsd) + return npsd, err + case string(PartitionSchemeSingleton1): + var spsd SingletonPartitionSchemeDescription + err := json.Unmarshal(body, &spsd) + return spsd, err + case string(PartitionSchemeUniformInt64Range1): + var ui6rpsd UniformInt64RangePartitionSchemeDescription + err := json.Unmarshal(body, &ui6rpsd) + return ui6rpsd, err + default: + var psd PartitionSchemeDescription + err := json.Unmarshal(body, &psd) + return psd, err + } +} +func unmarshalBasicPartitionSchemeDescriptionArray(body []byte) ([]BasicPartitionSchemeDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + psdArray := make([]BasicPartitionSchemeDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + psd, err := unmarshalBasicPartitionSchemeDescription(*rawMessage) + if err != nil { + return nil, err + } + psdArray[index] = psd + } + return psdArray, nil +} + +// MarshalJSON is the custom marshaler for PartitionSchemeDescription. +func (psd PartitionSchemeDescription) MarshalJSON() ([]byte, error) { + psd.PartitionScheme = PartitionSchemePartitionSchemeDescription + objectMap := make(map[string]interface{}) + if psd.PartitionScheme != "" { + objectMap["PartitionScheme"] = psd.PartitionScheme + } + return json.Marshal(objectMap) +} + +// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. +func (psd PartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { + return nil, false +} + +// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. +func (psd PartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { + return nil, false +} + +// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. +func (psd PartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { + return nil, false +} + +// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. +func (psd PartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { + return &psd, true +} + +// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for PartitionSchemeDescription. +func (psd PartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { + return &psd, true +} + +// PartitionsHealthEvaluation represents health evaluation for the partitions of a service, containing +// health evaluations for each unhealthy partition that impacts current aggregated health state. Can be +// returned when evaluating service health and the aggregated health state is either Error or Warning. +type PartitionsHealthEvaluation struct { + // MaxPercentUnhealthyPartitionsPerService - Maximum allowed percentage of unhealthy partitions per service from the ServiceTypeHealthPolicy. + MaxPercentUnhealthyPartitionsPerService *int32 `json:"MaxPercentUnhealthyPartitionsPerService,omitempty"` + // TotalCount - Total number of partitions of the service from the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy PartitionHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) MarshalJSON() ([]byte, error) { + phe.Kind = KindPartitions + objectMap := make(map[string]interface{}) + if phe.MaxPercentUnhealthyPartitionsPerService != nil { + objectMap["MaxPercentUnhealthyPartitionsPerService"] = phe.MaxPercentUnhealthyPartitionsPerService + } + if phe.TotalCount != nil { + objectMap["TotalCount"] = phe.TotalCount + } + if phe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = phe.UnhealthyEvaluations + } + if phe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = phe.AggregatedHealthState + } + if phe.Description != nil { + objectMap["Description"] = phe.Description + } + if phe.Kind != "" { + objectMap["Kind"] = phe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return &phe, true +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for PartitionsHealthEvaluation. +func (phe PartitionsHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &phe, true +} + +// PrimaryReplicatorStatus provides statistics about the Service Fabric Replicator, when it is functioning +// in a Primary role. +type PrimaryReplicatorStatus struct { + // ReplicationQueueStatus - Details about the replication queue on the primary replicator. + ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` + // RemoteReplicators - The status of all the active and idle secondary replicators that the primary is aware of. + RemoteReplicators *[]RemoteReplicatorStatus `json:"RemoteReplicators,omitempty"` + // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' + Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) MarshalJSON() ([]byte, error) { + prs.Kind = KindPrimary + objectMap := make(map[string]interface{}) + if prs.ReplicationQueueStatus != nil { + objectMap["ReplicationQueueStatus"] = prs.ReplicationQueueStatus + } + if prs.RemoteReplicators != nil { + objectMap["RemoteReplicators"] = prs.RemoteReplicators + } + if prs.Kind != "" { + objectMap["Kind"] = prs.Kind + } + return json.Marshal(objectMap) +} + +// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { + return &prs, true +} + +// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { + return nil, false +} + +// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { + return nil, false +} + +// AsReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { + return nil, false +} + +// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for PrimaryReplicatorStatus. +func (prs PrimaryReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { + return &prs, true +} + +// Probe probes have a number of fields that you can use to control their behavior. +type Probe struct { + // InitialDelaySeconds - The initial delay in seconds to start executing probe once code package has started. + InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` + // PeriodSeconds - Periodic seconds to execute probe. + PeriodSeconds *int32 `json:"periodSeconds,omitempty"` + // TimeoutSeconds - Period after which probe is considered as failed if it hasn't completed successfully. + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + // SuccessThreshold - The count of successful probe executions after which probe is considered success. + SuccessThreshold *int32 `json:"successThreshold,omitempty"` + // FailureThreshold - The count of failures after which probe is considered failed. + FailureThreshold *int32 `json:"failureThreshold,omitempty"` + // Exec - Exec command to run inside the container. + Exec *ProbeExec `json:"exec,omitempty"` + // HTTPGet - Http probe for the container. + HTTPGet *ProbeHTTPGet `json:"httpGet,omitempty"` + // TCPSocket - Tcp port to probe inside the container. + TCPSocket *ProbeTCPSocket `json:"tcpSocket,omitempty"` +} + +// ProbeExec exec command to run inside the container. +type ProbeExec struct { + // Command - Comma separated command to run inside the container for example "sh, -c, echo hello world". + Command *string `json:"command,omitempty"` +} + +// ProbeHTTPGet http probe for the container. +type ProbeHTTPGet struct { + // Port - Port to access for probe. + Port *int32 `json:"port,omitempty"` + // Path - Path to access on the HTTP request. + Path *string `json:"path,omitempty"` + // Host - Host IP to connect to. + Host *string `json:"host,omitempty"` + // HTTPHeaders - Headers to set in the request. + HTTPHeaders *[]ProbeHTTPGetHeaders `json:"httpHeaders,omitempty"` + // Scheme - Scheme for the http probe. Can be Http or Https. Possible values include: 'HTTP', 'HTTPS' + Scheme Scheme `json:"scheme,omitempty"` +} + +// ProbeHTTPGetHeaders http headers. +type ProbeHTTPGetHeaders struct { + // Name - The name of the header. + Name *string `json:"name,omitempty"` + // Value - The value of the header. + Value *string `json:"value,omitempty"` +} + +// ProbeTCPSocket tcp port to probe inside the container. +type ProbeTCPSocket struct { + // Port - Port to access for probe. + Port *int32 `json:"port,omitempty"` +} + +// PropertyBatchDescriptionList describes a list of property batch operations to be executed. Either all or +// none of the operations will be committed. +type PropertyBatchDescriptionList struct { + // Operations - A list of the property batch operations to be executed. + Operations *[]BasicPropertyBatchOperation `json:"Operations,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PropertyBatchDescriptionList struct. +func (pbdl *PropertyBatchDescriptionList) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "Operations": + if v != nil { + operations, err := unmarshalBasicPropertyBatchOperationArray(*v) + if err != nil { + return err + } + pbdl.Operations = &operations + } + } + } + + return nil +} + +// BasicPropertyBatchInfo information about the results of a property batch. +type BasicPropertyBatchInfo interface { + AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) + AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) + AsPropertyBatchInfo() (*PropertyBatchInfo, bool) +} + +// PropertyBatchInfo information about the results of a property batch. +type PropertyBatchInfo struct { + autorest.Response `json:"-"` + // Kind - Possible values include: 'KindPropertyBatchInfo', 'KindSuccessful', 'KindFailed' + Kind KindBasicPropertyBatchInfo `json:"Kind,omitempty"` +} + +func unmarshalBasicPropertyBatchInfo(body []byte) (BasicPropertyBatchInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindSuccessful): + var spbi SuccessfulPropertyBatchInfo + err := json.Unmarshal(body, &spbi) + return spbi, err + case string(KindFailed): + var fpbi FailedPropertyBatchInfo + err := json.Unmarshal(body, &fpbi) + return fpbi, err + default: + var pbi PropertyBatchInfo + err := json.Unmarshal(body, &pbi) + return pbi, err + } +} +func unmarshalBasicPropertyBatchInfoArray(body []byte) ([]BasicPropertyBatchInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pbiArray := make([]BasicPropertyBatchInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pbi, err := unmarshalBasicPropertyBatchInfo(*rawMessage) + if err != nil { + return nil, err + } + pbiArray[index] = pbi + } + return pbiArray, nil +} + +// MarshalJSON is the custom marshaler for PropertyBatchInfo. +func (pbi PropertyBatchInfo) MarshalJSON() ([]byte, error) { + pbi.Kind = KindPropertyBatchInfo + objectMap := make(map[string]interface{}) + if pbi.Kind != "" { + objectMap["Kind"] = pbi.Kind + } + return json.Marshal(objectMap) +} + +// AsSuccessfulPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. +func (pbi PropertyBatchInfo) AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) { + return nil, false +} + +// AsFailedPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. +func (pbi PropertyBatchInfo) AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) { + return nil, false +} + +// AsPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. +func (pbi PropertyBatchInfo) AsPropertyBatchInfo() (*PropertyBatchInfo, bool) { + return &pbi, true +} + +// AsBasicPropertyBatchInfo is the BasicPropertyBatchInfo implementation for PropertyBatchInfo. +func (pbi PropertyBatchInfo) AsBasicPropertyBatchInfo() (BasicPropertyBatchInfo, bool) { + return &pbi, true +} + +// PropertyBatchInfoModel ... +type PropertyBatchInfoModel struct { + autorest.Response `json:"-"` + Value BasicPropertyBatchInfo `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PropertyBatchInfoModel struct. +func (pbim *PropertyBatchInfoModel) UnmarshalJSON(body []byte) error { + pbi, err := unmarshalBasicPropertyBatchInfo(body) + if err != nil { + return err + } + pbim.Value = pbi + + return nil +} + +// BasicPropertyBatchOperation represents the base type for property operations that can be put into a batch and +// submitted. +type BasicPropertyBatchOperation interface { + AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) + AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) + AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) + AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) + AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) + AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) + AsPropertyBatchOperation() (*PropertyBatchOperation, bool) +} + +// PropertyBatchOperation represents the base type for property operations that can be put into a batch and +// submitted. +type PropertyBatchOperation struct { + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' + Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` +} + +func unmarshalBasicPropertyBatchOperation(body []byte) (BasicPropertyBatchOperation, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindCheckExists): + var cepbo CheckExistsPropertyBatchOperation + err := json.Unmarshal(body, &cepbo) + return cepbo, err + case string(KindCheckSequence): + var cspbo CheckSequencePropertyBatchOperation + err := json.Unmarshal(body, &cspbo) + return cspbo, err + case string(KindCheckValue): + var cvpbo CheckValuePropertyBatchOperation + err := json.Unmarshal(body, &cvpbo) + return cvpbo, err + case string(KindDelete): + var dpbo DeletePropertyBatchOperation + err := json.Unmarshal(body, &dpbo) + return dpbo, err + case string(KindGet): + var gpbo GetPropertyBatchOperation + err := json.Unmarshal(body, &gpbo) + return gpbo, err + case string(KindPut): + var ppbo PutPropertyBatchOperation + err := json.Unmarshal(body, &ppbo) + return ppbo, err + default: + var pbo PropertyBatchOperation + err := json.Unmarshal(body, &pbo) + return pbo, err + } +} +func unmarshalBasicPropertyBatchOperationArray(body []byte) ([]BasicPropertyBatchOperation, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pboArray := make([]BasicPropertyBatchOperation, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pbo, err := unmarshalBasicPropertyBatchOperation(*rawMessage) + if err != nil { + return nil, err + } + pboArray[index] = pbo + } + return pboArray, nil +} + +// MarshalJSON is the custom marshaler for PropertyBatchOperation. +func (pbo PropertyBatchOperation) MarshalJSON() ([]byte, error) { + pbo.Kind = KindPropertyBatchOperation + objectMap := make(map[string]interface{}) + if pbo.PropertyName != nil { + objectMap["PropertyName"] = pbo.PropertyName + } + if pbo.Kind != "" { + objectMap["Kind"] = pbo.Kind + } + return json.Marshal(objectMap) +} + +// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { + return nil, false +} + +// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { + return nil, false +} + +// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { + return nil, false +} + +// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { + return nil, false +} + +// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { + return &pbo, true +} + +// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PropertyBatchOperation. +func (pbo PropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { + return &pbo, true +} + +// PropertyDescription description of a Service Fabric property. +type PropertyDescription struct { + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // CustomTypeID - The property's custom type ID. Using this property, the user is able to tag the type of the value of the property. + CustomTypeID *string `json:"CustomTypeId,omitempty"` + // Value - Describes a Service Fabric property value. + Value BasicPropertyValue `json:"Value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PropertyDescription struct. +func (pd *PropertyDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "PropertyName": + if v != nil { + var propertyName string + err = json.Unmarshal(*v, &propertyName) + if err != nil { + return err + } + pd.PropertyName = &propertyName + } + case "CustomTypeId": + if v != nil { + var customTypeID string + err = json.Unmarshal(*v, &customTypeID) + if err != nil { + return err + } + pd.CustomTypeID = &customTypeID + } + case "Value": + if v != nil { + value, err := unmarshalBasicPropertyValue(*v) + if err != nil { + return err + } + pd.Value = value + } + } + } + + return nil +} + +// PropertyInfo information about a Service Fabric property. +type PropertyInfo struct { + autorest.Response `json:"-"` + // Name - The name of the Service Fabric property. + Name *string `json:"Name,omitempty"` + // Value - Describes a Service Fabric property value. + Value BasicPropertyValue `json:"Value,omitempty"` + // Metadata - The metadata associated with a property, including the property's name. + Metadata *PropertyMetadata `json:"Metadata,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PropertyInfo struct. +func (pi *PropertyInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "Name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pi.Name = &name + } + case "Value": + if v != nil { + value, err := unmarshalBasicPropertyValue(*v) + if err != nil { + return err + } + pi.Value = value + } + case "Metadata": + if v != nil { + var metadata PropertyMetadata + err = json.Unmarshal(*v, &metadata) + if err != nil { + return err + } + pi.Metadata = &metadata + } + } + } + + return nil +} + +// PropertyMetadata the metadata associated with a property, including the property's name. +type PropertyMetadata struct { + // TypeID - The kind of property, determined by the type of data. Following are the possible values. Possible values include: 'PropertyValueKindInvalid', 'PropertyValueKindBinary', 'PropertyValueKindInt64', 'PropertyValueKindDouble', 'PropertyValueKindString', 'PropertyValueKindGUID' + TypeID PropertyValueKind `json:"TypeId,omitempty"` + // CustomTypeID - The property's custom type ID. + CustomTypeID *string `json:"CustomTypeId,omitempty"` + // Parent - The name of the parent Service Fabric Name for the property. It could be thought of as the name-space/table under which the property exists. + Parent *string `json:"Parent,omitempty"` + // SizeInBytes - The length of the serialized property value. + SizeInBytes *int32 `json:"SizeInBytes,omitempty"` + // LastModifiedUtcTimestamp - Represents when the Property was last modified. Only write operations will cause this field to be updated. + LastModifiedUtcTimestamp *date.Time `json:"LastModifiedUtcTimestamp,omitempty"` + // SequenceNumber - The version of the property. Every time a property is modified, its sequence number is increased. + SequenceNumber *string `json:"SequenceNumber,omitempty"` +} + +// BasicPropertyValue describes a Service Fabric property value. +type BasicPropertyValue interface { + AsBinaryPropertyValue() (*BinaryPropertyValue, bool) + AsInt64PropertyValue() (*Int64PropertyValue, bool) + AsDoublePropertyValue() (*DoublePropertyValue, bool) + AsStringPropertyValue() (*StringPropertyValue, bool) + AsGUIDPropertyValue() (*GUIDPropertyValue, bool) + AsPropertyValue() (*PropertyValue, bool) +} + +// PropertyValue describes a Service Fabric property value. +type PropertyValue struct { + // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' + Kind KindBasicPropertyValue `json:"Kind,omitempty"` +} + +func unmarshalBasicPropertyValue(body []byte) (BasicPropertyValue, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindBinary): + var bpv BinaryPropertyValue + err := json.Unmarshal(body, &bpv) + return bpv, err + case string(KindInt64): + var i6pv Int64PropertyValue + err := json.Unmarshal(body, &i6pv) + return i6pv, err + case string(KindDouble): + var dpv DoublePropertyValue + err := json.Unmarshal(body, &dpv) + return dpv, err + case string(KindString): + var spv StringPropertyValue + err := json.Unmarshal(body, &spv) + return spv, err + case string(KindGUID): + var gpv GUIDPropertyValue + err := json.Unmarshal(body, &gpv) + return gpv, err + default: + var pv PropertyValue + err := json.Unmarshal(body, &pv) + return pv, err + } +} +func unmarshalBasicPropertyValueArray(body []byte) ([]BasicPropertyValue, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pvArray := make([]BasicPropertyValue, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pv, err := unmarshalBasicPropertyValue(*rawMessage) + if err != nil { + return nil, err + } + pvArray[index] = pv + } + return pvArray, nil +} + +// MarshalJSON is the custom marshaler for PropertyValue. +func (pv PropertyValue) MarshalJSON() ([]byte, error) { + pv.Kind = KindPropertyValue + objectMap := make(map[string]interface{}) + if pv.Kind != "" { + objectMap["Kind"] = pv.Kind + } + return json.Marshal(objectMap) +} + +// AsBinaryPropertyValue is the BasicPropertyValue implementation for PropertyValue. +func (pv PropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { + return nil, false +} + +// AsInt64PropertyValue is the BasicPropertyValue implementation for PropertyValue. +func (pv PropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { + return nil, false +} + +// AsDoublePropertyValue is the BasicPropertyValue implementation for PropertyValue. +func (pv PropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { + return nil, false +} + +// AsStringPropertyValue is the BasicPropertyValue implementation for PropertyValue. +func (pv PropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { + return nil, false +} + +// AsGUIDPropertyValue is the BasicPropertyValue implementation for PropertyValue. +func (pv PropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { + return nil, false +} + +// AsPropertyValue is the BasicPropertyValue implementation for PropertyValue. +func (pv PropertyValue) AsPropertyValue() (*PropertyValue, bool) { + return &pv, true +} + +// AsBasicPropertyValue is the BasicPropertyValue implementation for PropertyValue. +func (pv PropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { + return &pv, true +} + +// ProvisionApplicationTypeDescription describes the operation to register or provision an application type +// using an application package uploaded to the Service Fabric image store. +type ProvisionApplicationTypeDescription struct { + // ApplicationTypeBuildPath - The relative path for the application package in the image store specified during the prior upload operation. + ApplicationTypeBuildPath *string `json:"ApplicationTypeBuildPath,omitempty"` + // ApplicationPackageCleanupPolicy - The kind of action that needs to be taken for cleaning up the application package after successful provision. Possible values include: 'ApplicationPackageCleanupPolicyInvalid', 'ApplicationPackageCleanupPolicyDefault', 'ApplicationPackageCleanupPolicyAutomatic', 'ApplicationPackageCleanupPolicyManual' + ApplicationPackageCleanupPolicy ApplicationPackageCleanupPolicy `json:"ApplicationPackageCleanupPolicy,omitempty"` + // Async - Indicates whether or not provisioning should occur asynchronously. When set to true, the provision operation returns when the request is accepted by the system, and the provision operation continues without any timeout limit. The default value is false. For large application packages, we recommend setting the value to true. + Async *bool `json:"Async,omitempty"` + // Kind - Possible values include: 'KindProvisionApplicationTypeDescriptionBase', 'KindImageStorePath', 'KindExternalStore' + Kind KindBasicProvisionApplicationTypeDescriptionBase `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ProvisionApplicationTypeDescription. +func (patd ProvisionApplicationTypeDescription) MarshalJSON() ([]byte, error) { + patd.Kind = KindImageStorePath + objectMap := make(map[string]interface{}) + if patd.ApplicationTypeBuildPath != nil { + objectMap["ApplicationTypeBuildPath"] = patd.ApplicationTypeBuildPath + } + if patd.ApplicationPackageCleanupPolicy != "" { + objectMap["ApplicationPackageCleanupPolicy"] = patd.ApplicationPackageCleanupPolicy + } + if patd.Async != nil { + objectMap["Async"] = patd.Async + } + if patd.Kind != "" { + objectMap["Kind"] = patd.Kind + } + return json.Marshal(objectMap) +} + +// AsProvisionApplicationTypeDescription is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescription. +func (patd ProvisionApplicationTypeDescription) AsProvisionApplicationTypeDescription() (*ProvisionApplicationTypeDescription, bool) { + return &patd, true +} + +// AsExternalStoreProvisionApplicationTypeDescription is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescription. +func (patd ProvisionApplicationTypeDescription) AsExternalStoreProvisionApplicationTypeDescription() (*ExternalStoreProvisionApplicationTypeDescription, bool) { + return nil, false +} + +// AsProvisionApplicationTypeDescriptionBase is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescription. +func (patd ProvisionApplicationTypeDescription) AsProvisionApplicationTypeDescriptionBase() (*ProvisionApplicationTypeDescriptionBase, bool) { + return nil, false +} + +// AsBasicProvisionApplicationTypeDescriptionBase is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescription. +func (patd ProvisionApplicationTypeDescription) AsBasicProvisionApplicationTypeDescriptionBase() (BasicProvisionApplicationTypeDescriptionBase, bool) { + return &patd, true +} + +// BasicProvisionApplicationTypeDescriptionBase represents the type of registration or provision requested, and if the +// operation needs to be asynchronous or not. Supported types of provision operations are from either image store or +// external store. +type BasicProvisionApplicationTypeDescriptionBase interface { + AsProvisionApplicationTypeDescription() (*ProvisionApplicationTypeDescription, bool) + AsExternalStoreProvisionApplicationTypeDescription() (*ExternalStoreProvisionApplicationTypeDescription, bool) + AsProvisionApplicationTypeDescriptionBase() (*ProvisionApplicationTypeDescriptionBase, bool) +} + +// ProvisionApplicationTypeDescriptionBase represents the type of registration or provision requested, and if +// the operation needs to be asynchronous or not. Supported types of provision operations are from either image +// store or external store. +type ProvisionApplicationTypeDescriptionBase struct { + // Async - Indicates whether or not provisioning should occur asynchronously. When set to true, the provision operation returns when the request is accepted by the system, and the provision operation continues without any timeout limit. The default value is false. For large application packages, we recommend setting the value to true. + Async *bool `json:"Async,omitempty"` + // Kind - Possible values include: 'KindProvisionApplicationTypeDescriptionBase', 'KindImageStorePath', 'KindExternalStore' + Kind KindBasicProvisionApplicationTypeDescriptionBase `json:"Kind,omitempty"` +} + +func unmarshalBasicProvisionApplicationTypeDescriptionBase(body []byte) (BasicProvisionApplicationTypeDescriptionBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindImageStorePath): + var patd ProvisionApplicationTypeDescription + err := json.Unmarshal(body, &patd) + return patd, err + case string(KindExternalStore): + var espatd ExternalStoreProvisionApplicationTypeDescription + err := json.Unmarshal(body, &espatd) + return espatd, err + default: + var patdb ProvisionApplicationTypeDescriptionBase + err := json.Unmarshal(body, &patdb) + return patdb, err + } +} +func unmarshalBasicProvisionApplicationTypeDescriptionBaseArray(body []byte) ([]BasicProvisionApplicationTypeDescriptionBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + patdbArray := make([]BasicProvisionApplicationTypeDescriptionBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + patdb, err := unmarshalBasicProvisionApplicationTypeDescriptionBase(*rawMessage) + if err != nil { + return nil, err + } + patdbArray[index] = patdb + } + return patdbArray, nil +} + +// MarshalJSON is the custom marshaler for ProvisionApplicationTypeDescriptionBase. +func (patdb ProvisionApplicationTypeDescriptionBase) MarshalJSON() ([]byte, error) { + patdb.Kind = KindProvisionApplicationTypeDescriptionBase + objectMap := make(map[string]interface{}) + if patdb.Async != nil { + objectMap["Async"] = patdb.Async + } + if patdb.Kind != "" { + objectMap["Kind"] = patdb.Kind + } + return json.Marshal(objectMap) +} + +// AsProvisionApplicationTypeDescription is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescriptionBase. +func (patdb ProvisionApplicationTypeDescriptionBase) AsProvisionApplicationTypeDescription() (*ProvisionApplicationTypeDescription, bool) { + return nil, false +} + +// AsExternalStoreProvisionApplicationTypeDescription is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescriptionBase. +func (patdb ProvisionApplicationTypeDescriptionBase) AsExternalStoreProvisionApplicationTypeDescription() (*ExternalStoreProvisionApplicationTypeDescription, bool) { + return nil, false +} + +// AsProvisionApplicationTypeDescriptionBase is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescriptionBase. +func (patdb ProvisionApplicationTypeDescriptionBase) AsProvisionApplicationTypeDescriptionBase() (*ProvisionApplicationTypeDescriptionBase, bool) { + return &patdb, true +} + +// AsBasicProvisionApplicationTypeDescriptionBase is the BasicProvisionApplicationTypeDescriptionBase implementation for ProvisionApplicationTypeDescriptionBase. +func (patdb ProvisionApplicationTypeDescriptionBase) AsBasicProvisionApplicationTypeDescriptionBase() (BasicProvisionApplicationTypeDescriptionBase, bool) { + return &patdb, true +} + +// ProvisionFabricDescription describes the parameters for provisioning a cluster. +type ProvisionFabricDescription struct { + // CodeFilePath - The cluster code package file path. + CodeFilePath *string `json:"CodeFilePath,omitempty"` + // ClusterManifestFilePath - The cluster manifest file path. + ClusterManifestFilePath *string `json:"ClusterManifestFilePath,omitempty"` +} + +// PutPropertyBatchOperation puts the specified property under the specified name. +// Note that if one PropertyBatchOperation in a PropertyBatch fails, +// the entire batch fails and cannot be committed in a transactional manner. +type PutPropertyBatchOperation struct { + // Value - Describes a Service Fabric property value. + Value BasicPropertyValue `json:"Value,omitempty"` + // CustomTypeID - The property's custom type ID. Using this property, the user is able to tag the type of the value of the property. + CustomTypeID *string `json:"CustomTypeId,omitempty"` + // PropertyName - The name of the Service Fabric property. + PropertyName *string `json:"PropertyName,omitempty"` + // Kind - Possible values include: 'KindPropertyBatchOperation', 'KindCheckExists', 'KindCheckSequence', 'KindCheckValue', 'KindDelete', 'KindGet', 'KindPut' + Kind KindBasicPropertyBatchOperation `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) MarshalJSON() ([]byte, error) { + ppbo.Kind = KindPut + objectMap := make(map[string]interface{}) + objectMap["Value"] = ppbo.Value + if ppbo.CustomTypeID != nil { + objectMap["CustomTypeId"] = ppbo.CustomTypeID + } + if ppbo.PropertyName != nil { + objectMap["PropertyName"] = ppbo.PropertyName + } + if ppbo.Kind != "" { + objectMap["Kind"] = ppbo.Kind + } + return json.Marshal(objectMap) +} + +// AsCheckExistsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsCheckExistsPropertyBatchOperation() (*CheckExistsPropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckSequencePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsCheckSequencePropertyBatchOperation() (*CheckSequencePropertyBatchOperation, bool) { + return nil, false +} + +// AsCheckValuePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsCheckValuePropertyBatchOperation() (*CheckValuePropertyBatchOperation, bool) { + return nil, false +} + +// AsDeletePropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsDeletePropertyBatchOperation() (*DeletePropertyBatchOperation, bool) { + return nil, false +} + +// AsGetPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsGetPropertyBatchOperation() (*GetPropertyBatchOperation, bool) { + return nil, false +} + +// AsPutPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsPutPropertyBatchOperation() (*PutPropertyBatchOperation, bool) { + return &ppbo, true +} + +// AsPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsPropertyBatchOperation() (*PropertyBatchOperation, bool) { + return nil, false +} + +// AsBasicPropertyBatchOperation is the BasicPropertyBatchOperation implementation for PutPropertyBatchOperation. +func (ppbo PutPropertyBatchOperation) AsBasicPropertyBatchOperation() (BasicPropertyBatchOperation, bool) { + return &ppbo, true +} + +// UnmarshalJSON is the custom unmarshaler for PutPropertyBatchOperation struct. +func (ppbo *PutPropertyBatchOperation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "Value": + if v != nil { + value, err := unmarshalBasicPropertyValue(*v) + if err != nil { + return err + } + ppbo.Value = value + } + case "CustomTypeId": + if v != nil { + var customTypeID string + err = json.Unmarshal(*v, &customTypeID) + if err != nil { + return err + } + ppbo.CustomTypeID = &customTypeID + } + case "PropertyName": + if v != nil { + var propertyName string + err = json.Unmarshal(*v, &propertyName) + if err != nil { + return err + } + ppbo.PropertyName = &propertyName + } + case "Kind": + if v != nil { + var kind KindBasicPropertyBatchOperation + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + ppbo.Kind = kind + } + } + } + + return nil +} + +// ReconfigurationInformation information about current reconfiguration like phase, type, previous +// configuration role of replica and reconfiguration start date time. +type ReconfigurationInformation struct { + // PreviousConfigurationRole - Replica role before reconfiguration started. Possible values include: 'ReplicaRoleUnknown', 'ReplicaRoleNone', 'ReplicaRolePrimary', 'ReplicaRoleIdleSecondary', 'ReplicaRoleActiveSecondary' + PreviousConfigurationRole ReplicaRole `json:"PreviousConfigurationRole,omitempty"` + // ReconfigurationPhase - Current phase of ongoing reconfiguration. If no reconfiguration is taking place then this value will be "None". Possible values include: 'ReconfigurationPhaseUnknown', 'ReconfigurationPhaseNone', 'ReconfigurationPhasePhase0', 'ReconfigurationPhasePhase1', 'ReconfigurationPhasePhase2', 'ReconfigurationPhasePhase3', 'ReconfigurationPhasePhase4', 'ReconfigurationPhaseAbortPhaseZero' + ReconfigurationPhase ReconfigurationPhase `json:"ReconfigurationPhase,omitempty"` + // ReconfigurationType - Type of current ongoing reconfiguration. If no reconfiguration is taking place then this value will be "None". Possible values include: 'ReconfigurationTypeUnknown', 'ReconfigurationTypeSwapPrimary', 'ReconfigurationTypeFailover', 'ReconfigurationTypeOther' + ReconfigurationType ReconfigurationType `json:"ReconfigurationType,omitempty"` + // ReconfigurationStartTimeUtc - Start time (in UTC) of the ongoing reconfiguration. If no reconfiguration is taking place then this value will be zero date-time. + ReconfigurationStartTimeUtc *date.Time `json:"ReconfigurationStartTimeUtc,omitempty"` +} + +// RegistryCredential credential information to connect to container registry. +type RegistryCredential struct { + // RegistryUserName - The user name to connect to container registry. + RegistryUserName *string `json:"RegistryUserName,omitempty"` + // RegistryPassword - The password for supplied username to connect to container registry. + RegistryPassword *string `json:"RegistryPassword,omitempty"` + // PasswordEncrypted - Indicates that supplied container registry password is encrypted. + PasswordEncrypted *bool `json:"PasswordEncrypted,omitempty"` +} + +// ReliableCollectionsRef specifying this parameter adds support for reliable collections +type ReliableCollectionsRef struct { + // Name - Name of ReliableCollection resource. Right now it's not used and you can use any string. + Name *string `json:"name,omitempty"` + // DoNotPersistState - False (the default) if ReliableCollections state is persisted to disk as usual. True if you do not want to persist state, in which case replication is still enabled and you can use ReliableCollections as distributed cache. + DoNotPersistState *bool `json:"doNotPersistState,omitempty"` +} + +// RemoteReplicatorAcknowledgementDetail provides various statistics of the acknowledgements that are being +// received from the remote replicator. +type RemoteReplicatorAcknowledgementDetail struct { + // AverageReceiveDuration - Represents the average duration it takes for the remote replicator to receive an operation. + AverageReceiveDuration *string `json:"AverageReceiveDuration,omitempty"` + // AverageApplyDuration - Represents the average duration it takes for the remote replicator to apply an operation. This usually entails writing the operation to disk. + AverageApplyDuration *string `json:"AverageApplyDuration,omitempty"` + // NotReceivedCount - Represents the number of operations not yet received by a remote replicator. + NotReceivedCount *string `json:"NotReceivedCount,omitempty"` + // ReceivedAndNotAppliedCount - Represents the number of operations received and not yet applied by a remote replicator. + ReceivedAndNotAppliedCount *string `json:"ReceivedAndNotAppliedCount,omitempty"` +} + +// RemoteReplicatorAcknowledgementStatus provides details about the remote replicators from the primary +// replicator's point of view. +type RemoteReplicatorAcknowledgementStatus struct { + // ReplicationStreamAcknowledgementDetail - Details about the acknowledgements for operations that are part of the replication stream data. + ReplicationStreamAcknowledgementDetail *RemoteReplicatorAcknowledgementDetail `json:"ReplicationStreamAcknowledgementDetail,omitempty"` + // CopyStreamAcknowledgementDetail - Details about the acknowledgements for operations that are part of the copy stream data. + CopyStreamAcknowledgementDetail *RemoteReplicatorAcknowledgementDetail `json:"CopyStreamAcknowledgementDetail,omitempty"` +} + +// RemoteReplicatorStatus represents the state of the secondary replicator from the primary replicator’s +// point of view. +type RemoteReplicatorStatus struct { + // ReplicaID - Represents the replica ID of the remote secondary replicator. + ReplicaID *string `json:"ReplicaId,omitempty"` + // LastAcknowledgementProcessedTimeUtc - The last timestamp (in UTC) when an acknowledgement from the secondary replicator was processed on the primary. + // UTC 0 represents an invalid value, indicating that no acknowledgement messages were ever processed. + LastAcknowledgementProcessedTimeUtc *date.Time `json:"LastAcknowledgementProcessedTimeUtc,omitempty"` + // LastReceivedReplicationSequenceNumber - The highest replication operation sequence number that the secondary has received from the primary. + LastReceivedReplicationSequenceNumber *string `json:"LastReceivedReplicationSequenceNumber,omitempty"` + // LastAppliedReplicationSequenceNumber - The highest replication operation sequence number that the secondary has applied to its state. + LastAppliedReplicationSequenceNumber *string `json:"LastAppliedReplicationSequenceNumber,omitempty"` + // IsInBuild - A value that indicates whether the secondary replica is in the process of being built. + IsInBuild *bool `json:"IsInBuild,omitempty"` + // LastReceivedCopySequenceNumber - The highest copy operation sequence number that the secondary has received from the primary. + // A value of -1 implies that the secondary has received all copy operations. + LastReceivedCopySequenceNumber *string `json:"LastReceivedCopySequenceNumber,omitempty"` + // LastAppliedCopySequenceNumber - The highest copy operation sequence number that the secondary has applied to its state. + // A value of -1 implies that the secondary has applied all copy operations and the copy process is complete. + LastAppliedCopySequenceNumber *string `json:"LastAppliedCopySequenceNumber,omitempty"` + // RemoteReplicatorAcknowledgementStatus - Represents the acknowledgment status for the remote secondary replicator. + RemoteReplicatorAcknowledgementStatus *RemoteReplicatorAcknowledgementStatus `json:"RemoteReplicatorAcknowledgementStatus,omitempty"` +} + +// BasicRepairImpactDescriptionBase describes the expected impact of executing a repair task. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type BasicRepairImpactDescriptionBase interface { + AsNodeRepairImpactDescription() (*NodeRepairImpactDescription, bool) + AsRepairImpactDescriptionBase() (*RepairImpactDescriptionBase, bool) +} + +// RepairImpactDescriptionBase describes the expected impact of executing a repair task. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairImpactDescriptionBase struct { + // Kind - Possible values include: 'KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase', 'KindBasicRepairImpactDescriptionBaseKindNode' + Kind KindBasicRepairImpactDescriptionBase `json:"Kind,omitempty"` +} + +func unmarshalBasicRepairImpactDescriptionBase(body []byte) (BasicRepairImpactDescriptionBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindBasicRepairImpactDescriptionBaseKindNode): + var nrid NodeRepairImpactDescription + err := json.Unmarshal(body, &nrid) + return nrid, err + default: + var ridb RepairImpactDescriptionBase + err := json.Unmarshal(body, &ridb) + return ridb, err + } +} +func unmarshalBasicRepairImpactDescriptionBaseArray(body []byte) ([]BasicRepairImpactDescriptionBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ridbArray := make([]BasicRepairImpactDescriptionBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ridb, err := unmarshalBasicRepairImpactDescriptionBase(*rawMessage) + if err != nil { + return nil, err + } + ridbArray[index] = ridb + } + return ridbArray, nil +} + +// MarshalJSON is the custom marshaler for RepairImpactDescriptionBase. +func (ridb RepairImpactDescriptionBase) MarshalJSON() ([]byte, error) { + ridb.Kind = KindBasicRepairImpactDescriptionBaseKindRepairImpactDescriptionBase + objectMap := make(map[string]interface{}) + if ridb.Kind != "" { + objectMap["Kind"] = ridb.Kind + } + return json.Marshal(objectMap) +} + +// AsNodeRepairImpactDescription is the BasicRepairImpactDescriptionBase implementation for RepairImpactDescriptionBase. +func (ridb RepairImpactDescriptionBase) AsNodeRepairImpactDescription() (*NodeRepairImpactDescription, bool) { + return nil, false +} + +// AsRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for RepairImpactDescriptionBase. +func (ridb RepairImpactDescriptionBase) AsRepairImpactDescriptionBase() (*RepairImpactDescriptionBase, bool) { + return &ridb, true +} + +// AsBasicRepairImpactDescriptionBase is the BasicRepairImpactDescriptionBase implementation for RepairImpactDescriptionBase. +func (ridb RepairImpactDescriptionBase) AsBasicRepairImpactDescriptionBase() (BasicRepairImpactDescriptionBase, bool) { + return &ridb, true +} + +// BasicRepairTargetDescriptionBase describes the entities targeted by a repair action. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type BasicRepairTargetDescriptionBase interface { + AsNodeRepairTargetDescription() (*NodeRepairTargetDescription, bool) + AsRepairTargetDescriptionBase() (*RepairTargetDescriptionBase, bool) +} + +// RepairTargetDescriptionBase describes the entities targeted by a repair action. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTargetDescriptionBase struct { + // Kind - Possible values include: 'KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase', 'KindBasicRepairTargetDescriptionBaseKindNode' + Kind KindBasicRepairTargetDescriptionBase `json:"Kind,omitempty"` +} + +func unmarshalBasicRepairTargetDescriptionBase(body []byte) (BasicRepairTargetDescriptionBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindBasicRepairTargetDescriptionBaseKindNode): + var nrtd NodeRepairTargetDescription + err := json.Unmarshal(body, &nrtd) + return nrtd, err + default: + var rtdb RepairTargetDescriptionBase + err := json.Unmarshal(body, &rtdb) + return rtdb, err + } +} +func unmarshalBasicRepairTargetDescriptionBaseArray(body []byte) ([]BasicRepairTargetDescriptionBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rtdbArray := make([]BasicRepairTargetDescriptionBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rtdb, err := unmarshalBasicRepairTargetDescriptionBase(*rawMessage) + if err != nil { + return nil, err + } + rtdbArray[index] = rtdb + } + return rtdbArray, nil +} + +// MarshalJSON is the custom marshaler for RepairTargetDescriptionBase. +func (rtdb RepairTargetDescriptionBase) MarshalJSON() ([]byte, error) { + rtdb.Kind = KindBasicRepairTargetDescriptionBaseKindRepairTargetDescriptionBase + objectMap := make(map[string]interface{}) + if rtdb.Kind != "" { + objectMap["Kind"] = rtdb.Kind + } + return json.Marshal(objectMap) +} + +// AsNodeRepairTargetDescription is the BasicRepairTargetDescriptionBase implementation for RepairTargetDescriptionBase. +func (rtdb RepairTargetDescriptionBase) AsNodeRepairTargetDescription() (*NodeRepairTargetDescription, bool) { + return nil, false +} + +// AsRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for RepairTargetDescriptionBase. +func (rtdb RepairTargetDescriptionBase) AsRepairTargetDescriptionBase() (*RepairTargetDescriptionBase, bool) { + return &rtdb, true +} + +// AsBasicRepairTargetDescriptionBase is the BasicRepairTargetDescriptionBase implementation for RepairTargetDescriptionBase. +func (rtdb RepairTargetDescriptionBase) AsBasicRepairTargetDescriptionBase() (BasicRepairTargetDescriptionBase, bool) { + return &rtdb, true +} + +// RepairTask represents a repair task, which includes information about what kind of repair was requested, +// what its progress is, and what its final result was. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTask struct { + // TaskID - The ID of the repair task. + TaskID *string `json:"TaskId,omitempty"` + // Version - The version of the repair task. + // When creating a new repair task, the version must be set to zero. When updating a repair task, + // the version is used for optimistic concurrency checks. If the version is + // set to zero, the update will not check for write conflicts. If the version is set to a non-zero value, then the + // update will only succeed if the actual current version of the repair task matches this value. + Version *string `json:"Version,omitempty"` + // Description - A description of the purpose of the repair task, or other informational details. + // May be set when the repair task is created, and is immutable once set. + Description *string `json:"Description,omitempty"` + // State - The workflow state of the repair task. Valid initial states are Created, Claimed, and Preparing. Possible values include: 'StateInvalid', 'StateCreated', 'StateClaimed', 'StatePreparing', 'StateApproved', 'StateExecuting', 'StateRestoring', 'StateCompleted' + State State `json:"State,omitempty"` + // Flags - A bitwise-OR of the following values, which gives additional details about the status of the repair task. + // - 1 - Cancellation of the repair has been requested + // - 2 - Abort of the repair has been requested + // - 4 - Approval of the repair was forced via client request + Flags *int32 `json:"Flags,omitempty"` + // Action - The requested repair action. Must be specified when the repair task is created, and is immutable once set. + Action *string `json:"Action,omitempty"` + // Target - The target object determines what actions the system will take to prepare for the impact of the repair, prior to approving execution of the repair. + // May be set when the repair task is created, and is immutable once set. + Target BasicRepairTargetDescriptionBase `json:"Target,omitempty"` + // Executor - The name of the repair executor. Must be specified in Claimed and later states, and is immutable once set. + Executor *string `json:"Executor,omitempty"` + // ExecutorData - A data string that the repair executor can use to store its internal state. + ExecutorData *string `json:"ExecutorData,omitempty"` + // Impact - The impact object determines what actions the system will take to prepare for the impact of the repair, prior to approving execution of the repair. + // Impact must be specified by the repair executor when transitioning to the Preparing state, and is immutable once set. + Impact BasicRepairImpactDescriptionBase `json:"Impact,omitempty"` + // ResultStatus - A value describing the overall result of the repair task execution. Must be specified in the Restoring and later states, and is immutable once set. Possible values include: 'ResultStatusInvalid', 'ResultStatusSucceeded', 'ResultStatusCancelled', 'ResultStatusInterrupted', 'ResultStatusFailed', 'ResultStatusPending' + ResultStatus ResultStatus `json:"ResultStatus,omitempty"` + // ResultCode - A numeric value providing additional details about the result of the repair task execution. + // May be specified in the Restoring and later states, and is immutable once set. + ResultCode *int32 `json:"ResultCode,omitempty"` + // ResultDetails - A string providing additional details about the result of the repair task execution. + // May be specified in the Restoring and later states, and is immutable once set. + ResultDetails *string `json:"ResultDetails,omitempty"` + // History - An object that contains timestamps of the repair task's state transitions. + // These timestamps are updated by the system, and cannot be directly modified. + History *RepairTaskHistory `json:"History,omitempty"` + // PreparingHealthCheckState - The workflow state of the health check when the repair task is in the Preparing state. Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + PreparingHealthCheckState RepairTaskHealthCheckState `json:"PreparingHealthCheckState,omitempty"` + // RestoringHealthCheckState - The workflow state of the health check when the repair task is in the Restoring state. Possible values include: 'NotStarted', 'InProgress', 'Succeeded', 'Skipped', 'TimedOut' + RestoringHealthCheckState RepairTaskHealthCheckState `json:"RestoringHealthCheckState,omitempty"` + // PerformPreparingHealthCheck - A value to determine if health checks will be performed when the repair task enters the Preparing state. + PerformPreparingHealthCheck *bool `json:"PerformPreparingHealthCheck,omitempty"` + // PerformRestoringHealthCheck - A value to determine if health checks will be performed when the repair task enters the Restoring state. + PerformRestoringHealthCheck *bool `json:"PerformRestoringHealthCheck,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RepairTask struct. +func (rt *RepairTask) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "TaskId": + if v != nil { + var taskID string + err = json.Unmarshal(*v, &taskID) + if err != nil { + return err + } + rt.TaskID = &taskID + } + case "Version": + if v != nil { + var version string + err = json.Unmarshal(*v, &version) + if err != nil { + return err + } + rt.Version = &version + } + case "Description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + rt.Description = &description + } + case "State": + if v != nil { + var state State + err = json.Unmarshal(*v, &state) + if err != nil { + return err + } + rt.State = state + } + case "Flags": + if v != nil { + var flags int32 + err = json.Unmarshal(*v, &flags) + if err != nil { + return err + } + rt.Flags = &flags + } + case "Action": + if v != nil { + var action string + err = json.Unmarshal(*v, &action) + if err != nil { + return err + } + rt.Action = &action + } + case "Target": + if v != nil { + target, err := unmarshalBasicRepairTargetDescriptionBase(*v) + if err != nil { + return err + } + rt.Target = target + } + case "Executor": + if v != nil { + var executor string + err = json.Unmarshal(*v, &executor) + if err != nil { + return err + } + rt.Executor = &executor + } + case "ExecutorData": + if v != nil { + var executorData string + err = json.Unmarshal(*v, &executorData) + if err != nil { + return err + } + rt.ExecutorData = &executorData + } + case "Impact": + if v != nil { + impact, err := unmarshalBasicRepairImpactDescriptionBase(*v) + if err != nil { + return err + } + rt.Impact = impact + } + case "ResultStatus": + if v != nil { + var resultStatus ResultStatus + err = json.Unmarshal(*v, &resultStatus) + if err != nil { + return err + } + rt.ResultStatus = resultStatus + } + case "ResultCode": + if v != nil { + var resultCode int32 + err = json.Unmarshal(*v, &resultCode) + if err != nil { + return err + } + rt.ResultCode = &resultCode + } + case "ResultDetails": + if v != nil { + var resultDetails string + err = json.Unmarshal(*v, &resultDetails) + if err != nil { + return err + } + rt.ResultDetails = &resultDetails + } + case "History": + if v != nil { + var history RepairTaskHistory + err = json.Unmarshal(*v, &history) + if err != nil { + return err + } + rt.History = &history + } + case "PreparingHealthCheckState": + if v != nil { + var preparingHealthCheckState RepairTaskHealthCheckState + err = json.Unmarshal(*v, &preparingHealthCheckState) + if err != nil { + return err + } + rt.PreparingHealthCheckState = preparingHealthCheckState + } + case "RestoringHealthCheckState": + if v != nil { + var restoringHealthCheckState RepairTaskHealthCheckState + err = json.Unmarshal(*v, &restoringHealthCheckState) + if err != nil { + return err + } + rt.RestoringHealthCheckState = restoringHealthCheckState + } + case "PerformPreparingHealthCheck": + if v != nil { + var performPreparingHealthCheck bool + err = json.Unmarshal(*v, &performPreparingHealthCheck) + if err != nil { + return err + } + rt.PerformPreparingHealthCheck = &performPreparingHealthCheck + } + case "PerformRestoringHealthCheck": + if v != nil { + var performRestoringHealthCheck bool + err = json.Unmarshal(*v, &performRestoringHealthCheck) + if err != nil { + return err + } + rt.PerformRestoringHealthCheck = &performRestoringHealthCheck + } + } + } + + return nil +} + +// RepairTaskApproveDescription describes a request for forced approval of a repair task. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTaskApproveDescription struct { + // TaskID - The ID of the repair task. + TaskID *string `json:"TaskId,omitempty"` + // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current version of the repair task. If zero, then no version check is performed. + Version *string `json:"Version,omitempty"` +} + +// RepairTaskCancelDescription describes a request to cancel a repair task. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTaskCancelDescription struct { + // TaskID - The ID of the repair task. + TaskID *string `json:"TaskId,omitempty"` + // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current version of the repair task. If zero, then no version check is performed. + Version *string `json:"Version,omitempty"` + // RequestAbort - _True_ if the repair should be stopped as soon as possible even if it has already started executing. _False_ if the repair should be cancelled only if execution has not yet started. + RequestAbort *bool `json:"RequestAbort,omitempty"` +} + +// RepairTaskDeleteDescription describes a request to delete a completed repair task. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTaskDeleteDescription struct { + // TaskID - The ID of the completed repair task to be deleted. + TaskID *string `json:"TaskId,omitempty"` + // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current version of the repair task. If zero, then no version check is performed. + Version *string `json:"Version,omitempty"` +} + +// RepairTaskHistory a record of the times when the repair task entered each state. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTaskHistory struct { + // CreatedUtcTimestamp - The time when the repair task entered the Created state. + CreatedUtcTimestamp *date.Time `json:"CreatedUtcTimestamp,omitempty"` + // ClaimedUtcTimestamp - The time when the repair task entered the Claimed state. + ClaimedUtcTimestamp *date.Time `json:"ClaimedUtcTimestamp,omitempty"` + // PreparingUtcTimestamp - The time when the repair task entered the Preparing state. + PreparingUtcTimestamp *date.Time `json:"PreparingUtcTimestamp,omitempty"` + // ApprovedUtcTimestamp - The time when the repair task entered the Approved state + ApprovedUtcTimestamp *date.Time `json:"ApprovedUtcTimestamp,omitempty"` + // ExecutingUtcTimestamp - The time when the repair task entered the Executing state + ExecutingUtcTimestamp *date.Time `json:"ExecutingUtcTimestamp,omitempty"` + // RestoringUtcTimestamp - The time when the repair task entered the Restoring state + RestoringUtcTimestamp *date.Time `json:"RestoringUtcTimestamp,omitempty"` + // CompletedUtcTimestamp - The time when the repair task entered the Completed state + CompletedUtcTimestamp *date.Time `json:"CompletedUtcTimestamp,omitempty"` + // PreparingHealthCheckStartUtcTimestamp - The time when the repair task started the health check in the Preparing state. + PreparingHealthCheckStartUtcTimestamp *date.Time `json:"PreparingHealthCheckStartUtcTimestamp,omitempty"` + // PreparingHealthCheckEndUtcTimestamp - The time when the repair task completed the health check in the Preparing state. + PreparingHealthCheckEndUtcTimestamp *date.Time `json:"PreparingHealthCheckEndUtcTimestamp,omitempty"` + // RestoringHealthCheckStartUtcTimestamp - The time when the repair task started the health check in the Restoring state. + RestoringHealthCheckStartUtcTimestamp *date.Time `json:"RestoringHealthCheckStartUtcTimestamp,omitempty"` + // RestoringHealthCheckEndUtcTimestamp - The time when the repair task completed the health check in the Restoring state. + RestoringHealthCheckEndUtcTimestamp *date.Time `json:"RestoringHealthCheckEndUtcTimestamp,omitempty"` +} + +// RepairTaskUpdateHealthPolicyDescription describes a request to update the health policy of a repair +// task. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTaskUpdateHealthPolicyDescription struct { + // TaskID - The ID of the repair task to be updated. + TaskID *string `json:"TaskId,omitempty"` + // Version - The current version number of the repair task. If non-zero, then the request will only succeed if this value matches the actual current value of the repair task. If zero, then no version check is performed. + Version *string `json:"Version,omitempty"` + // PerformPreparingHealthCheck - A boolean indicating if health check is to be performed in the Preparing stage of the repair task. If not specified the existing value should not be altered. Otherwise, specify the desired new value. + PerformPreparingHealthCheck *bool `json:"PerformPreparingHealthCheck,omitempty"` + // PerformRestoringHealthCheck - A boolean indicating if health check is to be performed in the Restoring stage of the repair task. If not specified the existing value should not be altered. Otherwise, specify the desired new value. + PerformRestoringHealthCheck *bool `json:"PerformRestoringHealthCheck,omitempty"` +} + +// RepairTaskUpdateInfo describes the result of an operation that created or updated a repair task. +// +// This type supports the Service Fabric platform; it is not meant to be used directly from your code. +type RepairTaskUpdateInfo struct { + autorest.Response `json:"-"` + // Version - The new version of the repair task. + Version *string `json:"Version,omitempty"` +} + +// BasicReplicaEvent represents the base for all Replica Events. +type BasicReplicaEvent interface { + AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) + AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) + AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) + AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) + AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) + AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) + AsReplicaEvent() (*ReplicaEvent, bool) +} + +// ReplicaEvent represents the base for all Replica Events. +type ReplicaEvent struct { + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *int64 `json:"ReplicaId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicReplicaEvent(body []byte) (BasicReplicaEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindStatefulReplicaNewHealthReport): + var srnhre StatefulReplicaNewHealthReportEvent + err := json.Unmarshal(body, &srnhre) + return srnhre, err + case string(KindStatefulReplicaHealthReportExpired): + var srhree StatefulReplicaHealthReportExpiredEvent + err := json.Unmarshal(body, &srhree) + return srhree, err + case string(KindStatelessReplicaNewHealthReport): + var srnhre StatelessReplicaNewHealthReportEvent + err := json.Unmarshal(body, &srnhre) + return srnhre, err + case string(KindStatelessReplicaHealthReportExpired): + var srhree StatelessReplicaHealthReportExpiredEvent + err := json.Unmarshal(body, &srhree) + return srhree, err + case string(KindChaosReplicaRemovalScheduled): + var crrse ChaosReplicaRemovalScheduledEvent + err := json.Unmarshal(body, &crrse) + return crrse, err + case string(KindChaosReplicaRestartScheduled): + var crrse ChaosReplicaRestartScheduledEvent + err := json.Unmarshal(body, &crrse) + return crrse, err + default: + var re ReplicaEvent + err := json.Unmarshal(body, &re) + return re, err + } +} +func unmarshalBasicReplicaEventArray(body []byte) ([]BasicReplicaEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + reArray := make([]BasicReplicaEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + re, err := unmarshalBasicReplicaEvent(*rawMessage) + if err != nil { + return nil, err + } + reArray[index] = re + } + return reArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicaEvent. +func (re ReplicaEvent) MarshalJSON() ([]byte, error) { + re.Kind = KindReplicaEvent + objectMap := make(map[string]interface{}) + if re.PartitionID != nil { + objectMap["PartitionId"] = re.PartitionID + } + if re.ReplicaID != nil { + objectMap["ReplicaId"] = re.ReplicaID + } + if re.EventInstanceID != nil { + objectMap["EventInstanceId"] = re.EventInstanceID + } + if re.Category != nil { + objectMap["Category"] = re.Category + } + if re.TimeStamp != nil { + objectMap["TimeStamp"] = re.TimeStamp + } + if re.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = re.HasCorrelatedEvents + } + if re.Kind != "" { + objectMap["Kind"] = re.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return &re, true +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return &re, true +} + +// AsServiceEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ReplicaEvent. +func (re ReplicaEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &re, true +} + +// BasicReplicaHealth represents a base class for stateful service replica or stateless service instance health. +// Contains the replica aggregated health state, the health events and the unhealthy evaluations. +type BasicReplicaHealth interface { + AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) + AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) + AsReplicaHealth() (*ReplicaHealth, bool) +} + +// ReplicaHealth represents a base class for stateful service replica or stateless service instance health. +// Contains the replica aggregated health state, the health events and the unhealthy evaluations. +type ReplicaHealth struct { + autorest.Response `json:"-"` + // PartitionID - Id of the partition to which this replica belongs. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthServiceKindReplicaHealth', 'ServiceKindBasicReplicaHealthServiceKindStateful', 'ServiceKindBasicReplicaHealthServiceKindStateless' + ServiceKind ServiceKindBasicReplicaHealth `json:"ServiceKind,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +func unmarshalBasicReplicaHealth(body []byte) (BasicReplicaHealth, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicReplicaHealthServiceKindStateful): + var ssrh StatefulServiceReplicaHealth + err := json.Unmarshal(body, &ssrh) + return ssrh, err + case string(ServiceKindBasicReplicaHealthServiceKindStateless): + var ssih StatelessServiceInstanceHealth + err := json.Unmarshal(body, &ssih) + return ssih, err + default: + var rh ReplicaHealth + err := json.Unmarshal(body, &rh) + return rh, err + } +} +func unmarshalBasicReplicaHealthArray(body []byte) ([]BasicReplicaHealth, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rhArray := make([]BasicReplicaHealth, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rh, err := unmarshalBasicReplicaHealth(*rawMessage) + if err != nil { + return nil, err + } + rhArray[index] = rh + } + return rhArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicaHealth. +func (rh ReplicaHealth) MarshalJSON() ([]byte, error) { + rh.ServiceKind = ServiceKindBasicReplicaHealthServiceKindReplicaHealth + objectMap := make(map[string]interface{}) + if rh.PartitionID != nil { + objectMap["PartitionId"] = rh.PartitionID + } + if rh.ServiceKind != "" { + objectMap["ServiceKind"] = rh.ServiceKind + } + if rh.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = rh.AggregatedHealthState + } + if rh.HealthEvents != nil { + objectMap["HealthEvents"] = rh.HealthEvents + } + if rh.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = rh.UnhealthyEvaluations + } + if rh.HealthStatistics != nil { + objectMap["HealthStatistics"] = rh.HealthStatistics + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaHealth is the BasicReplicaHealth implementation for ReplicaHealth. +func (rh ReplicaHealth) AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) { + return nil, false +} + +// AsStatelessServiceInstanceHealth is the BasicReplicaHealth implementation for ReplicaHealth. +func (rh ReplicaHealth) AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) { + return nil, false +} + +// AsReplicaHealth is the BasicReplicaHealth implementation for ReplicaHealth. +func (rh ReplicaHealth) AsReplicaHealth() (*ReplicaHealth, bool) { + return &rh, true +} + +// AsBasicReplicaHealth is the BasicReplicaHealth implementation for ReplicaHealth. +func (rh ReplicaHealth) AsBasicReplicaHealth() (BasicReplicaHealth, bool) { + return &rh, true +} + +// ReplicaHealthEvaluation represents health evaluation for a replica, containing information about the +// data and the algorithm used by health store to evaluate health. The evaluation is returned only when the +// aggregated health state is either Error or Warning. +type ReplicaHealthEvaluation struct { + // PartitionID - Id of the partition to which the replica belongs. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaOrInstanceID - Id of a stateful service replica or a stateless service instance. This ID is used in the queries that apply to both stateful and stateless services. It is used by Service Fabric to uniquely identify a replica of a partition of a stateful service or an instance of a stateless service partition. It is unique within a partition and does not change for the lifetime of the replica or the instance. If a stateful replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the ID. If a stateless instance is failed over on the same or different node it will get a different value for the ID. + ReplicaOrInstanceID *string `json:"ReplicaOrInstanceId,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state of the replica. The types of the unhealthy evaluations can be EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) MarshalJSON() ([]byte, error) { + rhe.Kind = KindReplica + objectMap := make(map[string]interface{}) + if rhe.PartitionID != nil { + objectMap["PartitionId"] = rhe.PartitionID + } + if rhe.ReplicaOrInstanceID != nil { + objectMap["ReplicaOrInstanceId"] = rhe.ReplicaOrInstanceID + } + if rhe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = rhe.UnhealthyEvaluations + } + if rhe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = rhe.AggregatedHealthState + } + if rhe.Description != nil { + objectMap["Description"] = rhe.Description + } + if rhe.Kind != "" { + objectMap["Kind"] = rhe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return &rhe, true +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ReplicaHealthEvaluation. +func (rhe ReplicaHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &rhe, true +} + +// ReplicaHealthModel ... +type ReplicaHealthModel struct { + autorest.Response `json:"-"` + Value BasicReplicaHealth `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ReplicaHealthModel struct. +func (rhm *ReplicaHealthModel) UnmarshalJSON(body []byte) error { + rh, err := unmarshalBasicReplicaHealth(body) + if err != nil { + return err + } + rhm.Value = rh + + return nil +} + +// BasicReplicaHealthState represents a base class for stateful service replica or stateless service instance health +// state. +type BasicReplicaHealthState interface { + AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) + AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) + AsReplicaHealthState() (*ReplicaHealthState, bool) +} + +// ReplicaHealthState represents a base class for stateful service replica or stateless service instance health +// state. +type ReplicaHealthState struct { + // PartitionID - The ID of the partition to which this replica belongs. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState', 'ServiceKindBasicReplicaHealthStateServiceKindStateful', 'ServiceKindBasicReplicaHealthStateServiceKindStateless' + ServiceKind ServiceKindBasicReplicaHealthState `json:"ServiceKind,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +func unmarshalBasicReplicaHealthState(body []byte) (BasicReplicaHealthState, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicReplicaHealthStateServiceKindStateful): + var ssrhs StatefulServiceReplicaHealthState + err := json.Unmarshal(body, &ssrhs) + return ssrhs, err + case string(ServiceKindBasicReplicaHealthStateServiceKindStateless): + var ssihs StatelessServiceInstanceHealthState + err := json.Unmarshal(body, &ssihs) + return ssihs, err + default: + var RHS ReplicaHealthState + err := json.Unmarshal(body, &RHS) + return RHS, err + } +} +func unmarshalBasicReplicaHealthStateArray(body []byte) ([]BasicReplicaHealthState, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + RHSArray := make([]BasicReplicaHealthState, len(rawMessages)) + + for index, rawMessage := range rawMessages { + RHS, err := unmarshalBasicReplicaHealthState(*rawMessage) + if err != nil { + return nil, err + } + RHSArray[index] = RHS + } + return RHSArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicaHealthState. +func (RHS ReplicaHealthState) MarshalJSON() ([]byte, error) { + RHS.ServiceKind = ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState + objectMap := make(map[string]interface{}) + if RHS.PartitionID != nil { + objectMap["PartitionId"] = RHS.PartitionID + } + if RHS.ServiceKind != "" { + objectMap["ServiceKind"] = RHS.ServiceKind + } + if RHS.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = RHS.AggregatedHealthState + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. +func (RHS ReplicaHealthState) AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) { + return nil, false +} + +// AsStatelessServiceInstanceHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. +func (RHS ReplicaHealthState) AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) { + return nil, false +} + +// AsReplicaHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. +func (RHS ReplicaHealthState) AsReplicaHealthState() (*ReplicaHealthState, bool) { + return &RHS, true +} + +// AsBasicReplicaHealthState is the BasicReplicaHealthState implementation for ReplicaHealthState. +func (RHS ReplicaHealthState) AsBasicReplicaHealthState() (BasicReplicaHealthState, bool) { + return &RHS, true +} + +// ReplicaHealthStateChunk represents the health state chunk of a stateful service replica or a stateless +// service instance. +// The replica health state contains the replica ID and its aggregated health state. +type ReplicaHealthStateChunk struct { + // ReplicaOrInstanceID - Id of a stateful service replica or a stateless service instance. This ID is used in the queries that apply to both stateful and stateless services. It is used by Service Fabric to uniquely identify a replica of a partition of a stateful service or an instance of a stateless service partition. It is unique within a partition and does not change for the lifetime of the replica or the instance. If a stateful replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the ID. If a stateless instance is failed over on the same or different node it will get a different value for the ID. + ReplicaOrInstanceID *string `json:"ReplicaOrInstanceId,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// ReplicaHealthStateChunkList the list of replica health state chunks that respect the input filters in +// the chunk query. Returned by get cluster health state chunks query. +type ReplicaHealthStateChunkList struct { + // Items - The list of replica health state chunks that respect the input filters in the chunk query. + Items *[]ReplicaHealthStateChunk `json:"Items,omitempty"` +} + +// ReplicaHealthStateFilter defines matching criteria to determine whether a replica should be included as +// a child of a partition in the cluster health chunk. +// The replicas are only returned if the parent entities match a filter specified in the cluster health +// chunk query description. The parent partition, service and application must be included in the cluster +// health chunk. +// One filter can match zero, one or multiple replicas, depending on its properties. +type ReplicaHealthStateFilter struct { + // ReplicaOrInstanceIDFilter - Id of the stateful service replica or stateless service instance that matches the filter. The filter is applied only to the specified replica, if it exists. + // If the replica doesn't exist, no replica is returned in the cluster health chunk based on this filter. + // If the replica exists, it is included in the cluster health chunk if it respects the other filter properties. + // If not specified, all replicas that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. + ReplicaOrInstanceIDFilter *string `json:"ReplicaOrInstanceIdFilter,omitempty"` + // HealthStateFilter - The filter for the health state of the replicas. It allows selecting replicas if they match the desired health states. + // The possible values are integer value of one of the following health states. Only replicas that match the filter are returned. All replicas are used to evaluate the parent partition aggregated health state. + // If not specified, default value is None, unless the replica ID is specified. If the filter has default value and replica ID is specified, the matching replica is returned. + // The state values are flag-based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. + // For example, if the provided value is 6, it matches replicas with HealthState value of OK (2) and Warning (4). + // - Default - Default value. Matches any HealthState. The value is zero. + // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. + // - Ok - Filter that matches input with HealthState value Ok. The value is 2. + // - Warning - Filter that matches input with HealthState value Warning. The value is 4. + // - Error - Filter that matches input with HealthState value Error. The value is 8. + // - All - Filter that matches input with any HealthState value. The value is 65535. + HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` +} + +// BasicReplicaInfo information about the identity, status, health, node name, uptime, and other details about the +// replica. +type BasicReplicaInfo interface { + AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) + AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) + AsReplicaInfo() (*ReplicaInfo, bool) +} + +// ReplicaInfo information about the identity, status, health, node name, uptime, and other details about the +// replica. +type ReplicaInfo struct { + autorest.Response `json:"-"` + // ReplicaStatus - The status of a replica of a service. Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' + ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // Address - The address the replica is listening on. + Address *string `json:"Address,omitempty"` + // LastInBuildDurationInSeconds - The last in build duration of the replica in seconds. + LastInBuildDurationInSeconds *string `json:"LastInBuildDurationInSeconds,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaInfoServiceKindReplicaInfo', 'ServiceKindBasicReplicaInfoServiceKindStateful', 'ServiceKindBasicReplicaInfoServiceKindStateless' + ServiceKind ServiceKindBasicReplicaInfo `json:"ServiceKind,omitempty"` +} + +func unmarshalBasicReplicaInfo(body []byte) (BasicReplicaInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicReplicaInfoServiceKindStateful): + var ssri StatefulServiceReplicaInfo + err := json.Unmarshal(body, &ssri) + return ssri, err + case string(ServiceKindBasicReplicaInfoServiceKindStateless): + var ssii StatelessServiceInstanceInfo + err := json.Unmarshal(body, &ssii) + return ssii, err + default: + var ri ReplicaInfo + err := json.Unmarshal(body, &ri) + return ri, err + } +} +func unmarshalBasicReplicaInfoArray(body []byte) ([]BasicReplicaInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + riArray := make([]BasicReplicaInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ri, err := unmarshalBasicReplicaInfo(*rawMessage) + if err != nil { + return nil, err + } + riArray[index] = ri + } + return riArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicaInfo. +func (ri ReplicaInfo) MarshalJSON() ([]byte, error) { + ri.ServiceKind = ServiceKindBasicReplicaInfoServiceKindReplicaInfo + objectMap := make(map[string]interface{}) + if ri.ReplicaStatus != "" { + objectMap["ReplicaStatus"] = ri.ReplicaStatus + } + if ri.HealthState != "" { + objectMap["HealthState"] = ri.HealthState + } + if ri.NodeName != nil { + objectMap["NodeName"] = ri.NodeName + } + if ri.Address != nil { + objectMap["Address"] = ri.Address + } + if ri.LastInBuildDurationInSeconds != nil { + objectMap["LastInBuildDurationInSeconds"] = ri.LastInBuildDurationInSeconds + } + if ri.ServiceKind != "" { + objectMap["ServiceKind"] = ri.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaInfo is the BasicReplicaInfo implementation for ReplicaInfo. +func (ri ReplicaInfo) AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) { + return nil, false +} + +// AsStatelessServiceInstanceInfo is the BasicReplicaInfo implementation for ReplicaInfo. +func (ri ReplicaInfo) AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) { + return nil, false +} + +// AsReplicaInfo is the BasicReplicaInfo implementation for ReplicaInfo. +func (ri ReplicaInfo) AsReplicaInfo() (*ReplicaInfo, bool) { + return &ri, true +} + +// AsBasicReplicaInfo is the BasicReplicaInfo implementation for ReplicaInfo. +func (ri ReplicaInfo) AsBasicReplicaInfo() (BasicReplicaInfo, bool) { + return &ri, true +} + +// ReplicaInfoModel ... +type ReplicaInfoModel struct { + autorest.Response `json:"-"` + Value BasicReplicaInfo `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ReplicaInfoModel struct. +func (rim *ReplicaInfoModel) UnmarshalJSON(body []byte) error { + ri, err := unmarshalBasicReplicaInfo(body) + if err != nil { + return err + } + rim.Value = ri + + return nil +} + +// ReplicasHealthEvaluation represents health evaluation for replicas, containing health evaluations for +// each unhealthy replica that impacted current aggregated health state. Can be returned when evaluating +// partition health and the aggregated health state is either Error or Warning. +type ReplicasHealthEvaluation struct { + // MaxPercentUnhealthyReplicasPerPartition - Maximum allowed percentage of unhealthy replicas per partition from the ApplicationHealthPolicy. + MaxPercentUnhealthyReplicasPerPartition *int32 `json:"MaxPercentUnhealthyReplicasPerPartition,omitempty"` + // TotalCount - Total number of replicas in the partition from the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy ReplicaHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) MarshalJSON() ([]byte, error) { + rhe.Kind = KindReplicas + objectMap := make(map[string]interface{}) + if rhe.MaxPercentUnhealthyReplicasPerPartition != nil { + objectMap["MaxPercentUnhealthyReplicasPerPartition"] = rhe.MaxPercentUnhealthyReplicasPerPartition + } + if rhe.TotalCount != nil { + objectMap["TotalCount"] = rhe.TotalCount + } + if rhe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = rhe.UnhealthyEvaluations + } + if rhe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = rhe.AggregatedHealthState + } + if rhe.Description != nil { + objectMap["Description"] = rhe.Description + } + if rhe.Kind != "" { + objectMap["Kind"] = rhe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return &rhe, true +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ReplicasHealthEvaluation. +func (rhe ReplicasHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &rhe, true +} + +// BasicReplicaStatusBase information about the replica. +type BasicReplicaStatusBase interface { + AsKeyValueStoreReplicaStatus() (*KeyValueStoreReplicaStatus, bool) + AsReplicaStatusBase() (*ReplicaStatusBase, bool) +} + +// ReplicaStatusBase information about the replica. +type ReplicaStatusBase struct { + // Kind - Possible values include: 'KindReplicaStatusBase', 'KindKeyValueStore' + Kind KindBasicReplicaStatusBase `json:"Kind,omitempty"` +} + +func unmarshalBasicReplicaStatusBase(body []byte) (BasicReplicaStatusBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindKeyValueStore): + var kvsrs KeyValueStoreReplicaStatus + err := json.Unmarshal(body, &kvsrs) + return kvsrs, err + default: + var rsb ReplicaStatusBase + err := json.Unmarshal(body, &rsb) + return rsb, err + } +} +func unmarshalBasicReplicaStatusBaseArray(body []byte) ([]BasicReplicaStatusBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rsbArray := make([]BasicReplicaStatusBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rsb, err := unmarshalBasicReplicaStatusBase(*rawMessage) + if err != nil { + return nil, err + } + rsbArray[index] = rsb + } + return rsbArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicaStatusBase. +func (rsb ReplicaStatusBase) MarshalJSON() ([]byte, error) { + rsb.Kind = KindReplicaStatusBase + objectMap := make(map[string]interface{}) + if rsb.Kind != "" { + objectMap["Kind"] = rsb.Kind + } + return json.Marshal(objectMap) +} + +// AsKeyValueStoreReplicaStatus is the BasicReplicaStatusBase implementation for ReplicaStatusBase. +func (rsb ReplicaStatusBase) AsKeyValueStoreReplicaStatus() (*KeyValueStoreReplicaStatus, bool) { + return nil, false +} + +// AsReplicaStatusBase is the BasicReplicaStatusBase implementation for ReplicaStatusBase. +func (rsb ReplicaStatusBase) AsReplicaStatusBase() (*ReplicaStatusBase, bool) { + return &rsb, true +} + +// AsBasicReplicaStatusBase is the BasicReplicaStatusBase implementation for ReplicaStatusBase. +func (rsb ReplicaStatusBase) AsBasicReplicaStatusBase() (BasicReplicaStatusBase, bool) { + return &rsb, true +} + +// ReplicatorQueueStatus provides various statistics of the queue used in the service fabric replicator. +// Contains information about the service fabric replicator like the replication/copy queue utilization, +// last acknowledgement received timestamp, etc. +// Depending on the role of the replicator, the properties in this type imply different meanings. +type ReplicatorQueueStatus struct { + // QueueUtilizationPercentage - Represents the utilization of the queue. A value of 0 indicates that the queue is empty and a value of 100 indicates the queue is full. + QueueUtilizationPercentage *int32 `json:"QueueUtilizationPercentage,omitempty"` + // QueueMemorySize - Represents the virtual memory consumed by the queue in bytes. + QueueMemorySize *string `json:"QueueMemorySize,omitempty"` + // FirstSequenceNumber - On a primary replicator, this is semantically the sequence number of the operation for which all the secondary replicas have sent an acknowledgement. + // On a secondary replicator, this is the smallest sequence number of the operation that is present in the queue. + FirstSequenceNumber *string `json:"FirstSequenceNumber,omitempty"` + // CompletedSequenceNumber - On a primary replicator, this is semantically the highest sequence number of the operation for which all the secondary replicas have sent an acknowledgement. + // On a secondary replicator, this is semantically the highest sequence number that has been applied to the persistent state. + CompletedSequenceNumber *string `json:"CompletedSequenceNumber,omitempty"` + // CommittedSequenceNumber - On a primary replicator, this is semantically the highest sequence number of the operation for which a write quorum of the secondary replicas have sent an acknowledgement. + // On a secondary replicator, this is semantically the highest sequence number of the in-order operation received from the primary. + CommittedSequenceNumber *string `json:"CommittedSequenceNumber,omitempty"` + // LastSequenceNumber - Represents the latest sequence number of the operation that is available in the queue. + LastSequenceNumber *string `json:"LastSequenceNumber,omitempty"` +} + +// BasicReplicatorStatus represents a base class for primary or secondary replicator status. +// Contains information about the service fabric replicator like the replication/copy queue utilization, last +// acknowledgement received timestamp, etc. +type BasicReplicatorStatus interface { + AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) + AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) + AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) + AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) + AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) + AsReplicatorStatus() (*ReplicatorStatus, bool) +} + +// ReplicatorStatus represents a base class for primary or secondary replicator status. +// Contains information about the service fabric replicator like the replication/copy queue utilization, last +// acknowledgement received timestamp, etc. +type ReplicatorStatus struct { + // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' + Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` +} + +func unmarshalBasicReplicatorStatus(body []byte) (BasicReplicatorStatus, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindPrimary): + var prs PrimaryReplicatorStatus + err := json.Unmarshal(body, &prs) + return prs, err + case string(KindSecondaryReplicatorStatus): + var srs SecondaryReplicatorStatus + err := json.Unmarshal(body, &srs) + return srs, err + case string(KindActiveSecondary): + var sars SecondaryActiveReplicatorStatus + err := json.Unmarshal(body, &sars) + return sars, err + case string(KindIdleSecondary): + var sirs SecondaryIdleReplicatorStatus + err := json.Unmarshal(body, &sirs) + return sirs, err + default: + var rs ReplicatorStatus + err := json.Unmarshal(body, &rs) + return rs, err + } +} +func unmarshalBasicReplicatorStatusArray(body []byte) ([]BasicReplicatorStatus, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rsArray := make([]BasicReplicatorStatus, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rs, err := unmarshalBasicReplicatorStatus(*rawMessage) + if err != nil { + return nil, err + } + rsArray[index] = rs + } + return rsArray, nil +} + +// MarshalJSON is the custom marshaler for ReplicatorStatus. +func (rs ReplicatorStatus) MarshalJSON() ([]byte, error) { + rs.Kind = KindReplicatorStatus + objectMap := make(map[string]interface{}) + if rs.Kind != "" { + objectMap["Kind"] = rs.Kind + } + return json.Marshal(objectMap) +} + +// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. +func (rs ReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. +func (rs ReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { + return nil, false +} + +// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. +func (rs ReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. +func (rs ReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. +func (rs ReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { + return nil, false +} + +// AsReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. +func (rs ReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { + return &rs, true +} + +// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for ReplicatorStatus. +func (rs ReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { + return &rs, true +} + +// ResolvedServiceEndpoint endpoint of a resolved service partition. +type ResolvedServiceEndpoint struct { + // Kind - The role of the replica where the endpoint is reported. Possible values include: 'ServiceEndpointRoleInvalid', 'ServiceEndpointRoleStateless', 'ServiceEndpointRoleStatefulPrimary', 'ServiceEndpointRoleStatefulSecondary' + Kind ServiceEndpointRole `json:"Kind,omitempty"` + // Address - The address of the endpoint. If the endpoint has multiple listeners the address is a JSON object with one property per listener with the value as the address of that listener. + Address *string `json:"Address,omitempty"` +} + +// ResolvedServicePartition information about a service partition and its associated endpoints. +type ResolvedServicePartition struct { + autorest.Response `json:"-"` + // Name - The full name of the service with 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // PartitionInformation - A representation of the resolved partition. + PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` + // Endpoints - List of resolved service endpoints of a service partition. + Endpoints *[]ResolvedServiceEndpoint `json:"Endpoints,omitempty"` + // Version - The version of this resolved service partition result. This version should be passed in the next time the ResolveService call is made via the PreviousRspVersion query parameter. + Version *string `json:"Version,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ResolvedServicePartition struct. +func (rsp *ResolvedServicePartition) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "Name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rsp.Name = &name + } + case "PartitionInformation": + if v != nil { + partitionInformation, err := unmarshalBasicPartitionInformation(*v) + if err != nil { + return err + } + rsp.PartitionInformation = partitionInformation + } + case "Endpoints": + if v != nil { + var endpoints []ResolvedServiceEndpoint + err = json.Unmarshal(*v, &endpoints) + if err != nil { + return err + } + rsp.Endpoints = &endpoints + } + case "Version": + if v != nil { + var version string + err = json.Unmarshal(*v, &version) + if err != nil { + return err + } + rsp.Version = &version + } + } + } + + return nil +} + +// ResourceLimits this type describes the resource limits for a given container. It describes the most +// amount of resources a container is allowed to use before being restarted. +type ResourceLimits struct { + // MemoryInGB - The memory limit in GB. + MemoryInGB *float64 `json:"memoryInGB,omitempty"` + // CPU - CPU limits in cores. At present, only full cores are supported. + CPU *float64 `json:"cpu,omitempty"` +} + +// ResourceRequests this type describes the requested resources for a given container. It describes the +// least amount of resources required for the container. A container can consume more than requested +// resources up to the specified limits before being restarted. Currently, the requested resources are +// treated as limits. +type ResourceRequests struct { + // MemoryInGB - The memory request in GB for this container. + MemoryInGB *float64 `json:"memoryInGB,omitempty"` + // CPU - Requested number of CPU cores. At present, only full cores are supported. + CPU *float64 `json:"cpu,omitempty"` +} + +// ResourceRequirements this type describes the resource requirements for a container or a service. +type ResourceRequirements struct { + // Requests - Describes the requested resources for a given container. + Requests *ResourceRequests `json:"requests,omitempty"` + // Limits - Describes the maximum limits on the resources for a given container. + Limits *ResourceLimits `json:"limits,omitempty"` +} + +// RestartDeployedCodePackageDescription defines description for restarting a deployed code package on +// Service Fabric node. +type RestartDeployedCodePackageDescription struct { + // ServiceManifestName - The name of service manifest that specified this code package. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // ServicePackageActivationID - The ActivationId of a deployed service package. If ServicePackageActivationMode specified at the time of creating the service + // is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of ServicePackageActivationId + // is always an empty string. + ServicePackageActivationID *string `json:"ServicePackageActivationId,omitempty"` + // CodePackageName - The name of the code package defined in the service manifest. + CodePackageName *string `json:"CodePackageName,omitempty"` + // CodePackageInstanceID - The instance ID for currently running entry point. For a code package setup entry point (if specified) runs first and after it finishes main entry point is started. + // Each time entry point executable is run, its instance ID will change. If 0 is passed in as the code package instance ID, the API will restart the code package with whatever instance ID it is currently running. + // If an instance ID other than 0 is passed in, the API will restart the code package only if the current Instance ID matches the passed in instance ID. + // Note, passing in the exact instance ID (not 0) in the API is safer, because if ensures at most one restart of the code package. + CodePackageInstanceID *string `json:"CodePackageInstanceId,omitempty"` +} + +// RestartNodeDescription describes the parameters to restart a Service Fabric node. +type RestartNodeDescription struct { + // NodeInstanceID - The instance ID of the target node. If instance ID is specified the node is restarted only if it matches with the current instance of the node. A default value of "0" would match any instance ID. The instance ID can be obtained using get node query. + NodeInstanceID *string `json:"NodeInstanceId,omitempty"` + // CreateFabricDump - Specify True to create a dump of the fabric node process. This is case-sensitive. Possible values include: 'False', 'True' + CreateFabricDump CreateFabricDump `json:"CreateFabricDump,omitempty"` +} + +// RestartPartitionResult represents information about an operation in a terminal state (Completed or +// Faulted). +type RestartPartitionResult struct { + // ErrorCode - If OperationState is Completed, this is 0. If OperationState is Faulted, this is an error code indicating the reason. + ErrorCode *int32 `json:"ErrorCode,omitempty"` + // SelectedPartition - This class returns information about the partition that the user-induced operation acted upon. + SelectedPartition *SelectedPartition `json:"SelectedPartition,omitempty"` +} + +// RestorePartitionDescription specifies the parameters needed to trigger a restore of a specific +// partition. +type RestorePartitionDescription struct { + // BackupID - Unique backup ID. + BackupID *uuid.UUID `json:"BackupId,omitempty"` + // BackupLocation - Location of the backup relative to the backup storage specified/ configured. + BackupLocation *string `json:"BackupLocation,omitempty"` + // BackupStorage - Location of the backup from where the partition will be restored. + BackupStorage BasicBackupStorageDescription `json:"BackupStorage,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RestorePartitionDescription struct. +func (rpd *RestorePartitionDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "BackupId": + if v != nil { + var backupID uuid.UUID + err = json.Unmarshal(*v, &backupID) + if err != nil { + return err + } + rpd.BackupID = &backupID + } + case "BackupLocation": + if v != nil { + var backupLocation string + err = json.Unmarshal(*v, &backupLocation) + if err != nil { + return err + } + rpd.BackupLocation = &backupLocation + } + case "BackupStorage": + if v != nil { + backupStorage, err := unmarshalBasicBackupStorageDescription(*v) + if err != nil { + return err + } + rpd.BackupStorage = backupStorage + } + } + } + + return nil +} + +// RestoreProgressInfo describes the progress of a restore operation on a partition. +type RestoreProgressInfo struct { + autorest.Response `json:"-"` + // RestoreState - Represents the current state of the partition restore operation. Possible values include: 'RestoreStateInvalid', 'RestoreStateAccepted', 'RestoreStateRestoreInProgress', 'RestoreStateSuccess', 'RestoreStateFailure', 'RestoreStateTimeout' + RestoreState RestoreState `json:"RestoreState,omitempty"` + // TimeStampUtc - Timestamp when operation succeeded or failed. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // RestoredEpoch - Describes the epoch at which the partition is restored. + RestoredEpoch *Epoch `json:"RestoredEpoch,omitempty"` + // RestoredLsn - Restored LSN. + RestoredLsn *string `json:"RestoredLsn,omitempty"` + // FailureError - Denotes the failure encountered in performing restore operation. + FailureError *FabricErrorError `json:"FailureError,omitempty"` +} + +// ResumeApplicationUpgradeDescription describes the parameters for resuming an unmonitored manual Service +// Fabric application upgrade +type ResumeApplicationUpgradeDescription struct { + // UpgradeDomainName - The name of the upgrade domain in which to resume the upgrade. + UpgradeDomainName *string `json:"UpgradeDomainName,omitempty"` +} + +// ResumeClusterUpgradeDescription describes the parameters for resuming a cluster upgrade. +type ResumeClusterUpgradeDescription struct { + // UpgradeDomain - The next upgrade domain for this cluster upgrade. + UpgradeDomain *string `json:"UpgradeDomain,omitempty"` +} + +// BasicBasicRetentionPolicyDescription describes the retention policy configured. +type BasicBasicRetentionPolicyDescription interface { + AsBasicRetentionPolicyDescription() (*BasicRetentionPolicyDescription, bool) + AsRetentionPolicyDescription() (*RetentionPolicyDescription, bool) +} + +// RetentionPolicyDescription describes the retention policy configured. +type RetentionPolicyDescription struct { + // RetentionPolicyType - Possible values include: 'RetentionPolicyTypeRetentionPolicyDescription', 'RetentionPolicyTypeBasic1' + RetentionPolicyType RetentionPolicyTypeBasicBasicRetentionPolicyDescription `json:"RetentionPolicyType,omitempty"` +} + +func unmarshalBasicBasicRetentionPolicyDescription(body []byte) (BasicBasicRetentionPolicyDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["RetentionPolicyType"] { + case string(RetentionPolicyTypeBasic1): + var brpd BasicRetentionPolicyDescription + err := json.Unmarshal(body, &brpd) + return brpd, err + default: + var rpd RetentionPolicyDescription + err := json.Unmarshal(body, &rpd) + return rpd, err + } +} +func unmarshalBasicBasicRetentionPolicyDescriptionArray(body []byte) ([]BasicBasicRetentionPolicyDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpdArray := make([]BasicBasicRetentionPolicyDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpd, err := unmarshalBasicBasicRetentionPolicyDescription(*rawMessage) + if err != nil { + return nil, err + } + rpdArray[index] = rpd + } + return rpdArray, nil +} + +// MarshalJSON is the custom marshaler for RetentionPolicyDescription. +func (rpd RetentionPolicyDescription) MarshalJSON() ([]byte, error) { + rpd.RetentionPolicyType = RetentionPolicyTypeRetentionPolicyDescription + objectMap := make(map[string]interface{}) + if rpd.RetentionPolicyType != "" { + objectMap["RetentionPolicyType"] = rpd.RetentionPolicyType + } + return json.Marshal(objectMap) +} + +// AsBasicRetentionPolicyDescription is the BasicBasicRetentionPolicyDescription implementation for RetentionPolicyDescription. +func (rpd RetentionPolicyDescription) AsBasicRetentionPolicyDescription() (*BasicRetentionPolicyDescription, bool) { + return nil, false +} + +// AsRetentionPolicyDescription is the BasicBasicRetentionPolicyDescription implementation for RetentionPolicyDescription. +func (rpd RetentionPolicyDescription) AsRetentionPolicyDescription() (*RetentionPolicyDescription, bool) { + return &rpd, true +} + +// AsBasicBasicRetentionPolicyDescription is the BasicBasicRetentionPolicyDescription implementation for RetentionPolicyDescription. +func (rpd RetentionPolicyDescription) AsBasicBasicRetentionPolicyDescription() (BasicBasicRetentionPolicyDescription, bool) { + return &rpd, true +} + +// RollingUpgradeUpdateDescription describes the parameters for updating a rolling upgrade of application +// or cluster. +type RollingUpgradeUpdateDescription struct { + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). + ForceRestart *bool `json:"ForceRestart,omitempty"` + // ReplicaSetCheckTimeoutInMilliseconds - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + ReplicaSetCheckTimeoutInMilliseconds *int64 `json:"ReplicaSetCheckTimeoutInMilliseconds,omitempty"` + // FailureAction - The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. + // Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. + // Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. Possible values include: 'FailureActionInvalid', 'FailureActionRollback', 'FailureActionManual' + FailureAction FailureAction `json:"FailureAction,omitempty"` + // HealthCheckWaitDurationInMilliseconds - The amount of time to wait after completing an upgrade domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + HealthCheckWaitDurationInMilliseconds *string `json:"HealthCheckWaitDurationInMilliseconds,omitempty"` + // HealthCheckStableDurationInMilliseconds - The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + HealthCheckStableDurationInMilliseconds *string `json:"HealthCheckStableDurationInMilliseconds,omitempty"` + // HealthCheckRetryTimeoutInMilliseconds - The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + HealthCheckRetryTimeoutInMilliseconds *string `json:"HealthCheckRetryTimeoutInMilliseconds,omitempty"` + // UpgradeTimeoutInMilliseconds - The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + UpgradeTimeoutInMilliseconds *string `json:"UpgradeTimeoutInMilliseconds,omitempty"` + // UpgradeDomainTimeoutInMilliseconds - The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. + UpgradeDomainTimeoutInMilliseconds *string `json:"UpgradeDomainTimeoutInMilliseconds,omitempty"` + // InstanceCloseDelayDurationInSeconds - Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster + // upgrade, only for those instances which have a non-zero delay duration configured in the service description. See InstanceCloseDelayDurationSeconds property in $ref: "#/definitions/StatelessServiceDescription.yaml" for details. + // Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that the behavior will entirely depend on the delay configured in the stateless service description. + InstanceCloseDelayDurationInSeconds *int64 `json:"InstanceCloseDelayDurationInSeconds,omitempty"` +} + +// RunToCompletionExecutionPolicy the run to completion execution policy +type RunToCompletionExecutionPolicy struct { + // Restart - Enumerates the restart policy for RunToCompletionExecutionPolicy. Possible values include: 'OnFailure', 'Never' + Restart RestartPolicy `json:"restart,omitempty"` + // Type - Possible values include: 'TypeExecutionPolicy', 'TypeRunToCompletion' + Type TypeBasicExecutionPolicy `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for RunToCompletionExecutionPolicy. +func (rtcep RunToCompletionExecutionPolicy) MarshalJSON() ([]byte, error) { + rtcep.Type = TypeRunToCompletion + objectMap := make(map[string]interface{}) + if rtcep.Restart != "" { + objectMap["restart"] = rtcep.Restart + } + if rtcep.Type != "" { + objectMap["type"] = rtcep.Type + } + return json.Marshal(objectMap) +} + +// AsRunToCompletionExecutionPolicy is the BasicExecutionPolicy implementation for RunToCompletionExecutionPolicy. +func (rtcep RunToCompletionExecutionPolicy) AsRunToCompletionExecutionPolicy() (*RunToCompletionExecutionPolicy, bool) { + return &rtcep, true +} + +// AsExecutionPolicy is the BasicExecutionPolicy implementation for RunToCompletionExecutionPolicy. +func (rtcep RunToCompletionExecutionPolicy) AsExecutionPolicy() (*ExecutionPolicy, bool) { + return nil, false +} + +// AsBasicExecutionPolicy is the BasicExecutionPolicy implementation for RunToCompletionExecutionPolicy. +func (rtcep RunToCompletionExecutionPolicy) AsBasicExecutionPolicy() (BasicExecutionPolicy, bool) { + return &rtcep, true +} + +// BasicSafetyCheck represents a safety check performed by service fabric before continuing with the operations. These +// checks ensure the availability of the service and the reliability of the state. +type BasicSafetyCheck interface { + AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) + AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) + AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) + AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) + AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) + AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) + AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) + AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) + AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) + AsSafetyCheck() (*SafetyCheck, bool) +} + +// SafetyCheck represents a safety check performed by service fabric before continuing with the operations. +// These checks ensure the availability of the service and the reliability of the state. +type SafetyCheck struct { + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +func unmarshalBasicSafetyCheck(body []byte) (BasicSafetyCheck, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindPartitionSafetyCheck): + var psc PartitionSafetyCheck + err := json.Unmarshal(body, &psc) + return psc, err + case string(KindEnsureAvailability): + var easc EnsureAvailabilitySafetyCheck + err := json.Unmarshal(body, &easc) + return easc, err + case string(KindEnsurePartitionQuorum): + var epqsc EnsurePartitionQuorumSafetyCheck + err := json.Unmarshal(body, &epqsc) + return epqsc, err + case string(KindEnsureSeedNodeQuorum): + var snsc SeedNodeSafetyCheck + err := json.Unmarshal(body, &snsc) + return snsc, err + case string(KindWaitForInbuildReplica): + var wfirsc WaitForInbuildReplicaSafetyCheck + err := json.Unmarshal(body, &wfirsc) + return wfirsc, err + case string(KindWaitForPrimaryPlacement): + var wfppsc WaitForPrimaryPlacementSafetyCheck + err := json.Unmarshal(body, &wfppsc) + return wfppsc, err + case string(KindWaitForPrimarySwap): + var wfpssc WaitForPrimarySwapSafetyCheck + err := json.Unmarshal(body, &wfpssc) + return wfpssc, err + case string(KindWaitForReconfiguration): + var wfrsc WaitForReconfigurationSafetyCheck + err := json.Unmarshal(body, &wfrsc) + return wfrsc, err + default: + var sc SafetyCheck + err := json.Unmarshal(body, &sc) + return sc, err + } +} +func unmarshalBasicSafetyCheckArray(body []byte) ([]BasicSafetyCheck, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + scArray := make([]BasicSafetyCheck, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sc, err := unmarshalBasicSafetyCheck(*rawMessage) + if err != nil { + return nil, err + } + scArray[index] = sc + } + return scArray, nil +} + +// MarshalJSON is the custom marshaler for SafetyCheck. +func (sc SafetyCheck) MarshalJSON() ([]byte, error) { + sc.Kind = KindSafetyCheck + objectMap := make(map[string]interface{}) + if sc.Kind != "" { + objectMap["Kind"] = sc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return nil, false +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return &sc, true +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for SafetyCheck. +func (sc SafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &sc, true +} + +// SafetyCheckWrapper a wrapper for the safety check object. Safety checks are performed by service fabric +// before continuing with the operations. These checks ensure the availability of the service and the +// reliability of the state. +type SafetyCheckWrapper struct { + // SafetyCheck - Represents a safety check performed by service fabric before continuing with the operations. These checks ensure the availability of the service and the reliability of the state. + SafetyCheck BasicSafetyCheck `json:"SafetyCheck,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SafetyCheckWrapper struct. +func (scw *SafetyCheckWrapper) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "SafetyCheck": + if v != nil { + safetyCheck, err := unmarshalBasicSafetyCheck(*v) + if err != nil { + return err + } + scw.SafetyCheck = safetyCheck + } + } + } + + return nil +} + +// BasicScalingMechanismDescription describes the mechanism for performing a scaling operation. +type BasicScalingMechanismDescription interface { + AsPartitionInstanceCountScaleMechanism() (*PartitionInstanceCountScaleMechanism, bool) + AsAddRemoveIncrementalNamedPartitionScalingMechanism() (*AddRemoveIncrementalNamedPartitionScalingMechanism, bool) + AsScalingMechanismDescription() (*ScalingMechanismDescription, bool) +} + +// ScalingMechanismDescription describes the mechanism for performing a scaling operation. +type ScalingMechanismDescription struct { + // Kind - Possible values include: 'KindScalingMechanismDescription', 'KindPartitionInstanceCount', 'KindAddRemoveIncrementalNamedPartition' + Kind KindBasicScalingMechanismDescription `json:"Kind,omitempty"` +} + +func unmarshalBasicScalingMechanismDescription(body []byte) (BasicScalingMechanismDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindPartitionInstanceCount): + var picsm PartitionInstanceCountScaleMechanism + err := json.Unmarshal(body, &picsm) + return picsm, err + case string(KindAddRemoveIncrementalNamedPartition): + var arinpsm AddRemoveIncrementalNamedPartitionScalingMechanism + err := json.Unmarshal(body, &arinpsm) + return arinpsm, err + default: + var smd ScalingMechanismDescription + err := json.Unmarshal(body, &smd) + return smd, err + } +} +func unmarshalBasicScalingMechanismDescriptionArray(body []byte) ([]BasicScalingMechanismDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + smdArray := make([]BasicScalingMechanismDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + smd, err := unmarshalBasicScalingMechanismDescription(*rawMessage) + if err != nil { + return nil, err + } + smdArray[index] = smd + } + return smdArray, nil +} + +// MarshalJSON is the custom marshaler for ScalingMechanismDescription. +func (smd ScalingMechanismDescription) MarshalJSON() ([]byte, error) { + smd.Kind = KindScalingMechanismDescription + objectMap := make(map[string]interface{}) + if smd.Kind != "" { + objectMap["Kind"] = smd.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionInstanceCountScaleMechanism is the BasicScalingMechanismDescription implementation for ScalingMechanismDescription. +func (smd ScalingMechanismDescription) AsPartitionInstanceCountScaleMechanism() (*PartitionInstanceCountScaleMechanism, bool) { + return nil, false +} + +// AsAddRemoveIncrementalNamedPartitionScalingMechanism is the BasicScalingMechanismDescription implementation for ScalingMechanismDescription. +func (smd ScalingMechanismDescription) AsAddRemoveIncrementalNamedPartitionScalingMechanism() (*AddRemoveIncrementalNamedPartitionScalingMechanism, bool) { + return nil, false +} + +// AsScalingMechanismDescription is the BasicScalingMechanismDescription implementation for ScalingMechanismDescription. +func (smd ScalingMechanismDescription) AsScalingMechanismDescription() (*ScalingMechanismDescription, bool) { + return &smd, true +} + +// AsBasicScalingMechanismDescription is the BasicScalingMechanismDescription implementation for ScalingMechanismDescription. +func (smd ScalingMechanismDescription) AsBasicScalingMechanismDescription() (BasicScalingMechanismDescription, bool) { + return &smd, true +} + +// ScalingPolicyDescription describes how the scaling should be performed +type ScalingPolicyDescription struct { + // ScalingTrigger - Specifies the trigger associated with this scaling policy + ScalingTrigger BasicScalingTriggerDescription `json:"ScalingTrigger,omitempty"` + // ScalingMechanism - Specifies the mechanism associated with this scaling policy + ScalingMechanism BasicScalingMechanismDescription `json:"ScalingMechanism,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ScalingPolicyDescription struct. +func (spd *ScalingPolicyDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ScalingTrigger": + if v != nil { + scalingTrigger, err := unmarshalBasicScalingTriggerDescription(*v) + if err != nil { + return err + } + spd.ScalingTrigger = scalingTrigger + } + case "ScalingMechanism": + if v != nil { + scalingMechanism, err := unmarshalBasicScalingMechanismDescription(*v) + if err != nil { + return err + } + spd.ScalingMechanism = scalingMechanism + } + } + } + + return nil +} + +// BasicScalingTriggerDescription describes the trigger for performing a scaling operation. +type BasicScalingTriggerDescription interface { + AsAveragePartitionLoadScalingTrigger() (*AveragePartitionLoadScalingTrigger, bool) + AsAverageServiceLoadScalingTrigger() (*AverageServiceLoadScalingTrigger, bool) + AsScalingTriggerDescription() (*ScalingTriggerDescription, bool) +} + +// ScalingTriggerDescription describes the trigger for performing a scaling operation. +type ScalingTriggerDescription struct { + // Kind - Possible values include: 'KindScalingTriggerDescription', 'KindAveragePartitionLoad', 'KindAverageServiceLoad' + Kind KindBasicScalingTriggerDescription `json:"Kind,omitempty"` +} + +func unmarshalBasicScalingTriggerDescription(body []byte) (BasicScalingTriggerDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindAveragePartitionLoad): + var aplst AveragePartitionLoadScalingTrigger + err := json.Unmarshal(body, &aplst) + return aplst, err + case string(KindAverageServiceLoad): + var aslst AverageServiceLoadScalingTrigger + err := json.Unmarshal(body, &aslst) + return aslst, err + default: + var std ScalingTriggerDescription + err := json.Unmarshal(body, &std) + return std, err + } +} +func unmarshalBasicScalingTriggerDescriptionArray(body []byte) ([]BasicScalingTriggerDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + stdArray := make([]BasicScalingTriggerDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + std, err := unmarshalBasicScalingTriggerDescription(*rawMessage) + if err != nil { + return nil, err + } + stdArray[index] = std + } + return stdArray, nil +} + +// MarshalJSON is the custom marshaler for ScalingTriggerDescription. +func (std ScalingTriggerDescription) MarshalJSON() ([]byte, error) { + std.Kind = KindScalingTriggerDescription + objectMap := make(map[string]interface{}) + if std.Kind != "" { + objectMap["Kind"] = std.Kind + } + return json.Marshal(objectMap) +} + +// AsAveragePartitionLoadScalingTrigger is the BasicScalingTriggerDescription implementation for ScalingTriggerDescription. +func (std ScalingTriggerDescription) AsAveragePartitionLoadScalingTrigger() (*AveragePartitionLoadScalingTrigger, bool) { + return nil, false +} + +// AsAverageServiceLoadScalingTrigger is the BasicScalingTriggerDescription implementation for ScalingTriggerDescription. +func (std ScalingTriggerDescription) AsAverageServiceLoadScalingTrigger() (*AverageServiceLoadScalingTrigger, bool) { + return nil, false +} + +// AsScalingTriggerDescription is the BasicScalingTriggerDescription implementation for ScalingTriggerDescription. +func (std ScalingTriggerDescription) AsScalingTriggerDescription() (*ScalingTriggerDescription, bool) { + return &std, true +} + +// AsBasicScalingTriggerDescription is the BasicScalingTriggerDescription implementation for ScalingTriggerDescription. +func (std ScalingTriggerDescription) AsBasicScalingTriggerDescription() (BasicScalingTriggerDescription, bool) { + return &std, true +} + +// SecondaryActiveReplicatorStatus status of the secondary replicator when it is in active mode and is part +// of the replica set. +type SecondaryActiveReplicatorStatus struct { + // ReplicationQueueStatus - Details about the replication queue on the secondary replicator. + ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` + // LastReplicationOperationReceivedTimeUtc - The last time-stamp (UTC) at which a replication operation was received from the primary. + // UTC 0 represents an invalid value, indicating that a replication operation message was never received. + LastReplicationOperationReceivedTimeUtc *date.Time `json:"LastReplicationOperationReceivedTimeUtc,omitempty"` + // IsInBuild - Value that indicates whether the replica is currently being built. + IsInBuild *bool `json:"IsInBuild,omitempty"` + // CopyQueueStatus - Details about the copy queue on the secondary replicator. + CopyQueueStatus *ReplicatorQueueStatus `json:"CopyQueueStatus,omitempty"` + // LastCopyOperationReceivedTimeUtc - The last time-stamp (UTC) at which a copy operation was received from the primary. + // UTC 0 represents an invalid value, indicating that a copy operation message was never received. + LastCopyOperationReceivedTimeUtc *date.Time `json:"LastCopyOperationReceivedTimeUtc,omitempty"` + // LastAcknowledgementSentTimeUtc - The last time-stamp (UTC) at which an acknowledgment was sent to the primary replicator. + // UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + LastAcknowledgementSentTimeUtc *date.Time `json:"LastAcknowledgementSentTimeUtc,omitempty"` + // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' + Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) MarshalJSON() ([]byte, error) { + sars.Kind = KindActiveSecondary + objectMap := make(map[string]interface{}) + if sars.ReplicationQueueStatus != nil { + objectMap["ReplicationQueueStatus"] = sars.ReplicationQueueStatus + } + if sars.LastReplicationOperationReceivedTimeUtc != nil { + objectMap["LastReplicationOperationReceivedTimeUtc"] = sars.LastReplicationOperationReceivedTimeUtc + } + if sars.IsInBuild != nil { + objectMap["IsInBuild"] = sars.IsInBuild + } + if sars.CopyQueueStatus != nil { + objectMap["CopyQueueStatus"] = sars.CopyQueueStatus + } + if sars.LastCopyOperationReceivedTimeUtc != nil { + objectMap["LastCopyOperationReceivedTimeUtc"] = sars.LastCopyOperationReceivedTimeUtc + } + if sars.LastAcknowledgementSentTimeUtc != nil { + objectMap["LastAcknowledgementSentTimeUtc"] = sars.LastAcknowledgementSentTimeUtc + } + if sars.Kind != "" { + objectMap["Kind"] = sars.Kind + } + return json.Marshal(objectMap) +} + +// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { + return nil, false +} + +// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { + return &sars, true +} + +// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { + return &sars, true +} + +// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { + return nil, false +} + +// AsReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { + return nil, false +} + +// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryActiveReplicatorStatus. +func (sars SecondaryActiveReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { + return &sars, true +} + +// SecondaryIdleReplicatorStatus status of the secondary replicator when it is in idle mode and is being +// built by the primary. +type SecondaryIdleReplicatorStatus struct { + // ReplicationQueueStatus - Details about the replication queue on the secondary replicator. + ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` + // LastReplicationOperationReceivedTimeUtc - The last time-stamp (UTC) at which a replication operation was received from the primary. + // UTC 0 represents an invalid value, indicating that a replication operation message was never received. + LastReplicationOperationReceivedTimeUtc *date.Time `json:"LastReplicationOperationReceivedTimeUtc,omitempty"` + // IsInBuild - Value that indicates whether the replica is currently being built. + IsInBuild *bool `json:"IsInBuild,omitempty"` + // CopyQueueStatus - Details about the copy queue on the secondary replicator. + CopyQueueStatus *ReplicatorQueueStatus `json:"CopyQueueStatus,omitempty"` + // LastCopyOperationReceivedTimeUtc - The last time-stamp (UTC) at which a copy operation was received from the primary. + // UTC 0 represents an invalid value, indicating that a copy operation message was never received. + LastCopyOperationReceivedTimeUtc *date.Time `json:"LastCopyOperationReceivedTimeUtc,omitempty"` + // LastAcknowledgementSentTimeUtc - The last time-stamp (UTC) at which an acknowledgment was sent to the primary replicator. + // UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + LastAcknowledgementSentTimeUtc *date.Time `json:"LastAcknowledgementSentTimeUtc,omitempty"` + // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' + Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) MarshalJSON() ([]byte, error) { + sirs.Kind = KindIdleSecondary + objectMap := make(map[string]interface{}) + if sirs.ReplicationQueueStatus != nil { + objectMap["ReplicationQueueStatus"] = sirs.ReplicationQueueStatus + } + if sirs.LastReplicationOperationReceivedTimeUtc != nil { + objectMap["LastReplicationOperationReceivedTimeUtc"] = sirs.LastReplicationOperationReceivedTimeUtc + } + if sirs.IsInBuild != nil { + objectMap["IsInBuild"] = sirs.IsInBuild + } + if sirs.CopyQueueStatus != nil { + objectMap["CopyQueueStatus"] = sirs.CopyQueueStatus + } + if sirs.LastCopyOperationReceivedTimeUtc != nil { + objectMap["LastCopyOperationReceivedTimeUtc"] = sirs.LastCopyOperationReceivedTimeUtc + } + if sirs.LastAcknowledgementSentTimeUtc != nil { + objectMap["LastAcknowledgementSentTimeUtc"] = sirs.LastAcknowledgementSentTimeUtc + } + if sirs.Kind != "" { + objectMap["Kind"] = sirs.Kind + } + return json.Marshal(objectMap) +} + +// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { + return nil, false +} + +// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { + return &sirs, true +} + +// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { + return &sirs, true +} + +// AsReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { + return nil, false +} + +// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryIdleReplicatorStatus. +func (sirs SecondaryIdleReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { + return &sirs, true +} + +// BasicSecondaryReplicatorStatus provides statistics about the Service Fabric Replicator, when it is functioning in a +// ActiveSecondary role. +type BasicSecondaryReplicatorStatus interface { + AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) + AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) + AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) +} + +// SecondaryReplicatorStatus provides statistics about the Service Fabric Replicator, when it is functioning in +// a ActiveSecondary role. +type SecondaryReplicatorStatus struct { + // ReplicationQueueStatus - Details about the replication queue on the secondary replicator. + ReplicationQueueStatus *ReplicatorQueueStatus `json:"ReplicationQueueStatus,omitempty"` + // LastReplicationOperationReceivedTimeUtc - The last time-stamp (UTC) at which a replication operation was received from the primary. + // UTC 0 represents an invalid value, indicating that a replication operation message was never received. + LastReplicationOperationReceivedTimeUtc *date.Time `json:"LastReplicationOperationReceivedTimeUtc,omitempty"` + // IsInBuild - Value that indicates whether the replica is currently being built. + IsInBuild *bool `json:"IsInBuild,omitempty"` + // CopyQueueStatus - Details about the copy queue on the secondary replicator. + CopyQueueStatus *ReplicatorQueueStatus `json:"CopyQueueStatus,omitempty"` + // LastCopyOperationReceivedTimeUtc - The last time-stamp (UTC) at which a copy operation was received from the primary. + // UTC 0 represents an invalid value, indicating that a copy operation message was never received. + LastCopyOperationReceivedTimeUtc *date.Time `json:"LastCopyOperationReceivedTimeUtc,omitempty"` + // LastAcknowledgementSentTimeUtc - The last time-stamp (UTC) at which an acknowledgment was sent to the primary replicator. + // UTC 0 represents an invalid value, indicating that an acknowledgment message was never sent. + LastAcknowledgementSentTimeUtc *date.Time `json:"LastAcknowledgementSentTimeUtc,omitempty"` + // Kind - Possible values include: 'KindReplicatorStatus', 'KindPrimary', 'KindSecondaryReplicatorStatus', 'KindActiveSecondary', 'KindIdleSecondary' + Kind KindBasicReplicatorStatus `json:"Kind,omitempty"` +} + +func unmarshalBasicSecondaryReplicatorStatus(body []byte) (BasicSecondaryReplicatorStatus, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindActiveSecondary): + var sars SecondaryActiveReplicatorStatus + err := json.Unmarshal(body, &sars) + return sars, err + case string(KindIdleSecondary): + var sirs SecondaryIdleReplicatorStatus + err := json.Unmarshal(body, &sirs) + return sirs, err + default: + var srs SecondaryReplicatorStatus + err := json.Unmarshal(body, &srs) + return srs, err + } +} +func unmarshalBasicSecondaryReplicatorStatusArray(body []byte) ([]BasicSecondaryReplicatorStatus, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + srsArray := make([]BasicSecondaryReplicatorStatus, len(rawMessages)) + + for index, rawMessage := range rawMessages { + srs, err := unmarshalBasicSecondaryReplicatorStatus(*rawMessage) + if err != nil { + return nil, err + } + srsArray[index] = srs + } + return srsArray, nil +} + +// MarshalJSON is the custom marshaler for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) MarshalJSON() ([]byte, error) { + srs.Kind = KindSecondaryReplicatorStatus + objectMap := make(map[string]interface{}) + if srs.ReplicationQueueStatus != nil { + objectMap["ReplicationQueueStatus"] = srs.ReplicationQueueStatus + } + if srs.LastReplicationOperationReceivedTimeUtc != nil { + objectMap["LastReplicationOperationReceivedTimeUtc"] = srs.LastReplicationOperationReceivedTimeUtc + } + if srs.IsInBuild != nil { + objectMap["IsInBuild"] = srs.IsInBuild + } + if srs.CopyQueueStatus != nil { + objectMap["CopyQueueStatus"] = srs.CopyQueueStatus + } + if srs.LastCopyOperationReceivedTimeUtc != nil { + objectMap["LastCopyOperationReceivedTimeUtc"] = srs.LastCopyOperationReceivedTimeUtc + } + if srs.LastAcknowledgementSentTimeUtc != nil { + objectMap["LastAcknowledgementSentTimeUtc"] = srs.LastAcknowledgementSentTimeUtc + } + if srs.Kind != "" { + objectMap["Kind"] = srs.Kind + } + return json.Marshal(objectMap) +} + +// AsPrimaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) AsPrimaryReplicatorStatus() (*PrimaryReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) AsSecondaryReplicatorStatus() (*SecondaryReplicatorStatus, bool) { + return &srs, true +} + +// AsBasicSecondaryReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) AsBasicSecondaryReplicatorStatus() (BasicSecondaryReplicatorStatus, bool) { + return &srs, true +} + +// AsSecondaryActiveReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) AsSecondaryActiveReplicatorStatus() (*SecondaryActiveReplicatorStatus, bool) { + return nil, false +} + +// AsSecondaryIdleReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) AsSecondaryIdleReplicatorStatus() (*SecondaryIdleReplicatorStatus, bool) { + return nil, false +} + +// AsReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) AsReplicatorStatus() (*ReplicatorStatus, bool) { + return nil, false +} + +// AsBasicReplicatorStatus is the BasicReplicatorStatus implementation for SecondaryReplicatorStatus. +func (srs SecondaryReplicatorStatus) AsBasicReplicatorStatus() (BasicReplicatorStatus, bool) { + return &srs, true +} + +// SecretResourceDescription this type describes a secret resource. +type SecretResourceDescription struct { + autorest.Response `json:"-"` + // Properties - Describes the properties of a secret resource. + Properties BasicSecretResourceProperties `json:"properties,omitempty"` + // Name - Name of the Secret resource. + Name *string `json:"name,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SecretResourceDescription struct. +func (srd *SecretResourceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicSecretResourceProperties(*v) + if err != nil { + return err + } + srd.Properties = properties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + srd.Name = &name + } + } + } + + return nil +} + +// BasicSecretResourceProperties describes the properties of a secret resource. +type BasicSecretResourceProperties interface { + AsInlinedValueSecretResourceProperties() (*InlinedValueSecretResourceProperties, bool) + AsSecretResourceProperties() (*SecretResourceProperties, bool) +} + +// SecretResourceProperties describes the properties of a secret resource. +type SecretResourceProperties struct { + // Description - User readable description of the secret. + Description *string `json:"description,omitempty"` + // Status - READ-ONLY; Status of the resource. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the secret. + StatusDetails *string `json:"statusDetails,omitempty"` + // ContentType - The type of the content stored in the secret value. The value of this property is opaque to Service Fabric. Once set, the value of this property cannot be changed. + ContentType *string `json:"contentType,omitempty"` + // Kind - Possible values include: 'KindSecretResourcePropertiesBase', 'KindSecretResourceProperties', 'KindInlinedValue' + Kind KindBasicSecretResourcePropertiesBase `json:"kind,omitempty"` +} + +func unmarshalBasicSecretResourceProperties(body []byte) (BasicSecretResourceProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindInlinedValue): + var ivsrp InlinedValueSecretResourceProperties + err := json.Unmarshal(body, &ivsrp) + return ivsrp, err + default: + var srp SecretResourceProperties + err := json.Unmarshal(body, &srp) + return srp, err + } +} +func unmarshalBasicSecretResourcePropertiesArray(body []byte) ([]BasicSecretResourceProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + srpArray := make([]BasicSecretResourceProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + srp, err := unmarshalBasicSecretResourceProperties(*rawMessage) + if err != nil { + return nil, err + } + srpArray[index] = srp + } + return srpArray, nil +} + +// MarshalJSON is the custom marshaler for SecretResourceProperties. +func (srp SecretResourceProperties) MarshalJSON() ([]byte, error) { + srp.Kind = KindSecretResourceProperties + objectMap := make(map[string]interface{}) + if srp.Description != nil { + objectMap["description"] = srp.Description + } + if srp.ContentType != nil { + objectMap["contentType"] = srp.ContentType + } + if srp.Kind != "" { + objectMap["kind"] = srp.Kind + } + return json.Marshal(objectMap) +} + +// AsSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for SecretResourceProperties. +func (srp SecretResourceProperties) AsSecretResourceProperties() (*SecretResourceProperties, bool) { + return &srp, true +} + +// AsBasicSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for SecretResourceProperties. +func (srp SecretResourceProperties) AsBasicSecretResourceProperties() (BasicSecretResourceProperties, bool) { + return &srp, true +} + +// AsInlinedValueSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for SecretResourceProperties. +func (srp SecretResourceProperties) AsInlinedValueSecretResourceProperties() (*InlinedValueSecretResourceProperties, bool) { + return nil, false +} + +// AsSecretResourcePropertiesBase is the BasicSecretResourcePropertiesBase implementation for SecretResourceProperties. +func (srp SecretResourceProperties) AsSecretResourcePropertiesBase() (*SecretResourcePropertiesBase, bool) { + return nil, false +} + +// AsBasicSecretResourcePropertiesBase is the BasicSecretResourcePropertiesBase implementation for SecretResourceProperties. +func (srp SecretResourceProperties) AsBasicSecretResourcePropertiesBase() (BasicSecretResourcePropertiesBase, bool) { + return &srp, true +} + +// BasicSecretResourcePropertiesBase this type describes the properties of a secret resource, including its kind. +type BasicSecretResourcePropertiesBase interface { + AsSecretResourceProperties() (*SecretResourceProperties, bool) + AsBasicSecretResourceProperties() (BasicSecretResourceProperties, bool) + AsInlinedValueSecretResourceProperties() (*InlinedValueSecretResourceProperties, bool) + AsSecretResourcePropertiesBase() (*SecretResourcePropertiesBase, bool) +} + +// SecretResourcePropertiesBase this type describes the properties of a secret resource, including its kind. +type SecretResourcePropertiesBase struct { + // Kind - Possible values include: 'KindSecretResourcePropertiesBase', 'KindSecretResourceProperties', 'KindInlinedValue' + Kind KindBasicSecretResourcePropertiesBase `json:"kind,omitempty"` +} + +func unmarshalBasicSecretResourcePropertiesBase(body []byte) (BasicSecretResourcePropertiesBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindSecretResourceProperties): + var srp SecretResourceProperties + err := json.Unmarshal(body, &srp) + return srp, err + case string(KindInlinedValue): + var ivsrp InlinedValueSecretResourceProperties + err := json.Unmarshal(body, &ivsrp) + return ivsrp, err + default: + var srpb SecretResourcePropertiesBase + err := json.Unmarshal(body, &srpb) + return srpb, err + } +} +func unmarshalBasicSecretResourcePropertiesBaseArray(body []byte) ([]BasicSecretResourcePropertiesBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + srpbArray := make([]BasicSecretResourcePropertiesBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + srpb, err := unmarshalBasicSecretResourcePropertiesBase(*rawMessage) + if err != nil { + return nil, err + } + srpbArray[index] = srpb + } + return srpbArray, nil +} + +// MarshalJSON is the custom marshaler for SecretResourcePropertiesBase. +func (srpb SecretResourcePropertiesBase) MarshalJSON() ([]byte, error) { + srpb.Kind = KindSecretResourcePropertiesBase + objectMap := make(map[string]interface{}) + if srpb.Kind != "" { + objectMap["kind"] = srpb.Kind + } + return json.Marshal(objectMap) +} + +// AsSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for SecretResourcePropertiesBase. +func (srpb SecretResourcePropertiesBase) AsSecretResourceProperties() (*SecretResourceProperties, bool) { + return nil, false +} + +// AsBasicSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for SecretResourcePropertiesBase. +func (srpb SecretResourcePropertiesBase) AsBasicSecretResourceProperties() (BasicSecretResourceProperties, bool) { + return nil, false +} + +// AsInlinedValueSecretResourceProperties is the BasicSecretResourcePropertiesBase implementation for SecretResourcePropertiesBase. +func (srpb SecretResourcePropertiesBase) AsInlinedValueSecretResourceProperties() (*InlinedValueSecretResourceProperties, bool) { + return nil, false +} + +// AsSecretResourcePropertiesBase is the BasicSecretResourcePropertiesBase implementation for SecretResourcePropertiesBase. +func (srpb SecretResourcePropertiesBase) AsSecretResourcePropertiesBase() (*SecretResourcePropertiesBase, bool) { + return &srpb, true +} + +// AsBasicSecretResourcePropertiesBase is the BasicSecretResourcePropertiesBase implementation for SecretResourcePropertiesBase. +func (srpb SecretResourcePropertiesBase) AsBasicSecretResourcePropertiesBase() (BasicSecretResourcePropertiesBase, bool) { + return &srpb, true +} + +// SecretValue this type represents the unencrypted value of the secret. +type SecretValue struct { + autorest.Response `json:"-"` + // Value - The actual value of the secret. + Value *string `json:"value,omitempty"` +} + +// SecretValueProperties this type describes properties of secret value resource. +type SecretValueProperties struct { + // Value - The actual value of the secret. + Value *string `json:"value,omitempty"` +} + +// SecretValueResourceDescription this type describes a value of a secret resource. The name of this +// resource is the version identifier corresponding to this secret value. +type SecretValueResourceDescription struct { + autorest.Response `json:"-"` + // Name - Version identifier of the secret value. + Name *string `json:"name,omitempty"` + // SecretValueResourceProperties - This type describes properties of a secret value resource. + *SecretValueResourceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for SecretValueResourceDescription. +func (svrd SecretValueResourceDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if svrd.Name != nil { + objectMap["name"] = svrd.Name + } + if svrd.SecretValueResourceProperties != nil { + objectMap["properties"] = svrd.SecretValueResourceProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for SecretValueResourceDescription struct. +func (svrd *SecretValueResourceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + svrd.Name = &name + } + case "properties": + if v != nil { + var secretValueResourceProperties SecretValueResourceProperties + err = json.Unmarshal(*v, &secretValueResourceProperties) + if err != nil { + return err + } + svrd.SecretValueResourceProperties = &secretValueResourceProperties + } + } + } + + return nil +} + +// SecretValueResourceProperties this type describes properties of a secret value resource. +type SecretValueResourceProperties struct { + // Value - The actual value of the secret. + Value *string `json:"value,omitempty"` +} + +// SeedNodeSafetyCheck represents a safety check for the seed nodes being performed by service fabric +// before continuing with node level operations. +type SeedNodeSafetyCheck struct { + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) MarshalJSON() ([]byte, error) { + snsc.Kind = KindEnsureSeedNodeQuorum + objectMap := make(map[string]interface{}) + if snsc.Kind != "" { + objectMap["Kind"] = snsc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return nil, false +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return &snsc, true +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for SeedNodeSafetyCheck. +func (snsc SeedNodeSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &snsc, true +} + +// SelectedPartition this class returns information about the partition that the user-induced operation +// acted upon. +type SelectedPartition struct { + // ServiceName - The name of the service the partition belongs to. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` +} + +// ServiceBackupConfigurationInfo backup configuration information for a specific Service Fabric service +// specifying what backup policy is being applied and suspend description, if any. +type ServiceBackupConfigurationInfo struct { + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // PolicyName - The name of the backup policy which is applicable to this Service Fabric application or service or partition. + PolicyName *string `json:"PolicyName,omitempty"` + // PolicyInheritedFrom - Specifies the scope at which the backup policy is applied. Possible values include: 'BackupPolicyScopeInvalid', 'BackupPolicyScopePartition', 'BackupPolicyScopeService', 'BackupPolicyScopeApplication' + PolicyInheritedFrom BackupPolicyScope `json:"PolicyInheritedFrom,omitempty"` + // SuspensionInfo - Describes the backup suspension details. + SuspensionInfo *BackupSuspensionInfo `json:"SuspensionInfo,omitempty"` + // Kind - Possible values include: 'KindBasicBackupConfigurationInfoKindBackupConfigurationInfo', 'KindBasicBackupConfigurationInfoKindApplication', 'KindBasicBackupConfigurationInfoKindService', 'KindBasicBackupConfigurationInfoKindPartition' + Kind KindBasicBackupConfigurationInfo `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceBackupConfigurationInfo. +func (sbci ServiceBackupConfigurationInfo) MarshalJSON() ([]byte, error) { + sbci.Kind = KindBasicBackupConfigurationInfoKindService + objectMap := make(map[string]interface{}) + if sbci.ServiceName != nil { + objectMap["ServiceName"] = sbci.ServiceName + } + if sbci.PolicyName != nil { + objectMap["PolicyName"] = sbci.PolicyName + } + if sbci.PolicyInheritedFrom != "" { + objectMap["PolicyInheritedFrom"] = sbci.PolicyInheritedFrom + } + if sbci.SuspensionInfo != nil { + objectMap["SuspensionInfo"] = sbci.SuspensionInfo + } + if sbci.Kind != "" { + objectMap["Kind"] = sbci.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ServiceBackupConfigurationInfo. +func (sbci ServiceBackupConfigurationInfo) AsApplicationBackupConfigurationInfo() (*ApplicationBackupConfigurationInfo, bool) { + return nil, false +} + +// AsServiceBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ServiceBackupConfigurationInfo. +func (sbci ServiceBackupConfigurationInfo) AsServiceBackupConfigurationInfo() (*ServiceBackupConfigurationInfo, bool) { + return &sbci, true +} + +// AsPartitionBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ServiceBackupConfigurationInfo. +func (sbci ServiceBackupConfigurationInfo) AsPartitionBackupConfigurationInfo() (*PartitionBackupConfigurationInfo, bool) { + return nil, false +} + +// AsBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ServiceBackupConfigurationInfo. +func (sbci ServiceBackupConfigurationInfo) AsBackupConfigurationInfo() (*BackupConfigurationInfo, bool) { + return nil, false +} + +// AsBasicBackupConfigurationInfo is the BasicBackupConfigurationInfo implementation for ServiceBackupConfigurationInfo. +func (sbci ServiceBackupConfigurationInfo) AsBasicBackupConfigurationInfo() (BasicBackupConfigurationInfo, bool) { + return &sbci, true +} + +// ServiceBackupEntity identifies the Service Fabric stateful service which is being backed up. +type ServiceBackupEntity struct { + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // EntityKind - Possible values include: 'EntityKindBackupEntity', 'EntityKindApplication1', 'EntityKindService1', 'EntityKindPartition1' + EntityKind EntityKindBasicBackupEntity `json:"EntityKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceBackupEntity. +func (sbe ServiceBackupEntity) MarshalJSON() ([]byte, error) { + sbe.EntityKind = EntityKindService1 + objectMap := make(map[string]interface{}) + if sbe.ServiceName != nil { + objectMap["ServiceName"] = sbe.ServiceName + } + if sbe.EntityKind != "" { + objectMap["EntityKind"] = sbe.EntityKind + } + return json.Marshal(objectMap) +} + +// AsApplicationBackupEntity is the BasicBackupEntity implementation for ServiceBackupEntity. +func (sbe ServiceBackupEntity) AsApplicationBackupEntity() (*ApplicationBackupEntity, bool) { + return nil, false +} + +// AsServiceBackupEntity is the BasicBackupEntity implementation for ServiceBackupEntity. +func (sbe ServiceBackupEntity) AsServiceBackupEntity() (*ServiceBackupEntity, bool) { + return &sbe, true +} + +// AsPartitionBackupEntity is the BasicBackupEntity implementation for ServiceBackupEntity. +func (sbe ServiceBackupEntity) AsPartitionBackupEntity() (*PartitionBackupEntity, bool) { + return nil, false +} + +// AsBackupEntity is the BasicBackupEntity implementation for ServiceBackupEntity. +func (sbe ServiceBackupEntity) AsBackupEntity() (*BackupEntity, bool) { + return nil, false +} + +// AsBasicBackupEntity is the BasicBackupEntity implementation for ServiceBackupEntity. +func (sbe ServiceBackupEntity) AsBasicBackupEntity() (BasicBackupEntity, bool) { + return &sbe, true +} + +// ServiceCorrelationDescription creates a particular correlation between services. +type ServiceCorrelationDescription struct { + // Scheme - The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. Possible values include: 'ServiceCorrelationSchemeInvalid', 'ServiceCorrelationSchemeAffinity', 'ServiceCorrelationSchemeAlignedAffinity', 'ServiceCorrelationSchemeNonAlignedAffinity' + Scheme ServiceCorrelationScheme `json:"Scheme,omitempty"` + // ServiceName - The name of the service that the correlation relationship is established with. + ServiceName *string `json:"ServiceName,omitempty"` +} + +// ServiceCreatedEvent service Created event. +type ServiceCreatedEvent struct { + // ServiceTypeName - Service type name. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // ApplicationName - Application name. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ServiceInstance - Id of Service instance. + ServiceInstance *int64 `json:"ServiceInstance,omitempty"` + // IsStateful - Indicates if Service is stateful. + IsStateful *bool `json:"IsStateful,omitempty"` + // PartitionCount - Number of partitions. + PartitionCount *int32 `json:"PartitionCount,omitempty"` + // TargetReplicaSetSize - Size of target replicas set. + TargetReplicaSetSize *int32 `json:"TargetReplicaSetSize,omitempty"` + // MinReplicaSetSize - Minimum size of replicas set. + MinReplicaSetSize *int32 `json:"MinReplicaSetSize,omitempty"` + // ServicePackageVersion - Version of Service package. + ServicePackageVersion *string `json:"ServicePackageVersion,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ServiceID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ServiceID *string `json:"ServiceId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) MarshalJSON() ([]byte, error) { + sce.Kind = KindServiceCreated + objectMap := make(map[string]interface{}) + if sce.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = sce.ServiceTypeName + } + if sce.ApplicationName != nil { + objectMap["ApplicationName"] = sce.ApplicationName + } + if sce.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = sce.ApplicationTypeName + } + if sce.ServiceInstance != nil { + objectMap["ServiceInstance"] = sce.ServiceInstance + } + if sce.IsStateful != nil { + objectMap["IsStateful"] = sce.IsStateful + } + if sce.PartitionCount != nil { + objectMap["PartitionCount"] = sce.PartitionCount + } + if sce.TargetReplicaSetSize != nil { + objectMap["TargetReplicaSetSize"] = sce.TargetReplicaSetSize + } + if sce.MinReplicaSetSize != nil { + objectMap["MinReplicaSetSize"] = sce.MinReplicaSetSize + } + if sce.ServicePackageVersion != nil { + objectMap["ServicePackageVersion"] = sce.ServicePackageVersion + } + if sce.PartitionID != nil { + objectMap["PartitionId"] = sce.PartitionID + } + if sce.ServiceID != nil { + objectMap["ServiceId"] = sce.ServiceID + } + if sce.EventInstanceID != nil { + objectMap["EventInstanceId"] = sce.EventInstanceID + } + if sce.Category != nil { + objectMap["Category"] = sce.Category + } + if sce.TimeStamp != nil { + objectMap["TimeStamp"] = sce.TimeStamp + } + if sce.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = sce.HasCorrelatedEvents + } + if sce.Kind != "" { + objectMap["Kind"] = sce.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return &sce, true +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return &sce, true +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ServiceCreatedEvent. +func (sce ServiceCreatedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &sce, true +} + +// ServiceDeletedEvent service Deleted event. +type ServiceDeletedEvent struct { + // ServiceTypeName - Service type name. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // ApplicationName - Application name. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ApplicationTypeName - Application type name. + ApplicationTypeName *string `json:"ApplicationTypeName,omitempty"` + // ServiceInstance - Id of Service instance. + ServiceInstance *int64 `json:"ServiceInstance,omitempty"` + // IsStateful - Indicates if Service is stateful. + IsStateful *bool `json:"IsStateful,omitempty"` + // PartitionCount - Number of partitions. + PartitionCount *int32 `json:"PartitionCount,omitempty"` + // TargetReplicaSetSize - Size of target replicas set. + TargetReplicaSetSize *int32 `json:"TargetReplicaSetSize,omitempty"` + // MinReplicaSetSize - Minimum size of replicas set. + MinReplicaSetSize *int32 `json:"MinReplicaSetSize,omitempty"` + // ServicePackageVersion - Version of Service package. + ServicePackageVersion *string `json:"ServicePackageVersion,omitempty"` + // ServiceID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ServiceID *string `json:"ServiceId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) MarshalJSON() ([]byte, error) { + sde.Kind = KindServiceDeleted + objectMap := make(map[string]interface{}) + if sde.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = sde.ServiceTypeName + } + if sde.ApplicationName != nil { + objectMap["ApplicationName"] = sde.ApplicationName + } + if sde.ApplicationTypeName != nil { + objectMap["ApplicationTypeName"] = sde.ApplicationTypeName + } + if sde.ServiceInstance != nil { + objectMap["ServiceInstance"] = sde.ServiceInstance + } + if sde.IsStateful != nil { + objectMap["IsStateful"] = sde.IsStateful + } + if sde.PartitionCount != nil { + objectMap["PartitionCount"] = sde.PartitionCount + } + if sde.TargetReplicaSetSize != nil { + objectMap["TargetReplicaSetSize"] = sde.TargetReplicaSetSize + } + if sde.MinReplicaSetSize != nil { + objectMap["MinReplicaSetSize"] = sde.MinReplicaSetSize + } + if sde.ServicePackageVersion != nil { + objectMap["ServicePackageVersion"] = sde.ServicePackageVersion + } + if sde.ServiceID != nil { + objectMap["ServiceId"] = sde.ServiceID + } + if sde.EventInstanceID != nil { + objectMap["EventInstanceId"] = sde.EventInstanceID + } + if sde.Category != nil { + objectMap["Category"] = sde.Category + } + if sde.TimeStamp != nil { + objectMap["TimeStamp"] = sde.TimeStamp + } + if sde.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = sde.HasCorrelatedEvents + } + if sde.Kind != "" { + objectMap["Kind"] = sde.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return &sde, true +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return &sde, true +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ServiceDeletedEvent. +func (sde ServiceDeletedEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &sde, true +} + +// BasicServiceDescription a ServiceDescription contains all of the information necessary to create a service. +type BasicServiceDescription interface { + AsStatefulServiceDescription() (*StatefulServiceDescription, bool) + AsStatelessServiceDescription() (*StatelessServiceDescription, bool) + AsServiceDescription() (*ServiceDescription, bool) +} + +// ServiceDescription a ServiceDescription contains all of the information necessary to create a service. +type ServiceDescription struct { + autorest.Response `json:"-"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // InitializationData - The initialization data as an array of bytes. Initialization data is passed to service instances or replicas when they are created. + InitializationData *[]int32 `json:"InitializationData,omitempty"` + // PartitionDescription - The partition description as an object. + PartitionDescription BasicPartitionSchemeDescription `json:"PartitionDescription,omitempty"` + // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // CorrelationScheme - The correlation scheme. + CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` + // ServiceLoadMetrics - The service load metrics. + ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"ServiceLoadMetrics,omitempty"` + // ServicePlacementPolicies - The service placement policies. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // DefaultMoveCost - The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + DefaultMoveCost MoveCost `json:"DefaultMoveCost,omitempty"` + // IsDefaultMoveCostSpecified - Indicates if the DefaultMoveCost property is specified. + IsDefaultMoveCostSpecified *bool `json:"IsDefaultMoveCostSpecified,omitempty"` + // ServicePackageActivationMode - The activation mode of service package to be used for a service. Possible values include: 'SharedProcess', 'ExclusiveProcess' + ServicePackageActivationMode ServicePackageActivationMode `json:"ServicePackageActivationMode,omitempty"` + // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. + ServiceDNSName *string `json:"ServiceDnsName,omitempty"` + // ScalingPolicies - Scaling policies for this service. + ScalingPolicies *[]ScalingPolicyDescription `json:"ScalingPolicies,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceDescriptionServiceKindServiceDescription', 'ServiceKindBasicServiceDescriptionServiceKindStateful', 'ServiceKindBasicServiceDescriptionServiceKindStateless' + ServiceKind ServiceKindBasicServiceDescription `json:"ServiceKind,omitempty"` +} + +func unmarshalBasicServiceDescription(body []byte) (BasicServiceDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicServiceDescriptionServiceKindStateful): + var ssd StatefulServiceDescription + err := json.Unmarshal(body, &ssd) + return ssd, err + case string(ServiceKindBasicServiceDescriptionServiceKindStateless): + var ssd StatelessServiceDescription + err := json.Unmarshal(body, &ssd) + return ssd, err + default: + var sd ServiceDescription + err := json.Unmarshal(body, &sd) + return sd, err + } +} +func unmarshalBasicServiceDescriptionArray(body []byte) ([]BasicServiceDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sdArray := make([]BasicServiceDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sd, err := unmarshalBasicServiceDescription(*rawMessage) + if err != nil { + return nil, err + } + sdArray[index] = sd + } + return sdArray, nil +} + +// MarshalJSON is the custom marshaler for ServiceDescription. +func (sd ServiceDescription) MarshalJSON() ([]byte, error) { + sd.ServiceKind = ServiceKindBasicServiceDescriptionServiceKindServiceDescription + objectMap := make(map[string]interface{}) + if sd.ApplicationName != nil { + objectMap["ApplicationName"] = sd.ApplicationName + } + if sd.ServiceName != nil { + objectMap["ServiceName"] = sd.ServiceName + } + if sd.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = sd.ServiceTypeName + } + if sd.InitializationData != nil { + objectMap["InitializationData"] = sd.InitializationData + } + objectMap["PartitionDescription"] = sd.PartitionDescription + if sd.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = sd.PlacementConstraints + } + if sd.CorrelationScheme != nil { + objectMap["CorrelationScheme"] = sd.CorrelationScheme + } + if sd.ServiceLoadMetrics != nil { + objectMap["ServiceLoadMetrics"] = sd.ServiceLoadMetrics + } + if sd.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = sd.ServicePlacementPolicies + } + if sd.DefaultMoveCost != "" { + objectMap["DefaultMoveCost"] = sd.DefaultMoveCost + } + if sd.IsDefaultMoveCostSpecified != nil { + objectMap["IsDefaultMoveCostSpecified"] = sd.IsDefaultMoveCostSpecified + } + if sd.ServicePackageActivationMode != "" { + objectMap["ServicePackageActivationMode"] = sd.ServicePackageActivationMode + } + if sd.ServiceDNSName != nil { + objectMap["ServiceDnsName"] = sd.ServiceDNSName + } + if sd.ScalingPolicies != nil { + objectMap["ScalingPolicies"] = sd.ScalingPolicies + } + if sd.ServiceKind != "" { + objectMap["ServiceKind"] = sd.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceDescription is the BasicServiceDescription implementation for ServiceDescription. +func (sd ServiceDescription) AsStatefulServiceDescription() (*StatefulServiceDescription, bool) { + return nil, false +} + +// AsStatelessServiceDescription is the BasicServiceDescription implementation for ServiceDescription. +func (sd ServiceDescription) AsStatelessServiceDescription() (*StatelessServiceDescription, bool) { + return nil, false +} + +// AsServiceDescription is the BasicServiceDescription implementation for ServiceDescription. +func (sd ServiceDescription) AsServiceDescription() (*ServiceDescription, bool) { + return &sd, true +} + +// AsBasicServiceDescription is the BasicServiceDescription implementation for ServiceDescription. +func (sd ServiceDescription) AsBasicServiceDescription() (BasicServiceDescription, bool) { + return &sd, true +} + +// UnmarshalJSON is the custom unmarshaler for ServiceDescription struct. +func (sd *ServiceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ApplicationName": + if v != nil { + var applicationName string + err = json.Unmarshal(*v, &applicationName) + if err != nil { + return err + } + sd.ApplicationName = &applicationName + } + case "ServiceName": + if v != nil { + var serviceName string + err = json.Unmarshal(*v, &serviceName) + if err != nil { + return err + } + sd.ServiceName = &serviceName + } + case "ServiceTypeName": + if v != nil { + var serviceTypeName string + err = json.Unmarshal(*v, &serviceTypeName) + if err != nil { + return err + } + sd.ServiceTypeName = &serviceTypeName + } + case "InitializationData": + if v != nil { + var initializationData []int32 + err = json.Unmarshal(*v, &initializationData) + if err != nil { + return err + } + sd.InitializationData = &initializationData + } + case "PartitionDescription": + if v != nil { + partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v) + if err != nil { + return err + } + sd.PartitionDescription = partitionDescription + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + sd.PlacementConstraints = &placementConstraints + } + case "CorrelationScheme": + if v != nil { + var correlationScheme []ServiceCorrelationDescription + err = json.Unmarshal(*v, &correlationScheme) + if err != nil { + return err + } + sd.CorrelationScheme = &correlationScheme + } + case "ServiceLoadMetrics": + if v != nil { + var serviceLoadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &serviceLoadMetrics) + if err != nil { + return err + } + sd.ServiceLoadMetrics = &serviceLoadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + sd.ServicePlacementPolicies = &servicePlacementPolicies + } + case "DefaultMoveCost": + if v != nil { + var defaultMoveCost MoveCost + err = json.Unmarshal(*v, &defaultMoveCost) + if err != nil { + return err + } + sd.DefaultMoveCost = defaultMoveCost + } + case "IsDefaultMoveCostSpecified": + if v != nil { + var isDefaultMoveCostSpecified bool + err = json.Unmarshal(*v, &isDefaultMoveCostSpecified) + if err != nil { + return err + } + sd.IsDefaultMoveCostSpecified = &isDefaultMoveCostSpecified + } + case "ServicePackageActivationMode": + if v != nil { + var servicePackageActivationMode ServicePackageActivationMode + err = json.Unmarshal(*v, &servicePackageActivationMode) + if err != nil { + return err + } + sd.ServicePackageActivationMode = servicePackageActivationMode + } + case "ServiceDnsName": + if v != nil { + var serviceDNSName string + err = json.Unmarshal(*v, &serviceDNSName) + if err != nil { + return err + } + sd.ServiceDNSName = &serviceDNSName + } + case "ScalingPolicies": + if v != nil { + var scalingPolicies []ScalingPolicyDescription + err = json.Unmarshal(*v, &scalingPolicies) + if err != nil { + return err + } + sd.ScalingPolicies = &scalingPolicies + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServiceDescription + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + sd.ServiceKind = serviceKind + } + } + } + + return nil +} + +// ServiceDescriptionModel ... +type ServiceDescriptionModel struct { + autorest.Response `json:"-"` + Value BasicServiceDescription `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ServiceDescriptionModel struct. +func (sdm *ServiceDescriptionModel) UnmarshalJSON(body []byte) error { + sd, err := unmarshalBasicServiceDescription(body) + if err != nil { + return err + } + sdm.Value = sd + + return nil +} + +// BasicServiceEvent represents the base for all Service Events. +type BasicServiceEvent interface { + AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) + AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) + AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) + AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) + AsServiceEvent() (*ServiceEvent, bool) +} + +// ServiceEvent represents the base for all Service Events. +type ServiceEvent struct { + // ServiceID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ServiceID *string `json:"ServiceId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +func unmarshalBasicServiceEvent(body []byte) (BasicServiceEvent, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindServiceCreated): + var sce ServiceCreatedEvent + err := json.Unmarshal(body, &sce) + return sce, err + case string(KindServiceDeleted): + var sde ServiceDeletedEvent + err := json.Unmarshal(body, &sde) + return sde, err + case string(KindServiceNewHealthReport): + var snhre ServiceNewHealthReportEvent + err := json.Unmarshal(body, &snhre) + return snhre, err + case string(KindServiceHealthReportExpired): + var shree ServiceHealthReportExpiredEvent + err := json.Unmarshal(body, &shree) + return shree, err + default: + var se ServiceEvent + err := json.Unmarshal(body, &se) + return se, err + } +} +func unmarshalBasicServiceEventArray(body []byte) ([]BasicServiceEvent, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + seArray := make([]BasicServiceEvent, len(rawMessages)) + + for index, rawMessage := range rawMessages { + se, err := unmarshalBasicServiceEvent(*rawMessage) + if err != nil { + return nil, err + } + seArray[index] = se + } + return seArray, nil +} + +// MarshalJSON is the custom marshaler for ServiceEvent. +func (se ServiceEvent) MarshalJSON() ([]byte, error) { + se.Kind = KindServiceEvent + objectMap := make(map[string]interface{}) + if se.ServiceID != nil { + objectMap["ServiceId"] = se.ServiceID + } + if se.EventInstanceID != nil { + objectMap["EventInstanceId"] = se.EventInstanceID + } + if se.Category != nil { + objectMap["Category"] = se.Category + } + if se.TimeStamp != nil { + objectMap["TimeStamp"] = se.TimeStamp + } + if se.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = se.HasCorrelatedEvents + } + if se.Kind != "" { + objectMap["Kind"] = se.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsServiceEvent() (*ServiceEvent, bool) { + return &se, true +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return &se, true +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ServiceEvent. +func (se ServiceEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &se, true +} + +// ServiceFromTemplateDescription defines description for creating a Service Fabric service from a template +// defined in the application manifest. +type ServiceFromTemplateDescription struct { + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // InitializationData - The initialization data for the newly created service instance. + InitializationData *[]int32 `json:"InitializationData,omitempty"` + // ServicePackageActivationMode - The activation mode of service package to be used for a service. Possible values include: 'SharedProcess', 'ExclusiveProcess' + ServicePackageActivationMode ServicePackageActivationMode `json:"ServicePackageActivationMode,omitempty"` + // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. + ServiceDNSName *string `json:"ServiceDnsName,omitempty"` +} + +// ServiceHealth information about the health of a Service Fabric service. +type ServiceHealth struct { + autorest.Response `json:"-"` + // Name - The name of the service whose health information is described by this object. + Name *string `json:"Name,omitempty"` + // PartitionHealthStates - The list of partition health states associated with the service. + PartitionHealthStates *[]PartitionHealthState `json:"PartitionHealthStates,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// ServiceHealthEvaluation represents health evaluation for a service, containing information about the +// data and the algorithm used by health store to evaluate health. The evaluation is returned only when the +// aggregated health state is either Error or Warning. +type ServiceHealthEvaluation struct { + // ServiceName - Name of the service whose health evaluation is described by this object. + ServiceName *string `json:"ServiceName,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state of the service. The types of the unhealthy evaluations can be PartitionsHealthEvaluation or EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) MarshalJSON() ([]byte, error) { + she.Kind = KindService + objectMap := make(map[string]interface{}) + if she.ServiceName != nil { + objectMap["ServiceName"] = she.ServiceName + } + if she.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = she.UnhealthyEvaluations + } + if she.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = she.AggregatedHealthState + } + if she.Description != nil { + objectMap["Description"] = she.Description + } + if she.Kind != "" { + objectMap["Kind"] = she.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return &she, true +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ServiceHealthEvaluation. +func (she ServiceHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &she, true +} + +// ServiceHealthReportExpiredEvent service Health Report Expired event. +type ServiceHealthReportExpiredEvent struct { + // InstanceID - Id of Service instance. + InstanceID *int64 `json:"InstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ServiceID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ServiceID *string `json:"ServiceId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + shree.Kind = KindServiceHealthReportExpired + objectMap := make(map[string]interface{}) + if shree.InstanceID != nil { + objectMap["InstanceId"] = shree.InstanceID + } + if shree.SourceID != nil { + objectMap["SourceId"] = shree.SourceID + } + if shree.Property != nil { + objectMap["Property"] = shree.Property + } + if shree.HealthState != nil { + objectMap["HealthState"] = shree.HealthState + } + if shree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = shree.TimeToLiveMs + } + if shree.SequenceNumber != nil { + objectMap["SequenceNumber"] = shree.SequenceNumber + } + if shree.Description != nil { + objectMap["Description"] = shree.Description + } + if shree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = shree.RemoveWhenExpired + } + if shree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = shree.SourceUtcTimestamp + } + if shree.ServiceID != nil { + objectMap["ServiceId"] = shree.ServiceID + } + if shree.EventInstanceID != nil { + objectMap["EventInstanceId"] = shree.EventInstanceID + } + if shree.Category != nil { + objectMap["Category"] = shree.Category + } + if shree.TimeStamp != nil { + objectMap["TimeStamp"] = shree.TimeStamp + } + if shree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = shree.HasCorrelatedEvents + } + if shree.Kind != "" { + objectMap["Kind"] = shree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return &shree, true +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return &shree, true +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ServiceHealthReportExpiredEvent. +func (shree ServiceHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &shree, true +} + +// ServiceHealthState represents the health state of a service, which contains the service identifier and +// its aggregated health state. +type ServiceHealthState struct { + // ServiceName - Name of the service whose health state is represented by this object. + ServiceName *string `json:"ServiceName,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// ServiceHealthStateChunk represents the health state chunk of a service, which contains the service name, +// its aggregated health state and any partitions that respect the filters in the cluster health chunk +// query description. +type ServiceHealthStateChunk struct { + // ServiceName - The name of the service whose health state chunk is provided in this object. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionHealthStateChunks - The list of partition health state chunks belonging to the service that respect the filters in the cluster health chunk query description. + PartitionHealthStateChunks *PartitionHealthStateChunkList `json:"PartitionHealthStateChunks,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` +} + +// ServiceHealthStateChunkList the list of service health state chunks that respect the input filters in +// the chunk query. Returned by get cluster health state chunks query. +type ServiceHealthStateChunkList struct { + // Items - The list of service health state chunks that respect the input filters in the chunk query. + Items *[]ServiceHealthStateChunk `json:"Items,omitempty"` +} + +// ServiceHealthStateFilter defines matching criteria to determine whether a service should be included as +// a child of an application in the cluster health chunk. +// The services are only returned if the parent application matches a filter specified in the cluster +// health chunk query description. +// One filter can match zero, one or multiple services, depending on its properties. +type ServiceHealthStateFilter struct { + // ServiceNameFilter - The name of the service that matches the filter. The filter is applied only to the specified service, if it exists. + // If the service doesn't exist, no service is returned in the cluster health chunk based on this filter. + // If the service exists, it is included as the application's child if the health state matches the other filter properties. + // If not specified, all services that match the parent filters (if any) are taken into consideration and matched against the other filter members, like health state filter. + ServiceNameFilter *string `json:"ServiceNameFilter,omitempty"` + // HealthStateFilter - The filter for the health state of the services. It allows selecting services if they match the desired health states. + // The possible values are integer value of one of the following health states. Only services that match the filter are returned. All services are used to evaluate the cluster aggregated health state. + // If not specified, default value is None, unless the service name is specified. If the filter has default value and service name is specified, the matching service is returned. + // The state values are flag-based enumeration, so the value could be a combination of these values obtained using bitwise 'OR' operator. + // For example, if the provided value is 6, it matches services with HealthState value of OK (2) and Warning (4). + // - Default - Default value. Matches any HealthState. The value is zero. + // - None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. + // - Ok - Filter that matches input with HealthState value Ok. The value is 2. + // - Warning - Filter that matches input with HealthState value Warning. The value is 4. + // - Error - Filter that matches input with HealthState value Error. The value is 8. + // - All - Filter that matches input with any HealthState value. The value is 65535. + HealthStateFilter *int32 `json:"HealthStateFilter,omitempty"` + // PartitionFilters - Defines a list of filters that specify which partitions to be included in the returned cluster health chunk as children of the service. The partitions are returned only if the parent service matches a filter. + // If the list is empty, no partitions are returned. All the partitions are used to evaluate the parent service aggregated health state, regardless of the input filters. + // The service filter may specify multiple partition filters. + // For example, it can specify a filter to return all partitions with health state Error and another filter to always include a partition identified by its partition ID. + PartitionFilters *[]PartitionHealthStateFilter `json:"PartitionFilters,omitempty"` +} + +// ServiceIdentity map service identity friendly name to an application identity. +type ServiceIdentity struct { + // Name - The identity friendly name. + Name *string `json:"name,omitempty"` + // IdentityRef - The application identity name. + IdentityRef *string `json:"identityRef,omitempty"` +} + +// BasicServiceInfo information about a Service Fabric service. +type BasicServiceInfo interface { + AsStatefulServiceInfo() (*StatefulServiceInfo, bool) + AsStatelessServiceInfo() (*StatelessServiceInfo, bool) + AsServiceInfo() (*ServiceInfo, bool) +} + +// ServiceInfo information about a Service Fabric service. +type ServiceInfo struct { + autorest.Response `json:"-"` + // ID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ID *string `json:"Id,omitempty"` + // Name - The full name of the service with 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TypeName - Name of the service type as specified in the service manifest. + TypeName *string `json:"TypeName,omitempty"` + // ManifestVersion - The version of the service manifest. + ManifestVersion *string `json:"ManifestVersion,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // ServiceStatus - The status of the application. Possible values include: 'ServiceStatusUnknown', 'ServiceStatusActive', 'ServiceStatusUpgrading', 'ServiceStatusDeleting', 'ServiceStatusCreating', 'ServiceStatusFailed' + ServiceStatus ServiceStatus `json:"ServiceStatus,omitempty"` + // IsServiceGroup - Whether the service is in a service group. + IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceInfoServiceKindServiceInfo', 'ServiceKindBasicServiceInfoServiceKindStateful', 'ServiceKindBasicServiceInfoServiceKindStateless' + ServiceKind ServiceKindBasicServiceInfo `json:"ServiceKind,omitempty"` +} + +func unmarshalBasicServiceInfo(body []byte) (BasicServiceInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicServiceInfoServiceKindStateful): + var ssi StatefulServiceInfo + err := json.Unmarshal(body, &ssi) + return ssi, err + case string(ServiceKindBasicServiceInfoServiceKindStateless): + var ssi StatelessServiceInfo + err := json.Unmarshal(body, &ssi) + return ssi, err + default: + var si ServiceInfo + err := json.Unmarshal(body, &si) + return si, err + } +} +func unmarshalBasicServiceInfoArray(body []byte) ([]BasicServiceInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + siArray := make([]BasicServiceInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + si, err := unmarshalBasicServiceInfo(*rawMessage) + if err != nil { + return nil, err + } + siArray[index] = si + } + return siArray, nil +} + +// MarshalJSON is the custom marshaler for ServiceInfo. +func (si ServiceInfo) MarshalJSON() ([]byte, error) { + si.ServiceKind = ServiceKindBasicServiceInfoServiceKindServiceInfo + objectMap := make(map[string]interface{}) + if si.ID != nil { + objectMap["Id"] = si.ID + } + if si.Name != nil { + objectMap["Name"] = si.Name + } + if si.TypeName != nil { + objectMap["TypeName"] = si.TypeName + } + if si.ManifestVersion != nil { + objectMap["ManifestVersion"] = si.ManifestVersion + } + if si.HealthState != "" { + objectMap["HealthState"] = si.HealthState + } + if si.ServiceStatus != "" { + objectMap["ServiceStatus"] = si.ServiceStatus + } + if si.IsServiceGroup != nil { + objectMap["IsServiceGroup"] = si.IsServiceGroup + } + if si.ServiceKind != "" { + objectMap["ServiceKind"] = si.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceInfo is the BasicServiceInfo implementation for ServiceInfo. +func (si ServiceInfo) AsStatefulServiceInfo() (*StatefulServiceInfo, bool) { + return nil, false +} + +// AsStatelessServiceInfo is the BasicServiceInfo implementation for ServiceInfo. +func (si ServiceInfo) AsStatelessServiceInfo() (*StatelessServiceInfo, bool) { + return nil, false +} + +// AsServiceInfo is the BasicServiceInfo implementation for ServiceInfo. +func (si ServiceInfo) AsServiceInfo() (*ServiceInfo, bool) { + return &si, true +} + +// AsBasicServiceInfo is the BasicServiceInfo implementation for ServiceInfo. +func (si ServiceInfo) AsBasicServiceInfo() (BasicServiceInfo, bool) { + return &si, true +} + +// ServiceInfoModel ... +type ServiceInfoModel struct { + autorest.Response `json:"-"` + Value BasicServiceInfo `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ServiceInfoModel struct. +func (sim *ServiceInfoModel) UnmarshalJSON(body []byte) error { + si, err := unmarshalBasicServiceInfo(body) + if err != nil { + return err + } + sim.Value = si + + return nil +} + +// ServiceLoadMetricDescription specifies a metric to load balance a service during runtime. +type ServiceLoadMetricDescription struct { + // Name - The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case-sensitive. + Name *string `json:"Name,omitempty"` + // Weight - The service load metric relative weight, compared to other metrics configured for this service, as a number. Possible values include: 'ServiceLoadMetricWeightZero', 'ServiceLoadMetricWeightLow', 'ServiceLoadMetricWeightMedium', 'ServiceLoadMetricWeightHigh' + Weight ServiceLoadMetricWeight `json:"Weight,omitempty"` + // PrimaryDefaultLoad - Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica. + PrimaryDefaultLoad *int32 `json:"PrimaryDefaultLoad,omitempty"` + // SecondaryDefaultLoad - Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. + SecondaryDefaultLoad *int32 `json:"SecondaryDefaultLoad,omitempty"` + // DefaultLoad - Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. + DefaultLoad *int32 `json:"DefaultLoad,omitempty"` +} + +// ServiceNameInfo information about the service name. +type ServiceNameInfo struct { + autorest.Response `json:"-"` + // ID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ID *string `json:"Id,omitempty"` + // Name - The full name of the service with 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` +} + +// ServiceNewHealthReportEvent service Health Report Created event. +type ServiceNewHealthReportEvent struct { + // InstanceID - Id of Service instance. + InstanceID *int64 `json:"InstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // ServiceID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ServiceID *string `json:"ServiceId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) MarshalJSON() ([]byte, error) { + snhre.Kind = KindServiceNewHealthReport + objectMap := make(map[string]interface{}) + if snhre.InstanceID != nil { + objectMap["InstanceId"] = snhre.InstanceID + } + if snhre.SourceID != nil { + objectMap["SourceId"] = snhre.SourceID + } + if snhre.Property != nil { + objectMap["Property"] = snhre.Property + } + if snhre.HealthState != nil { + objectMap["HealthState"] = snhre.HealthState + } + if snhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = snhre.TimeToLiveMs + } + if snhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = snhre.SequenceNumber + } + if snhre.Description != nil { + objectMap["Description"] = snhre.Description + } + if snhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = snhre.RemoveWhenExpired + } + if snhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = snhre.SourceUtcTimestamp + } + if snhre.ServiceID != nil { + objectMap["ServiceId"] = snhre.ServiceID + } + if snhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = snhre.EventInstanceID + } + if snhre.Category != nil { + objectMap["Category"] = snhre.Category + } + if snhre.TimeStamp != nil { + objectMap["TimeStamp"] = snhre.TimeStamp + } + if snhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = snhre.HasCorrelatedEvents + } + if snhre.Kind != "" { + objectMap["Kind"] = snhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return nil, false +} + +// AsServiceEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return &snhre, true +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return &snhre, true +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for ServiceNewHealthReportEvent. +func (snhre ServiceNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &snhre, true +} + +// BasicServicePartitionInfo information about a partition of a Service Fabric service. +type BasicServicePartitionInfo interface { + AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) + AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) + AsServicePartitionInfo() (*ServicePartitionInfo, bool) +} + +// ServicePartitionInfo information about a partition of a Service Fabric service. +type ServicePartitionInfo struct { + autorest.Response `json:"-"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // PartitionStatus - The status of the service fabric service partition. Possible values include: 'ServicePartitionStatusInvalid', 'ServicePartitionStatusReady', 'ServicePartitionStatusNotReady', 'ServicePartitionStatusInQuorumLoss', 'ServicePartitionStatusReconfiguring', 'ServicePartitionStatusDeleting' + PartitionStatus ServicePartitionStatus `json:"PartitionStatus,omitempty"` + // PartitionInformation - Information about the partition identity, partitioning scheme and keys supported by it. + PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo', 'ServiceKindBasicServicePartitionInfoServiceKindStateful', 'ServiceKindBasicServicePartitionInfoServiceKindStateless' + ServiceKind ServiceKindBasicServicePartitionInfo `json:"ServiceKind,omitempty"` +} + +func unmarshalBasicServicePartitionInfo(body []byte) (BasicServicePartitionInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicServicePartitionInfoServiceKindStateful): + var sspi StatefulServicePartitionInfo + err := json.Unmarshal(body, &sspi) + return sspi, err + case string(ServiceKindBasicServicePartitionInfoServiceKindStateless): + var sspi StatelessServicePartitionInfo + err := json.Unmarshal(body, &sspi) + return sspi, err + default: + var spi ServicePartitionInfo + err := json.Unmarshal(body, &spi) + return spi, err + } +} +func unmarshalBasicServicePartitionInfoArray(body []byte) ([]BasicServicePartitionInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + spiArray := make([]BasicServicePartitionInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + spi, err := unmarshalBasicServicePartitionInfo(*rawMessage) + if err != nil { + return nil, err + } + spiArray[index] = spi + } + return spiArray, nil +} + +// MarshalJSON is the custom marshaler for ServicePartitionInfo. +func (spi ServicePartitionInfo) MarshalJSON() ([]byte, error) { + spi.ServiceKind = ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo + objectMap := make(map[string]interface{}) + if spi.HealthState != "" { + objectMap["HealthState"] = spi.HealthState + } + if spi.PartitionStatus != "" { + objectMap["PartitionStatus"] = spi.PartitionStatus + } + objectMap["PartitionInformation"] = spi.PartitionInformation + if spi.ServiceKind != "" { + objectMap["ServiceKind"] = spi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. +func (spi ServicePartitionInfo) AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) { + return nil, false +} + +// AsStatelessServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. +func (spi ServicePartitionInfo) AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) { + return nil, false +} + +// AsServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. +func (spi ServicePartitionInfo) AsServicePartitionInfo() (*ServicePartitionInfo, bool) { + return &spi, true +} + +// AsBasicServicePartitionInfo is the BasicServicePartitionInfo implementation for ServicePartitionInfo. +func (spi ServicePartitionInfo) AsBasicServicePartitionInfo() (BasicServicePartitionInfo, bool) { + return &spi, true +} + +// UnmarshalJSON is the custom unmarshaler for ServicePartitionInfo struct. +func (spi *ServicePartitionInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "HealthState": + if v != nil { + var healthState HealthState + err = json.Unmarshal(*v, &healthState) + if err != nil { + return err + } + spi.HealthState = healthState + } + case "PartitionStatus": + if v != nil { + var partitionStatus ServicePartitionStatus + err = json.Unmarshal(*v, &partitionStatus) + if err != nil { + return err + } + spi.PartitionStatus = partitionStatus + } + case "PartitionInformation": + if v != nil { + partitionInformation, err := unmarshalBasicPartitionInformation(*v) + if err != nil { + return err + } + spi.PartitionInformation = partitionInformation + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServicePartitionInfo + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + spi.ServiceKind = serviceKind + } + } + } + + return nil +} + +// ServicePartitionInfoModel ... +type ServicePartitionInfoModel struct { + autorest.Response `json:"-"` + Value BasicServicePartitionInfo `json:"value,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ServicePartitionInfoModel struct. +func (spim *ServicePartitionInfoModel) UnmarshalJSON(body []byte) error { + spi, err := unmarshalBasicServicePartitionInfo(body) + if err != nil { + return err + } + spim.Value = spi + + return nil +} + +// ServicePlacementInvalidDomainPolicyDescription describes the policy to be used for placement of a +// Service Fabric service where a particular fault or upgrade domain should not be used for placement of +// the instances or replicas of that service. +type ServicePlacementInvalidDomainPolicyDescription struct { + // DomainName - The name of the domain that should not be used for placement. + DomainName *string `json:"DomainName,omitempty"` + // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' + Type Type `json:"Type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) MarshalJSON() ([]byte, error) { + spidpd.Type = TypeInvalidDomain + objectMap := make(map[string]interface{}) + if spidpd.DomainName != nil { + objectMap["DomainName"] = spidpd.DomainName + } + if spidpd.Type != "" { + objectMap["Type"] = spidpd.Type + } + return json.Marshal(objectMap) +} + +// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { + return &spidpd, true +} + +// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { + return nil, false +} + +// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementInvalidDomainPolicyDescription. +func (spidpd ServicePlacementInvalidDomainPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { + return &spidpd, true +} + +// ServicePlacementNonPartiallyPlaceServicePolicyDescription describes the policy to be used for placement +// of a Service Fabric service where all replicas must be able to be placed in order for any replicas to be +// created. +type ServicePlacementNonPartiallyPlaceServicePolicyDescription struct { + // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' + Type Type `json:"Type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) MarshalJSON() ([]byte, error) { + spnppspd.Type = TypeNonPartiallyPlaceService + objectMap := make(map[string]interface{}) + if spnppspd.Type != "" { + objectMap["Type"] = spnppspd.Type + } + return json.Marshal(objectMap) +} + +// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { + return &spnppspd, true +} + +// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { + return nil, false +} + +// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementNonPartiallyPlaceServicePolicyDescription. +func (spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { + return &spnppspd, true +} + +// BasicServicePlacementPolicyDescription describes the policy to be used for placement of a Service Fabric service. +type BasicServicePlacementPolicyDescription interface { + AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) + AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) + AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) + AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) + AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) + AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) +} + +// ServicePlacementPolicyDescription describes the policy to be used for placement of a Service Fabric service. +type ServicePlacementPolicyDescription struct { + // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' + Type Type `json:"Type,omitempty"` +} + +func unmarshalBasicServicePlacementPolicyDescription(body []byte) (BasicServicePlacementPolicyDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Type"] { + case string(TypeInvalidDomain): + var spidpd ServicePlacementInvalidDomainPolicyDescription + err := json.Unmarshal(body, &spidpd) + return spidpd, err + case string(TypeNonPartiallyPlaceService): + var spnppspd ServicePlacementNonPartiallyPlaceServicePolicyDescription + err := json.Unmarshal(body, &spnppspd) + return spnppspd, err + case string(TypePreferPrimaryDomain): + var spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription + err := json.Unmarshal(body, &spppdpd) + return spppdpd, err + case string(TypeRequireDomain): + var sprdpd ServicePlacementRequiredDomainPolicyDescription + err := json.Unmarshal(body, &sprdpd) + return sprdpd, err + case string(TypeRequireDomainDistribution): + var sprddpd ServicePlacementRequireDomainDistributionPolicyDescription + err := json.Unmarshal(body, &sprddpd) + return sprddpd, err + default: + var sppd ServicePlacementPolicyDescription + err := json.Unmarshal(body, &sppd) + return sppd, err + } +} +func unmarshalBasicServicePlacementPolicyDescriptionArray(body []byte) ([]BasicServicePlacementPolicyDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sppdArray := make([]BasicServicePlacementPolicyDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sppd, err := unmarshalBasicServicePlacementPolicyDescription(*rawMessage) + if err != nil { + return nil, err + } + sppdArray[index] = sppd + } + return sppdArray, nil +} + +// MarshalJSON is the custom marshaler for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) MarshalJSON() ([]byte, error) { + sppd.Type = TypeServicePlacementPolicyDescription + objectMap := make(map[string]interface{}) + if sppd.Type != "" { + objectMap["Type"] = sppd.Type + } + return json.Marshal(objectMap) +} + +// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { + return &sppd, true +} + +// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPolicyDescription. +func (sppd ServicePlacementPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { + return &sppd, true +} + +// ServicePlacementPreferPrimaryDomainPolicyDescription describes the policy to be used for placement of a +// Service Fabric service where the service's Primary replicas should optimally be placed in a particular +// domain. +// +// This placement policy is usually used with fault domains in scenarios where the Service Fabric cluster +// is geographically distributed in order to indicate that a service's primary replica should be located in +// a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter +// boundaries. Note that since this is an optimization it is possible that the Primary replica may not end +// up located in this domain due to failures, capacity limits, or other constraints. +type ServicePlacementPreferPrimaryDomainPolicyDescription struct { + // DomainName - The name of the domain that should used for placement as per this policy. + DomainName *string `json:"DomainName,omitempty"` + // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' + Type Type `json:"Type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) MarshalJSON() ([]byte, error) { + spppdpd.Type = TypePreferPrimaryDomain + objectMap := make(map[string]interface{}) + if spppdpd.DomainName != nil { + objectMap["DomainName"] = spppdpd.DomainName + } + if spppdpd.Type != "" { + objectMap["Type"] = spppdpd.Type + } + return json.Marshal(objectMap) +} + +// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { + return &spppdpd, true +} + +// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { + return nil, false +} + +// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementPreferPrimaryDomainPolicyDescription. +func (spppdpd ServicePlacementPreferPrimaryDomainPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { + return &spppdpd, true +} + +// ServicePlacementRequiredDomainPolicyDescription describes the policy to be used for placement of a +// Service Fabric service where the instances or replicas of that service must be placed in a particular +// domain +type ServicePlacementRequiredDomainPolicyDescription struct { + // DomainName - The name of the domain that should used for placement as per this policy. + DomainName *string `json:"DomainName,omitempty"` + // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' + Type Type `json:"Type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) MarshalJSON() ([]byte, error) { + sprdpd.Type = TypeRequireDomain + objectMap := make(map[string]interface{}) + if sprdpd.DomainName != nil { + objectMap["DomainName"] = sprdpd.DomainName + } + if sprdpd.Type != "" { + objectMap["Type"] = sprdpd.Type + } + return json.Marshal(objectMap) +} + +// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { + return &sprdpd, true +} + +// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { + return nil, false +} + +// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequiredDomainPolicyDescription. +func (sprdpd ServicePlacementRequiredDomainPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { + return &sprdpd, true +} + +// ServicePlacementRequireDomainDistributionPolicyDescription describes the policy to be used for placement +// of a Service Fabric service where two replicas from the same partition should never be placed in the +// same fault or upgrade domain. +// +// While this is not common it can expose the service to an increased risk of concurrent failures due to +// unplanned outages or other cases of subsequent/concurrent failures. As an example, consider a case where +// replicas are deployed across different data center, with one replica per location. In the event that one +// of the datacenters goes offline, normally the replica that was placed in that datacenter will be packed +// into one of the remaining datacenters. If this is not desirable then this policy should be set. +type ServicePlacementRequireDomainDistributionPolicyDescription struct { + // DomainName - The name of the domain that should used for placement as per this policy. + DomainName *string `json:"DomainName,omitempty"` + // Type - Possible values include: 'TypeServicePlacementPolicyDescription', 'TypeInvalidDomain', 'TypeNonPartiallyPlaceService', 'TypePreferPrimaryDomain', 'TypeRequireDomain', 'TypeRequireDomainDistribution' + Type Type `json:"Type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) MarshalJSON() ([]byte, error) { + sprddpd.Type = TypeRequireDomainDistribution + objectMap := make(map[string]interface{}) + if sprddpd.DomainName != nil { + objectMap["DomainName"] = sprddpd.DomainName + } + if sprddpd.Type != "" { + objectMap["Type"] = sprddpd.Type + } + return json.Marshal(objectMap) +} + +// AsServicePlacementInvalidDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementInvalidDomainPolicyDescription() (*ServicePlacementInvalidDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementNonPartiallyPlaceServicePolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementNonPartiallyPlaceServicePolicyDescription() (*ServicePlacementNonPartiallyPlaceServicePolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementPreferPrimaryDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementPreferPrimaryDomainPolicyDescription() (*ServicePlacementPreferPrimaryDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequiredDomainPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementRequiredDomainPolicyDescription() (*ServicePlacementRequiredDomainPolicyDescription, bool) { + return nil, false +} + +// AsServicePlacementRequireDomainDistributionPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementRequireDomainDistributionPolicyDescription() (*ServicePlacementRequireDomainDistributionPolicyDescription, bool) { + return &sprddpd, true +} + +// AsServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsServicePlacementPolicyDescription() (*ServicePlacementPolicyDescription, bool) { + return nil, false +} + +// AsBasicServicePlacementPolicyDescription is the BasicServicePlacementPolicyDescription implementation for ServicePlacementRequireDomainDistributionPolicyDescription. +func (sprddpd ServicePlacementRequireDomainDistributionPolicyDescription) AsBasicServicePlacementPolicyDescription() (BasicServicePlacementPolicyDescription, bool) { + return &sprddpd, true +} + +// ServiceProperties describes properties of a service resource. +type ServiceProperties struct { + // Description - User readable description of the service. + Description *string `json:"description,omitempty"` + // ReplicaCount - The number of replicas of the service to create. Defaults to 1 if not specified. + ReplicaCount *int32 `json:"replicaCount,omitempty"` + // ExecutionPolicy - The execution policy of the service + ExecutionPolicy BasicExecutionPolicy `json:"executionPolicy,omitempty"` + // AutoScalingPolicies - Auto scaling policies + AutoScalingPolicies *[]AutoScalingPolicy `json:"autoScalingPolicies,omitempty"` + // Status - READ-ONLY; Status of the service. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the service. + StatusDetails *string `json:"statusDetails,omitempty"` + // HealthState - READ-ONLY; Describes the health state of an application resource. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"healthState,omitempty"` + // UnhealthyEvaluation - READ-ONLY; When the service's health state is not 'Ok', this additional details from service fabric Health Manager for the user to know why the service is marked unhealthy. + UnhealthyEvaluation *string `json:"unhealthyEvaluation,omitempty"` + // IdentityRefs - The service identity list. + IdentityRefs *[]ServiceIdentity `json:"identityRefs,omitempty"` + // DNSName - Dns name of the service. + DNSName *string `json:"dnsName,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ServiceProperties struct. +func (sp *ServiceProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + sp.Description = &description + } + case "replicaCount": + if v != nil { + var replicaCount int32 + err = json.Unmarshal(*v, &replicaCount) + if err != nil { + return err + } + sp.ReplicaCount = &replicaCount + } + case "executionPolicy": + if v != nil { + executionPolicy, err := unmarshalBasicExecutionPolicy(*v) + if err != nil { + return err + } + sp.ExecutionPolicy = executionPolicy + } + case "autoScalingPolicies": + if v != nil { + var autoScalingPolicies []AutoScalingPolicy + err = json.Unmarshal(*v, &autoScalingPolicies) + if err != nil { + return err + } + sp.AutoScalingPolicies = &autoScalingPolicies + } + case "status": + if v != nil { + var status ResourceStatus + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + sp.Status = status + } + case "statusDetails": + if v != nil { + var statusDetails string + err = json.Unmarshal(*v, &statusDetails) + if err != nil { + return err + } + sp.StatusDetails = &statusDetails + } + case "healthState": + if v != nil { + var healthState HealthState + err = json.Unmarshal(*v, &healthState) + if err != nil { + return err + } + sp.HealthState = healthState + } + case "unhealthyEvaluation": + if v != nil { + var unhealthyEvaluation string + err = json.Unmarshal(*v, &unhealthyEvaluation) + if err != nil { + return err + } + sp.UnhealthyEvaluation = &unhealthyEvaluation + } + case "identityRefs": + if v != nil { + var identityRefs []ServiceIdentity + err = json.Unmarshal(*v, &identityRefs) + if err != nil { + return err + } + sp.IdentityRefs = &identityRefs + } + case "dnsName": + if v != nil { + var DNSName string + err = json.Unmarshal(*v, &DNSName) + if err != nil { + return err + } + sp.DNSName = &DNSName + } + } + } + + return nil +} + +// ServiceReplicaDescription describes a replica of a service resource. +type ServiceReplicaDescription struct { + autorest.Response `json:"-"` + // ReplicaName - Name of the replica. + ReplicaName *string `json:"replicaName,omitempty"` + // OsType - The operation system required by the code in service. Possible values include: 'Linux', 'Windows' + OsType OperatingSystemType `json:"osType,omitempty"` + // CodePackages - Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.). + CodePackages *[]ContainerCodePackageProperties `json:"codePackages,omitempty"` + // NetworkRefs - The names of the private networks that this service needs to be part of. + NetworkRefs *[]NetworkRef `json:"networkRefs,omitempty"` + // Diagnostics - Reference to sinks in DiagnosticsDescription. + Diagnostics *DiagnosticsRef `json:"diagnostics,omitempty"` +} + +// ServiceReplicaProperties describes the properties of a service replica. +type ServiceReplicaProperties struct { + // OsType - The operation system required by the code in service. Possible values include: 'Linux', 'Windows' + OsType OperatingSystemType `json:"osType,omitempty"` + // CodePackages - Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.). + CodePackages *[]ContainerCodePackageProperties `json:"codePackages,omitempty"` + // NetworkRefs - The names of the private networks that this service needs to be part of. + NetworkRefs *[]NetworkRef `json:"networkRefs,omitempty"` + // Diagnostics - Reference to sinks in DiagnosticsDescription. + Diagnostics *DiagnosticsRef `json:"diagnostics,omitempty"` +} + +// ServiceResourceDescription this type describes a service resource. +type ServiceResourceDescription struct { + autorest.Response `json:"-"` + // Name - Name of the Service resource. + Name *string `json:"name,omitempty"` + // ServiceResourceProperties - This type describes properties of a service resource. + *ServiceResourceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceResourceDescription. +func (srd ServiceResourceDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if srd.Name != nil { + objectMap["name"] = srd.Name + } + if srd.ServiceResourceProperties != nil { + objectMap["properties"] = srd.ServiceResourceProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ServiceResourceDescription struct. +func (srd *ServiceResourceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + srd.Name = &name + } + case "properties": + if v != nil { + var serviceResourceProperties ServiceResourceProperties + err = json.Unmarshal(*v, &serviceResourceProperties) + if err != nil { + return err + } + srd.ServiceResourceProperties = &serviceResourceProperties + } + } + } + + return nil +} + +// ServiceResourceProperties this type describes properties of a service resource. +type ServiceResourceProperties struct { + // OsType - The operation system required by the code in service. Possible values include: 'Linux', 'Windows' + OsType OperatingSystemType `json:"osType,omitempty"` + // CodePackages - Describes the set of code packages that forms the service. A code package describes the container and the properties for running it. All the code packages are started together on the same host and share the same context (network, process etc.). + CodePackages *[]ContainerCodePackageProperties `json:"codePackages,omitempty"` + // NetworkRefs - The names of the private networks that this service needs to be part of. + NetworkRefs *[]NetworkRef `json:"networkRefs,omitempty"` + // Diagnostics - Reference to sinks in DiagnosticsDescription. + Diagnostics *DiagnosticsRef `json:"diagnostics,omitempty"` + // Description - User readable description of the service. + Description *string `json:"description,omitempty"` + // ReplicaCount - The number of replicas of the service to create. Defaults to 1 if not specified. + ReplicaCount *int32 `json:"replicaCount,omitempty"` + // ExecutionPolicy - The execution policy of the service + ExecutionPolicy BasicExecutionPolicy `json:"executionPolicy,omitempty"` + // AutoScalingPolicies - Auto scaling policies + AutoScalingPolicies *[]AutoScalingPolicy `json:"autoScalingPolicies,omitempty"` + // Status - READ-ONLY; Status of the service. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the service. + StatusDetails *string `json:"statusDetails,omitempty"` + // HealthState - READ-ONLY; Describes the health state of an application resource. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"healthState,omitempty"` + // UnhealthyEvaluation - READ-ONLY; When the service's health state is not 'Ok', this additional details from service fabric Health Manager for the user to know why the service is marked unhealthy. + UnhealthyEvaluation *string `json:"unhealthyEvaluation,omitempty"` + // IdentityRefs - The service identity list. + IdentityRefs *[]ServiceIdentity `json:"identityRefs,omitempty"` + // DNSName - Dns name of the service. + DNSName *string `json:"dnsName,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ServiceResourceProperties struct. +func (srp *ServiceResourceProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "osType": + if v != nil { + var osType OperatingSystemType + err = json.Unmarshal(*v, &osType) + if err != nil { + return err + } + srp.OsType = osType + } + case "codePackages": + if v != nil { + var codePackages []ContainerCodePackageProperties + err = json.Unmarshal(*v, &codePackages) + if err != nil { + return err + } + srp.CodePackages = &codePackages + } + case "networkRefs": + if v != nil { + var networkRefs []NetworkRef + err = json.Unmarshal(*v, &networkRefs) + if err != nil { + return err + } + srp.NetworkRefs = &networkRefs + } + case "diagnostics": + if v != nil { + var diagnostics DiagnosticsRef + err = json.Unmarshal(*v, &diagnostics) + if err != nil { + return err + } + srp.Diagnostics = &diagnostics + } + case "description": + if v != nil { + var description string + err = json.Unmarshal(*v, &description) + if err != nil { + return err + } + srp.Description = &description + } + case "replicaCount": + if v != nil { + var replicaCount int32 + err = json.Unmarshal(*v, &replicaCount) + if err != nil { + return err + } + srp.ReplicaCount = &replicaCount + } + case "executionPolicy": + if v != nil { + executionPolicy, err := unmarshalBasicExecutionPolicy(*v) + if err != nil { + return err + } + srp.ExecutionPolicy = executionPolicy + } + case "autoScalingPolicies": + if v != nil { + var autoScalingPolicies []AutoScalingPolicy + err = json.Unmarshal(*v, &autoScalingPolicies) + if err != nil { + return err + } + srp.AutoScalingPolicies = &autoScalingPolicies + } + case "status": + if v != nil { + var status ResourceStatus + err = json.Unmarshal(*v, &status) + if err != nil { + return err + } + srp.Status = status + } + case "statusDetails": + if v != nil { + var statusDetails string + err = json.Unmarshal(*v, &statusDetails) + if err != nil { + return err + } + srp.StatusDetails = &statusDetails + } + case "healthState": + if v != nil { + var healthState HealthState + err = json.Unmarshal(*v, &healthState) + if err != nil { + return err + } + srp.HealthState = healthState + } + case "unhealthyEvaluation": + if v != nil { + var unhealthyEvaluation string + err = json.Unmarshal(*v, &unhealthyEvaluation) + if err != nil { + return err + } + srp.UnhealthyEvaluation = &unhealthyEvaluation + } + case "identityRefs": + if v != nil { + var identityRefs []ServiceIdentity + err = json.Unmarshal(*v, &identityRefs) + if err != nil { + return err + } + srp.IdentityRefs = &identityRefs + } + case "dnsName": + if v != nil { + var DNSName string + err = json.Unmarshal(*v, &DNSName) + if err != nil { + return err + } + srp.DNSName = &DNSName + } + } + } + + return nil +} + +// ServicesHealthEvaluation represents health evaluation for services of a certain service type belonging +// to an application, containing health evaluations for each unhealthy service that impacted current +// aggregated health state. Can be returned when evaluating application health and the aggregated health +// state is either Error or Warning. +type ServicesHealthEvaluation struct { + // ServiceTypeName - Name of the service type of the services. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // MaxPercentUnhealthyServices - Maximum allowed percentage of unhealthy services from the ServiceTypeHealthPolicy. + MaxPercentUnhealthyServices *int32 `json:"MaxPercentUnhealthyServices,omitempty"` + // TotalCount - Total number of services of the current service type in the application from the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy ServiceHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) MarshalJSON() ([]byte, error) { + she.Kind = KindServices + objectMap := make(map[string]interface{}) + if she.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = she.ServiceTypeName + } + if she.MaxPercentUnhealthyServices != nil { + objectMap["MaxPercentUnhealthyServices"] = she.MaxPercentUnhealthyServices + } + if she.TotalCount != nil { + objectMap["TotalCount"] = she.TotalCount + } + if she.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = she.UnhealthyEvaluations + } + if she.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = she.AggregatedHealthState + } + if she.Description != nil { + objectMap["Description"] = she.Description + } + if she.Kind != "" { + objectMap["Kind"] = she.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return &she, true +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for ServicesHealthEvaluation. +func (she ServicesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &she, true +} + +// BasicServiceTypeDescription describes a service type defined in the service manifest of a provisioned application +// type. The properties the ones defined in the service manifest. +type BasicServiceTypeDescription interface { + AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) + AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) + AsServiceTypeDescription() (*ServiceTypeDescription, bool) +} + +// ServiceTypeDescription describes a service type defined in the service manifest of a provisioned application +// type. The properties the ones defined in the service manifest. +type ServiceTypeDescription struct { + // IsStateful - Indicates whether the service type is a stateful service type or a stateless service type. This property is true if the service type is a stateful service type, false otherwise. + IsStateful *bool `json:"IsStateful,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // PlacementConstraints - The placement constraint to be used when instantiating this service in a Service Fabric cluster. + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // LoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects. + LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` + // ServicePlacementPolicies - List of service placement policy descriptions. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // Extensions - List of service type extensions. + Extensions *[]ServiceTypeExtensionDescription `json:"Extensions,omitempty"` + // Kind - Possible values include: 'KindServiceTypeDescription', 'KindStateful', 'KindStateless' + Kind KindBasicServiceTypeDescription `json:"Kind,omitempty"` +} + +func unmarshalBasicServiceTypeDescription(body []byte) (BasicServiceTypeDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Kind"] { + case string(KindStateful): + var sstd StatefulServiceTypeDescription + err := json.Unmarshal(body, &sstd) + return sstd, err + case string(KindStateless): + var sstd StatelessServiceTypeDescription + err := json.Unmarshal(body, &sstd) + return sstd, err + default: + var std ServiceTypeDescription + err := json.Unmarshal(body, &std) + return std, err + } +} +func unmarshalBasicServiceTypeDescriptionArray(body []byte) ([]BasicServiceTypeDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + stdArray := make([]BasicServiceTypeDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + std, err := unmarshalBasicServiceTypeDescription(*rawMessage) + if err != nil { + return nil, err + } + stdArray[index] = std + } + return stdArray, nil +} + +// MarshalJSON is the custom marshaler for ServiceTypeDescription. +func (std ServiceTypeDescription) MarshalJSON() ([]byte, error) { + std.Kind = KindServiceTypeDescription + objectMap := make(map[string]interface{}) + if std.IsStateful != nil { + objectMap["IsStateful"] = std.IsStateful + } + if std.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = std.ServiceTypeName + } + if std.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = std.PlacementConstraints + } + if std.LoadMetrics != nil { + objectMap["LoadMetrics"] = std.LoadMetrics + } + if std.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = std.ServicePlacementPolicies + } + if std.Extensions != nil { + objectMap["Extensions"] = std.Extensions + } + if std.Kind != "" { + objectMap["Kind"] = std.Kind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. +func (std ServiceTypeDescription) AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) { + return nil, false +} + +// AsStatelessServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. +func (std ServiceTypeDescription) AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) { + return nil, false +} + +// AsServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. +func (std ServiceTypeDescription) AsServiceTypeDescription() (*ServiceTypeDescription, bool) { + return &std, true +} + +// AsBasicServiceTypeDescription is the BasicServiceTypeDescription implementation for ServiceTypeDescription. +func (std ServiceTypeDescription) AsBasicServiceTypeDescription() (BasicServiceTypeDescription, bool) { + return &std, true +} + +// UnmarshalJSON is the custom unmarshaler for ServiceTypeDescription struct. +func (std *ServiceTypeDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "IsStateful": + if v != nil { + var isStateful bool + err = json.Unmarshal(*v, &isStateful) + if err != nil { + return err + } + std.IsStateful = &isStateful + } + case "ServiceTypeName": + if v != nil { + var serviceTypeName string + err = json.Unmarshal(*v, &serviceTypeName) + if err != nil { + return err + } + std.ServiceTypeName = &serviceTypeName + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + std.PlacementConstraints = &placementConstraints + } + case "LoadMetrics": + if v != nil { + var loadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &loadMetrics) + if err != nil { + return err + } + std.LoadMetrics = &loadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + std.ServicePlacementPolicies = &servicePlacementPolicies + } + case "Extensions": + if v != nil { + var extensions []ServiceTypeExtensionDescription + err = json.Unmarshal(*v, &extensions) + if err != nil { + return err + } + std.Extensions = &extensions + } + case "Kind": + if v != nil { + var kind KindBasicServiceTypeDescription + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + std.Kind = kind + } + } + } + + return nil +} + +// ServiceTypeExtensionDescription describes extension of a service type defined in the service manifest. +type ServiceTypeExtensionDescription struct { + // Key - The name of the extension. + Key *string `json:"Key,omitempty"` + // Value - The extension value. + Value *string `json:"Value,omitempty"` +} + +// ServiceTypeHealthPolicy represents the health policy used to evaluate the health of services belonging +// to a service type. +type ServiceTypeHealthPolicy struct { + // MaxPercentUnhealthyPartitionsPerService - The maximum allowed percentage of unhealthy partitions per service. Allowed values are Byte values from zero to 100 + // The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error. + // If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + // The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. + // The computation rounds up to tolerate one failure on small numbers of partitions. Default percentage is zero. + MaxPercentUnhealthyPartitionsPerService *int32 `json:"MaxPercentUnhealthyPartitionsPerService,omitempty"` + // MaxPercentUnhealthyReplicasPerPartition - The maximum allowed percentage of unhealthy replicas per partition. Allowed values are Byte values from zero to 100. + // The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error. + // If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + // The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. + // The computation rounds up to tolerate one failure on small numbers of replicas. Default percentage is zero. + MaxPercentUnhealthyReplicasPerPartition *int32 `json:"MaxPercentUnhealthyReplicasPerPartition,omitempty"` + // MaxPercentUnhealthyServices - The maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. + // The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. + // If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + // This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. + // The computation rounds up to tolerate one failure on small numbers of services. Default percentage is zero. + MaxPercentUnhealthyServices *int32 `json:"MaxPercentUnhealthyServices,omitempty"` +} + +// ServiceTypeHealthPolicyMapItem defines an item in ServiceTypeHealthPolicyMap. +type ServiceTypeHealthPolicyMapItem struct { + // Key - The key of the service type health policy map item. This is the name of the service type. + Key *string `json:"Key,omitempty"` + // Value - The value of the service type health policy map item. This is the ServiceTypeHealthPolicy for this service type. + Value *ServiceTypeHealthPolicy `json:"Value,omitempty"` +} + +// ServiceTypeInfo information about a service type that is defined in a service manifest of a provisioned +// application type. +type ServiceTypeInfo struct { + autorest.Response `json:"-"` + // ServiceTypeDescription - Describes a service type defined in the service manifest of a provisioned application type. The properties the ones defined in the service manifest. + ServiceTypeDescription BasicServiceTypeDescription `json:"ServiceTypeDescription,omitempty"` + // ServiceManifestName - The name of the service manifest in which this service type is defined. + ServiceManifestName *string `json:"ServiceManifestName,omitempty"` + // ServiceManifestVersion - The version of the service manifest in which this service type is defined. + ServiceManifestVersion *string `json:"ServiceManifestVersion,omitempty"` + // IsServiceGroup - Indicates whether the service is a service group. If it is, the property value is true otherwise false. + IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ServiceTypeInfo struct. +func (sti *ServiceTypeInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "ServiceTypeDescription": + if v != nil { + serviceTypeDescription, err := unmarshalBasicServiceTypeDescription(*v) + if err != nil { + return err + } + sti.ServiceTypeDescription = serviceTypeDescription + } + case "ServiceManifestName": + if v != nil { + var serviceManifestName string + err = json.Unmarshal(*v, &serviceManifestName) + if err != nil { + return err + } + sti.ServiceManifestName = &serviceManifestName + } + case "ServiceManifestVersion": + if v != nil { + var serviceManifestVersion string + err = json.Unmarshal(*v, &serviceManifestVersion) + if err != nil { + return err + } + sti.ServiceManifestVersion = &serviceManifestVersion + } + case "IsServiceGroup": + if v != nil { + var isServiceGroup bool + err = json.Unmarshal(*v, &isServiceGroup) + if err != nil { + return err + } + sti.IsServiceGroup = &isServiceGroup + } + } + } + + return nil +} + +// ServiceTypeManifest contains the manifest describing a service type registered as part of an application +// in a Service Fabric cluster. +type ServiceTypeManifest struct { + autorest.Response `json:"-"` + // Manifest - The XML manifest as a string. + Manifest *string `json:"Manifest,omitempty"` +} + +// BasicServiceUpdateDescription a ServiceUpdateDescription contains all of the information necessary to update a +// service. +type BasicServiceUpdateDescription interface { + AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) + AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) + AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) +} + +// ServiceUpdateDescription a ServiceUpdateDescription contains all of the information necessary to update a +// service. +type ServiceUpdateDescription struct { + // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. + // This property can be a combination of those flags obtained using bitwise 'OR' operator. + // For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + // - None - Does not indicate any other properties are set. The value is zero. + // - TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property (for Stateful services) or the InstanceCount property (for Stateless services) is set. The value is 1. + // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 2. + // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 4. + // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 8. + // - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + // - PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + // - PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is 64. + // - Correlation - Indicates the CorrelationScheme property is set. The value is 128. + // - Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + // - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + // - ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + // - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The value is 2048. + // - MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + // - MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is 8192. + // - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + Flags *string `json:"Flags,omitempty"` + // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // CorrelationScheme - The correlation scheme. + CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` + // LoadMetrics - The service load metrics. + LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` + // ServicePlacementPolicies - The service placement policies. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // DefaultMoveCost - The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + DefaultMoveCost MoveCost `json:"DefaultMoveCost,omitempty"` + // ScalingPolicies - Scaling policies for this service. + ScalingPolicies *[]ScalingPolicyDescription `json:"ScalingPolicies,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateful', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateless' + ServiceKind ServiceKindBasicServiceUpdateDescription `json:"ServiceKind,omitempty"` +} + +func unmarshalBasicServiceUpdateDescription(body []byte) (BasicServiceUpdateDescription, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["ServiceKind"] { + case string(ServiceKindBasicServiceUpdateDescriptionServiceKindStateful): + var ssud StatefulServiceUpdateDescription + err := json.Unmarshal(body, &ssud) + return ssud, err + case string(ServiceKindBasicServiceUpdateDescriptionServiceKindStateless): + var ssud StatelessServiceUpdateDescription + err := json.Unmarshal(body, &ssud) + return ssud, err + default: + var sud ServiceUpdateDescription + err := json.Unmarshal(body, &sud) + return sud, err + } +} +func unmarshalBasicServiceUpdateDescriptionArray(body []byte) ([]BasicServiceUpdateDescription, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sudArray := make([]BasicServiceUpdateDescription, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sud, err := unmarshalBasicServiceUpdateDescription(*rawMessage) + if err != nil { + return nil, err + } + sudArray[index] = sud + } + return sudArray, nil +} + +// MarshalJSON is the custom marshaler for ServiceUpdateDescription. +func (sud ServiceUpdateDescription) MarshalJSON() ([]byte, error) { + sud.ServiceKind = ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription + objectMap := make(map[string]interface{}) + if sud.Flags != nil { + objectMap["Flags"] = sud.Flags + } + if sud.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = sud.PlacementConstraints + } + if sud.CorrelationScheme != nil { + objectMap["CorrelationScheme"] = sud.CorrelationScheme + } + if sud.LoadMetrics != nil { + objectMap["LoadMetrics"] = sud.LoadMetrics + } + if sud.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = sud.ServicePlacementPolicies + } + if sud.DefaultMoveCost != "" { + objectMap["DefaultMoveCost"] = sud.DefaultMoveCost + } + if sud.ScalingPolicies != nil { + objectMap["ScalingPolicies"] = sud.ScalingPolicies + } + if sud.ServiceKind != "" { + objectMap["ServiceKind"] = sud.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. +func (sud ServiceUpdateDescription) AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) { + return nil, false +} + +// AsStatelessServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. +func (sud ServiceUpdateDescription) AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) { + return nil, false +} + +// AsServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. +func (sud ServiceUpdateDescription) AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) { + return &sud, true +} + +// AsBasicServiceUpdateDescription is the BasicServiceUpdateDescription implementation for ServiceUpdateDescription. +func (sud ServiceUpdateDescription) AsBasicServiceUpdateDescription() (BasicServiceUpdateDescription, bool) { + return &sud, true +} + +// UnmarshalJSON is the custom unmarshaler for ServiceUpdateDescription struct. +func (sud *ServiceUpdateDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "Flags": + if v != nil { + var flags string + err = json.Unmarshal(*v, &flags) + if err != nil { + return err + } + sud.Flags = &flags + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + sud.PlacementConstraints = &placementConstraints + } + case "CorrelationScheme": + if v != nil { + var correlationScheme []ServiceCorrelationDescription + err = json.Unmarshal(*v, &correlationScheme) + if err != nil { + return err + } + sud.CorrelationScheme = &correlationScheme + } + case "LoadMetrics": + if v != nil { + var loadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &loadMetrics) + if err != nil { + return err + } + sud.LoadMetrics = &loadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + sud.ServicePlacementPolicies = &servicePlacementPolicies + } + case "DefaultMoveCost": + if v != nil { + var defaultMoveCost MoveCost + err = json.Unmarshal(*v, &defaultMoveCost) + if err != nil { + return err + } + sud.DefaultMoveCost = defaultMoveCost + } + case "ScalingPolicies": + if v != nil { + var scalingPolicies []ScalingPolicyDescription + err = json.Unmarshal(*v, &scalingPolicies) + if err != nil { + return err + } + sud.ScalingPolicies = &scalingPolicies + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServiceUpdateDescription + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + sud.ServiceKind = serviceKind + } + } + } + + return nil +} + +// ServiceUpgradeProgress information about how many replicas are completed or pending for a specific +// service during upgrade. +type ServiceUpgradeProgress struct { + // ServiceName - Name of the Service resource. + ServiceName *string `json:"ServiceName,omitempty"` + // CompletedReplicaCount - The number of replicas that completes the upgrade in the service. + CompletedReplicaCount *string `json:"CompletedReplicaCount,omitempty"` + // PendingReplicaCount - The number of replicas that are waiting to be upgraded in the service. + PendingReplicaCount *string `json:"PendingReplicaCount,omitempty"` +} + +// Setting describes a setting for the container. The setting file path can be fetched from environment +// variable "Fabric_SettingPath". The path for Windows container is "C:\\secrets". The path for Linux +// container is "/var/secrets". +type Setting struct { + // Type - The type of the setting being given in value. Possible values include: 'SettingTypeClearText', 'SettingTypeKeyVaultReference', 'SettingTypeSecretValueReference' + Type SettingType `json:"type,omitempty"` + // Name - The name of the setting. + Name *string `json:"name,omitempty"` + // Value - The value of the setting, will be processed based on the type provided. + Value *string `json:"value,omitempty"` +} + +// SingletonPartitionInformation information about a partition that is singleton. The services with +// singleton partitioning scheme are effectively non-partitioned. They only have one partition. +type SingletonPartitionInformation struct { + // ID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + ID *uuid.UUID `json:"Id,omitempty"` + // ServicePartitionKind - Possible values include: 'ServicePartitionKindPartitionInformation', 'ServicePartitionKindInt64Range1', 'ServicePartitionKindNamed1', 'ServicePartitionKindSingleton1' + ServicePartitionKind ServicePartitionKindBasicPartitionInformation `json:"ServicePartitionKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for SingletonPartitionInformation. +func (spi SingletonPartitionInformation) MarshalJSON() ([]byte, error) { + spi.ServicePartitionKind = ServicePartitionKindSingleton1 + objectMap := make(map[string]interface{}) + if spi.ID != nil { + objectMap["Id"] = spi.ID + } + if spi.ServicePartitionKind != "" { + objectMap["ServicePartitionKind"] = spi.ServicePartitionKind + } + return json.Marshal(objectMap) +} + +// AsInt64RangePartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. +func (spi SingletonPartitionInformation) AsInt64RangePartitionInformation() (*Int64RangePartitionInformation, bool) { + return nil, false +} + +// AsNamedPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. +func (spi SingletonPartitionInformation) AsNamedPartitionInformation() (*NamedPartitionInformation, bool) { + return nil, false +} + +// AsSingletonPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. +func (spi SingletonPartitionInformation) AsSingletonPartitionInformation() (*SingletonPartitionInformation, bool) { + return &spi, true +} + +// AsPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. +func (spi SingletonPartitionInformation) AsPartitionInformation() (*PartitionInformation, bool) { + return nil, false +} + +// AsBasicPartitionInformation is the BasicPartitionInformation implementation for SingletonPartitionInformation. +func (spi SingletonPartitionInformation) AsBasicPartitionInformation() (BasicPartitionInformation, bool) { + return &spi, true +} + +// SingletonPartitionSchemeDescription describes the partition scheme of a singleton-partitioned, or +// non-partitioned service. +type SingletonPartitionSchemeDescription struct { + // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed1', 'PartitionSchemeSingleton1', 'PartitionSchemeUniformInt64Range1' + PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"` +} + +// MarshalJSON is the custom marshaler for SingletonPartitionSchemeDescription. +func (spsd SingletonPartitionSchemeDescription) MarshalJSON() ([]byte, error) { + spsd.PartitionScheme = PartitionSchemeSingleton1 + objectMap := make(map[string]interface{}) + if spsd.PartitionScheme != "" { + objectMap["PartitionScheme"] = spsd.PartitionScheme + } + return json.Marshal(objectMap) +} + +// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. +func (spsd SingletonPartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { + return nil, false +} + +// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. +func (spsd SingletonPartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { + return &spsd, true +} + +// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. +func (spsd SingletonPartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { + return nil, false +} + +// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. +func (spsd SingletonPartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { + return nil, false +} + +// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for SingletonPartitionSchemeDescription. +func (spsd SingletonPartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { + return &spsd, true +} + +// StartClusterUpgradeDescription describes the parameters for starting a cluster upgrade. +type StartClusterUpgradeDescription struct { + // CodeVersion - The cluster code version. + CodeVersion *string `json:"CodeVersion,omitempty"` + // ConfigVersion - The cluster configuration version. + ConfigVersion *string `json:"ConfigVersion,omitempty"` + // UpgradeKind - The kind of upgrade out of the following possible values. Possible values include: 'UpgradeKindInvalid', 'UpgradeKindRolling' + UpgradeKind UpgradeKind `json:"UpgradeKind,omitempty"` + // RollingUpgradeMode - The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'UpgradeModeInvalid', 'UpgradeModeUnmonitoredAuto', 'UpgradeModeUnmonitoredManual', 'UpgradeModeMonitored' + RollingUpgradeMode UpgradeMode `json:"RollingUpgradeMode,omitempty"` + // UpgradeReplicaSetCheckTimeoutInSeconds - The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + UpgradeReplicaSetCheckTimeoutInSeconds *int64 `json:"UpgradeReplicaSetCheckTimeoutInSeconds,omitempty"` + // ForceRestart - If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). + ForceRestart *bool `json:"ForceRestart,omitempty"` + // SortOrder - Defines the order in which an upgrade proceeds through the cluster. Possible values include: 'UpgradeSortOrderInvalid', 'UpgradeSortOrderDefault', 'UpgradeSortOrderNumeric', 'UpgradeSortOrderLexicographical', 'UpgradeSortOrderReverseNumeric', 'UpgradeSortOrderReverseLexicographical' + SortOrder UpgradeSortOrder `json:"SortOrder,omitempty"` + // MonitoringPolicy - Describes the parameters for monitoring an upgrade in Monitored mode. + MonitoringPolicy *MonitoringPolicyDescription `json:"MonitoringPolicy,omitempty"` + // ClusterHealthPolicy - Defines a health policy used to evaluate the health of the cluster or of a cluster node. + ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` + // EnableDeltaHealthEvaluation - When true, enables delta health evaluation rather than absolute health evaluation after completion of each upgrade domain. + EnableDeltaHealthEvaluation *bool `json:"EnableDeltaHealthEvaluation,omitempty"` + // ClusterUpgradeHealthPolicy - Defines a health policy used to evaluate the health of the cluster during a cluster upgrade. + ClusterUpgradeHealthPolicy *ClusterUpgradeHealthPolicyObject `json:"ClusterUpgradeHealthPolicy,omitempty"` + // ApplicationHealthPolicyMap - Defines the application health policy map used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicyMap *ApplicationHealthPolicies `json:"ApplicationHealthPolicyMap,omitempty"` + // InstanceCloseDelayDurationInSeconds - Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster + // upgrade, only for those instances which have a non-zero delay duration configured in the service description. See InstanceCloseDelayDurationSeconds property in $ref: "#/definitions/StatelessServiceDescription.yaml" for details. + // Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that the behavior will entirely depend on the delay configured in the stateless service description. + InstanceCloseDelayDurationInSeconds *int64 `json:"InstanceCloseDelayDurationInSeconds,omitempty"` +} + +// StartedChaosEvent describes a Chaos event that gets generated when Chaos is started. +type StartedChaosEvent struct { + // ChaosParameters - Defines all the parameters to configure a Chaos run. + ChaosParameters *ChaosParameters `json:"ChaosParameters,omitempty"` + // TimeStampUtc - The UTC timestamp when this Chaos event was generated. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' + Kind KindBasicChaosEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StartedChaosEvent. +func (sce StartedChaosEvent) MarshalJSON() ([]byte, error) { + sce.Kind = KindStarted + objectMap := make(map[string]interface{}) + if sce.ChaosParameters != nil { + objectMap["ChaosParameters"] = sce.ChaosParameters + } + if sce.TimeStampUtc != nil { + objectMap["TimeStampUtc"] = sce.TimeStampUtc + } + if sce.Kind != "" { + objectMap["Kind"] = sce.Kind + } + return json.Marshal(objectMap) +} + +// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { + return nil, false +} + +// AsStartedChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { + return &sce, true +} + +// AsStoppedChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { + return nil, false +} + +// AsTestErrorChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { + return nil, false +} + +// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { + return nil, false +} + +// AsWaitingChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { + return nil, false +} + +// AsChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { + return nil, false +} + +// AsBasicChaosEvent is the BasicChaosEvent implementation for StartedChaosEvent. +func (sce StartedChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { + return &sce, true +} + +// StatefulReplicaHealthReportExpiredEvent stateful Replica Health Report Expired event. +type StatefulReplicaHealthReportExpiredEvent struct { + // ReplicaInstanceID - Id of Replica instance. + ReplicaInstanceID *int64 `json:"ReplicaInstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *int64 `json:"ReplicaId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + srhree.Kind = KindStatefulReplicaHealthReportExpired + objectMap := make(map[string]interface{}) + if srhree.ReplicaInstanceID != nil { + objectMap["ReplicaInstanceId"] = srhree.ReplicaInstanceID + } + if srhree.SourceID != nil { + objectMap["SourceId"] = srhree.SourceID + } + if srhree.Property != nil { + objectMap["Property"] = srhree.Property + } + if srhree.HealthState != nil { + objectMap["HealthState"] = srhree.HealthState + } + if srhree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = srhree.TimeToLiveMs + } + if srhree.SequenceNumber != nil { + objectMap["SequenceNumber"] = srhree.SequenceNumber + } + if srhree.Description != nil { + objectMap["Description"] = srhree.Description + } + if srhree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = srhree.RemoveWhenExpired + } + if srhree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = srhree.SourceUtcTimestamp + } + if srhree.PartitionID != nil { + objectMap["PartitionId"] = srhree.PartitionID + } + if srhree.ReplicaID != nil { + objectMap["ReplicaId"] = srhree.ReplicaID + } + if srhree.EventInstanceID != nil { + objectMap["EventInstanceId"] = srhree.EventInstanceID + } + if srhree.Category != nil { + objectMap["Category"] = srhree.Category + } + if srhree.TimeStamp != nil { + objectMap["TimeStamp"] = srhree.TimeStamp + } + if srhree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = srhree.HasCorrelatedEvents + } + if srhree.Kind != "" { + objectMap["Kind"] = srhree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return &srhree, true +} + +// AsServiceEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return &srhree, true +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for StatefulReplicaHealthReportExpiredEvent. +func (srhree StatefulReplicaHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &srhree, true +} + +// StatefulReplicaNewHealthReportEvent stateful Replica Health Report Created event. +type StatefulReplicaNewHealthReportEvent struct { + // ReplicaInstanceID - Id of Replica instance. + ReplicaInstanceID *int64 `json:"ReplicaInstanceId,omitempty"` + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *int64 `json:"ReplicaId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) MarshalJSON() ([]byte, error) { + srnhre.Kind = KindStatefulReplicaNewHealthReport + objectMap := make(map[string]interface{}) + if srnhre.ReplicaInstanceID != nil { + objectMap["ReplicaInstanceId"] = srnhre.ReplicaInstanceID + } + if srnhre.SourceID != nil { + objectMap["SourceId"] = srnhre.SourceID + } + if srnhre.Property != nil { + objectMap["Property"] = srnhre.Property + } + if srnhre.HealthState != nil { + objectMap["HealthState"] = srnhre.HealthState + } + if srnhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = srnhre.TimeToLiveMs + } + if srnhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = srnhre.SequenceNumber + } + if srnhre.Description != nil { + objectMap["Description"] = srnhre.Description + } + if srnhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = srnhre.RemoveWhenExpired + } + if srnhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = srnhre.SourceUtcTimestamp + } + if srnhre.PartitionID != nil { + objectMap["PartitionId"] = srnhre.PartitionID + } + if srnhre.ReplicaID != nil { + objectMap["ReplicaId"] = srnhre.ReplicaID + } + if srnhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = srnhre.EventInstanceID + } + if srnhre.Category != nil { + objectMap["Category"] = srnhre.Category + } + if srnhre.TimeStamp != nil { + objectMap["TimeStamp"] = srnhre.TimeStamp + } + if srnhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = srnhre.HasCorrelatedEvents + } + if srnhre.Kind != "" { + objectMap["Kind"] = srnhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return &srnhre, true +} + +// AsServiceEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return &srnhre, true +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for StatefulReplicaNewHealthReportEvent. +func (srnhre StatefulReplicaNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &srnhre, true +} + +// StatefulServiceDescription describes a stateful service. +type StatefulServiceDescription struct { + // TargetReplicaSetSize - The target replica set size as a number. + TargetReplicaSetSize *int32 `json:"TargetReplicaSetSize,omitempty"` + // MinReplicaSetSize - The minimum replica set size as a number. + MinReplicaSetSize *int32 `json:"MinReplicaSetSize,omitempty"` + // HasPersistedState - A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. + HasPersistedState *bool `json:"HasPersistedState,omitempty"` + // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. + // This property can be a combination of those flags obtained using bitwise 'OR' operator. + // For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set. + // - None - Does not indicate any other properties are set. The value is zero. + // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 1. + // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 2. + // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 4. + // - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The value is 8. + Flags *int32 `json:"Flags,omitempty"` + // ReplicaRestartWaitDurationSeconds - The duration, in seconds, between when a replica goes down and when a new replica is created. + ReplicaRestartWaitDurationSeconds *int64 `json:"ReplicaRestartWaitDurationSeconds,omitempty"` + // QuorumLossWaitDurationSeconds - The maximum duration, in seconds, for which a partition is allowed to be in a state of quorum loss. + QuorumLossWaitDurationSeconds *int64 `json:"QuorumLossWaitDurationSeconds,omitempty"` + // StandByReplicaKeepDurationSeconds - The definition on how long StandBy replicas should be maintained before being removed. + StandByReplicaKeepDurationSeconds *int64 `json:"StandByReplicaKeepDurationSeconds,omitempty"` + // ServicePlacementTimeLimitSeconds - The duration for which replicas can stay InBuild before reporting that build is stuck. + ServicePlacementTimeLimitSeconds *int64 `json:"ServicePlacementTimeLimitSeconds,omitempty"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // InitializationData - The initialization data as an array of bytes. Initialization data is passed to service instances or replicas when they are created. + InitializationData *[]int32 `json:"InitializationData,omitempty"` + // PartitionDescription - The partition description as an object. + PartitionDescription BasicPartitionSchemeDescription `json:"PartitionDescription,omitempty"` + // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // CorrelationScheme - The correlation scheme. + CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` + // ServiceLoadMetrics - The service load metrics. + ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"ServiceLoadMetrics,omitempty"` + // ServicePlacementPolicies - The service placement policies. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // DefaultMoveCost - The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + DefaultMoveCost MoveCost `json:"DefaultMoveCost,omitempty"` + // IsDefaultMoveCostSpecified - Indicates if the DefaultMoveCost property is specified. + IsDefaultMoveCostSpecified *bool `json:"IsDefaultMoveCostSpecified,omitempty"` + // ServicePackageActivationMode - The activation mode of service package to be used for a service. Possible values include: 'SharedProcess', 'ExclusiveProcess' + ServicePackageActivationMode ServicePackageActivationMode `json:"ServicePackageActivationMode,omitempty"` + // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. + ServiceDNSName *string `json:"ServiceDnsName,omitempty"` + // ScalingPolicies - Scaling policies for this service. + ScalingPolicies *[]ScalingPolicyDescription `json:"ScalingPolicies,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceDescriptionServiceKindServiceDescription', 'ServiceKindBasicServiceDescriptionServiceKindStateful', 'ServiceKindBasicServiceDescriptionServiceKindStateless' + ServiceKind ServiceKindBasicServiceDescription `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServiceDescription. +func (ssd StatefulServiceDescription) MarshalJSON() ([]byte, error) { + ssd.ServiceKind = ServiceKindBasicServiceDescriptionServiceKindStateful + objectMap := make(map[string]interface{}) + if ssd.TargetReplicaSetSize != nil { + objectMap["TargetReplicaSetSize"] = ssd.TargetReplicaSetSize + } + if ssd.MinReplicaSetSize != nil { + objectMap["MinReplicaSetSize"] = ssd.MinReplicaSetSize + } + if ssd.HasPersistedState != nil { + objectMap["HasPersistedState"] = ssd.HasPersistedState + } + if ssd.Flags != nil { + objectMap["Flags"] = ssd.Flags + } + if ssd.ReplicaRestartWaitDurationSeconds != nil { + objectMap["ReplicaRestartWaitDurationSeconds"] = ssd.ReplicaRestartWaitDurationSeconds + } + if ssd.QuorumLossWaitDurationSeconds != nil { + objectMap["QuorumLossWaitDurationSeconds"] = ssd.QuorumLossWaitDurationSeconds + } + if ssd.StandByReplicaKeepDurationSeconds != nil { + objectMap["StandByReplicaKeepDurationSeconds"] = ssd.StandByReplicaKeepDurationSeconds + } + if ssd.ServicePlacementTimeLimitSeconds != nil { + objectMap["ServicePlacementTimeLimitSeconds"] = ssd.ServicePlacementTimeLimitSeconds + } + if ssd.ApplicationName != nil { + objectMap["ApplicationName"] = ssd.ApplicationName + } + if ssd.ServiceName != nil { + objectMap["ServiceName"] = ssd.ServiceName + } + if ssd.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = ssd.ServiceTypeName + } + if ssd.InitializationData != nil { + objectMap["InitializationData"] = ssd.InitializationData + } + objectMap["PartitionDescription"] = ssd.PartitionDescription + if ssd.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = ssd.PlacementConstraints + } + if ssd.CorrelationScheme != nil { + objectMap["CorrelationScheme"] = ssd.CorrelationScheme + } + if ssd.ServiceLoadMetrics != nil { + objectMap["ServiceLoadMetrics"] = ssd.ServiceLoadMetrics + } + if ssd.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = ssd.ServicePlacementPolicies + } + if ssd.DefaultMoveCost != "" { + objectMap["DefaultMoveCost"] = ssd.DefaultMoveCost + } + if ssd.IsDefaultMoveCostSpecified != nil { + objectMap["IsDefaultMoveCostSpecified"] = ssd.IsDefaultMoveCostSpecified + } + if ssd.ServicePackageActivationMode != "" { + objectMap["ServicePackageActivationMode"] = ssd.ServicePackageActivationMode + } + if ssd.ServiceDNSName != nil { + objectMap["ServiceDnsName"] = ssd.ServiceDNSName + } + if ssd.ScalingPolicies != nil { + objectMap["ScalingPolicies"] = ssd.ScalingPolicies + } + if ssd.ServiceKind != "" { + objectMap["ServiceKind"] = ssd.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. +func (ssd StatefulServiceDescription) AsStatefulServiceDescription() (*StatefulServiceDescription, bool) { + return &ssd, true +} + +// AsStatelessServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. +func (ssd StatefulServiceDescription) AsStatelessServiceDescription() (*StatelessServiceDescription, bool) { + return nil, false +} + +// AsServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. +func (ssd StatefulServiceDescription) AsServiceDescription() (*ServiceDescription, bool) { + return nil, false +} + +// AsBasicServiceDescription is the BasicServiceDescription implementation for StatefulServiceDescription. +func (ssd StatefulServiceDescription) AsBasicServiceDescription() (BasicServiceDescription, bool) { + return &ssd, true +} + +// UnmarshalJSON is the custom unmarshaler for StatefulServiceDescription struct. +func (ssd *StatefulServiceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "TargetReplicaSetSize": + if v != nil { + var targetReplicaSetSize int32 + err = json.Unmarshal(*v, &targetReplicaSetSize) + if err != nil { + return err + } + ssd.TargetReplicaSetSize = &targetReplicaSetSize + } + case "MinReplicaSetSize": + if v != nil { + var minReplicaSetSize int32 + err = json.Unmarshal(*v, &minReplicaSetSize) + if err != nil { + return err + } + ssd.MinReplicaSetSize = &minReplicaSetSize + } + case "HasPersistedState": + if v != nil { + var hasPersistedState bool + err = json.Unmarshal(*v, &hasPersistedState) + if err != nil { + return err + } + ssd.HasPersistedState = &hasPersistedState + } + case "Flags": + if v != nil { + var flags int32 + err = json.Unmarshal(*v, &flags) + if err != nil { + return err + } + ssd.Flags = &flags + } + case "ReplicaRestartWaitDurationSeconds": + if v != nil { + var replicaRestartWaitDurationSeconds int64 + err = json.Unmarshal(*v, &replicaRestartWaitDurationSeconds) + if err != nil { + return err + } + ssd.ReplicaRestartWaitDurationSeconds = &replicaRestartWaitDurationSeconds + } + case "QuorumLossWaitDurationSeconds": + if v != nil { + var quorumLossWaitDurationSeconds int64 + err = json.Unmarshal(*v, &quorumLossWaitDurationSeconds) + if err != nil { + return err + } + ssd.QuorumLossWaitDurationSeconds = &quorumLossWaitDurationSeconds + } + case "StandByReplicaKeepDurationSeconds": + if v != nil { + var standByReplicaKeepDurationSeconds int64 + err = json.Unmarshal(*v, &standByReplicaKeepDurationSeconds) + if err != nil { + return err + } + ssd.StandByReplicaKeepDurationSeconds = &standByReplicaKeepDurationSeconds + } + case "ServicePlacementTimeLimitSeconds": + if v != nil { + var servicePlacementTimeLimitSeconds int64 + err = json.Unmarshal(*v, &servicePlacementTimeLimitSeconds) + if err != nil { + return err + } + ssd.ServicePlacementTimeLimitSeconds = &servicePlacementTimeLimitSeconds + } + case "ApplicationName": + if v != nil { + var applicationName string + err = json.Unmarshal(*v, &applicationName) + if err != nil { + return err + } + ssd.ApplicationName = &applicationName + } + case "ServiceName": + if v != nil { + var serviceName string + err = json.Unmarshal(*v, &serviceName) + if err != nil { + return err + } + ssd.ServiceName = &serviceName + } + case "ServiceTypeName": + if v != nil { + var serviceTypeName string + err = json.Unmarshal(*v, &serviceTypeName) + if err != nil { + return err + } + ssd.ServiceTypeName = &serviceTypeName + } + case "InitializationData": + if v != nil { + var initializationData []int32 + err = json.Unmarshal(*v, &initializationData) + if err != nil { + return err + } + ssd.InitializationData = &initializationData + } + case "PartitionDescription": + if v != nil { + partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v) + if err != nil { + return err + } + ssd.PartitionDescription = partitionDescription + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + ssd.PlacementConstraints = &placementConstraints + } + case "CorrelationScheme": + if v != nil { + var correlationScheme []ServiceCorrelationDescription + err = json.Unmarshal(*v, &correlationScheme) + if err != nil { + return err + } + ssd.CorrelationScheme = &correlationScheme + } + case "ServiceLoadMetrics": + if v != nil { + var serviceLoadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &serviceLoadMetrics) + if err != nil { + return err + } + ssd.ServiceLoadMetrics = &serviceLoadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + ssd.ServicePlacementPolicies = &servicePlacementPolicies + } + case "DefaultMoveCost": + if v != nil { + var defaultMoveCost MoveCost + err = json.Unmarshal(*v, &defaultMoveCost) + if err != nil { + return err + } + ssd.DefaultMoveCost = defaultMoveCost + } + case "IsDefaultMoveCostSpecified": + if v != nil { + var isDefaultMoveCostSpecified bool + err = json.Unmarshal(*v, &isDefaultMoveCostSpecified) + if err != nil { + return err + } + ssd.IsDefaultMoveCostSpecified = &isDefaultMoveCostSpecified + } + case "ServicePackageActivationMode": + if v != nil { + var servicePackageActivationMode ServicePackageActivationMode + err = json.Unmarshal(*v, &servicePackageActivationMode) + if err != nil { + return err + } + ssd.ServicePackageActivationMode = servicePackageActivationMode + } + case "ServiceDnsName": + if v != nil { + var serviceDNSName string + err = json.Unmarshal(*v, &serviceDNSName) + if err != nil { + return err + } + ssd.ServiceDNSName = &serviceDNSName + } + case "ScalingPolicies": + if v != nil { + var scalingPolicies []ScalingPolicyDescription + err = json.Unmarshal(*v, &scalingPolicies) + if err != nil { + return err + } + ssd.ScalingPolicies = &scalingPolicies + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServiceDescription + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + ssd.ServiceKind = serviceKind + } + } + } + + return nil +} + +// StatefulServiceInfo information about a stateful Service Fabric service. +type StatefulServiceInfo struct { + // HasPersistedState - Whether the service has persisted state. + HasPersistedState *bool `json:"HasPersistedState,omitempty"` + // ID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ID *string `json:"Id,omitempty"` + // Name - The full name of the service with 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TypeName - Name of the service type as specified in the service manifest. + TypeName *string `json:"TypeName,omitempty"` + // ManifestVersion - The version of the service manifest. + ManifestVersion *string `json:"ManifestVersion,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // ServiceStatus - The status of the application. Possible values include: 'ServiceStatusUnknown', 'ServiceStatusActive', 'ServiceStatusUpgrading', 'ServiceStatusDeleting', 'ServiceStatusCreating', 'ServiceStatusFailed' + ServiceStatus ServiceStatus `json:"ServiceStatus,omitempty"` + // IsServiceGroup - Whether the service is in a service group. + IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceInfoServiceKindServiceInfo', 'ServiceKindBasicServiceInfoServiceKindStateful', 'ServiceKindBasicServiceInfoServiceKindStateless' + ServiceKind ServiceKindBasicServiceInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServiceInfo. +func (ssi StatefulServiceInfo) MarshalJSON() ([]byte, error) { + ssi.ServiceKind = ServiceKindBasicServiceInfoServiceKindStateful + objectMap := make(map[string]interface{}) + if ssi.HasPersistedState != nil { + objectMap["HasPersistedState"] = ssi.HasPersistedState + } + if ssi.ID != nil { + objectMap["Id"] = ssi.ID + } + if ssi.Name != nil { + objectMap["Name"] = ssi.Name + } + if ssi.TypeName != nil { + objectMap["TypeName"] = ssi.TypeName + } + if ssi.ManifestVersion != nil { + objectMap["ManifestVersion"] = ssi.ManifestVersion + } + if ssi.HealthState != "" { + objectMap["HealthState"] = ssi.HealthState + } + if ssi.ServiceStatus != "" { + objectMap["ServiceStatus"] = ssi.ServiceStatus + } + if ssi.IsServiceGroup != nil { + objectMap["IsServiceGroup"] = ssi.IsServiceGroup + } + if ssi.ServiceKind != "" { + objectMap["ServiceKind"] = ssi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. +func (ssi StatefulServiceInfo) AsStatefulServiceInfo() (*StatefulServiceInfo, bool) { + return &ssi, true +} + +// AsStatelessServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. +func (ssi StatefulServiceInfo) AsStatelessServiceInfo() (*StatelessServiceInfo, bool) { + return nil, false +} + +// AsServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. +func (ssi StatefulServiceInfo) AsServiceInfo() (*ServiceInfo, bool) { + return nil, false +} + +// AsBasicServiceInfo is the BasicServiceInfo implementation for StatefulServiceInfo. +func (ssi StatefulServiceInfo) AsBasicServiceInfo() (BasicServiceInfo, bool) { + return &ssi, true +} + +// StatefulServicePartitionInfo information about a partition of a stateful Service Fabric service.. +type StatefulServicePartitionInfo struct { + // TargetReplicaSetSize - The target replica set size as a number. + TargetReplicaSetSize *int64 `json:"TargetReplicaSetSize,omitempty"` + // MinReplicaSetSize - The minimum replica set size as a number. + MinReplicaSetSize *int64 `json:"MinReplicaSetSize,omitempty"` + // LastQuorumLossDuration - The duration for which this partition was in quorum loss. If the partition is currently in quorum loss, it returns the duration since it has been in that state. This field is using ISO8601 format for specifying the duration. + LastQuorumLossDuration *string `json:"LastQuorumLossDuration,omitempty"` + // PrimaryEpoch - An Epoch is a configuration number for the partition as a whole. When the configuration of the replica set changes, for example when the Primary replica changes, the operations that are replicated from the new Primary replica are said to be a new Epoch from the ones which were sent by the old Primary replica. + PrimaryEpoch *Epoch `json:"PrimaryEpoch,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // PartitionStatus - The status of the service fabric service partition. Possible values include: 'ServicePartitionStatusInvalid', 'ServicePartitionStatusReady', 'ServicePartitionStatusNotReady', 'ServicePartitionStatusInQuorumLoss', 'ServicePartitionStatusReconfiguring', 'ServicePartitionStatusDeleting' + PartitionStatus ServicePartitionStatus `json:"PartitionStatus,omitempty"` + // PartitionInformation - Information about the partition identity, partitioning scheme and keys supported by it. + PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo', 'ServiceKindBasicServicePartitionInfoServiceKindStateful', 'ServiceKindBasicServicePartitionInfoServiceKindStateless' + ServiceKind ServiceKindBasicServicePartitionInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServicePartitionInfo. +func (sspi StatefulServicePartitionInfo) MarshalJSON() ([]byte, error) { + sspi.ServiceKind = ServiceKindBasicServicePartitionInfoServiceKindStateful + objectMap := make(map[string]interface{}) + if sspi.TargetReplicaSetSize != nil { + objectMap["TargetReplicaSetSize"] = sspi.TargetReplicaSetSize + } + if sspi.MinReplicaSetSize != nil { + objectMap["MinReplicaSetSize"] = sspi.MinReplicaSetSize + } + if sspi.LastQuorumLossDuration != nil { + objectMap["LastQuorumLossDuration"] = sspi.LastQuorumLossDuration + } + if sspi.PrimaryEpoch != nil { + objectMap["PrimaryEpoch"] = sspi.PrimaryEpoch + } + if sspi.HealthState != "" { + objectMap["HealthState"] = sspi.HealthState + } + if sspi.PartitionStatus != "" { + objectMap["PartitionStatus"] = sspi.PartitionStatus + } + objectMap["PartitionInformation"] = sspi.PartitionInformation + if sspi.ServiceKind != "" { + objectMap["ServiceKind"] = sspi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. +func (sspi StatefulServicePartitionInfo) AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) { + return &sspi, true +} + +// AsStatelessServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. +func (sspi StatefulServicePartitionInfo) AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) { + return nil, false +} + +// AsServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. +func (sspi StatefulServicePartitionInfo) AsServicePartitionInfo() (*ServicePartitionInfo, bool) { + return nil, false +} + +// AsBasicServicePartitionInfo is the BasicServicePartitionInfo implementation for StatefulServicePartitionInfo. +func (sspi StatefulServicePartitionInfo) AsBasicServicePartitionInfo() (BasicServicePartitionInfo, bool) { + return &sspi, true +} + +// UnmarshalJSON is the custom unmarshaler for StatefulServicePartitionInfo struct. +func (sspi *StatefulServicePartitionInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "TargetReplicaSetSize": + if v != nil { + var targetReplicaSetSize int64 + err = json.Unmarshal(*v, &targetReplicaSetSize) + if err != nil { + return err + } + sspi.TargetReplicaSetSize = &targetReplicaSetSize + } + case "MinReplicaSetSize": + if v != nil { + var minReplicaSetSize int64 + err = json.Unmarshal(*v, &minReplicaSetSize) + if err != nil { + return err + } + sspi.MinReplicaSetSize = &minReplicaSetSize + } + case "LastQuorumLossDuration": + if v != nil { + var lastQuorumLossDuration string + err = json.Unmarshal(*v, &lastQuorumLossDuration) + if err != nil { + return err + } + sspi.LastQuorumLossDuration = &lastQuorumLossDuration + } + case "PrimaryEpoch": + if v != nil { + var primaryEpoch Epoch + err = json.Unmarshal(*v, &primaryEpoch) + if err != nil { + return err + } + sspi.PrimaryEpoch = &primaryEpoch + } + case "HealthState": + if v != nil { + var healthState HealthState + err = json.Unmarshal(*v, &healthState) + if err != nil { + return err + } + sspi.HealthState = healthState + } + case "PartitionStatus": + if v != nil { + var partitionStatus ServicePartitionStatus + err = json.Unmarshal(*v, &partitionStatus) + if err != nil { + return err + } + sspi.PartitionStatus = partitionStatus + } + case "PartitionInformation": + if v != nil { + partitionInformation, err := unmarshalBasicPartitionInformation(*v) + if err != nil { + return err + } + sspi.PartitionInformation = partitionInformation + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServicePartitionInfo + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + sspi.ServiceKind = serviceKind + } + } + } + + return nil +} + +// StatefulServiceReplicaHealth represents the health of the stateful service replica. +// Contains the replica aggregated health state, the health events and the unhealthy evaluations. +type StatefulServiceReplicaHealth struct { + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *string `json:"ReplicaId,omitempty"` + // PartitionID - Id of the partition to which this replica belongs. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthServiceKindReplicaHealth', 'ServiceKindBasicReplicaHealthServiceKindStateful', 'ServiceKindBasicReplicaHealthServiceKindStateless' + ServiceKind ServiceKindBasicReplicaHealth `json:"ServiceKind,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServiceReplicaHealth. +func (ssrh StatefulServiceReplicaHealth) MarshalJSON() ([]byte, error) { + ssrh.ServiceKind = ServiceKindBasicReplicaHealthServiceKindStateful + objectMap := make(map[string]interface{}) + if ssrh.ReplicaID != nil { + objectMap["ReplicaId"] = ssrh.ReplicaID + } + if ssrh.PartitionID != nil { + objectMap["PartitionId"] = ssrh.PartitionID + } + if ssrh.ServiceKind != "" { + objectMap["ServiceKind"] = ssrh.ServiceKind + } + if ssrh.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = ssrh.AggregatedHealthState + } + if ssrh.HealthEvents != nil { + objectMap["HealthEvents"] = ssrh.HealthEvents + } + if ssrh.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = ssrh.UnhealthyEvaluations + } + if ssrh.HealthStatistics != nil { + objectMap["HealthStatistics"] = ssrh.HealthStatistics + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. +func (ssrh StatefulServiceReplicaHealth) AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) { + return &ssrh, true +} + +// AsStatelessServiceInstanceHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. +func (ssrh StatefulServiceReplicaHealth) AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) { + return nil, false +} + +// AsReplicaHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. +func (ssrh StatefulServiceReplicaHealth) AsReplicaHealth() (*ReplicaHealth, bool) { + return nil, false +} + +// AsBasicReplicaHealth is the BasicReplicaHealth implementation for StatefulServiceReplicaHealth. +func (ssrh StatefulServiceReplicaHealth) AsBasicReplicaHealth() (BasicReplicaHealth, bool) { + return &ssrh, true +} + +// StatefulServiceReplicaHealthState represents the health state of the stateful service replica, which +// contains the replica ID and the aggregated health state. +type StatefulServiceReplicaHealthState struct { + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *string `json:"ReplicaId,omitempty"` + // PartitionID - The ID of the partition to which this replica belongs. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState', 'ServiceKindBasicReplicaHealthStateServiceKindStateful', 'ServiceKindBasicReplicaHealthStateServiceKindStateless' + ServiceKind ServiceKindBasicReplicaHealthState `json:"ServiceKind,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServiceReplicaHealthState. +func (ssrhs StatefulServiceReplicaHealthState) MarshalJSON() ([]byte, error) { + ssrhs.ServiceKind = ServiceKindBasicReplicaHealthStateServiceKindStateful + objectMap := make(map[string]interface{}) + if ssrhs.ReplicaID != nil { + objectMap["ReplicaId"] = ssrhs.ReplicaID + } + if ssrhs.PartitionID != nil { + objectMap["PartitionId"] = ssrhs.PartitionID + } + if ssrhs.ServiceKind != "" { + objectMap["ServiceKind"] = ssrhs.ServiceKind + } + if ssrhs.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = ssrhs.AggregatedHealthState + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. +func (ssrhs StatefulServiceReplicaHealthState) AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) { + return &ssrhs, true +} + +// AsStatelessServiceInstanceHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. +func (ssrhs StatefulServiceReplicaHealthState) AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) { + return nil, false +} + +// AsReplicaHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. +func (ssrhs StatefulServiceReplicaHealthState) AsReplicaHealthState() (*ReplicaHealthState, bool) { + return nil, false +} + +// AsBasicReplicaHealthState is the BasicReplicaHealthState implementation for StatefulServiceReplicaHealthState. +func (ssrhs StatefulServiceReplicaHealthState) AsBasicReplicaHealthState() (BasicReplicaHealthState, bool) { + return &ssrhs, true +} + +// StatefulServiceReplicaInfo represents a stateful service replica. This includes information about the +// identity, role, status, health, node name, uptime, and other details about the replica. +type StatefulServiceReplicaInfo struct { + // ReplicaRole - The role of a replica of a stateful service. Possible values include: 'ReplicaRoleUnknown', 'ReplicaRoleNone', 'ReplicaRolePrimary', 'ReplicaRoleIdleSecondary', 'ReplicaRoleActiveSecondary' + ReplicaRole ReplicaRole `json:"ReplicaRole,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *string `json:"ReplicaId,omitempty"` + // ReplicaStatus - The status of a replica of a service. Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' + ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // Address - The address the replica is listening on. + Address *string `json:"Address,omitempty"` + // LastInBuildDurationInSeconds - The last in build duration of the replica in seconds. + LastInBuildDurationInSeconds *string `json:"LastInBuildDurationInSeconds,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaInfoServiceKindReplicaInfo', 'ServiceKindBasicReplicaInfoServiceKindStateful', 'ServiceKindBasicReplicaInfoServiceKindStateless' + ServiceKind ServiceKindBasicReplicaInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServiceReplicaInfo. +func (ssri StatefulServiceReplicaInfo) MarshalJSON() ([]byte, error) { + ssri.ServiceKind = ServiceKindBasicReplicaInfoServiceKindStateful + objectMap := make(map[string]interface{}) + if ssri.ReplicaRole != "" { + objectMap["ReplicaRole"] = ssri.ReplicaRole + } + if ssri.ReplicaID != nil { + objectMap["ReplicaId"] = ssri.ReplicaID + } + if ssri.ReplicaStatus != "" { + objectMap["ReplicaStatus"] = ssri.ReplicaStatus + } + if ssri.HealthState != "" { + objectMap["HealthState"] = ssri.HealthState + } + if ssri.NodeName != nil { + objectMap["NodeName"] = ssri.NodeName + } + if ssri.Address != nil { + objectMap["Address"] = ssri.Address + } + if ssri.LastInBuildDurationInSeconds != nil { + objectMap["LastInBuildDurationInSeconds"] = ssri.LastInBuildDurationInSeconds + } + if ssri.ServiceKind != "" { + objectMap["ServiceKind"] = ssri.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. +func (ssri StatefulServiceReplicaInfo) AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) { + return &ssri, true +} + +// AsStatelessServiceInstanceInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. +func (ssri StatefulServiceReplicaInfo) AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) { + return nil, false +} + +// AsReplicaInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. +func (ssri StatefulServiceReplicaInfo) AsReplicaInfo() (*ReplicaInfo, bool) { + return nil, false +} + +// AsBasicReplicaInfo is the BasicReplicaInfo implementation for StatefulServiceReplicaInfo. +func (ssri StatefulServiceReplicaInfo) AsBasicReplicaInfo() (BasicReplicaInfo, bool) { + return &ssri, true +} + +// StatefulServiceTypeDescription describes a stateful service type defined in the service manifest of a +// provisioned application type. +type StatefulServiceTypeDescription struct { + // HasPersistedState - A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. + HasPersistedState *bool `json:"HasPersistedState,omitempty"` + // IsStateful - Indicates whether the service type is a stateful service type or a stateless service type. This property is true if the service type is a stateful service type, false otherwise. + IsStateful *bool `json:"IsStateful,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // PlacementConstraints - The placement constraint to be used when instantiating this service in a Service Fabric cluster. + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // LoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects. + LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` + // ServicePlacementPolicies - List of service placement policy descriptions. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // Extensions - List of service type extensions. + Extensions *[]ServiceTypeExtensionDescription `json:"Extensions,omitempty"` + // Kind - Possible values include: 'KindServiceTypeDescription', 'KindStateful', 'KindStateless' + Kind KindBasicServiceTypeDescription `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServiceTypeDescription. +func (sstd StatefulServiceTypeDescription) MarshalJSON() ([]byte, error) { + sstd.Kind = KindStateful + objectMap := make(map[string]interface{}) + if sstd.HasPersistedState != nil { + objectMap["HasPersistedState"] = sstd.HasPersistedState + } + if sstd.IsStateful != nil { + objectMap["IsStateful"] = sstd.IsStateful + } + if sstd.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = sstd.ServiceTypeName + } + if sstd.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = sstd.PlacementConstraints + } + if sstd.LoadMetrics != nil { + objectMap["LoadMetrics"] = sstd.LoadMetrics + } + if sstd.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = sstd.ServicePlacementPolicies + } + if sstd.Extensions != nil { + objectMap["Extensions"] = sstd.Extensions + } + if sstd.Kind != "" { + objectMap["Kind"] = sstd.Kind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. +func (sstd StatefulServiceTypeDescription) AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) { + return &sstd, true +} + +// AsStatelessServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. +func (sstd StatefulServiceTypeDescription) AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) { + return nil, false +} + +// AsServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. +func (sstd StatefulServiceTypeDescription) AsServiceTypeDescription() (*ServiceTypeDescription, bool) { + return nil, false +} + +// AsBasicServiceTypeDescription is the BasicServiceTypeDescription implementation for StatefulServiceTypeDescription. +func (sstd StatefulServiceTypeDescription) AsBasicServiceTypeDescription() (BasicServiceTypeDescription, bool) { + return &sstd, true +} + +// UnmarshalJSON is the custom unmarshaler for StatefulServiceTypeDescription struct. +func (sstd *StatefulServiceTypeDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "HasPersistedState": + if v != nil { + var hasPersistedState bool + err = json.Unmarshal(*v, &hasPersistedState) + if err != nil { + return err + } + sstd.HasPersistedState = &hasPersistedState + } + case "IsStateful": + if v != nil { + var isStateful bool + err = json.Unmarshal(*v, &isStateful) + if err != nil { + return err + } + sstd.IsStateful = &isStateful + } + case "ServiceTypeName": + if v != nil { + var serviceTypeName string + err = json.Unmarshal(*v, &serviceTypeName) + if err != nil { + return err + } + sstd.ServiceTypeName = &serviceTypeName + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + sstd.PlacementConstraints = &placementConstraints + } + case "LoadMetrics": + if v != nil { + var loadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &loadMetrics) + if err != nil { + return err + } + sstd.LoadMetrics = &loadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + sstd.ServicePlacementPolicies = &servicePlacementPolicies + } + case "Extensions": + if v != nil { + var extensions []ServiceTypeExtensionDescription + err = json.Unmarshal(*v, &extensions) + if err != nil { + return err + } + sstd.Extensions = &extensions + } + case "Kind": + if v != nil { + var kind KindBasicServiceTypeDescription + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sstd.Kind = kind + } + } + } + + return nil +} + +// StatefulServiceUpdateDescription describes an update for a stateful service. +type StatefulServiceUpdateDescription struct { + // TargetReplicaSetSize - The target replica set size as a number. + TargetReplicaSetSize *int32 `json:"TargetReplicaSetSize,omitempty"` + // MinReplicaSetSize - The minimum replica set size as a number. + MinReplicaSetSize *int32 `json:"MinReplicaSetSize,omitempty"` + // ReplicaRestartWaitDurationSeconds - The duration, in seconds, between when a replica goes down and when a new replica is created. + ReplicaRestartWaitDurationSeconds *string `json:"ReplicaRestartWaitDurationSeconds,omitempty"` + // QuorumLossWaitDurationSeconds - The maximum duration, in seconds, for which a partition is allowed to be in a state of quorum loss. + QuorumLossWaitDurationSeconds *string `json:"QuorumLossWaitDurationSeconds,omitempty"` + // StandByReplicaKeepDurationSeconds - The definition on how long StandBy replicas should be maintained before being removed. + StandByReplicaKeepDurationSeconds *string `json:"StandByReplicaKeepDurationSeconds,omitempty"` + // ServicePlacementTimeLimitSeconds - The duration for which replicas can stay InBuild before reporting that build is stuck. + ServicePlacementTimeLimitSeconds *string `json:"ServicePlacementTimeLimitSeconds,omitempty"` + // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. + // This property can be a combination of those flags obtained using bitwise 'OR' operator. + // For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + // - None - Does not indicate any other properties are set. The value is zero. + // - TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property (for Stateful services) or the InstanceCount property (for Stateless services) is set. The value is 1. + // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 2. + // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 4. + // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 8. + // - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + // - PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + // - PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is 64. + // - Correlation - Indicates the CorrelationScheme property is set. The value is 128. + // - Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + // - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + // - ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + // - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The value is 2048. + // - MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + // - MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is 8192. + // - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + Flags *string `json:"Flags,omitempty"` + // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // CorrelationScheme - The correlation scheme. + CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` + // LoadMetrics - The service load metrics. + LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` + // ServicePlacementPolicies - The service placement policies. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // DefaultMoveCost - The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + DefaultMoveCost MoveCost `json:"DefaultMoveCost,omitempty"` + // ScalingPolicies - Scaling policies for this service. + ScalingPolicies *[]ScalingPolicyDescription `json:"ScalingPolicies,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateful', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateless' + ServiceKind ServiceKindBasicServiceUpdateDescription `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatefulServiceUpdateDescription. +func (ssud StatefulServiceUpdateDescription) MarshalJSON() ([]byte, error) { + ssud.ServiceKind = ServiceKindBasicServiceUpdateDescriptionServiceKindStateful + objectMap := make(map[string]interface{}) + if ssud.TargetReplicaSetSize != nil { + objectMap["TargetReplicaSetSize"] = ssud.TargetReplicaSetSize + } + if ssud.MinReplicaSetSize != nil { + objectMap["MinReplicaSetSize"] = ssud.MinReplicaSetSize + } + if ssud.ReplicaRestartWaitDurationSeconds != nil { + objectMap["ReplicaRestartWaitDurationSeconds"] = ssud.ReplicaRestartWaitDurationSeconds + } + if ssud.QuorumLossWaitDurationSeconds != nil { + objectMap["QuorumLossWaitDurationSeconds"] = ssud.QuorumLossWaitDurationSeconds + } + if ssud.StandByReplicaKeepDurationSeconds != nil { + objectMap["StandByReplicaKeepDurationSeconds"] = ssud.StandByReplicaKeepDurationSeconds + } + if ssud.ServicePlacementTimeLimitSeconds != nil { + objectMap["ServicePlacementTimeLimitSeconds"] = ssud.ServicePlacementTimeLimitSeconds + } + if ssud.Flags != nil { + objectMap["Flags"] = ssud.Flags + } + if ssud.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = ssud.PlacementConstraints + } + if ssud.CorrelationScheme != nil { + objectMap["CorrelationScheme"] = ssud.CorrelationScheme + } + if ssud.LoadMetrics != nil { + objectMap["LoadMetrics"] = ssud.LoadMetrics + } + if ssud.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = ssud.ServicePlacementPolicies + } + if ssud.DefaultMoveCost != "" { + objectMap["DefaultMoveCost"] = ssud.DefaultMoveCost + } + if ssud.ScalingPolicies != nil { + objectMap["ScalingPolicies"] = ssud.ScalingPolicies + } + if ssud.ServiceKind != "" { + objectMap["ServiceKind"] = ssud.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. +func (ssud StatefulServiceUpdateDescription) AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) { + return &ssud, true +} + +// AsStatelessServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. +func (ssud StatefulServiceUpdateDescription) AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) { + return nil, false +} + +// AsServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. +func (ssud StatefulServiceUpdateDescription) AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) { + return nil, false +} + +// AsBasicServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatefulServiceUpdateDescription. +func (ssud StatefulServiceUpdateDescription) AsBasicServiceUpdateDescription() (BasicServiceUpdateDescription, bool) { + return &ssud, true +} + +// UnmarshalJSON is the custom unmarshaler for StatefulServiceUpdateDescription struct. +func (ssud *StatefulServiceUpdateDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "TargetReplicaSetSize": + if v != nil { + var targetReplicaSetSize int32 + err = json.Unmarshal(*v, &targetReplicaSetSize) + if err != nil { + return err + } + ssud.TargetReplicaSetSize = &targetReplicaSetSize + } + case "MinReplicaSetSize": + if v != nil { + var minReplicaSetSize int32 + err = json.Unmarshal(*v, &minReplicaSetSize) + if err != nil { + return err + } + ssud.MinReplicaSetSize = &minReplicaSetSize + } + case "ReplicaRestartWaitDurationSeconds": + if v != nil { + var replicaRestartWaitDurationSeconds string + err = json.Unmarshal(*v, &replicaRestartWaitDurationSeconds) + if err != nil { + return err + } + ssud.ReplicaRestartWaitDurationSeconds = &replicaRestartWaitDurationSeconds + } + case "QuorumLossWaitDurationSeconds": + if v != nil { + var quorumLossWaitDurationSeconds string + err = json.Unmarshal(*v, &quorumLossWaitDurationSeconds) + if err != nil { + return err + } + ssud.QuorumLossWaitDurationSeconds = &quorumLossWaitDurationSeconds + } + case "StandByReplicaKeepDurationSeconds": + if v != nil { + var standByReplicaKeepDurationSeconds string + err = json.Unmarshal(*v, &standByReplicaKeepDurationSeconds) + if err != nil { + return err + } + ssud.StandByReplicaKeepDurationSeconds = &standByReplicaKeepDurationSeconds + } + case "ServicePlacementTimeLimitSeconds": + if v != nil { + var servicePlacementTimeLimitSeconds string + err = json.Unmarshal(*v, &servicePlacementTimeLimitSeconds) + if err != nil { + return err + } + ssud.ServicePlacementTimeLimitSeconds = &servicePlacementTimeLimitSeconds + } + case "Flags": + if v != nil { + var flags string + err = json.Unmarshal(*v, &flags) + if err != nil { + return err + } + ssud.Flags = &flags + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + ssud.PlacementConstraints = &placementConstraints + } + case "CorrelationScheme": + if v != nil { + var correlationScheme []ServiceCorrelationDescription + err = json.Unmarshal(*v, &correlationScheme) + if err != nil { + return err + } + ssud.CorrelationScheme = &correlationScheme + } + case "LoadMetrics": + if v != nil { + var loadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &loadMetrics) + if err != nil { + return err + } + ssud.LoadMetrics = &loadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + ssud.ServicePlacementPolicies = &servicePlacementPolicies + } + case "DefaultMoveCost": + if v != nil { + var defaultMoveCost MoveCost + err = json.Unmarshal(*v, &defaultMoveCost) + if err != nil { + return err + } + ssud.DefaultMoveCost = defaultMoveCost + } + case "ScalingPolicies": + if v != nil { + var scalingPolicies []ScalingPolicyDescription + err = json.Unmarshal(*v, &scalingPolicies) + if err != nil { + return err + } + ssud.ScalingPolicies = &scalingPolicies + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServiceUpdateDescription + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + ssud.ServiceKind = serviceKind + } + } + } + + return nil +} + +// StatelessReplicaHealthReportExpiredEvent stateless Replica Health Report Expired event. +type StatelessReplicaHealthReportExpiredEvent struct { + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *int64 `json:"ReplicaId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) MarshalJSON() ([]byte, error) { + srhree.Kind = KindStatelessReplicaHealthReportExpired + objectMap := make(map[string]interface{}) + if srhree.SourceID != nil { + objectMap["SourceId"] = srhree.SourceID + } + if srhree.Property != nil { + objectMap["Property"] = srhree.Property + } + if srhree.HealthState != nil { + objectMap["HealthState"] = srhree.HealthState + } + if srhree.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = srhree.TimeToLiveMs + } + if srhree.SequenceNumber != nil { + objectMap["SequenceNumber"] = srhree.SequenceNumber + } + if srhree.Description != nil { + objectMap["Description"] = srhree.Description + } + if srhree.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = srhree.RemoveWhenExpired + } + if srhree.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = srhree.SourceUtcTimestamp + } + if srhree.PartitionID != nil { + objectMap["PartitionId"] = srhree.PartitionID + } + if srhree.ReplicaID != nil { + objectMap["ReplicaId"] = srhree.ReplicaID + } + if srhree.EventInstanceID != nil { + objectMap["EventInstanceId"] = srhree.EventInstanceID + } + if srhree.Category != nil { + objectMap["Category"] = srhree.Category + } + if srhree.TimeStamp != nil { + objectMap["TimeStamp"] = srhree.TimeStamp + } + if srhree.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = srhree.HasCorrelatedEvents + } + if srhree.Kind != "" { + objectMap["Kind"] = srhree.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return &srhree, true +} + +// AsServiceEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return &srhree, true +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for StatelessReplicaHealthReportExpiredEvent. +func (srhree StatelessReplicaHealthReportExpiredEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &srhree, true +} + +// StatelessReplicaNewHealthReportEvent stateless Replica Health Report Created event. +type StatelessReplicaNewHealthReportEvent struct { + // SourceID - Id of report source. + SourceID *string `json:"SourceId,omitempty"` + // Property - Describes the property. + Property *string `json:"Property,omitempty"` + // HealthState - Describes the property health state. + HealthState *string `json:"HealthState,omitempty"` + // TimeToLiveMs - Time to live in milli-seconds. + TimeToLiveMs *int64 `json:"TimeToLiveMs,omitempty"` + // SequenceNumber - Sequence number of report. + SequenceNumber *int64 `json:"SequenceNumber,omitempty"` + // Description - Description of report. + Description *string `json:"Description,omitempty"` + // RemoveWhenExpired - Indicates the removal when it expires. + RemoveWhenExpired *bool `json:"RemoveWhenExpired,omitempty"` + // SourceUtcTimestamp - Source time. + SourceUtcTimestamp *date.Time `json:"SourceUtcTimestamp,omitempty"` + // PartitionID - An internal ID used by Service Fabric to uniquely identify a partition. This is a randomly generated GUID when the service was created. The partition ID is unique and does not change for the lifetime of the service. If the same service was deleted and recreated the IDs of its partitions would be different. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ReplicaID - Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a replica gets dropped and another replica gets created on the same node for the same partition, it will get a different value for the id. Sometimes the id of a stateless service instance is also referred as a replica id. + ReplicaID *int64 `json:"ReplicaId,omitempty"` + // EventInstanceID - The identifier for the FabricEvent instance. + EventInstanceID *uuid.UUID `json:"EventInstanceId,omitempty"` + // Category - The category of event. + Category *string `json:"Category,omitempty"` + // TimeStamp - The time event was logged. + TimeStamp *date.Time `json:"TimeStamp,omitempty"` + // HasCorrelatedEvents - Shows there is existing related events available. + HasCorrelatedEvents *bool `json:"HasCorrelatedEvents,omitempty"` + // Kind - Possible values include: 'KindFabricEvent', 'KindApplicationEvent', 'KindClusterEvent', 'KindContainerInstanceEvent', 'KindNodeEvent', 'KindPartitionAnalysisEvent', 'KindPartitionEvent', 'KindReplicaEvent', 'KindServiceEvent', 'KindApplicationCreated', 'KindApplicationDeleted', 'KindApplicationNewHealthReport', 'KindApplicationHealthReportExpired', 'KindApplicationUpgradeCompleted', 'KindApplicationUpgradeDomainCompleted', 'KindApplicationUpgradeRollbackCompleted', 'KindApplicationUpgradeRollbackStarted', 'KindApplicationUpgradeStarted', 'KindDeployedApplicationNewHealthReport', 'KindDeployedApplicationHealthReportExpired', 'KindApplicationProcessExited', 'KindApplicationContainerInstanceExited', 'KindNodeAborted', 'KindNodeAddedToCluster', 'KindNodeClosed', 'KindNodeDeactivateCompleted', 'KindNodeDeactivateStarted', 'KindNodeDown', 'KindNodeNewHealthReport', 'KindNodeHealthReportExpired', 'KindNodeOpenSucceeded', 'KindNodeOpenFailed', 'KindNodeRemovedFromCluster', 'KindNodeUp', 'KindPartitionNewHealthReport', 'KindPartitionHealthReportExpired', 'KindPartitionReconfigured', 'KindPartitionPrimaryMoveAnalysis', 'KindServiceCreated', 'KindServiceDeleted', 'KindServiceNewHealthReport', 'KindServiceHealthReportExpired', 'KindDeployedServicePackageNewHealthReport', 'KindDeployedServicePackageHealthReportExpired', 'KindStatefulReplicaNewHealthReport', 'KindStatefulReplicaHealthReportExpired', 'KindStatelessReplicaNewHealthReport', 'KindStatelessReplicaHealthReportExpired', 'KindClusterNewHealthReport', 'KindClusterHealthReportExpired', 'KindClusterUpgradeCompleted', 'KindClusterUpgradeDomainCompleted', 'KindClusterUpgradeRollbackCompleted', 'KindClusterUpgradeRollbackStarted', 'KindClusterUpgradeStarted', 'KindChaosStopped', 'KindChaosStarted', 'KindChaosCodePackageRestartScheduled', 'KindChaosReplicaRemovalScheduled', 'KindChaosPartitionSecondaryMoveScheduled', 'KindChaosPartitionPrimaryMoveScheduled', 'KindChaosReplicaRestartScheduled', 'KindChaosNodeRestartScheduled' + Kind KindBasicFabricEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) MarshalJSON() ([]byte, error) { + srnhre.Kind = KindStatelessReplicaNewHealthReport + objectMap := make(map[string]interface{}) + if srnhre.SourceID != nil { + objectMap["SourceId"] = srnhre.SourceID + } + if srnhre.Property != nil { + objectMap["Property"] = srnhre.Property + } + if srnhre.HealthState != nil { + objectMap["HealthState"] = srnhre.HealthState + } + if srnhre.TimeToLiveMs != nil { + objectMap["TimeToLiveMs"] = srnhre.TimeToLiveMs + } + if srnhre.SequenceNumber != nil { + objectMap["SequenceNumber"] = srnhre.SequenceNumber + } + if srnhre.Description != nil { + objectMap["Description"] = srnhre.Description + } + if srnhre.RemoveWhenExpired != nil { + objectMap["RemoveWhenExpired"] = srnhre.RemoveWhenExpired + } + if srnhre.SourceUtcTimestamp != nil { + objectMap["SourceUtcTimestamp"] = srnhre.SourceUtcTimestamp + } + if srnhre.PartitionID != nil { + objectMap["PartitionId"] = srnhre.PartitionID + } + if srnhre.ReplicaID != nil { + objectMap["ReplicaId"] = srnhre.ReplicaID + } + if srnhre.EventInstanceID != nil { + objectMap["EventInstanceId"] = srnhre.EventInstanceID + } + if srnhre.Category != nil { + objectMap["Category"] = srnhre.Category + } + if srnhre.TimeStamp != nil { + objectMap["TimeStamp"] = srnhre.TimeStamp + } + if srnhre.HasCorrelatedEvents != nil { + objectMap["HasCorrelatedEvents"] = srnhre.HasCorrelatedEvents + } + if srnhre.Kind != "" { + objectMap["Kind"] = srnhre.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationEvent() (*ApplicationEvent, bool) { + return nil, false +} + +// AsBasicApplicationEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicApplicationEvent() (BasicApplicationEvent, bool) { + return nil, false +} + +// AsClusterEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterEvent() (*ClusterEvent, bool) { + return nil, false +} + +// AsBasicClusterEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicClusterEvent() (BasicClusterEvent, bool) { + return nil, false +} + +// AsContainerInstanceEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsContainerInstanceEvent() (*ContainerInstanceEvent, bool) { + return nil, false +} + +// AsNodeEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeEvent() (*NodeEvent, bool) { + return nil, false +} + +// AsBasicNodeEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicNodeEvent() (BasicNodeEvent, bool) { + return nil, false +} + +// AsPartitionAnalysisEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsPartitionAnalysisEvent() (*PartitionAnalysisEvent, bool) { + return nil, false +} + +// AsBasicPartitionAnalysisEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicPartitionAnalysisEvent() (BasicPartitionAnalysisEvent, bool) { + return nil, false +} + +// AsPartitionEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsPartitionEvent() (*PartitionEvent, bool) { + return nil, false +} + +// AsBasicPartitionEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicPartitionEvent() (BasicPartitionEvent, bool) { + return nil, false +} + +// AsReplicaEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsReplicaEvent() (*ReplicaEvent, bool) { + return nil, false +} + +// AsBasicReplicaEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicReplicaEvent() (BasicReplicaEvent, bool) { + return &srnhre, true +} + +// AsServiceEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsServiceEvent() (*ServiceEvent, bool) { + return nil, false +} + +// AsBasicServiceEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicServiceEvent() (BasicServiceEvent, bool) { + return nil, false +} + +// AsApplicationCreatedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationCreatedEvent() (*ApplicationCreatedEvent, bool) { + return nil, false +} + +// AsApplicationDeletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationDeletedEvent() (*ApplicationDeletedEvent, bool) { + return nil, false +} + +// AsApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationNewHealthReportEvent() (*ApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationHealthReportExpiredEvent() (*ApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationUpgradeCompletedEvent() (*ApplicationUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationUpgradeDomainCompletedEvent() (*ApplicationUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationUpgradeRollbackCompletedEvent() (*ApplicationUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationUpgradeRollbackStartedEvent() (*ApplicationUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsApplicationUpgradeStartedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationUpgradeStartedEvent() (*ApplicationUpgradeStartedEvent, bool) { + return nil, false +} + +// AsDeployedApplicationNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsDeployedApplicationNewHealthReportEvent() (*DeployedApplicationNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedApplicationHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsDeployedApplicationHealthReportExpiredEvent() (*DeployedApplicationHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsApplicationProcessExitedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationProcessExitedEvent() (*ApplicationProcessExitedEvent, bool) { + return nil, false +} + +// AsApplicationContainerInstanceExitedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsApplicationContainerInstanceExitedEvent() (*ApplicationContainerInstanceExitedEvent, bool) { + return nil, false +} + +// AsNodeAbortedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeAbortedEvent() (*NodeAbortedEvent, bool) { + return nil, false +} + +// AsNodeAddedToClusterEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeAddedToClusterEvent() (*NodeAddedToClusterEvent, bool) { + return nil, false +} + +// AsNodeClosedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeClosedEvent() (*NodeClosedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeDeactivateCompletedEvent() (*NodeDeactivateCompletedEvent, bool) { + return nil, false +} + +// AsNodeDeactivateStartedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeDeactivateStartedEvent() (*NodeDeactivateStartedEvent, bool) { + return nil, false +} + +// AsNodeDownEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeDownEvent() (*NodeDownEvent, bool) { + return nil, false +} + +// AsNodeNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeNewHealthReportEvent() (*NodeNewHealthReportEvent, bool) { + return nil, false +} + +// AsNodeHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeHealthReportExpiredEvent() (*NodeHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsNodeOpenSucceededEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeOpenSucceededEvent() (*NodeOpenSucceededEvent, bool) { + return nil, false +} + +// AsNodeOpenFailedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeOpenFailedEvent() (*NodeOpenFailedEvent, bool) { + return nil, false +} + +// AsNodeRemovedFromClusterEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeRemovedFromClusterEvent() (*NodeRemovedFromClusterEvent, bool) { + return nil, false +} + +// AsNodeUpEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsNodeUpEvent() (*NodeUpEvent, bool) { + return nil, false +} + +// AsPartitionNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsPartitionNewHealthReportEvent() (*PartitionNewHealthReportEvent, bool) { + return nil, false +} + +// AsPartitionHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsPartitionHealthReportExpiredEvent() (*PartitionHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsPartitionReconfiguredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsPartitionReconfiguredEvent() (*PartitionReconfiguredEvent, bool) { + return nil, false +} + +// AsPartitionPrimaryMoveAnalysisEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsPartitionPrimaryMoveAnalysisEvent() (*PartitionPrimaryMoveAnalysisEvent, bool) { + return nil, false +} + +// AsServiceCreatedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsServiceCreatedEvent() (*ServiceCreatedEvent, bool) { + return nil, false +} + +// AsServiceDeletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsServiceDeletedEvent() (*ServiceDeletedEvent, bool) { + return nil, false +} + +// AsServiceNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsServiceNewHealthReportEvent() (*ServiceNewHealthReportEvent, bool) { + return nil, false +} + +// AsServiceHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsServiceHealthReportExpiredEvent() (*ServiceHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsDeployedServicePackageNewHealthReportEvent() (*DeployedServicePackageNewHealthReportEvent, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsDeployedServicePackageHealthReportExpiredEvent() (*DeployedServicePackageHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatefulReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsStatefulReplicaNewHealthReportEvent() (*StatefulReplicaNewHealthReportEvent, bool) { + return nil, false +} + +// AsStatefulReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsStatefulReplicaHealthReportExpiredEvent() (*StatefulReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsStatelessReplicaNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsStatelessReplicaNewHealthReportEvent() (*StatelessReplicaNewHealthReportEvent, bool) { + return &srnhre, true +} + +// AsStatelessReplicaHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsStatelessReplicaHealthReportExpiredEvent() (*StatelessReplicaHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterNewHealthReportEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterNewHealthReportEvent() (*ClusterNewHealthReportEvent, bool) { + return nil, false +} + +// AsClusterHealthReportExpiredEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterHealthReportExpiredEvent() (*ClusterHealthReportExpiredEvent, bool) { + return nil, false +} + +// AsClusterUpgradeCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterUpgradeCompletedEvent() (*ClusterUpgradeCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeDomainCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterUpgradeDomainCompletedEvent() (*ClusterUpgradeDomainCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackCompletedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterUpgradeRollbackCompletedEvent() (*ClusterUpgradeRollbackCompletedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeRollbackStartedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterUpgradeRollbackStartedEvent() (*ClusterUpgradeRollbackStartedEvent, bool) { + return nil, false +} + +// AsClusterUpgradeStartedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsClusterUpgradeStartedEvent() (*ClusterUpgradeStartedEvent, bool) { + return nil, false +} + +// AsChaosStoppedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosStoppedEvent() (*ChaosStoppedEvent, bool) { + return nil, false +} + +// AsChaosStartedEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosStartedEvent() (*ChaosStartedEvent, bool) { + return nil, false +} + +// AsChaosCodePackageRestartScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosCodePackageRestartScheduledEvent() (*ChaosCodePackageRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRemovalScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosReplicaRemovalScheduledEvent() (*ChaosReplicaRemovalScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionSecondaryMoveScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosPartitionSecondaryMoveScheduledEvent() (*ChaosPartitionSecondaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosPartitionPrimaryMoveScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosPartitionPrimaryMoveScheduledEvent() (*ChaosPartitionPrimaryMoveScheduledEvent, bool) { + return nil, false +} + +// AsChaosReplicaRestartScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosReplicaRestartScheduledEvent() (*ChaosReplicaRestartScheduledEvent, bool) { + return nil, false +} + +// AsChaosNodeRestartScheduledEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsChaosNodeRestartScheduledEvent() (*ChaosNodeRestartScheduledEvent, bool) { + return nil, false +} + +// AsFabricEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsFabricEvent() (*FabricEvent, bool) { + return nil, false +} + +// AsBasicFabricEvent is the BasicFabricEvent implementation for StatelessReplicaNewHealthReportEvent. +func (srnhre StatelessReplicaNewHealthReportEvent) AsBasicFabricEvent() (BasicFabricEvent, bool) { + return &srnhre, true +} + +// StatelessServiceDescription describes a stateless service. +type StatelessServiceDescription struct { + // InstanceCount - The instance count. + InstanceCount *int32 `json:"InstanceCount,omitempty"` + // MinInstanceCount - MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + // The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). + // Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + MinInstanceCount *int32 `json:"MinInstanceCount,omitempty"` + // MinInstancePercentage - MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + // The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). + // Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + MinInstancePercentage *int32 `json:"MinInstancePercentage,omitempty"` + // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. + // This property can be a combination of those flags obtained using bitwise 'OR' operator. + // For example, if the provided value is 1 then the flags for InstanceCloseDelayDuration is set. + // - None - Does not indicate any other properties are set. The value is zero. + // - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 1. + Flags *int32 `json:"Flags,omitempty"` + // InstanceCloseDelayDurationSeconds - Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade and disabling node. + // The endpoint exposed on this instance is removed prior to starting the delay, which prevents new connections to this instance. + // In addition, clients that have subscribed to service endpoint change events(https://docs.microsoft.com/en-us/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), can do + // the following upon receiving the endpoint removal notification: + // - Stop sending new requests to this instance. + // - Close existing connections after in-flight requests have completed. + // - Connect to a different instance of the service partition for future requests. + // Note, the default value of InstanceCloseDelayDuration is 0, which indicates that there won't be any delay or removal of the endpoint prior to closing the instance. + InstanceCloseDelayDurationSeconds *int64 `json:"InstanceCloseDelayDurationSeconds,omitempty"` + // ApplicationName - The name of the application, including the 'fabric:' URI scheme. + ApplicationName *string `json:"ApplicationName,omitempty"` + // ServiceName - The full name of the service with 'fabric:' URI scheme. + ServiceName *string `json:"ServiceName,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // InitializationData - The initialization data as an array of bytes. Initialization data is passed to service instances or replicas when they are created. + InitializationData *[]int32 `json:"InitializationData,omitempty"` + // PartitionDescription - The partition description as an object. + PartitionDescription BasicPartitionSchemeDescription `json:"PartitionDescription,omitempty"` + // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // CorrelationScheme - The correlation scheme. + CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` + // ServiceLoadMetrics - The service load metrics. + ServiceLoadMetrics *[]ServiceLoadMetricDescription `json:"ServiceLoadMetrics,omitempty"` + // ServicePlacementPolicies - The service placement policies. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // DefaultMoveCost - The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + DefaultMoveCost MoveCost `json:"DefaultMoveCost,omitempty"` + // IsDefaultMoveCostSpecified - Indicates if the DefaultMoveCost property is specified. + IsDefaultMoveCostSpecified *bool `json:"IsDefaultMoveCostSpecified,omitempty"` + // ServicePackageActivationMode - The activation mode of service package to be used for a service. Possible values include: 'SharedProcess', 'ExclusiveProcess' + ServicePackageActivationMode ServicePackageActivationMode `json:"ServicePackageActivationMode,omitempty"` + // ServiceDNSName - The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster. + ServiceDNSName *string `json:"ServiceDnsName,omitempty"` + // ScalingPolicies - Scaling policies for this service. + ScalingPolicies *[]ScalingPolicyDescription `json:"ScalingPolicies,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceDescriptionServiceKindServiceDescription', 'ServiceKindBasicServiceDescriptionServiceKindStateful', 'ServiceKindBasicServiceDescriptionServiceKindStateless' + ServiceKind ServiceKindBasicServiceDescription `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServiceDescription. +func (ssd StatelessServiceDescription) MarshalJSON() ([]byte, error) { + ssd.ServiceKind = ServiceKindBasicServiceDescriptionServiceKindStateless + objectMap := make(map[string]interface{}) + if ssd.InstanceCount != nil { + objectMap["InstanceCount"] = ssd.InstanceCount + } + if ssd.MinInstanceCount != nil { + objectMap["MinInstanceCount"] = ssd.MinInstanceCount + } + if ssd.MinInstancePercentage != nil { + objectMap["MinInstancePercentage"] = ssd.MinInstancePercentage + } + if ssd.Flags != nil { + objectMap["Flags"] = ssd.Flags + } + if ssd.InstanceCloseDelayDurationSeconds != nil { + objectMap["InstanceCloseDelayDurationSeconds"] = ssd.InstanceCloseDelayDurationSeconds + } + if ssd.ApplicationName != nil { + objectMap["ApplicationName"] = ssd.ApplicationName + } + if ssd.ServiceName != nil { + objectMap["ServiceName"] = ssd.ServiceName + } + if ssd.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = ssd.ServiceTypeName + } + if ssd.InitializationData != nil { + objectMap["InitializationData"] = ssd.InitializationData + } + objectMap["PartitionDescription"] = ssd.PartitionDescription + if ssd.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = ssd.PlacementConstraints + } + if ssd.CorrelationScheme != nil { + objectMap["CorrelationScheme"] = ssd.CorrelationScheme + } + if ssd.ServiceLoadMetrics != nil { + objectMap["ServiceLoadMetrics"] = ssd.ServiceLoadMetrics + } + if ssd.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = ssd.ServicePlacementPolicies + } + if ssd.DefaultMoveCost != "" { + objectMap["DefaultMoveCost"] = ssd.DefaultMoveCost + } + if ssd.IsDefaultMoveCostSpecified != nil { + objectMap["IsDefaultMoveCostSpecified"] = ssd.IsDefaultMoveCostSpecified + } + if ssd.ServicePackageActivationMode != "" { + objectMap["ServicePackageActivationMode"] = ssd.ServicePackageActivationMode + } + if ssd.ServiceDNSName != nil { + objectMap["ServiceDnsName"] = ssd.ServiceDNSName + } + if ssd.ScalingPolicies != nil { + objectMap["ScalingPolicies"] = ssd.ScalingPolicies + } + if ssd.ServiceKind != "" { + objectMap["ServiceKind"] = ssd.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. +func (ssd StatelessServiceDescription) AsStatefulServiceDescription() (*StatefulServiceDescription, bool) { + return nil, false +} + +// AsStatelessServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. +func (ssd StatelessServiceDescription) AsStatelessServiceDescription() (*StatelessServiceDescription, bool) { + return &ssd, true +} + +// AsServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. +func (ssd StatelessServiceDescription) AsServiceDescription() (*ServiceDescription, bool) { + return nil, false +} + +// AsBasicServiceDescription is the BasicServiceDescription implementation for StatelessServiceDescription. +func (ssd StatelessServiceDescription) AsBasicServiceDescription() (BasicServiceDescription, bool) { + return &ssd, true +} + +// UnmarshalJSON is the custom unmarshaler for StatelessServiceDescription struct. +func (ssd *StatelessServiceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "InstanceCount": + if v != nil { + var instanceCount int32 + err = json.Unmarshal(*v, &instanceCount) + if err != nil { + return err + } + ssd.InstanceCount = &instanceCount + } + case "MinInstanceCount": + if v != nil { + var minInstanceCount int32 + err = json.Unmarshal(*v, &minInstanceCount) + if err != nil { + return err + } + ssd.MinInstanceCount = &minInstanceCount + } + case "MinInstancePercentage": + if v != nil { + var minInstancePercentage int32 + err = json.Unmarshal(*v, &minInstancePercentage) + if err != nil { + return err + } + ssd.MinInstancePercentage = &minInstancePercentage + } + case "Flags": + if v != nil { + var flags int32 + err = json.Unmarshal(*v, &flags) + if err != nil { + return err + } + ssd.Flags = &flags + } + case "InstanceCloseDelayDurationSeconds": + if v != nil { + var instanceCloseDelayDurationSeconds int64 + err = json.Unmarshal(*v, &instanceCloseDelayDurationSeconds) + if err != nil { + return err + } + ssd.InstanceCloseDelayDurationSeconds = &instanceCloseDelayDurationSeconds + } + case "ApplicationName": + if v != nil { + var applicationName string + err = json.Unmarshal(*v, &applicationName) + if err != nil { + return err + } + ssd.ApplicationName = &applicationName + } + case "ServiceName": + if v != nil { + var serviceName string + err = json.Unmarshal(*v, &serviceName) + if err != nil { + return err + } + ssd.ServiceName = &serviceName + } + case "ServiceTypeName": + if v != nil { + var serviceTypeName string + err = json.Unmarshal(*v, &serviceTypeName) + if err != nil { + return err + } + ssd.ServiceTypeName = &serviceTypeName + } + case "InitializationData": + if v != nil { + var initializationData []int32 + err = json.Unmarshal(*v, &initializationData) + if err != nil { + return err + } + ssd.InitializationData = &initializationData + } + case "PartitionDescription": + if v != nil { + partitionDescription, err := unmarshalBasicPartitionSchemeDescription(*v) + if err != nil { + return err + } + ssd.PartitionDescription = partitionDescription + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + ssd.PlacementConstraints = &placementConstraints + } + case "CorrelationScheme": + if v != nil { + var correlationScheme []ServiceCorrelationDescription + err = json.Unmarshal(*v, &correlationScheme) + if err != nil { + return err + } + ssd.CorrelationScheme = &correlationScheme + } + case "ServiceLoadMetrics": + if v != nil { + var serviceLoadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &serviceLoadMetrics) + if err != nil { + return err + } + ssd.ServiceLoadMetrics = &serviceLoadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + ssd.ServicePlacementPolicies = &servicePlacementPolicies + } + case "DefaultMoveCost": + if v != nil { + var defaultMoveCost MoveCost + err = json.Unmarshal(*v, &defaultMoveCost) + if err != nil { + return err + } + ssd.DefaultMoveCost = defaultMoveCost + } + case "IsDefaultMoveCostSpecified": + if v != nil { + var isDefaultMoveCostSpecified bool + err = json.Unmarshal(*v, &isDefaultMoveCostSpecified) + if err != nil { + return err + } + ssd.IsDefaultMoveCostSpecified = &isDefaultMoveCostSpecified + } + case "ServicePackageActivationMode": + if v != nil { + var servicePackageActivationMode ServicePackageActivationMode + err = json.Unmarshal(*v, &servicePackageActivationMode) + if err != nil { + return err + } + ssd.ServicePackageActivationMode = servicePackageActivationMode + } + case "ServiceDnsName": + if v != nil { + var serviceDNSName string + err = json.Unmarshal(*v, &serviceDNSName) + if err != nil { + return err + } + ssd.ServiceDNSName = &serviceDNSName + } + case "ScalingPolicies": + if v != nil { + var scalingPolicies []ScalingPolicyDescription + err = json.Unmarshal(*v, &scalingPolicies) + if err != nil { + return err + } + ssd.ScalingPolicies = &scalingPolicies + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServiceDescription + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + ssd.ServiceKind = serviceKind + } + } + } + + return nil +} + +// StatelessServiceInfo information about a stateless Service Fabric service. +type StatelessServiceInfo struct { + // ID - The identity of the service. This ID is an encoded representation of the service name. This is used in the REST APIs to identify the service resource. + // Starting in version 6.0, hierarchical names are delimited with the "\~" character. For example, if the service name is "fabric:/myapp/app1/svc1", + // the service identity would be "myapp~app1\~svc1" in 6.0+ and "myapp/app1/svc1" in previous versions. + ID *string `json:"Id,omitempty"` + // Name - The full name of the service with 'fabric:' URI scheme. + Name *string `json:"Name,omitempty"` + // TypeName - Name of the service type as specified in the service manifest. + TypeName *string `json:"TypeName,omitempty"` + // ManifestVersion - The version of the service manifest. + ManifestVersion *string `json:"ManifestVersion,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // ServiceStatus - The status of the application. Possible values include: 'ServiceStatusUnknown', 'ServiceStatusActive', 'ServiceStatusUpgrading', 'ServiceStatusDeleting', 'ServiceStatusCreating', 'ServiceStatusFailed' + ServiceStatus ServiceStatus `json:"ServiceStatus,omitempty"` + // IsServiceGroup - Whether the service is in a service group. + IsServiceGroup *bool `json:"IsServiceGroup,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceInfoServiceKindServiceInfo', 'ServiceKindBasicServiceInfoServiceKindStateful', 'ServiceKindBasicServiceInfoServiceKindStateless' + ServiceKind ServiceKindBasicServiceInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServiceInfo. +func (ssi StatelessServiceInfo) MarshalJSON() ([]byte, error) { + ssi.ServiceKind = ServiceKindBasicServiceInfoServiceKindStateless + objectMap := make(map[string]interface{}) + if ssi.ID != nil { + objectMap["Id"] = ssi.ID + } + if ssi.Name != nil { + objectMap["Name"] = ssi.Name + } + if ssi.TypeName != nil { + objectMap["TypeName"] = ssi.TypeName + } + if ssi.ManifestVersion != nil { + objectMap["ManifestVersion"] = ssi.ManifestVersion + } + if ssi.HealthState != "" { + objectMap["HealthState"] = ssi.HealthState + } + if ssi.ServiceStatus != "" { + objectMap["ServiceStatus"] = ssi.ServiceStatus + } + if ssi.IsServiceGroup != nil { + objectMap["IsServiceGroup"] = ssi.IsServiceGroup + } + if ssi.ServiceKind != "" { + objectMap["ServiceKind"] = ssi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. +func (ssi StatelessServiceInfo) AsStatefulServiceInfo() (*StatefulServiceInfo, bool) { + return nil, false +} + +// AsStatelessServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. +func (ssi StatelessServiceInfo) AsStatelessServiceInfo() (*StatelessServiceInfo, bool) { + return &ssi, true +} + +// AsServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. +func (ssi StatelessServiceInfo) AsServiceInfo() (*ServiceInfo, bool) { + return nil, false +} + +// AsBasicServiceInfo is the BasicServiceInfo implementation for StatelessServiceInfo. +func (ssi StatelessServiceInfo) AsBasicServiceInfo() (BasicServiceInfo, bool) { + return &ssi, true +} + +// StatelessServiceInstanceHealth represents the health of the stateless service instance. +// Contains the instance aggregated health state, the health events and the unhealthy evaluations. +type StatelessServiceInstanceHealth struct { + // InstanceID - Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely identify an instance of a partition of a stateless service. It is unique within a partition and does not change for the lifetime of the instance. If the instance has failed over on the same or different node, it will get a different value for the InstanceId. + InstanceID *string `json:"InstanceId,omitempty"` + // PartitionID - Id of the partition to which this replica belongs. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthServiceKindReplicaHealth', 'ServiceKindBasicReplicaHealthServiceKindStateful', 'ServiceKindBasicReplicaHealthServiceKindStateless' + ServiceKind ServiceKindBasicReplicaHealth `json:"ServiceKind,omitempty"` + // AggregatedHealthState - The HealthState representing the aggregated health state of the entity computed by Health Manager. + // The health evaluation of the entity reflects all events reported on the entity and its children (if any). + // The aggregation is done by applying the desired health policy. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // HealthEvents - The list of health events reported on the entity. + HealthEvents *[]HealthEvent `json:"HealthEvents,omitempty"` + // UnhealthyEvaluations - The unhealthy evaluations that show why the current aggregated health state was returned by Health Manager. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // HealthStatistics - Shows the health statistics for all children types of the queried entity. + HealthStatistics *HealthStatistics `json:"HealthStatistics,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServiceInstanceHealth. +func (ssih StatelessServiceInstanceHealth) MarshalJSON() ([]byte, error) { + ssih.ServiceKind = ServiceKindBasicReplicaHealthServiceKindStateless + objectMap := make(map[string]interface{}) + if ssih.InstanceID != nil { + objectMap["InstanceId"] = ssih.InstanceID + } + if ssih.PartitionID != nil { + objectMap["PartitionId"] = ssih.PartitionID + } + if ssih.ServiceKind != "" { + objectMap["ServiceKind"] = ssih.ServiceKind + } + if ssih.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = ssih.AggregatedHealthState + } + if ssih.HealthEvents != nil { + objectMap["HealthEvents"] = ssih.HealthEvents + } + if ssih.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = ssih.UnhealthyEvaluations + } + if ssih.HealthStatistics != nil { + objectMap["HealthStatistics"] = ssih.HealthStatistics + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. +func (ssih StatelessServiceInstanceHealth) AsStatefulServiceReplicaHealth() (*StatefulServiceReplicaHealth, bool) { + return nil, false +} + +// AsStatelessServiceInstanceHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. +func (ssih StatelessServiceInstanceHealth) AsStatelessServiceInstanceHealth() (*StatelessServiceInstanceHealth, bool) { + return &ssih, true +} + +// AsReplicaHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. +func (ssih StatelessServiceInstanceHealth) AsReplicaHealth() (*ReplicaHealth, bool) { + return nil, false +} + +// AsBasicReplicaHealth is the BasicReplicaHealth implementation for StatelessServiceInstanceHealth. +func (ssih StatelessServiceInstanceHealth) AsBasicReplicaHealth() (BasicReplicaHealth, bool) { + return &ssih, true +} + +// StatelessServiceInstanceHealthState represents the health state of the stateless service instance, which +// contains the instance ID and the aggregated health state. +type StatelessServiceInstanceHealthState struct { + // ReplicaID - Id of the stateless service instance on the wire this field is called ReplicaId. + ReplicaID *string `json:"ReplicaId,omitempty"` + // PartitionID - The ID of the partition to which this replica belongs. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaHealthStateServiceKindReplicaHealthState', 'ServiceKindBasicReplicaHealthStateServiceKindStateful', 'ServiceKindBasicReplicaHealthStateServiceKindStateless' + ServiceKind ServiceKindBasicReplicaHealthState `json:"ServiceKind,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServiceInstanceHealthState. +func (ssihs StatelessServiceInstanceHealthState) MarshalJSON() ([]byte, error) { + ssihs.ServiceKind = ServiceKindBasicReplicaHealthStateServiceKindStateless + objectMap := make(map[string]interface{}) + if ssihs.ReplicaID != nil { + objectMap["ReplicaId"] = ssihs.ReplicaID + } + if ssihs.PartitionID != nil { + objectMap["PartitionId"] = ssihs.PartitionID + } + if ssihs.ServiceKind != "" { + objectMap["ServiceKind"] = ssihs.ServiceKind + } + if ssihs.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = ssihs.AggregatedHealthState + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. +func (ssihs StatelessServiceInstanceHealthState) AsStatefulServiceReplicaHealthState() (*StatefulServiceReplicaHealthState, bool) { + return nil, false +} + +// AsStatelessServiceInstanceHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. +func (ssihs StatelessServiceInstanceHealthState) AsStatelessServiceInstanceHealthState() (*StatelessServiceInstanceHealthState, bool) { + return &ssihs, true +} + +// AsReplicaHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. +func (ssihs StatelessServiceInstanceHealthState) AsReplicaHealthState() (*ReplicaHealthState, bool) { + return nil, false +} + +// AsBasicReplicaHealthState is the BasicReplicaHealthState implementation for StatelessServiceInstanceHealthState. +func (ssihs StatelessServiceInstanceHealthState) AsBasicReplicaHealthState() (BasicReplicaHealthState, bool) { + return &ssihs, true +} + +// StatelessServiceInstanceInfo represents a stateless service instance. This includes information about +// the identity, status, health, node name, uptime, and other details about the instance. +type StatelessServiceInstanceInfo struct { + // InstanceID - Id of a stateless service instance. InstanceId is used by Service Fabric to uniquely identify an instance of a partition of a stateless service. It is unique within a partition and does not change for the lifetime of the instance. If the instance has failed over on the same or different node, it will get a different value for the InstanceId. + InstanceID *string `json:"InstanceId,omitempty"` + // ReplicaStatus - The status of a replica of a service. Possible values include: 'ReplicaStatusInvalid', 'ReplicaStatusInBuild', 'ReplicaStatusStandby', 'ReplicaStatusReady', 'ReplicaStatusDown', 'ReplicaStatusDropped' + ReplicaStatus ReplicaStatus `json:"ReplicaStatus,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // NodeName - The name of a Service Fabric node. + NodeName *string `json:"NodeName,omitempty"` + // Address - The address the replica is listening on. + Address *string `json:"Address,omitempty"` + // LastInBuildDurationInSeconds - The last in build duration of the replica in seconds. + LastInBuildDurationInSeconds *string `json:"LastInBuildDurationInSeconds,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicReplicaInfoServiceKindReplicaInfo', 'ServiceKindBasicReplicaInfoServiceKindStateful', 'ServiceKindBasicReplicaInfoServiceKindStateless' + ServiceKind ServiceKindBasicReplicaInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServiceInstanceInfo. +func (ssii StatelessServiceInstanceInfo) MarshalJSON() ([]byte, error) { + ssii.ServiceKind = ServiceKindBasicReplicaInfoServiceKindStateless + objectMap := make(map[string]interface{}) + if ssii.InstanceID != nil { + objectMap["InstanceId"] = ssii.InstanceID + } + if ssii.ReplicaStatus != "" { + objectMap["ReplicaStatus"] = ssii.ReplicaStatus + } + if ssii.HealthState != "" { + objectMap["HealthState"] = ssii.HealthState + } + if ssii.NodeName != nil { + objectMap["NodeName"] = ssii.NodeName + } + if ssii.Address != nil { + objectMap["Address"] = ssii.Address + } + if ssii.LastInBuildDurationInSeconds != nil { + objectMap["LastInBuildDurationInSeconds"] = ssii.LastInBuildDurationInSeconds + } + if ssii.ServiceKind != "" { + objectMap["ServiceKind"] = ssii.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceReplicaInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. +func (ssii StatelessServiceInstanceInfo) AsStatefulServiceReplicaInfo() (*StatefulServiceReplicaInfo, bool) { + return nil, false +} + +// AsStatelessServiceInstanceInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. +func (ssii StatelessServiceInstanceInfo) AsStatelessServiceInstanceInfo() (*StatelessServiceInstanceInfo, bool) { + return &ssii, true +} + +// AsReplicaInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. +func (ssii StatelessServiceInstanceInfo) AsReplicaInfo() (*ReplicaInfo, bool) { + return nil, false +} + +// AsBasicReplicaInfo is the BasicReplicaInfo implementation for StatelessServiceInstanceInfo. +func (ssii StatelessServiceInstanceInfo) AsBasicReplicaInfo() (BasicReplicaInfo, bool) { + return &ssii, true +} + +// StatelessServicePartitionInfo information about a partition of a stateless Service Fabric service. +type StatelessServicePartitionInfo struct { + // InstanceCount - Number of instances of this partition. + InstanceCount *int64 `json:"InstanceCount,omitempty"` + // MinInstanceCount - MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + // The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). + // Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + MinInstanceCount *int32 `json:"MinInstanceCount,omitempty"` + // MinInstancePercentage - MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + // The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). + // Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + MinInstancePercentage *int32 `json:"MinInstancePercentage,omitempty"` + // HealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + HealthState HealthState `json:"HealthState,omitempty"` + // PartitionStatus - The status of the service fabric service partition. Possible values include: 'ServicePartitionStatusInvalid', 'ServicePartitionStatusReady', 'ServicePartitionStatusNotReady', 'ServicePartitionStatusInQuorumLoss', 'ServicePartitionStatusReconfiguring', 'ServicePartitionStatusDeleting' + PartitionStatus ServicePartitionStatus `json:"PartitionStatus,omitempty"` + // PartitionInformation - Information about the partition identity, partitioning scheme and keys supported by it. + PartitionInformation BasicPartitionInformation `json:"PartitionInformation,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServicePartitionInfoServiceKindServicePartitionInfo', 'ServiceKindBasicServicePartitionInfoServiceKindStateful', 'ServiceKindBasicServicePartitionInfoServiceKindStateless' + ServiceKind ServiceKindBasicServicePartitionInfo `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServicePartitionInfo. +func (sspi StatelessServicePartitionInfo) MarshalJSON() ([]byte, error) { + sspi.ServiceKind = ServiceKindBasicServicePartitionInfoServiceKindStateless + objectMap := make(map[string]interface{}) + if sspi.InstanceCount != nil { + objectMap["InstanceCount"] = sspi.InstanceCount + } + if sspi.MinInstanceCount != nil { + objectMap["MinInstanceCount"] = sspi.MinInstanceCount + } + if sspi.MinInstancePercentage != nil { + objectMap["MinInstancePercentage"] = sspi.MinInstancePercentage + } + if sspi.HealthState != "" { + objectMap["HealthState"] = sspi.HealthState + } + if sspi.PartitionStatus != "" { + objectMap["PartitionStatus"] = sspi.PartitionStatus + } + objectMap["PartitionInformation"] = sspi.PartitionInformation + if sspi.ServiceKind != "" { + objectMap["ServiceKind"] = sspi.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. +func (sspi StatelessServicePartitionInfo) AsStatefulServicePartitionInfo() (*StatefulServicePartitionInfo, bool) { + return nil, false +} + +// AsStatelessServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. +func (sspi StatelessServicePartitionInfo) AsStatelessServicePartitionInfo() (*StatelessServicePartitionInfo, bool) { + return &sspi, true +} + +// AsServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. +func (sspi StatelessServicePartitionInfo) AsServicePartitionInfo() (*ServicePartitionInfo, bool) { + return nil, false +} + +// AsBasicServicePartitionInfo is the BasicServicePartitionInfo implementation for StatelessServicePartitionInfo. +func (sspi StatelessServicePartitionInfo) AsBasicServicePartitionInfo() (BasicServicePartitionInfo, bool) { + return &sspi, true +} + +// UnmarshalJSON is the custom unmarshaler for StatelessServicePartitionInfo struct. +func (sspi *StatelessServicePartitionInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "InstanceCount": + if v != nil { + var instanceCount int64 + err = json.Unmarshal(*v, &instanceCount) + if err != nil { + return err + } + sspi.InstanceCount = &instanceCount + } + case "MinInstanceCount": + if v != nil { + var minInstanceCount int32 + err = json.Unmarshal(*v, &minInstanceCount) + if err != nil { + return err + } + sspi.MinInstanceCount = &minInstanceCount + } + case "MinInstancePercentage": + if v != nil { + var minInstancePercentage int32 + err = json.Unmarshal(*v, &minInstancePercentage) + if err != nil { + return err + } + sspi.MinInstancePercentage = &minInstancePercentage + } + case "HealthState": + if v != nil { + var healthState HealthState + err = json.Unmarshal(*v, &healthState) + if err != nil { + return err + } + sspi.HealthState = healthState + } + case "PartitionStatus": + if v != nil { + var partitionStatus ServicePartitionStatus + err = json.Unmarshal(*v, &partitionStatus) + if err != nil { + return err + } + sspi.PartitionStatus = partitionStatus + } + case "PartitionInformation": + if v != nil { + partitionInformation, err := unmarshalBasicPartitionInformation(*v) + if err != nil { + return err + } + sspi.PartitionInformation = partitionInformation + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServicePartitionInfo + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + sspi.ServiceKind = serviceKind + } + } + } + + return nil +} + +// StatelessServiceTypeDescription describes a stateless service type defined in the service manifest of a +// provisioned application type. +type StatelessServiceTypeDescription struct { + // UseImplicitHost - A flag indicating if this type is not implemented and hosted by a user service process, but is implicitly hosted by a system created process. This value is true for services using the guest executable services, false otherwise. + UseImplicitHost *bool `json:"UseImplicitHost,omitempty"` + // IsStateful - Indicates whether the service type is a stateful service type or a stateless service type. This property is true if the service type is a stateful service type, false otherwise. + IsStateful *bool `json:"IsStateful,omitempty"` + // ServiceTypeName - Name of the service type as specified in the service manifest. + ServiceTypeName *string `json:"ServiceTypeName,omitempty"` + // PlacementConstraints - The placement constraint to be used when instantiating this service in a Service Fabric cluster. + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // LoadMetrics - The service load metrics is given as an array of ServiceLoadMetricDescription objects. + LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` + // ServicePlacementPolicies - List of service placement policy descriptions. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // Extensions - List of service type extensions. + Extensions *[]ServiceTypeExtensionDescription `json:"Extensions,omitempty"` + // Kind - Possible values include: 'KindServiceTypeDescription', 'KindStateful', 'KindStateless' + Kind KindBasicServiceTypeDescription `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServiceTypeDescription. +func (sstd StatelessServiceTypeDescription) MarshalJSON() ([]byte, error) { + sstd.Kind = KindStateless + objectMap := make(map[string]interface{}) + if sstd.UseImplicitHost != nil { + objectMap["UseImplicitHost"] = sstd.UseImplicitHost + } + if sstd.IsStateful != nil { + objectMap["IsStateful"] = sstd.IsStateful + } + if sstd.ServiceTypeName != nil { + objectMap["ServiceTypeName"] = sstd.ServiceTypeName + } + if sstd.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = sstd.PlacementConstraints + } + if sstd.LoadMetrics != nil { + objectMap["LoadMetrics"] = sstd.LoadMetrics + } + if sstd.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = sstd.ServicePlacementPolicies + } + if sstd.Extensions != nil { + objectMap["Extensions"] = sstd.Extensions + } + if sstd.Kind != "" { + objectMap["Kind"] = sstd.Kind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. +func (sstd StatelessServiceTypeDescription) AsStatefulServiceTypeDescription() (*StatefulServiceTypeDescription, bool) { + return nil, false +} + +// AsStatelessServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. +func (sstd StatelessServiceTypeDescription) AsStatelessServiceTypeDescription() (*StatelessServiceTypeDescription, bool) { + return &sstd, true +} + +// AsServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. +func (sstd StatelessServiceTypeDescription) AsServiceTypeDescription() (*ServiceTypeDescription, bool) { + return nil, false +} + +// AsBasicServiceTypeDescription is the BasicServiceTypeDescription implementation for StatelessServiceTypeDescription. +func (sstd StatelessServiceTypeDescription) AsBasicServiceTypeDescription() (BasicServiceTypeDescription, bool) { + return &sstd, true +} + +// UnmarshalJSON is the custom unmarshaler for StatelessServiceTypeDescription struct. +func (sstd *StatelessServiceTypeDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "UseImplicitHost": + if v != nil { + var useImplicitHost bool + err = json.Unmarshal(*v, &useImplicitHost) + if err != nil { + return err + } + sstd.UseImplicitHost = &useImplicitHost + } + case "IsStateful": + if v != nil { + var isStateful bool + err = json.Unmarshal(*v, &isStateful) + if err != nil { + return err + } + sstd.IsStateful = &isStateful + } + case "ServiceTypeName": + if v != nil { + var serviceTypeName string + err = json.Unmarshal(*v, &serviceTypeName) + if err != nil { + return err + } + sstd.ServiceTypeName = &serviceTypeName + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + sstd.PlacementConstraints = &placementConstraints + } + case "LoadMetrics": + if v != nil { + var loadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &loadMetrics) + if err != nil { + return err + } + sstd.LoadMetrics = &loadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + sstd.ServicePlacementPolicies = &servicePlacementPolicies + } + case "Extensions": + if v != nil { + var extensions []ServiceTypeExtensionDescription + err = json.Unmarshal(*v, &extensions) + if err != nil { + return err + } + sstd.Extensions = &extensions + } + case "Kind": + if v != nil { + var kind KindBasicServiceTypeDescription + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + sstd.Kind = kind + } + } + } + + return nil +} + +// StatelessServiceUpdateDescription describes an update for a stateless service. +type StatelessServiceUpdateDescription struct { + // InstanceCount - The instance count. + InstanceCount *int32 `json:"InstanceCount,omitempty"` + // MinInstanceCount - MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + // The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). + // Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + MinInstanceCount *int32 `json:"MinInstanceCount,omitempty"` + // MinInstancePercentage - MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. + // The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). + // Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + MinInstancePercentage *int32 `json:"MinInstancePercentage,omitempty"` + // InstanceCloseDelayDurationSeconds - Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade and disabling node. + // The endpoint exposed on this instance is removed prior to starting the delay, which prevents new connections to this instance. + // In addition, clients that have subscribed to service endpoint change events(https://docs.microsoft.com/en-us/dotnet/api/system.fabric.fabricclient.servicemanagementclient.registerservicenotificationfilterasync), can do + // the following upon receiving the endpoint removal notification: + // - Stop sending new requests to this instance. + // - Close existing connections after in-flight requests have completed. + // - Connect to a different instance of the service partition for future requests. + InstanceCloseDelayDurationSeconds *string `json:"InstanceCloseDelayDurationSeconds,omitempty"` + // Flags - Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified. + // This property can be a combination of those flags obtained using bitwise 'OR' operator. + // For example, if the provided value is 6 then the flags for ReplicaRestartWaitDuration (2) and QuorumLossWaitDuration (4) are set. + // - None - Does not indicate any other properties are set. The value is zero. + // - TargetReplicaSetSize/InstanceCount - Indicates whether the TargetReplicaSetSize property (for Stateful services) or the InstanceCount property (for Stateless services) is set. The value is 1. + // - ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 2. + // - QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 4. + // - StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration property is set. The value is 8. + // - MinReplicaSetSize - Indicates the MinReplicaSetSize property is set. The value is 16. + // - PlacementConstraints - Indicates the PlacementConstraints property is set. The value is 32. + // - PlacementPolicyList - Indicates the ServicePlacementPolicies property is set. The value is 64. + // - Correlation - Indicates the CorrelationScheme property is set. The value is 128. + // - Metrics - Indicates the ServiceLoadMetrics property is set. The value is 256. + // - DefaultMoveCost - Indicates the DefaultMoveCost property is set. The value is 512. + // - ScalingPolicy - Indicates the ScalingPolicies property is set. The value is 1024. + // - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The value is 2048. + // - MinInstanceCount - Indicates the MinInstanceCount property is set. The value is 4096. + // - MinInstancePercentage - Indicates the MinInstancePercentage property is set. The value is 8192. + // - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + Flags *string `json:"Flags,omitempty"` + // PlacementConstraints - The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + PlacementConstraints *string `json:"PlacementConstraints,omitempty"` + // CorrelationScheme - The correlation scheme. + CorrelationScheme *[]ServiceCorrelationDescription `json:"CorrelationScheme,omitempty"` + // LoadMetrics - The service load metrics. + LoadMetrics *[]ServiceLoadMetricDescription `json:"LoadMetrics,omitempty"` + // ServicePlacementPolicies - The service placement policies. + ServicePlacementPolicies *[]BasicServicePlacementPolicyDescription `json:"ServicePlacementPolicies,omitempty"` + // DefaultMoveCost - The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh' + DefaultMoveCost MoveCost `json:"DefaultMoveCost,omitempty"` + // ScalingPolicies - Scaling policies for this service. + ScalingPolicies *[]ScalingPolicyDescription `json:"ScalingPolicies,omitempty"` + // ServiceKind - Possible values include: 'ServiceKindBasicServiceUpdateDescriptionServiceKindServiceUpdateDescription', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateful', 'ServiceKindBasicServiceUpdateDescriptionServiceKindStateless' + ServiceKind ServiceKindBasicServiceUpdateDescription `json:"ServiceKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatelessServiceUpdateDescription. +func (ssud StatelessServiceUpdateDescription) MarshalJSON() ([]byte, error) { + ssud.ServiceKind = ServiceKindBasicServiceUpdateDescriptionServiceKindStateless + objectMap := make(map[string]interface{}) + if ssud.InstanceCount != nil { + objectMap["InstanceCount"] = ssud.InstanceCount + } + if ssud.MinInstanceCount != nil { + objectMap["MinInstanceCount"] = ssud.MinInstanceCount + } + if ssud.MinInstancePercentage != nil { + objectMap["MinInstancePercentage"] = ssud.MinInstancePercentage + } + if ssud.InstanceCloseDelayDurationSeconds != nil { + objectMap["InstanceCloseDelayDurationSeconds"] = ssud.InstanceCloseDelayDurationSeconds + } + if ssud.Flags != nil { + objectMap["Flags"] = ssud.Flags + } + if ssud.PlacementConstraints != nil { + objectMap["PlacementConstraints"] = ssud.PlacementConstraints + } + if ssud.CorrelationScheme != nil { + objectMap["CorrelationScheme"] = ssud.CorrelationScheme + } + if ssud.LoadMetrics != nil { + objectMap["LoadMetrics"] = ssud.LoadMetrics + } + if ssud.ServicePlacementPolicies != nil { + objectMap["ServicePlacementPolicies"] = ssud.ServicePlacementPolicies + } + if ssud.DefaultMoveCost != "" { + objectMap["DefaultMoveCost"] = ssud.DefaultMoveCost + } + if ssud.ScalingPolicies != nil { + objectMap["ScalingPolicies"] = ssud.ScalingPolicies + } + if ssud.ServiceKind != "" { + objectMap["ServiceKind"] = ssud.ServiceKind + } + return json.Marshal(objectMap) +} + +// AsStatefulServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. +func (ssud StatelessServiceUpdateDescription) AsStatefulServiceUpdateDescription() (*StatefulServiceUpdateDescription, bool) { + return nil, false +} + +// AsStatelessServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. +func (ssud StatelessServiceUpdateDescription) AsStatelessServiceUpdateDescription() (*StatelessServiceUpdateDescription, bool) { + return &ssud, true +} + +// AsServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. +func (ssud StatelessServiceUpdateDescription) AsServiceUpdateDescription() (*ServiceUpdateDescription, bool) { + return nil, false +} + +// AsBasicServiceUpdateDescription is the BasicServiceUpdateDescription implementation for StatelessServiceUpdateDescription. +func (ssud StatelessServiceUpdateDescription) AsBasicServiceUpdateDescription() (BasicServiceUpdateDescription, bool) { + return &ssud, true +} + +// UnmarshalJSON is the custom unmarshaler for StatelessServiceUpdateDescription struct. +func (ssud *StatelessServiceUpdateDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "InstanceCount": + if v != nil { + var instanceCount int32 + err = json.Unmarshal(*v, &instanceCount) + if err != nil { + return err + } + ssud.InstanceCount = &instanceCount + } + case "MinInstanceCount": + if v != nil { + var minInstanceCount int32 + err = json.Unmarshal(*v, &minInstanceCount) + if err != nil { + return err + } + ssud.MinInstanceCount = &minInstanceCount + } + case "MinInstancePercentage": + if v != nil { + var minInstancePercentage int32 + err = json.Unmarshal(*v, &minInstancePercentage) + if err != nil { + return err + } + ssud.MinInstancePercentage = &minInstancePercentage + } + case "InstanceCloseDelayDurationSeconds": + if v != nil { + var instanceCloseDelayDurationSeconds string + err = json.Unmarshal(*v, &instanceCloseDelayDurationSeconds) + if err != nil { + return err + } + ssud.InstanceCloseDelayDurationSeconds = &instanceCloseDelayDurationSeconds + } + case "Flags": + if v != nil { + var flags string + err = json.Unmarshal(*v, &flags) + if err != nil { + return err + } + ssud.Flags = &flags + } + case "PlacementConstraints": + if v != nil { + var placementConstraints string + err = json.Unmarshal(*v, &placementConstraints) + if err != nil { + return err + } + ssud.PlacementConstraints = &placementConstraints + } + case "CorrelationScheme": + if v != nil { + var correlationScheme []ServiceCorrelationDescription + err = json.Unmarshal(*v, &correlationScheme) + if err != nil { + return err + } + ssud.CorrelationScheme = &correlationScheme + } + case "LoadMetrics": + if v != nil { + var loadMetrics []ServiceLoadMetricDescription + err = json.Unmarshal(*v, &loadMetrics) + if err != nil { + return err + } + ssud.LoadMetrics = &loadMetrics + } + case "ServicePlacementPolicies": + if v != nil { + servicePlacementPolicies, err := unmarshalBasicServicePlacementPolicyDescriptionArray(*v) + if err != nil { + return err + } + ssud.ServicePlacementPolicies = &servicePlacementPolicies + } + case "DefaultMoveCost": + if v != nil { + var defaultMoveCost MoveCost + err = json.Unmarshal(*v, &defaultMoveCost) + if err != nil { + return err + } + ssud.DefaultMoveCost = defaultMoveCost + } + case "ScalingPolicies": + if v != nil { + var scalingPolicies []ScalingPolicyDescription + err = json.Unmarshal(*v, &scalingPolicies) + if err != nil { + return err + } + ssud.ScalingPolicies = &scalingPolicies + } + case "ServiceKind": + if v != nil { + var serviceKind ServiceKindBasicServiceUpdateDescription + err = json.Unmarshal(*v, &serviceKind) + if err != nil { + return err + } + ssud.ServiceKind = serviceKind + } + } + } + + return nil +} + +// StoppedChaosEvent describes a Chaos event that gets generated when Chaos stops because either the user +// issued a stop or the time to run was up. +type StoppedChaosEvent struct { + // Reason - Describes why Chaos stopped. Chaos can stop because of StopChaos API call or the timeToRun provided in ChaosParameters is over. + Reason *string `json:"Reason,omitempty"` + // TimeStampUtc - The UTC timestamp when this Chaos event was generated. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' + Kind KindBasicChaosEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StoppedChaosEvent. +func (sce StoppedChaosEvent) MarshalJSON() ([]byte, error) { + sce.Kind = KindStopped + objectMap := make(map[string]interface{}) + if sce.Reason != nil { + objectMap["Reason"] = sce.Reason + } + if sce.TimeStampUtc != nil { + objectMap["TimeStampUtc"] = sce.TimeStampUtc + } + if sce.Kind != "" { + objectMap["Kind"] = sce.Kind + } + return json.Marshal(objectMap) +} + +// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { + return nil, false +} + +// AsStartedChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { + return nil, false +} + +// AsStoppedChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { + return &sce, true +} + +// AsTestErrorChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { + return nil, false +} + +// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { + return nil, false +} + +// AsWaitingChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { + return nil, false +} + +// AsChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { + return nil, false +} + +// AsBasicChaosEvent is the BasicChaosEvent implementation for StoppedChaosEvent. +func (sce StoppedChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { + return &sce, true +} + +// String ... +type String struct { + autorest.Response `json:"-"` + Value *string `json:"value,omitempty"` +} + +// StringPropertyValue describes a Service Fabric property value of type String. +type StringPropertyValue struct { + // Data - The data of the property value. + Data *string `json:"Data,omitempty"` + // Kind - Possible values include: 'KindPropertyValue', 'KindBinary', 'KindInt64', 'KindDouble', 'KindString', 'KindGUID' + Kind KindBasicPropertyValue `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for StringPropertyValue. +func (spv StringPropertyValue) MarshalJSON() ([]byte, error) { + spv.Kind = KindString + objectMap := make(map[string]interface{}) + if spv.Data != nil { + objectMap["Data"] = spv.Data + } + if spv.Kind != "" { + objectMap["Kind"] = spv.Kind + } + return json.Marshal(objectMap) +} + +// AsBinaryPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. +func (spv StringPropertyValue) AsBinaryPropertyValue() (*BinaryPropertyValue, bool) { + return nil, false +} + +// AsInt64PropertyValue is the BasicPropertyValue implementation for StringPropertyValue. +func (spv StringPropertyValue) AsInt64PropertyValue() (*Int64PropertyValue, bool) { + return nil, false +} + +// AsDoublePropertyValue is the BasicPropertyValue implementation for StringPropertyValue. +func (spv StringPropertyValue) AsDoublePropertyValue() (*DoublePropertyValue, bool) { + return nil, false +} + +// AsStringPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. +func (spv StringPropertyValue) AsStringPropertyValue() (*StringPropertyValue, bool) { + return &spv, true +} + +// AsGUIDPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. +func (spv StringPropertyValue) AsGUIDPropertyValue() (*GUIDPropertyValue, bool) { + return nil, false +} + +// AsPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. +func (spv StringPropertyValue) AsPropertyValue() (*PropertyValue, bool) { + return nil, false +} + +// AsBasicPropertyValue is the BasicPropertyValue implementation for StringPropertyValue. +func (spv StringPropertyValue) AsBasicPropertyValue() (BasicPropertyValue, bool) { + return &spv, true +} + +// SuccessfulPropertyBatchInfo derived from PropertyBatchInfo. Represents the property batch succeeding. +// Contains the results of any "Get" operations in the batch. +type SuccessfulPropertyBatchInfo struct { + // Properties - A map containing the properties that were requested through any "Get" property batch operations. The key represents the index of the "Get" operation in the original request, in string form. The value is the property. If a property is not found, it will not be in the map. + Properties map[string]*PropertyInfo `json:"Properties"` + // Kind - Possible values include: 'KindPropertyBatchInfo', 'KindSuccessful', 'KindFailed' + Kind KindBasicPropertyBatchInfo `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for SuccessfulPropertyBatchInfo. +func (spbi SuccessfulPropertyBatchInfo) MarshalJSON() ([]byte, error) { + spbi.Kind = KindSuccessful + objectMap := make(map[string]interface{}) + if spbi.Properties != nil { + objectMap["Properties"] = spbi.Properties + } + if spbi.Kind != "" { + objectMap["Kind"] = spbi.Kind + } + return json.Marshal(objectMap) +} + +// AsSuccessfulPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. +func (spbi SuccessfulPropertyBatchInfo) AsSuccessfulPropertyBatchInfo() (*SuccessfulPropertyBatchInfo, bool) { + return &spbi, true +} + +// AsFailedPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. +func (spbi SuccessfulPropertyBatchInfo) AsFailedPropertyBatchInfo() (*FailedPropertyBatchInfo, bool) { + return nil, false +} + +// AsPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. +func (spbi SuccessfulPropertyBatchInfo) AsPropertyBatchInfo() (*PropertyBatchInfo, bool) { + return nil, false +} + +// AsBasicPropertyBatchInfo is the BasicPropertyBatchInfo implementation for SuccessfulPropertyBatchInfo. +func (spbi SuccessfulPropertyBatchInfo) AsBasicPropertyBatchInfo() (BasicPropertyBatchInfo, bool) { + return &spbi, true +} + +// SystemApplicationHealthEvaluation represents health evaluation for the fabric:/System application, +// containing information about the data and the algorithm used by health store to evaluate health. The +// evaluation is returned only when the aggregated health state of the cluster is either Error or Warning. +type SystemApplicationHealthEvaluation struct { + // UnhealthyEvaluations - List of unhealthy evaluations that led to the current aggregated health state of the system application. The types of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation, ServicesHealthEvaluation or EventHealthEvaluation. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) MarshalJSON() ([]byte, error) { + sahe.Kind = KindSystemApplication + objectMap := make(map[string]interface{}) + if sahe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = sahe.UnhealthyEvaluations + } + if sahe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = sahe.AggregatedHealthState + } + if sahe.Description != nil { + objectMap["Description"] = sahe.Description + } + if sahe.Kind != "" { + objectMap["Kind"] = sahe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return &sahe, true +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for SystemApplicationHealthEvaluation. +func (sahe SystemApplicationHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &sahe, true +} + +// TCPConfig describes the tcp configuration for external connectivity for this network. +type TCPConfig struct { + // Name - tcp gateway config name. + Name *string `json:"name,omitempty"` + // Port - Specifies the port at which the service endpoint below needs to be exposed. + Port *int32 `json:"port,omitempty"` + // Destination - Describes destination endpoint for routing traffic. + Destination *GatewayDestination `json:"destination,omitempty"` +} + +// TestErrorChaosEvent describes a Chaos event that gets generated when an unexpected event occurs in the +// Chaos engine. +// For example, due to the cluster snapshot being inconsistent, while faulting an entity, Chaos found that +// the entity was already faulted -- which would be an unexpected event. +type TestErrorChaosEvent struct { + // Reason - Describes why TestErrorChaosEvent was generated. For example, Chaos tries to fault a partition but finds that the partition is no longer fault tolerant, then a TestErrorEvent gets generated with the reason stating that the partition is not fault tolerant. + Reason *string `json:"Reason,omitempty"` + // TimeStampUtc - The UTC timestamp when this Chaos event was generated. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' + Kind KindBasicChaosEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) MarshalJSON() ([]byte, error) { + tece.Kind = KindTestError + objectMap := make(map[string]interface{}) + if tece.Reason != nil { + objectMap["Reason"] = tece.Reason + } + if tece.TimeStampUtc != nil { + objectMap["TimeStampUtc"] = tece.TimeStampUtc + } + if tece.Kind != "" { + objectMap["Kind"] = tece.Kind + } + return json.Marshal(objectMap) +} + +// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { + return nil, false +} + +// AsStartedChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { + return nil, false +} + +// AsStoppedChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { + return nil, false +} + +// AsTestErrorChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { + return &tece, true +} + +// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { + return nil, false +} + +// AsWaitingChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { + return nil, false +} + +// AsChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { + return nil, false +} + +// AsBasicChaosEvent is the BasicChaosEvent implementation for TestErrorChaosEvent. +func (tece TestErrorChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { + return &tece, true +} + +// TimeBasedBackupScheduleDescription describes the time based backup schedule. +type TimeBasedBackupScheduleDescription struct { + // ScheduleFrequencyType - Describes the frequency with which to run the time based backup schedule. Possible values include: 'BackupScheduleFrequencyTypeInvalid', 'BackupScheduleFrequencyTypeDaily', 'BackupScheduleFrequencyTypeWeekly' + ScheduleFrequencyType BackupScheduleFrequencyType `json:"ScheduleFrequencyType,omitempty"` + // RunDays - List of days of a week when to trigger the periodic backup. This is valid only when the backup schedule frequency type is weekly. + RunDays *[]DayOfWeek `json:"RunDays,omitempty"` + // RunTimes - Represents the list of exact time during the day in ISO8601 format. Like '19:00:00' will represent '7PM' during the day. Date specified along with time will be ignored. + RunTimes *[]date.Time `json:"RunTimes,omitempty"` + // ScheduleKind - Possible values include: 'ScheduleKindBackupScheduleDescription', 'ScheduleKindFrequencyBased', 'ScheduleKindTimeBased' + ScheduleKind ScheduleKind `json:"ScheduleKind,omitempty"` +} + +// MarshalJSON is the custom marshaler for TimeBasedBackupScheduleDescription. +func (tbbsd TimeBasedBackupScheduleDescription) MarshalJSON() ([]byte, error) { + tbbsd.ScheduleKind = ScheduleKindTimeBased + objectMap := make(map[string]interface{}) + if tbbsd.ScheduleFrequencyType != "" { + objectMap["ScheduleFrequencyType"] = tbbsd.ScheduleFrequencyType + } + if tbbsd.RunDays != nil { + objectMap["RunDays"] = tbbsd.RunDays + } + if tbbsd.RunTimes != nil { + objectMap["RunTimes"] = tbbsd.RunTimes + } + if tbbsd.ScheduleKind != "" { + objectMap["ScheduleKind"] = tbbsd.ScheduleKind + } + return json.Marshal(objectMap) +} + +// AsFrequencyBasedBackupScheduleDescription is the BasicBackupScheduleDescription implementation for TimeBasedBackupScheduleDescription. +func (tbbsd TimeBasedBackupScheduleDescription) AsFrequencyBasedBackupScheduleDescription() (*FrequencyBasedBackupScheduleDescription, bool) { + return nil, false +} + +// AsTimeBasedBackupScheduleDescription is the BasicBackupScheduleDescription implementation for TimeBasedBackupScheduleDescription. +func (tbbsd TimeBasedBackupScheduleDescription) AsTimeBasedBackupScheduleDescription() (*TimeBasedBackupScheduleDescription, bool) { + return &tbbsd, true +} + +// AsBackupScheduleDescription is the BasicBackupScheduleDescription implementation for TimeBasedBackupScheduleDescription. +func (tbbsd TimeBasedBackupScheduleDescription) AsBackupScheduleDescription() (*BackupScheduleDescription, bool) { + return nil, false +} + +// AsBasicBackupScheduleDescription is the BasicBackupScheduleDescription implementation for TimeBasedBackupScheduleDescription. +func (tbbsd TimeBasedBackupScheduleDescription) AsBasicBackupScheduleDescription() (BasicBackupScheduleDescription, bool) { + return &tbbsd, true +} + +// TimeOfDay defines an hour and minute of the day specified in 24 hour time. +type TimeOfDay struct { + // Hour - Represents the hour of the day. Value must be between 0 and 23 inclusive. + Hour *int32 `json:"Hour,omitempty"` + // Minute - Represents the minute of the hour. Value must be between 0 to 59 inclusive. + Minute *int32 `json:"Minute,omitempty"` +} + +// TimeRange defines a time range in a 24 hour day specified by a start and end time. +type TimeRange struct { + // StartTime - Defines an hour and minute of the day specified in 24 hour time. + StartTime *TimeOfDay `json:"StartTime,omitempty"` + // EndTime - Defines an hour and minute of the day specified in 24 hour time. + EndTime *TimeOfDay `json:"EndTime,omitempty"` +} + +// UniformInt64RangePartitionSchemeDescription describes a partitioning scheme where an integer range is +// allocated evenly across a number of partitions. +type UniformInt64RangePartitionSchemeDescription struct { + // Count - The number of partitions. + Count *int32 `json:"Count,omitempty"` + // LowKey - String indicating the lower bound of the partition key range that + // should be split between the partitions. + LowKey *string `json:"LowKey,omitempty"` + // HighKey - String indicating the upper bound of the partition key range that + // should be split between the partitions. + HighKey *string `json:"HighKey,omitempty"` + // PartitionScheme - Possible values include: 'PartitionSchemePartitionSchemeDescription', 'PartitionSchemeNamed1', 'PartitionSchemeSingleton1', 'PartitionSchemeUniformInt64Range1' + PartitionScheme PartitionSchemeBasicPartitionSchemeDescription `json:"PartitionScheme,omitempty"` +} + +// MarshalJSON is the custom marshaler for UniformInt64RangePartitionSchemeDescription. +func (ui6rpsd UniformInt64RangePartitionSchemeDescription) MarshalJSON() ([]byte, error) { + ui6rpsd.PartitionScheme = PartitionSchemeUniformInt64Range1 + objectMap := make(map[string]interface{}) + if ui6rpsd.Count != nil { + objectMap["Count"] = ui6rpsd.Count + } + if ui6rpsd.LowKey != nil { + objectMap["LowKey"] = ui6rpsd.LowKey + } + if ui6rpsd.HighKey != nil { + objectMap["HighKey"] = ui6rpsd.HighKey + } + if ui6rpsd.PartitionScheme != "" { + objectMap["PartitionScheme"] = ui6rpsd.PartitionScheme + } + return json.Marshal(objectMap) +} + +// AsNamedPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. +func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsNamedPartitionSchemeDescription() (*NamedPartitionSchemeDescription, bool) { + return nil, false +} + +// AsSingletonPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. +func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsSingletonPartitionSchemeDescription() (*SingletonPartitionSchemeDescription, bool) { + return nil, false +} + +// AsUniformInt64RangePartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. +func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsUniformInt64RangePartitionSchemeDescription() (*UniformInt64RangePartitionSchemeDescription, bool) { + return &ui6rpsd, true +} + +// AsPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. +func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsPartitionSchemeDescription() (*PartitionSchemeDescription, bool) { + return nil, false +} + +// AsBasicPartitionSchemeDescription is the BasicPartitionSchemeDescription implementation for UniformInt64RangePartitionSchemeDescription. +func (ui6rpsd UniformInt64RangePartitionSchemeDescription) AsBasicPartitionSchemeDescription() (BasicPartitionSchemeDescription, bool) { + return &ui6rpsd, true +} + +// UnplacedReplicaInformation contains information for an unplaced replica. +type UnplacedReplicaInformation struct { + autorest.Response `json:"-"` + // ServiceName - The name of the service. + ServiceName *string `json:"ServiceName,omitempty"` + // PartitionID - The ID of the partition. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // UnplacedReplicaDetails - List of reasons due to which a replica cannot be placed. + UnplacedReplicaDetails *[]string `json:"UnplacedReplicaDetails,omitempty"` +} + +// UnprovisionApplicationTypeDescriptionInfo describes the operation to unregister or unprovision an +// application type and its version that was registered with the Service Fabric. +type UnprovisionApplicationTypeDescriptionInfo struct { + // ApplicationTypeVersion - The version of the application type as defined in the application manifest. + ApplicationTypeVersion *string `json:"ApplicationTypeVersion,omitempty"` + // Async - The flag indicating whether or not unprovision should occur asynchronously. When set to true, the unprovision operation returns when the request is accepted by the system, and the unprovision operation continues without any timeout limit. The default value is false. However, we recommend setting it to true for large application packages that were provisioned. + Async *bool `json:"Async,omitempty"` +} + +// UnprovisionFabricDescription describes the parameters for unprovisioning a cluster. +type UnprovisionFabricDescription struct { + // CodeVersion - The cluster code package version. + CodeVersion *string `json:"CodeVersion,omitempty"` + // ConfigVersion - The cluster manifest version. + ConfigVersion *string `json:"ConfigVersion,omitempty"` +} + +// UpdateClusterUpgradeDescription parameters for updating a cluster upgrade. +type UpdateClusterUpgradeDescription struct { + // UpgradeKind - The type of upgrade out of the following possible values. Possible values include: 'UpgradeTypeInvalid', 'UpgradeTypeRolling', 'UpgradeTypeRollingForceRestart' + UpgradeKind UpgradeType `json:"UpgradeKind,omitempty"` + // UpdateDescription - Describes the parameters for updating a rolling upgrade of application or cluster. + UpdateDescription *RollingUpgradeUpdateDescription `json:"UpdateDescription,omitempty"` + // ClusterHealthPolicy - Defines a health policy used to evaluate the health of the cluster or of a cluster node. + ClusterHealthPolicy *ClusterHealthPolicy `json:"ClusterHealthPolicy,omitempty"` + // EnableDeltaHealthEvaluation - When true, enables delta health evaluation rather than absolute health evaluation after completion of each upgrade domain. + EnableDeltaHealthEvaluation *bool `json:"EnableDeltaHealthEvaluation,omitempty"` + // ClusterUpgradeHealthPolicy - Defines a health policy used to evaluate the health of the cluster during a cluster upgrade. + ClusterUpgradeHealthPolicy *ClusterUpgradeHealthPolicyObject `json:"ClusterUpgradeHealthPolicy,omitempty"` + // ApplicationHealthPolicyMap - Defines the application health policy map used to evaluate the health of an application or one of its children entities. + ApplicationHealthPolicyMap *ApplicationHealthPolicies `json:"ApplicationHealthPolicyMap,omitempty"` +} + +// UpgradeDomainDeltaNodesCheckHealthEvaluation represents health evaluation for delta unhealthy cluster +// nodes in an upgrade domain, containing health evaluations for each unhealthy node that impacted current +// aggregated health state. +// Can be returned during cluster upgrade when cluster aggregated health state is Warning or Error. +type UpgradeDomainDeltaNodesCheckHealthEvaluation struct { + // UpgradeDomainName - Name of the upgrade domain where nodes health is currently evaluated. + UpgradeDomainName *string `json:"UpgradeDomainName,omitempty"` + // BaselineErrorCount - Number of upgrade domain nodes with aggregated heath state Error in the health store at the beginning of the cluster upgrade. + BaselineErrorCount *int64 `json:"BaselineErrorCount,omitempty"` + // BaselineTotalCount - Total number of upgrade domain nodes in the health store at the beginning of the cluster upgrade. + BaselineTotalCount *int64 `json:"BaselineTotalCount,omitempty"` + // MaxPercentDeltaUnhealthyNodes - Maximum allowed percentage of upgrade domain delta unhealthy nodes from the ClusterUpgradeHealthPolicy. + MaxPercentDeltaUnhealthyNodes *int32 `json:"MaxPercentDeltaUnhealthyNodes,omitempty"` + // TotalCount - Total number of upgrade domain nodes in the health store. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) MarshalJSON() ([]byte, error) { + uddnche.Kind = KindUpgradeDomainDeltaNodesCheck + objectMap := make(map[string]interface{}) + if uddnche.UpgradeDomainName != nil { + objectMap["UpgradeDomainName"] = uddnche.UpgradeDomainName + } + if uddnche.BaselineErrorCount != nil { + objectMap["BaselineErrorCount"] = uddnche.BaselineErrorCount + } + if uddnche.BaselineTotalCount != nil { + objectMap["BaselineTotalCount"] = uddnche.BaselineTotalCount + } + if uddnche.MaxPercentDeltaUnhealthyNodes != nil { + objectMap["MaxPercentDeltaUnhealthyNodes"] = uddnche.MaxPercentDeltaUnhealthyNodes + } + if uddnche.TotalCount != nil { + objectMap["TotalCount"] = uddnche.TotalCount + } + if uddnche.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = uddnche.UnhealthyEvaluations + } + if uddnche.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = uddnche.AggregatedHealthState + } + if uddnche.Description != nil { + objectMap["Description"] = uddnche.Description + } + if uddnche.Kind != "" { + objectMap["Kind"] = uddnche.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return &uddnche, true +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return nil, false +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainDeltaNodesCheckHealthEvaluation. +func (uddnche UpgradeDomainDeltaNodesCheckHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &uddnche, true +} + +// UpgradeDomainInfo information about an upgrade domain. +type UpgradeDomainInfo struct { + // Name - The name of the upgrade domain + Name *string `json:"Name,omitempty"` + // State - The state of the upgrade domain. Possible values include: 'UpgradeDomainStateInvalid', 'UpgradeDomainStatePending', 'UpgradeDomainStateInProgress', 'UpgradeDomainStateCompleted' + State UpgradeDomainState `json:"State,omitempty"` +} + +// UpgradeDomainNodesHealthEvaluation represents health evaluation for cluster nodes in an upgrade domain, +// containing health evaluations for each unhealthy node that impacted current aggregated health state. Can +// be returned when evaluating cluster health during cluster upgrade and the aggregated health state is +// either Error or Warning. +type UpgradeDomainNodesHealthEvaluation struct { + // UpgradeDomainName - Name of the upgrade domain where nodes health is currently evaluated. + UpgradeDomainName *string `json:"UpgradeDomainName,omitempty"` + // MaxPercentUnhealthyNodes - Maximum allowed percentage of unhealthy nodes from the ClusterHealthPolicy. + MaxPercentUnhealthyNodes *int32 `json:"MaxPercentUnhealthyNodes,omitempty"` + // TotalCount - Total number of nodes in the current upgrade domain. + TotalCount *int64 `json:"TotalCount,omitempty"` + // UnhealthyEvaluations - List of unhealthy evaluations that led to the aggregated health state. Includes all the unhealthy NodeHealthEvaluation that impacted the aggregated health. + UnhealthyEvaluations *[]HealthEvaluationWrapper `json:"UnhealthyEvaluations,omitempty"` + // AggregatedHealthState - The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc. Possible values include: 'HealthStateInvalid', 'HealthStateOk', 'HealthStateWarning', 'HealthStateError', 'HealthStateUnknown' + AggregatedHealthState HealthState `json:"AggregatedHealthState,omitempty"` + // Description - Description of the health evaluation, which represents a summary of the evaluation process. + Description *string `json:"Description,omitempty"` + // Kind - Possible values include: 'KindHealthEvaluation', 'KindApplication', 'KindApplications', 'KindApplicationTypeApplications', 'KindDeltaNodesCheck', 'KindDeployedApplication', 'KindDeployedApplications', 'KindDeployedServicePackage', 'KindDeployedServicePackages', 'KindEvent', 'KindNode', 'KindNodes', 'KindPartition', 'KindPartitions', 'KindReplica', 'KindReplicas', 'KindService', 'KindServices', 'KindSystemApplication', 'KindUpgradeDomainDeltaNodesCheck', 'KindUpgradeDomainNodes' + Kind Kind `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) MarshalJSON() ([]byte, error) { + udnhe.Kind = KindUpgradeDomainNodes + objectMap := make(map[string]interface{}) + if udnhe.UpgradeDomainName != nil { + objectMap["UpgradeDomainName"] = udnhe.UpgradeDomainName + } + if udnhe.MaxPercentUnhealthyNodes != nil { + objectMap["MaxPercentUnhealthyNodes"] = udnhe.MaxPercentUnhealthyNodes + } + if udnhe.TotalCount != nil { + objectMap["TotalCount"] = udnhe.TotalCount + } + if udnhe.UnhealthyEvaluations != nil { + objectMap["UnhealthyEvaluations"] = udnhe.UnhealthyEvaluations + } + if udnhe.AggregatedHealthState != "" { + objectMap["AggregatedHealthState"] = udnhe.AggregatedHealthState + } + if udnhe.Description != nil { + objectMap["Description"] = udnhe.Description + } + if udnhe.Kind != "" { + objectMap["Kind"] = udnhe.Kind + } + return json.Marshal(objectMap) +} + +// AsApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsApplicationHealthEvaluation() (*ApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsApplicationsHealthEvaluation() (*ApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsApplicationTypeApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsApplicationTypeApplicationsHealthEvaluation() (*ApplicationTypeApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeltaNodesCheckHealthEvaluation() (*DeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedApplicationHealthEvaluation() (*DeployedApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedApplicationsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedApplicationsHealthEvaluation() (*DeployedApplicationsHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackageHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedServicePackageHealthEvaluation() (*DeployedServicePackageHealthEvaluation, bool) { + return nil, false +} + +// AsDeployedServicePackagesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsDeployedServicePackagesHealthEvaluation() (*DeployedServicePackagesHealthEvaluation, bool) { + return nil, false +} + +// AsEventHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsEventHealthEvaluation() (*EventHealthEvaluation, bool) { + return nil, false +} + +// AsNodeHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsNodeHealthEvaluation() (*NodeHealthEvaluation, bool) { + return nil, false +} + +// AsNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsNodesHealthEvaluation() (*NodesHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsPartitionHealthEvaluation() (*PartitionHealthEvaluation, bool) { + return nil, false +} + +// AsPartitionsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsPartitionsHealthEvaluation() (*PartitionsHealthEvaluation, bool) { + return nil, false +} + +// AsReplicaHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsReplicaHealthEvaluation() (*ReplicaHealthEvaluation, bool) { + return nil, false +} + +// AsReplicasHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsReplicasHealthEvaluation() (*ReplicasHealthEvaluation, bool) { + return nil, false +} + +// AsServiceHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsServiceHealthEvaluation() (*ServiceHealthEvaluation, bool) { + return nil, false +} + +// AsServicesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsServicesHealthEvaluation() (*ServicesHealthEvaluation, bool) { + return nil, false +} + +// AsSystemApplicationHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsSystemApplicationHealthEvaluation() (*SystemApplicationHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainDeltaNodesCheckHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsUpgradeDomainDeltaNodesCheckHealthEvaluation() (*UpgradeDomainDeltaNodesCheckHealthEvaluation, bool) { + return nil, false +} + +// AsUpgradeDomainNodesHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsUpgradeDomainNodesHealthEvaluation() (*UpgradeDomainNodesHealthEvaluation, bool) { + return &udnhe, true +} + +// AsHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsHealthEvaluation() (*HealthEvaluation, bool) { + return nil, false +} + +// AsBasicHealthEvaluation is the BasicHealthEvaluation implementation for UpgradeDomainNodesHealthEvaluation. +func (udnhe UpgradeDomainNodesHealthEvaluation) AsBasicHealthEvaluation() (BasicHealthEvaluation, bool) { + return &udnhe, true +} + +// UpgradeOrchestrationServiceState service state of Service Fabric Upgrade Orchestration Service. +type UpgradeOrchestrationServiceState struct { + autorest.Response `json:"-"` + // ServiceState - The state of Service Fabric Upgrade Orchestration Service. + ServiceState *string `json:"ServiceState,omitempty"` +} + +// UpgradeOrchestrationServiceStateSummary service state summary of Service Fabric Upgrade Orchestration +// Service. +type UpgradeOrchestrationServiceStateSummary struct { + autorest.Response `json:"-"` + // CurrentCodeVersion - The current code version of the cluster. + CurrentCodeVersion *string `json:"CurrentCodeVersion,omitempty"` + // CurrentManifestVersion - The current manifest version of the cluster. + CurrentManifestVersion *string `json:"CurrentManifestVersion,omitempty"` + // TargetCodeVersion - The target code version of the cluster. + TargetCodeVersion *string `json:"TargetCodeVersion,omitempty"` + // TargetManifestVersion - The target manifest version of the cluster. + TargetManifestVersion *string `json:"TargetManifestVersion,omitempty"` + // PendingUpgradeType - The type of the pending upgrade of the cluster. + PendingUpgradeType *string `json:"PendingUpgradeType,omitempty"` +} + +// UploadChunkRange information about which portion of the file to upload. +type UploadChunkRange struct { + // StartPosition - The start position of the portion of the file. It's represented by the number of bytes. + StartPosition *string `json:"StartPosition,omitempty"` + // EndPosition - The end position of the portion of the file. It's represented by the number of bytes. + EndPosition *string `json:"EndPosition,omitempty"` +} + +// UploadSession information about a image store upload session +type UploadSession struct { + autorest.Response `json:"-"` + // UploadSessions - When querying upload session by upload session ID, the result contains only one upload session. When querying upload session by image store relative path, the result might contain multiple upload sessions. + UploadSessions *[]UploadSessionInfo `json:"UploadSessions,omitempty"` +} + +// UploadSessionInfo information about an image store upload session. A session is associated with a +// relative path in the image store. +type UploadSessionInfo struct { + // StoreRelativePath - The remote location within image store. This path is relative to the image store root. + StoreRelativePath *string `json:"StoreRelativePath,omitempty"` + // SessionID - A unique ID of the upload session. A session ID can be reused only if the session was committed or removed. + SessionID *uuid.UUID `json:"SessionId,omitempty"` + // ModifiedDate - The date and time when the upload session was last modified. + ModifiedDate *date.Time `json:"ModifiedDate,omitempty"` + // FileSize - The size in bytes of the uploading file. + FileSize *string `json:"FileSize,omitempty"` + // ExpectedRanges - List of chunk ranges that image store has not received yet. + ExpectedRanges *[]UploadChunkRange `json:"ExpectedRanges,omitempty"` +} + +// UsageInfo information about how much space and how many files in the file system the ImageStore is using +// in this category +type UsageInfo struct { + // UsedSpace - the size of all files in this category + UsedSpace *string `json:"UsedSpace,omitempty"` + // FileCount - the number of all files in this category + FileCount *string `json:"FileCount,omitempty"` +} + +// ValidationFailedChaosEvent chaos event corresponding to a failure during validation. +type ValidationFailedChaosEvent struct { + // Reason - Describes why the ValidationFailedChaosEvent was generated. This may happen because more than MaxPercentUnhealthyNodes are unhealthy for more than MaxClusterStabilizationTimeout. This reason will be in the Reason property of the ValidationFailedChaosEvent as a string. + Reason *string `json:"Reason,omitempty"` + // TimeStampUtc - The UTC timestamp when this Chaos event was generated. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' + Kind KindBasicChaosEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) MarshalJSON() ([]byte, error) { + vfce.Kind = KindValidationFailed + objectMap := make(map[string]interface{}) + if vfce.Reason != nil { + objectMap["Reason"] = vfce.Reason + } + if vfce.TimeStampUtc != nil { + objectMap["TimeStampUtc"] = vfce.TimeStampUtc + } + if vfce.Kind != "" { + objectMap["Kind"] = vfce.Kind + } + return json.Marshal(objectMap) +} + +// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { + return nil, false +} + +// AsStartedChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { + return nil, false +} + +// AsStoppedChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { + return nil, false +} + +// AsTestErrorChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { + return nil, false +} + +// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { + return &vfce, true +} + +// AsWaitingChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { + return nil, false +} + +// AsChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { + return nil, false +} + +// AsBasicChaosEvent is the BasicChaosEvent implementation for ValidationFailedChaosEvent. +func (vfce ValidationFailedChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { + return &vfce, true +} + +// VolumeProperties describes properties of a volume resource. +type VolumeProperties struct { + // Description - User readable description of the volume. + Description *string `json:"description,omitempty"` + // Status - READ-ONLY; Status of the volume. Possible values include: 'ResourceStatusUnknown', 'ResourceStatusReady', 'ResourceStatusUpgrading', 'ResourceStatusCreating', 'ResourceStatusDeleting', 'ResourceStatusFailed' + Status ResourceStatus `json:"status,omitempty"` + // StatusDetails - READ-ONLY; Gives additional information about the current status of the volume. + StatusDetails *string `json:"statusDetails,omitempty"` + // Provider - Provider of the volume. + Provider *string `json:"provider,omitempty"` + // AzureFileParameters - This type describes a volume provided by an Azure Files file share. + AzureFileParameters *VolumeProviderParametersAzureFile `json:"azureFileParameters,omitempty"` +} + +// VolumeProviderParametersAzureFile this type describes a volume provided by an Azure Files file share. +type VolumeProviderParametersAzureFile struct { + // AccountName - Name of the Azure storage account for the File Share. + AccountName *string `json:"accountName,omitempty"` + // AccountKey - Access key of the Azure storage account for the File Share. + AccountKey *string `json:"accountKey,omitempty"` + // ShareName - Name of the Azure Files file share that provides storage for the volume. + ShareName *string `json:"shareName,omitempty"` +} + +// VolumeReference describes a reference to a volume resource. +type VolumeReference struct { + // Name - Name of the volume being referenced. + Name *string `json:"name,omitempty"` + // ReadOnly - The flag indicating whether the volume is read only. Default is 'false'. + ReadOnly *bool `json:"readOnly,omitempty"` + // DestinationPath - The path within the container at which the volume should be mounted. Only valid path characters are allowed. + DestinationPath *string `json:"destinationPath,omitempty"` +} + +// VolumeResourceDescription this type describes a volume resource. +type VolumeResourceDescription struct { + autorest.Response `json:"-"` + // Name - Name of the Volume resource. + Name *string `json:"name,omitempty"` + // VolumeProperties - Describes properties of a volume resource. + *VolumeProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for VolumeResourceDescription. +func (vrd VolumeResourceDescription) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vrd.Name != nil { + objectMap["name"] = vrd.Name + } + if vrd.VolumeProperties != nil { + objectMap["properties"] = vrd.VolumeProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VolumeResourceDescription struct. +func (vrd *VolumeResourceDescription) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vrd.Name = &name + } + case "properties": + if v != nil { + var volumeProperties VolumeProperties + err = json.Unmarshal(*v, &volumeProperties) + if err != nil { + return err + } + vrd.VolumeProperties = &volumeProperties + } + } + } + + return nil +} + +// WaitForInbuildReplicaSafetyCheck safety check that waits for the replica build operation to finish. This +// indicates that there is a replica that is going through the copy or is providing data for building +// another replica. Bring the node down will abort this copy operation which are typically expensive +// involving data movements. +type WaitForInbuildReplicaSafetyCheck struct { + // PartitionID - Id of the partition which is undergoing the safety check. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) MarshalJSON() ([]byte, error) { + wfirsc.Kind = KindWaitForInbuildReplica + objectMap := make(map[string]interface{}) + if wfirsc.PartitionID != nil { + objectMap["PartitionId"] = wfirsc.PartitionID + } + if wfirsc.Kind != "" { + objectMap["Kind"] = wfirsc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return &wfirsc, true +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return &wfirsc, true +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForInbuildReplicaSafetyCheck. +func (wfirsc WaitForInbuildReplicaSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &wfirsc, true +} + +// WaitForPrimaryPlacementSafetyCheck safety check that waits for the primary replica that was moved out of +// the node due to upgrade to be placed back again on that node. +type WaitForPrimaryPlacementSafetyCheck struct { + // PartitionID - Id of the partition which is undergoing the safety check. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) MarshalJSON() ([]byte, error) { + wfppsc.Kind = KindWaitForPrimaryPlacement + objectMap := make(map[string]interface{}) + if wfppsc.PartitionID != nil { + objectMap["PartitionId"] = wfppsc.PartitionID + } + if wfppsc.Kind != "" { + objectMap["Kind"] = wfppsc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return &wfppsc, true +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return &wfppsc, true +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimaryPlacementSafetyCheck. +func (wfppsc WaitForPrimaryPlacementSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &wfppsc, true +} + +// WaitForPrimarySwapSafetyCheck safety check that waits for the primary replica to be moved out of the +// node before starting an upgrade to ensure the availability of the primary replica for the partition. +type WaitForPrimarySwapSafetyCheck struct { + // PartitionID - Id of the partition which is undergoing the safety check. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) MarshalJSON() ([]byte, error) { + wfpssc.Kind = KindWaitForPrimarySwap + objectMap := make(map[string]interface{}) + if wfpssc.PartitionID != nil { + objectMap["PartitionId"] = wfpssc.PartitionID + } + if wfpssc.Kind != "" { + objectMap["Kind"] = wfpssc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return &wfpssc, true +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return &wfpssc, true +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return nil, false +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForPrimarySwapSafetyCheck. +func (wfpssc WaitForPrimarySwapSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &wfpssc, true +} + +// WaitForReconfigurationSafetyCheck safety check that waits for the current reconfiguration of the +// partition to be completed before starting an upgrade. +type WaitForReconfigurationSafetyCheck struct { + // PartitionID - Id of the partition which is undergoing the safety check. + PartitionID *uuid.UUID `json:"PartitionId,omitempty"` + // Kind - Possible values include: 'KindSafetyCheck', 'KindPartitionSafetyCheck', 'KindEnsureAvailability', 'KindEnsurePartitionQuorum', 'KindEnsureSeedNodeQuorum', 'KindWaitForInbuildReplica', 'KindWaitForPrimaryPlacement', 'KindWaitForPrimarySwap', 'KindWaitForReconfiguration' + Kind KindBasicSafetyCheck `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) MarshalJSON() ([]byte, error) { + wfrsc.Kind = KindWaitForReconfiguration + objectMap := make(map[string]interface{}) + if wfrsc.PartitionID != nil { + objectMap["PartitionId"] = wfrsc.PartitionID + } + if wfrsc.Kind != "" { + objectMap["Kind"] = wfrsc.Kind + } + return json.Marshal(objectMap) +} + +// AsPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsPartitionSafetyCheck() (*PartitionSafetyCheck, bool) { + return nil, false +} + +// AsBasicPartitionSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsBasicPartitionSafetyCheck() (BasicPartitionSafetyCheck, bool) { + return &wfrsc, true +} + +// AsEnsureAvailabilitySafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsEnsureAvailabilitySafetyCheck() (*EnsureAvailabilitySafetyCheck, bool) { + return nil, false +} + +// AsEnsurePartitionQuorumSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsEnsurePartitionQuorumSafetyCheck() (*EnsurePartitionQuorumSafetyCheck, bool) { + return nil, false +} + +// AsSeedNodeSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsSeedNodeSafetyCheck() (*SeedNodeSafetyCheck, bool) { + return nil, false +} + +// AsWaitForInbuildReplicaSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForInbuildReplicaSafetyCheck() (*WaitForInbuildReplicaSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimaryPlacementSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForPrimaryPlacementSafetyCheck() (*WaitForPrimaryPlacementSafetyCheck, bool) { + return nil, false +} + +// AsWaitForPrimarySwapSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForPrimarySwapSafetyCheck() (*WaitForPrimarySwapSafetyCheck, bool) { + return nil, false +} + +// AsWaitForReconfigurationSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsWaitForReconfigurationSafetyCheck() (*WaitForReconfigurationSafetyCheck, bool) { + return &wfrsc, true +} + +// AsSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsSafetyCheck() (*SafetyCheck, bool) { + return nil, false +} + +// AsBasicSafetyCheck is the BasicSafetyCheck implementation for WaitForReconfigurationSafetyCheck. +func (wfrsc WaitForReconfigurationSafetyCheck) AsBasicSafetyCheck() (BasicSafetyCheck, bool) { + return &wfrsc, true +} + +// WaitingChaosEvent describes a Chaos event that gets generated when Chaos is waiting for the cluster to +// become ready for faulting, for example, Chaos may be waiting for the on-going upgrade to finish. +type WaitingChaosEvent struct { + // Reason - Describes why the WaitingChaosEvent was generated, for example, due to a cluster upgrade. + Reason *string `json:"Reason,omitempty"` + // TimeStampUtc - The UTC timestamp when this Chaos event was generated. + TimeStampUtc *date.Time `json:"TimeStampUtc,omitempty"` + // Kind - Possible values include: 'KindChaosEvent', 'KindExecutingFaults', 'KindStarted', 'KindStopped', 'KindTestError', 'KindValidationFailed', 'KindWaiting' + Kind KindBasicChaosEvent `json:"Kind,omitempty"` +} + +// MarshalJSON is the custom marshaler for WaitingChaosEvent. +func (wce WaitingChaosEvent) MarshalJSON() ([]byte, error) { + wce.Kind = KindWaiting + objectMap := make(map[string]interface{}) + if wce.Reason != nil { + objectMap["Reason"] = wce.Reason + } + if wce.TimeStampUtc != nil { + objectMap["TimeStampUtc"] = wce.TimeStampUtc + } + if wce.Kind != "" { + objectMap["Kind"] = wce.Kind + } + return json.Marshal(objectMap) +} + +// AsExecutingFaultsChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsExecutingFaultsChaosEvent() (*ExecutingFaultsChaosEvent, bool) { + return nil, false +} + +// AsStartedChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsStartedChaosEvent() (*StartedChaosEvent, bool) { + return nil, false +} + +// AsStoppedChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsStoppedChaosEvent() (*StoppedChaosEvent, bool) { + return nil, false +} + +// AsTestErrorChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsTestErrorChaosEvent() (*TestErrorChaosEvent, bool) { + return nil, false +} + +// AsValidationFailedChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsValidationFailedChaosEvent() (*ValidationFailedChaosEvent, bool) { + return nil, false +} + +// AsWaitingChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsWaitingChaosEvent() (*WaitingChaosEvent, bool) { + return &wce, true +} + +// AsChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsChaosEvent() (*ChaosEvent, bool) { + return nil, false +} + +// AsBasicChaosEvent is the BasicChaosEvent implementation for WaitingChaosEvent. +func (wce WaitingChaosEvent) AsBasicChaosEvent() (BasicChaosEvent, bool) { + return &wce, true +} diff --git a/services/servicefabric/7.0/servicefabric/servicefabricapi/interfaces.go b/services/servicefabric/7.0/servicefabric/servicefabricapi/interfaces.go new file mode 100644 index 000000000000..8ea809ce95a3 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/servicefabricapi/interfaces.go @@ -0,0 +1,325 @@ +package servicefabricapi + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/services/servicefabric/7.0/servicefabric" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/satori/go.uuid" +) + +// BaseClientAPI contains the set of methods on the BaseClient type. +type BaseClientAPI interface { + AddConfigurationParameterOverrides(ctx context.Context, nodeName string, configParameterOverrideList []servicefabric.ConfigParameterOverride, force *bool, timeout *int64) (result autorest.Response, err error) + BackupPartition(ctx context.Context, partitionID uuid.UUID, backupPartitionDescription *servicefabric.BackupPartitionDescription, backupTimeout *int32, timeout *int64) (result autorest.Response, err error) + CancelOperation(ctx context.Context, operationID uuid.UUID, force bool, timeout *int64) (result autorest.Response, err error) + CancelRepairTask(ctx context.Context, repairTaskCancelDescription servicefabric.RepairTaskCancelDescription) (result servicefabric.RepairTaskUpdateInfo, err error) + CommitImageStoreUploadSession(ctx context.Context, sessionID uuid.UUID, timeout *int64) (result autorest.Response, err error) + CopyImageStoreContent(ctx context.Context, imageStoreCopyDescription servicefabric.ImageStoreCopyDescription, timeout *int64) (result autorest.Response, err error) + CreateApplication(ctx context.Context, applicationDescription servicefabric.ApplicationDescription, timeout *int64) (result autorest.Response, err error) + CreateBackupPolicy(ctx context.Context, backupPolicyDescription servicefabric.BackupPolicyDescription, timeout *int64) (result autorest.Response, err error) + CreateComposeDeployment(ctx context.Context, createComposeDeploymentDescription servicefabric.CreateComposeDeploymentDescription, timeout *int64) (result autorest.Response, err error) + CreateName(ctx context.Context, nameDescription servicefabric.NameDescription, timeout *int64) (result autorest.Response, err error) + CreateRepairTask(ctx context.Context, repairTask servicefabric.RepairTask) (result servicefabric.RepairTaskUpdateInfo, err error) + CreateService(ctx context.Context, applicationID string, serviceDescription servicefabric.BasicServiceDescription, timeout *int64) (result autorest.Response, err error) + CreateServiceFromTemplate(ctx context.Context, applicationID string, serviceFromTemplateDescription servicefabric.ServiceFromTemplateDescription, timeout *int64) (result autorest.Response, err error) + DeleteApplication(ctx context.Context, applicationID string, forceRemove *bool, timeout *int64) (result autorest.Response, err error) + DeleteBackupPolicy(ctx context.Context, backupPolicyName string, timeout *int64) (result autorest.Response, err error) + DeleteImageStoreContent(ctx context.Context, contentPath string, timeout *int64) (result autorest.Response, err error) + DeleteImageStoreUploadSession(ctx context.Context, sessionID uuid.UUID, timeout *int64) (result autorest.Response, err error) + DeleteName(ctx context.Context, nameID string, timeout *int64) (result autorest.Response, err error) + DeleteProperty(ctx context.Context, nameID string, propertyName string, timeout *int64) (result autorest.Response, err error) + DeleteRepairTask(ctx context.Context, repairTaskDeleteDescription servicefabric.RepairTaskDeleteDescription) (result autorest.Response, err error) + DeleteService(ctx context.Context, serviceID string, forceRemove *bool, timeout *int64) (result autorest.Response, err error) + DeployServicePackageToNode(ctx context.Context, nodeName string, deployServicePackageToNodeDescription servicefabric.DeployServicePackageToNodeDescription, timeout *int64) (result autorest.Response, err error) + DisableApplicationBackup(ctx context.Context, applicationID string, timeout *int64, disableBackupDescription *servicefabric.DisableBackupDescription) (result autorest.Response, err error) + DisableNode(ctx context.Context, nodeName string, deactivationIntentDescription servicefabric.DeactivationIntentDescription, timeout *int64) (result autorest.Response, err error) + DisablePartitionBackup(ctx context.Context, partitionID uuid.UUID, disableBackupDescription *servicefabric.DisableBackupDescription, timeout *int64) (result autorest.Response, err error) + DisableServiceBackup(ctx context.Context, serviceID string, disableBackupDescription *servicefabric.DisableBackupDescription, timeout *int64) (result autorest.Response, err error) + EnableApplicationBackup(ctx context.Context, applicationID string, enableBackupDescription servicefabric.EnableBackupDescription, timeout *int64) (result autorest.Response, err error) + EnableNode(ctx context.Context, nodeName string, timeout *int64) (result autorest.Response, err error) + EnablePartitionBackup(ctx context.Context, partitionID uuid.UUID, enableBackupDescription servicefabric.EnableBackupDescription, timeout *int64) (result autorest.Response, err error) + EnableServiceBackup(ctx context.Context, serviceID string, enableBackupDescription servicefabric.EnableBackupDescription, timeout *int64) (result autorest.Response, err error) + ForceApproveRepairTask(ctx context.Context, repairTaskApproveDescription servicefabric.RepairTaskApproveDescription) (result servicefabric.RepairTaskUpdateInfo, err error) + GetAadMetadata(ctx context.Context, timeout *int64) (result servicefabric.AadMetadataObject, err error) + GetAllEntitiesBackedUpByPolicy(ctx context.Context, backupPolicyName string, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedBackupEntityList, err error) + GetApplicationBackupConfigurationInfo(ctx context.Context, applicationID string, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedBackupConfigurationInfoList, err error) + GetApplicationBackupList(ctx context.Context, applicationID string, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time, continuationToken string, maxResults *int64) (result servicefabric.PagedBackupInfoList, err error) + GetApplicationEventList(ctx context.Context, applicationID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListApplicationEvent, err error) + GetApplicationHealth(ctx context.Context, applicationID string, eventsHealthStateFilter *int32, deployedApplicationsHealthStateFilter *int32, servicesHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result servicefabric.ApplicationHealth, err error) + GetApplicationHealthUsingPolicy(ctx context.Context, applicationID string, eventsHealthStateFilter *int32, deployedApplicationsHealthStateFilter *int32, servicesHealthStateFilter *int32, excludeHealthStatistics *bool, applicationHealthPolicy *servicefabric.ApplicationHealthPolicy, timeout *int64) (result servicefabric.ApplicationHealth, err error) + GetApplicationInfo(ctx context.Context, applicationID string, excludeApplicationParameters *bool, timeout *int64) (result servicefabric.ApplicationInfo, err error) + GetApplicationInfoList(ctx context.Context, applicationDefinitionKindFilter *int32, applicationTypeName string, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedApplicationInfoList, err error) + GetApplicationLoadInfo(ctx context.Context, applicationID string, timeout *int64) (result servicefabric.ApplicationLoadInfo, err error) + GetApplicationManifest(ctx context.Context, applicationTypeName string, applicationTypeVersion string, timeout *int64) (result servicefabric.ApplicationTypeManifest, err error) + GetApplicationNameInfo(ctx context.Context, serviceID string, timeout *int64) (result servicefabric.ApplicationNameInfo, err error) + GetApplicationsEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListApplicationEvent, err error) + GetApplicationTypeInfoList(ctx context.Context, applicationTypeDefinitionKindFilter *int32, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedApplicationTypeInfoList, err error) + GetApplicationTypeInfoListByName(ctx context.Context, applicationTypeName string, applicationTypeVersion string, excludeApplicationParameters *bool, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedApplicationTypeInfoList, err error) + GetApplicationUpgrade(ctx context.Context, applicationID string, timeout *int64) (result servicefabric.ApplicationUpgradeProgressInfo, err error) + GetBackupPolicyByName(ctx context.Context, backupPolicyName string, timeout *int64) (result servicefabric.BackupPolicyDescription, err error) + GetBackupPolicyList(ctx context.Context, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedBackupPolicyDescriptionList, err error) + GetBackupsFromBackupLocation(ctx context.Context, getBackupByStorageQueryDescription servicefabric.GetBackupByStorageQueryDescription, timeout *int64, continuationToken string, maxResults *int64) (result servicefabric.PagedBackupInfoList, err error) + GetChaos(ctx context.Context, timeout *int64) (result servicefabric.Chaos, err error) + GetChaosEvents(ctx context.Context, continuationToken string, startTimeUtc string, endTimeUtc string, maxResults *int64, timeout *int64) (result servicefabric.ChaosEventsSegment, err error) + GetChaosSchedule(ctx context.Context, timeout *int64) (result servicefabric.ChaosScheduleDescription, err error) + GetClusterConfiguration(ctx context.Context, configurationAPIVersion string, timeout *int64) (result servicefabric.ClusterConfiguration, err error) + GetClusterConfigurationUpgradeStatus(ctx context.Context, timeout *int64) (result servicefabric.ClusterConfigurationUpgradeStatusInfo, err error) + GetClusterEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListClusterEvent, err error) + GetClusterHealth(ctx context.Context, nodesHealthStateFilter *int32, applicationsHealthStateFilter *int32, eventsHealthStateFilter *int32, excludeHealthStatistics *bool, includeSystemApplicationHealthStatistics *bool, timeout *int64) (result servicefabric.ClusterHealth, err error) + GetClusterHealthChunk(ctx context.Context, timeout *int64) (result servicefabric.ClusterHealthChunk, err error) + GetClusterHealthChunkUsingPolicyAndAdvancedFilters(ctx context.Context, clusterHealthChunkQueryDescription *servicefabric.ClusterHealthChunkQueryDescription, timeout *int64) (result servicefabric.ClusterHealthChunk, err error) + GetClusterHealthUsingPolicy(ctx context.Context, nodesHealthStateFilter *int32, applicationsHealthStateFilter *int32, eventsHealthStateFilter *int32, excludeHealthStatistics *bool, includeSystemApplicationHealthStatistics *bool, clusterHealthPolicies *servicefabric.ClusterHealthPolicies, timeout *int64) (result servicefabric.ClusterHealth, err error) + GetClusterLoad(ctx context.Context, timeout *int64) (result servicefabric.ClusterLoadInfo, err error) + GetClusterManifest(ctx context.Context, timeout *int64) (result servicefabric.ClusterManifest, err error) + GetClusterUpgradeProgress(ctx context.Context, timeout *int64) (result servicefabric.ClusterUpgradeProgressObject, err error) + GetClusterVersion(ctx context.Context, timeout *int64) (result servicefabric.ClusterVersion, err error) + GetComposeDeploymentStatus(ctx context.Context, deploymentName string, timeout *int64) (result servicefabric.ComposeDeploymentStatusInfo, err error) + GetComposeDeploymentStatusList(ctx context.Context, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedComposeDeploymentStatusInfoList, err error) + GetComposeDeploymentUpgradeProgress(ctx context.Context, deploymentName string, timeout *int64) (result servicefabric.ComposeDeploymentUpgradeProgressInfo, err error) + GetConfigurationOverrides(ctx context.Context, nodeName string, timeout *int64) (result servicefabric.ListConfigParameterOverride, err error) + GetContainerLogsDeployedOnNode(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, tail string, previous *bool, timeout *int64) (result servicefabric.ContainerLogs, err error) + GetContainersEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListContainerInstanceEvent, err error) + GetCorrelatedEventList(ctx context.Context, eventInstanceID string, timeout *int64) (result servicefabric.ListFabricEvent, err error) + GetDataLossProgress(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (result servicefabric.PartitionDataLossProgress, err error) + GetDeployedApplicationHealth(ctx context.Context, nodeName string, applicationID string, eventsHealthStateFilter *int32, deployedServicePackagesHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result servicefabric.DeployedApplicationHealth, err error) + GetDeployedApplicationHealthUsingPolicy(ctx context.Context, nodeName string, applicationID string, eventsHealthStateFilter *int32, deployedServicePackagesHealthStateFilter *int32, applicationHealthPolicy *servicefabric.ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (result servicefabric.DeployedApplicationHealth, err error) + GetDeployedApplicationInfo(ctx context.Context, nodeName string, applicationID string, timeout *int64, includeHealthState *bool) (result servicefabric.DeployedApplicationInfo, err error) + GetDeployedApplicationInfoList(ctx context.Context, nodeName string, timeout *int64, includeHealthState *bool, continuationToken string, maxResults *int64) (result servicefabric.PagedDeployedApplicationInfoList, err error) + GetDeployedCodePackageInfoList(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, timeout *int64) (result servicefabric.ListDeployedCodePackageInfo, err error) + GetDeployedServicePackageHealth(ctx context.Context, nodeName string, applicationID string, servicePackageName string, eventsHealthStateFilter *int32, timeout *int64) (result servicefabric.DeployedServicePackageHealth, err error) + GetDeployedServicePackageHealthUsingPolicy(ctx context.Context, nodeName string, applicationID string, servicePackageName string, eventsHealthStateFilter *int32, applicationHealthPolicy *servicefabric.ApplicationHealthPolicy, timeout *int64) (result servicefabric.DeployedServicePackageHealth, err error) + GetDeployedServicePackageInfoList(ctx context.Context, nodeName string, applicationID string, timeout *int64) (result servicefabric.ListDeployedServicePackageInfo, err error) + GetDeployedServicePackageInfoListByName(ctx context.Context, nodeName string, applicationID string, servicePackageName string, timeout *int64) (result servicefabric.ListDeployedServicePackageInfo, err error) + GetDeployedServiceReplicaDetailInfo(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, timeout *int64) (result servicefabric.DeployedServiceReplicaDetailInfoModel, err error) + GetDeployedServiceReplicaDetailInfoByPartitionID(ctx context.Context, nodeName string, partitionID uuid.UUID, timeout *int64) (result servicefabric.DeployedServiceReplicaDetailInfoModel, err error) + GetDeployedServiceReplicaInfoList(ctx context.Context, nodeName string, applicationID string, partitionID *uuid.UUID, serviceManifestName string, timeout *int64) (result servicefabric.ListDeployedServiceReplicaInfo, err error) + GetDeployedServiceTypeInfoByName(ctx context.Context, nodeName string, applicationID string, serviceTypeName string, serviceManifestName string, timeout *int64) (result servicefabric.ListDeployedServiceTypeInfo, err error) + GetDeployedServiceTypeInfoList(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, timeout *int64) (result servicefabric.ListDeployedServiceTypeInfo, err error) + GetFaultOperationList(ctx context.Context, typeFilter int32, stateFilter int32, timeout *int64) (result servicefabric.ListOperationStatus, err error) + GetImageStoreContent(ctx context.Context, contentPath string, timeout *int64) (result servicefabric.ImageStoreContent, err error) + GetImageStoreFolderSize(ctx context.Context, contentPath string, timeout *int64) (result servicefabric.FolderSizeInfo, err error) + GetImageStoreInfo(ctx context.Context, timeout *int64) (result servicefabric.ImageStoreInfo, err error) + GetImageStoreRootContent(ctx context.Context, timeout *int64) (result servicefabric.ImageStoreContent, err error) + GetImageStoreRootFolderSize(ctx context.Context, timeout *int64) (result servicefabric.FolderSizeInfo, err error) + GetImageStoreUploadSessionByID(ctx context.Context, sessionID uuid.UUID, timeout *int64) (result servicefabric.UploadSession, err error) + GetImageStoreUploadSessionByPath(ctx context.Context, contentPath string, timeout *int64) (result servicefabric.UploadSession, err error) + GetNameExistsInfo(ctx context.Context, nameID string, timeout *int64) (result autorest.Response, err error) + GetNodeEventList(ctx context.Context, nodeName string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListNodeEvent, err error) + GetNodeHealth(ctx context.Context, nodeName string, eventsHealthStateFilter *int32, timeout *int64) (result servicefabric.NodeHealth, err error) + GetNodeHealthUsingPolicy(ctx context.Context, nodeName string, eventsHealthStateFilter *int32, clusterHealthPolicy *servicefabric.ClusterHealthPolicy, timeout *int64) (result servicefabric.NodeHealth, err error) + GetNodeInfo(ctx context.Context, nodeName string, timeout *int64) (result servicefabric.NodeInfo, err error) + GetNodeInfoList(ctx context.Context, continuationToken string, nodeStatusFilter servicefabric.NodeStatusFilter, maxResults *int64, timeout *int64) (result servicefabric.PagedNodeInfoList, err error) + GetNodeLoadInfo(ctx context.Context, nodeName string, timeout *int64) (result servicefabric.NodeLoadInfo, err error) + GetNodesEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListNodeEvent, err error) + GetNodeTransitionProgress(ctx context.Context, nodeName string, operationID uuid.UUID, timeout *int64) (result servicefabric.NodeTransitionProgress, err error) + GetPartitionBackupConfigurationInfo(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result servicefabric.PartitionBackupConfigurationInfo, err error) + GetPartitionBackupList(ctx context.Context, partitionID uuid.UUID, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time) (result servicefabric.PagedBackupInfoList, err error) + GetPartitionBackupProgress(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result servicefabric.BackupProgressInfo, err error) + GetPartitionEventList(ctx context.Context, partitionID uuid.UUID, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListPartitionEvent, err error) + GetPartitionHealth(ctx context.Context, partitionID uuid.UUID, eventsHealthStateFilter *int32, replicasHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result servicefabric.PartitionHealth, err error) + GetPartitionHealthUsingPolicy(ctx context.Context, partitionID uuid.UUID, eventsHealthStateFilter *int32, replicasHealthStateFilter *int32, applicationHealthPolicy *servicefabric.ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (result servicefabric.PartitionHealth, err error) + GetPartitionInfo(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result servicefabric.ServicePartitionInfoModel, err error) + GetPartitionInfoList(ctx context.Context, serviceID string, continuationToken string, timeout *int64) (result servicefabric.PagedServicePartitionInfoList, err error) + GetPartitionLoadInformation(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result servicefabric.PartitionLoadInformation, err error) + GetPartitionReplicaEventList(ctx context.Context, partitionID uuid.UUID, replicaID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListReplicaEvent, err error) + GetPartitionReplicasEventList(ctx context.Context, partitionID uuid.UUID, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListReplicaEvent, err error) + GetPartitionRestartProgress(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (result servicefabric.PartitionRestartProgress, err error) + GetPartitionRestoreProgress(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result servicefabric.RestoreProgressInfo, err error) + GetPartitionsEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListPartitionEvent, err error) + GetPropertyInfo(ctx context.Context, nameID string, propertyName string, timeout *int64) (result servicefabric.PropertyInfo, err error) + GetPropertyInfoList(ctx context.Context, nameID string, includeValues *bool, continuationToken string, timeout *int64) (result servicefabric.PagedPropertyInfoList, err error) + GetProvisionedFabricCodeVersionInfoList(ctx context.Context, codeVersion string, timeout *int64) (result servicefabric.ListFabricCodeVersionInfo, err error) + GetProvisionedFabricConfigVersionInfoList(ctx context.Context, configVersion string, timeout *int64) (result servicefabric.ListFabricConfigVersionInfo, err error) + GetQuorumLossProgress(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, timeout *int64) (result servicefabric.PartitionQuorumLossProgress, err error) + GetRepairTaskList(ctx context.Context, taskIDFilter string, stateFilter *int32, executorFilter string) (result servicefabric.ListRepairTask, err error) + GetReplicaHealth(ctx context.Context, partitionID uuid.UUID, replicaID string, eventsHealthStateFilter *int32, timeout *int64) (result servicefabric.ReplicaHealthModel, err error) + GetReplicaHealthUsingPolicy(ctx context.Context, partitionID uuid.UUID, replicaID string, eventsHealthStateFilter *int32, applicationHealthPolicy *servicefabric.ApplicationHealthPolicy, timeout *int64) (result servicefabric.ReplicaHealthModel, err error) + GetReplicaInfo(ctx context.Context, partitionID uuid.UUID, replicaID string, timeout *int64) (result servicefabric.ReplicaInfoModel, err error) + GetReplicaInfoList(ctx context.Context, partitionID uuid.UUID, continuationToken string, timeout *int64) (result servicefabric.PagedReplicaInfoList, err error) + GetServiceBackupConfigurationInfo(ctx context.Context, serviceID string, continuationToken string, maxResults *int64, timeout *int64) (result servicefabric.PagedBackupConfigurationInfoList, err error) + GetServiceBackupList(ctx context.Context, serviceID string, timeout *int64, latest *bool, startDateTimeFilter *date.Time, endDateTimeFilter *date.Time, continuationToken string, maxResults *int64) (result servicefabric.PagedBackupInfoList, err error) + GetServiceDescription(ctx context.Context, serviceID string, timeout *int64) (result servicefabric.ServiceDescriptionModel, err error) + GetServiceEventList(ctx context.Context, serviceID string, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListServiceEvent, err error) + GetServiceHealth(ctx context.Context, serviceID string, eventsHealthStateFilter *int32, partitionsHealthStateFilter *int32, excludeHealthStatistics *bool, timeout *int64) (result servicefabric.ServiceHealth, err error) + GetServiceHealthUsingPolicy(ctx context.Context, serviceID string, eventsHealthStateFilter *int32, partitionsHealthStateFilter *int32, applicationHealthPolicy *servicefabric.ApplicationHealthPolicy, excludeHealthStatistics *bool, timeout *int64) (result servicefabric.ServiceHealth, err error) + GetServiceInfo(ctx context.Context, applicationID string, serviceID string, timeout *int64) (result servicefabric.ServiceInfoModel, err error) + GetServiceInfoList(ctx context.Context, applicationID string, serviceTypeName string, continuationToken string, timeout *int64) (result servicefabric.PagedServiceInfoList, err error) + GetServiceManifest(ctx context.Context, applicationTypeName string, applicationTypeVersion string, serviceManifestName string, timeout *int64) (result servicefabric.ServiceTypeManifest, err error) + GetServiceNameInfo(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result servicefabric.ServiceNameInfo, err error) + GetServicesEventList(ctx context.Context, startTimeUtc string, endTimeUtc string, timeout *int64, eventsTypesFilter string, excludeAnalysisEvents *bool, skipCorrelationLookup *bool) (result servicefabric.ListServiceEvent, err error) + GetServiceTypeInfoByName(ctx context.Context, applicationTypeName string, applicationTypeVersion string, serviceTypeName string, timeout *int64) (result servicefabric.ServiceTypeInfo, err error) + GetServiceTypeInfoList(ctx context.Context, applicationTypeName string, applicationTypeVersion string, timeout *int64) (result servicefabric.ListServiceTypeInfo, err error) + GetSubNameInfoList(ctx context.Context, nameID string, recursive *bool, continuationToken string, timeout *int64) (result servicefabric.PagedSubNameInfoList, err error) + GetUnplacedReplicaInformation(ctx context.Context, serviceID string, partitionID *uuid.UUID, onlyQueryPrimaries *bool, timeout *int64) (result servicefabric.UnplacedReplicaInformation, err error) + GetUpgradeOrchestrationServiceState(ctx context.Context, timeout *int64) (result servicefabric.UpgradeOrchestrationServiceState, err error) + InvokeContainerAPI(ctx context.Context, nodeName string, applicationID string, serviceManifestName string, codePackageName string, codePackageInstanceID string, containerAPIRequestBody servicefabric.ContainerAPIRequestBody, timeout *int64) (result servicefabric.ContainerAPIResponse, err error) + InvokeInfrastructureCommand(ctx context.Context, command string, serviceID string, timeout *int64) (result servicefabric.String, err error) + InvokeInfrastructureQuery(ctx context.Context, command string, serviceID string, timeout *int64) (result servicefabric.String, err error) + MovePrimaryReplica(ctx context.Context, partitionID uuid.UUID, nodeName string, ignoreConstraints *bool, timeout *int64) (result autorest.Response, err error) + MoveSecondaryReplica(ctx context.Context, partitionID uuid.UUID, currentNodeName string, newNodeName string, ignoreConstraints *bool, timeout *int64) (result autorest.Response, err error) + PostChaosSchedule(ctx context.Context, chaosSchedule servicefabric.ChaosScheduleDescription, timeout *int64) (result autorest.Response, err error) + ProvisionApplicationType(ctx context.Context, provisionApplicationTypeDescriptionBaseRequiredBodyParam servicefabric.BasicProvisionApplicationTypeDescriptionBase, timeout *int64) (result autorest.Response, err error) + ProvisionCluster(ctx context.Context, provisionFabricDescription servicefabric.ProvisionFabricDescription, timeout *int64) (result autorest.Response, err error) + PutProperty(ctx context.Context, nameID string, propertyDescription servicefabric.PropertyDescription, timeout *int64) (result autorest.Response, err error) + RecoverAllPartitions(ctx context.Context, timeout *int64) (result autorest.Response, err error) + RecoverPartition(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) + RecoverServicePartitions(ctx context.Context, serviceID string, timeout *int64) (result autorest.Response, err error) + RecoverSystemPartitions(ctx context.Context, timeout *int64) (result autorest.Response, err error) + RemoveComposeDeployment(ctx context.Context, deploymentName string, timeout *int64) (result autorest.Response, err error) + RemoveConfigurationOverrides(ctx context.Context, nodeName string, timeout *int64) (result autorest.Response, err error) + RemoveNodeState(ctx context.Context, nodeName string, timeout *int64) (result autorest.Response, err error) + RemoveReplica(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, forceRemove *bool, timeout *int64) (result autorest.Response, err error) + ReportApplicationHealth(ctx context.Context, applicationID string, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ReportClusterHealth(ctx context.Context, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ReportDeployedApplicationHealth(ctx context.Context, nodeName string, applicationID string, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ReportDeployedServicePackageHealth(ctx context.Context, nodeName string, applicationID string, servicePackageName string, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ReportNodeHealth(ctx context.Context, nodeName string, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ReportPartitionHealth(ctx context.Context, partitionID uuid.UUID, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ReportReplicaHealth(ctx context.Context, partitionID uuid.UUID, replicaID string, serviceKind servicefabric.ReplicaHealthReportServiceKind, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ReportServiceHealth(ctx context.Context, serviceID string, healthInformation servicefabric.HealthInformation, immediate *bool, timeout *int64) (result autorest.Response, err error) + ResetPartitionLoad(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) + ResolveService(ctx context.Context, serviceID string, partitionKeyType *int32, partitionKeyValue string, previousRspVersion string, timeout *int64) (result servicefabric.ResolvedServicePartition, err error) + RestartDeployedCodePackage(ctx context.Context, nodeName string, applicationID string, restartDeployedCodePackageDescription servicefabric.RestartDeployedCodePackageDescription, timeout *int64) (result autorest.Response, err error) + RestartNode(ctx context.Context, nodeName string, restartNodeDescription servicefabric.RestartNodeDescription, timeout *int64) (result autorest.Response, err error) + RestartReplica(ctx context.Context, nodeName string, partitionID uuid.UUID, replicaID string, timeout *int64) (result autorest.Response, err error) + RestorePartition(ctx context.Context, partitionID uuid.UUID, restorePartitionDescription servicefabric.RestorePartitionDescription, restoreTimeout *int32, timeout *int64) (result autorest.Response, err error) + ResumeApplicationBackup(ctx context.Context, applicationID string, timeout *int64) (result autorest.Response, err error) + ResumeApplicationUpgrade(ctx context.Context, applicationID string, resumeApplicationUpgradeDescription servicefabric.ResumeApplicationUpgradeDescription, timeout *int64) (result autorest.Response, err error) + ResumeClusterUpgrade(ctx context.Context, resumeClusterUpgradeDescription servicefabric.ResumeClusterUpgradeDescription, timeout *int64) (result autorest.Response, err error) + ResumePartitionBackup(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) + ResumeServiceBackup(ctx context.Context, serviceID string, timeout *int64) (result autorest.Response, err error) + RollbackApplicationUpgrade(ctx context.Context, applicationID string, timeout *int64) (result autorest.Response, err error) + RollbackClusterUpgrade(ctx context.Context, timeout *int64) (result autorest.Response, err error) + SetUpgradeOrchestrationServiceState(ctx context.Context, upgradeOrchestrationServiceState servicefabric.UpgradeOrchestrationServiceState, timeout *int64) (result servicefabric.UpgradeOrchestrationServiceStateSummary, err error) + StartApplicationUpgrade(ctx context.Context, applicationID string, applicationUpgradeDescription servicefabric.ApplicationUpgradeDescription, timeout *int64) (result autorest.Response, err error) + StartChaos(ctx context.Context, chaosParameters servicefabric.ChaosParameters, timeout *int64) (result autorest.Response, err error) + StartClusterConfigurationUpgrade(ctx context.Context, clusterConfigurationUpgradeDescription servicefabric.ClusterConfigurationUpgradeDescription, timeout *int64) (result autorest.Response, err error) + StartClusterUpgrade(ctx context.Context, startClusterUpgradeDescription servicefabric.StartClusterUpgradeDescription, timeout *int64) (result autorest.Response, err error) + StartComposeDeploymentUpgrade(ctx context.Context, deploymentName string, composeDeploymentUpgradeDescription servicefabric.ComposeDeploymentUpgradeDescription, timeout *int64) (result autorest.Response, err error) + StartDataLoss(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, dataLossMode servicefabric.DataLossMode, timeout *int64) (result autorest.Response, err error) + StartNodeTransition(ctx context.Context, nodeName string, operationID uuid.UUID, nodeTransitionType servicefabric.NodeTransitionType, nodeInstanceID string, stopDurationInSeconds int32, timeout *int64) (result autorest.Response, err error) + StartPartitionRestart(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, restartPartitionMode servicefabric.RestartPartitionMode, timeout *int64) (result autorest.Response, err error) + StartQuorumLoss(ctx context.Context, serviceID string, partitionID uuid.UUID, operationID uuid.UUID, quorumLossMode servicefabric.QuorumLossMode, quorumLossDuration int32, timeout *int64) (result autorest.Response, err error) + StartRollbackComposeDeploymentUpgrade(ctx context.Context, deploymentName string, timeout *int64) (result autorest.Response, err error) + StopChaos(ctx context.Context, timeout *int64) (result autorest.Response, err error) + SubmitPropertyBatch(ctx context.Context, nameID string, propertyBatchDescriptionList servicefabric.PropertyBatchDescriptionList, timeout *int64) (result servicefabric.PropertyBatchInfoModel, err error) + SuspendApplicationBackup(ctx context.Context, applicationID string, timeout *int64) (result autorest.Response, err error) + SuspendPartitionBackup(ctx context.Context, partitionID uuid.UUID, timeout *int64) (result autorest.Response, err error) + SuspendServiceBackup(ctx context.Context, serviceID string, timeout *int64) (result autorest.Response, err error) + ToggleVerboseServicePlacementHealthReporting(ctx context.Context, enabled bool, timeout *int64) (result autorest.Response, err error) + UnprovisionApplicationType(ctx context.Context, applicationTypeName string, unprovisionApplicationTypeDescriptionInfo servicefabric.UnprovisionApplicationTypeDescriptionInfo, timeout *int64) (result autorest.Response, err error) + UnprovisionCluster(ctx context.Context, unprovisionFabricDescription servicefabric.UnprovisionFabricDescription, timeout *int64) (result autorest.Response, err error) + UpdateApplicationUpgrade(ctx context.Context, applicationID string, applicationUpgradeUpdateDescription servicefabric.ApplicationUpgradeUpdateDescription, timeout *int64) (result autorest.Response, err error) + UpdateBackupPolicy(ctx context.Context, backupPolicyDescription servicefabric.BackupPolicyDescription, backupPolicyName string, timeout *int64) (result autorest.Response, err error) + UpdateClusterUpgrade(ctx context.Context, updateClusterUpgradeDescription servicefabric.UpdateClusterUpgradeDescription, timeout *int64) (result autorest.Response, err error) + UpdateRepairExecutionState(ctx context.Context, repairTask servicefabric.RepairTask) (result servicefabric.RepairTaskUpdateInfo, err error) + UpdateRepairTaskHealthPolicy(ctx context.Context, repairTaskUpdateHealthPolicyDescription servicefabric.RepairTaskUpdateHealthPolicyDescription) (result servicefabric.RepairTaskUpdateInfo, err error) + UpdateService(ctx context.Context, serviceID string, serviceUpdateDescription servicefabric.BasicServiceUpdateDescription, timeout *int64) (result autorest.Response, err error) + UploadFile(ctx context.Context, contentPath string, timeout *int64) (result autorest.Response, err error) + UploadFileChunk(ctx context.Context, contentPath string, sessionID uuid.UUID, contentRange string, timeout *int64) (result autorest.Response, err error) +} + +var _ BaseClientAPI = (*servicefabric.BaseClient)(nil) + +// MeshSecretClientAPI contains the set of methods on the MeshSecretClient type. +type MeshSecretClientAPI interface { + CreateOrUpdate(ctx context.Context, secretResourceName string, secretResourceDescription servicefabric.SecretResourceDescription) (result servicefabric.SecretResourceDescription, err error) + Delete(ctx context.Context, secretResourceName string) (result autorest.Response, err error) + Get(ctx context.Context, secretResourceName string) (result servicefabric.SecretResourceDescription, err error) + List(ctx context.Context) (result servicefabric.PagedSecretResourceDescriptionList, err error) +} + +var _ MeshSecretClientAPI = (*servicefabric.MeshSecretClient)(nil) + +// MeshSecretValueClientAPI contains the set of methods on the MeshSecretValueClient type. +type MeshSecretValueClientAPI interface { + AddValue(ctx context.Context, secretResourceName string, secretValueResourceName string, secretValueResourceDescription servicefabric.SecretValueResourceDescription) (result servicefabric.SecretValueResourceDescription, err error) + Delete(ctx context.Context, secretResourceName string, secretValueResourceName string) (result autorest.Response, err error) + Get(ctx context.Context, secretResourceName string, secretValueResourceName string) (result servicefabric.SecretValueResourceDescription, err error) + List(ctx context.Context, secretResourceName string) (result servicefabric.PagedSecretValueResourceDescriptionList, err error) + Show(ctx context.Context, secretResourceName string, secretValueResourceName string) (result servicefabric.SecretValue, err error) +} + +var _ MeshSecretValueClientAPI = (*servicefabric.MeshSecretValueClient)(nil) + +// MeshVolumeClientAPI contains the set of methods on the MeshVolumeClient type. +type MeshVolumeClientAPI interface { + CreateOrUpdate(ctx context.Context, volumeResourceName string, volumeResourceDescription servicefabric.VolumeResourceDescription) (result servicefabric.VolumeResourceDescription, err error) + Delete(ctx context.Context, volumeResourceName string) (result autorest.Response, err error) + Get(ctx context.Context, volumeResourceName string) (result servicefabric.VolumeResourceDescription, err error) + List(ctx context.Context) (result servicefabric.PagedVolumeResourceDescriptionList, err error) +} + +var _ MeshVolumeClientAPI = (*servicefabric.MeshVolumeClient)(nil) + +// MeshNetworkClientAPI contains the set of methods on the MeshNetworkClient type. +type MeshNetworkClientAPI interface { + CreateOrUpdate(ctx context.Context, networkResourceName string, networkResourceDescription servicefabric.NetworkResourceDescription) (result servicefabric.NetworkResourceDescription, err error) + Delete(ctx context.Context, networkResourceName string) (result autorest.Response, err error) + Get(ctx context.Context, networkResourceName string) (result servicefabric.NetworkResourceDescription, err error) + List(ctx context.Context) (result servicefabric.PagedNetworkResourceDescriptionList, err error) +} + +var _ MeshNetworkClientAPI = (*servicefabric.MeshNetworkClient)(nil) + +// MeshApplicationClientAPI contains the set of methods on the MeshApplicationClient type. +type MeshApplicationClientAPI interface { + CreateOrUpdate(ctx context.Context, applicationResourceName string, applicationResourceDescription servicefabric.ApplicationResourceDescription) (result servicefabric.ApplicationResourceDescription, err error) + Delete(ctx context.Context, applicationResourceName string) (result autorest.Response, err error) + Get(ctx context.Context, applicationResourceName string) (result servicefabric.ApplicationResourceDescription, err error) + GetUpgradeProgress(ctx context.Context, applicationResourceName string) (result servicefabric.ApplicationResourceUpgradeProgressInfo, err error) + List(ctx context.Context) (result servicefabric.PagedApplicationResourceDescriptionList, err error) +} + +var _ MeshApplicationClientAPI = (*servicefabric.MeshApplicationClient)(nil) + +// MeshServiceClientAPI contains the set of methods on the MeshServiceClient type. +type MeshServiceClientAPI interface { + Get(ctx context.Context, applicationResourceName string, serviceResourceName string) (result servicefabric.ServiceResourceDescription, err error) + List(ctx context.Context, applicationResourceName string) (result servicefabric.PagedServiceResourceDescriptionList, err error) +} + +var _ MeshServiceClientAPI = (*servicefabric.MeshServiceClient)(nil) + +// MeshCodePackageClientAPI contains the set of methods on the MeshCodePackageClient type. +type MeshCodePackageClientAPI interface { + GetContainerLogs(ctx context.Context, applicationResourceName string, serviceResourceName string, replicaName string, codePackageName string, tail string) (result servicefabric.ContainerLogs, err error) +} + +var _ MeshCodePackageClientAPI = (*servicefabric.MeshCodePackageClient)(nil) + +// MeshServiceReplicaClientAPI contains the set of methods on the MeshServiceReplicaClient type. +type MeshServiceReplicaClientAPI interface { + Get(ctx context.Context, applicationResourceName string, serviceResourceName string, replicaName string) (result servicefabric.ServiceReplicaDescription, err error) + List(ctx context.Context, applicationResourceName string, serviceResourceName string) (result servicefabric.PagedServiceReplicaDescriptionList, err error) +} + +var _ MeshServiceReplicaClientAPI = (*servicefabric.MeshServiceReplicaClient)(nil) + +// MeshGatewayClientAPI contains the set of methods on the MeshGatewayClient type. +type MeshGatewayClientAPI interface { + CreateOrUpdate(ctx context.Context, gatewayResourceName string, gatewayResourceDescription servicefabric.GatewayResourceDescription) (result servicefabric.GatewayResourceDescription, err error) + Delete(ctx context.Context, gatewayResourceName string) (result autorest.Response, err error) + Get(ctx context.Context, gatewayResourceName string) (result servicefabric.GatewayResourceDescription, err error) + List(ctx context.Context) (result servicefabric.PagedGatewayResourceDescriptionList, err error) +} + +var _ MeshGatewayClientAPI = (*servicefabric.MeshGatewayClient)(nil) diff --git a/services/servicefabric/7.0/servicefabric/version.go b/services/servicefabric/7.0/servicefabric/version.go new file mode 100644 index 000000000000..880347cd50d7 --- /dev/null +++ b/services/servicefabric/7.0/servicefabric/version.go @@ -0,0 +1,30 @@ +package servicefabric + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " servicefabric/7.0.0.42" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go index b4a09b245e9e..3b4e3f71c813 100644 --- a/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2016-09-01/servicefabric/clusters.go @@ -83,25 +83,25 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go index 557d323b2a97..74fce5e5ab40 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/clusters.go @@ -83,25 +83,25 @@ func (client ClustersClient) Create(ctx context.Context, resourceGroupName strin {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/servicefabric/mgmt/2018-02-01/servicefabric/models.go b/services/servicefabric/mgmt/2018-02-01/servicefabric/models.go index 73d97817dd1e..12de536e10c2 100644 --- a/services/servicefabric/mgmt/2018-02-01/servicefabric/models.go +++ b/services/servicefabric/mgmt/2018-02-01/servicefabric/models.go @@ -1578,7 +1578,7 @@ type ClusterProperties struct { NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the cluster resource. Possible values include: 'Updating', 'Succeeded', 'Failed', 'Canceled' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // - Silver - Run the System services with a target replica set count of 5. @@ -1620,7 +1620,7 @@ type ClusterPropertiesUpdateParameters struct { FabricSettings *[]SettingsSectionDescription `json:"fabricSettings,omitempty"` // NodeTypes - The list of node types in the cluster. This will overwrite the existing list. NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"` - // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // - Silver - Run the System services with a target replica set count of 5. @@ -1919,7 +1919,7 @@ type NodeTypeDescription struct { ClientConnectionEndpointPort *int32 `json:"clientConnectionEndpointPort,omitempty"` // HTTPGatewayEndpointPort - The HTTP cluster management endpoint port. HTTPGatewayEndpointPort *int32 `json:"httpGatewayEndpointPort,omitempty"` - // DurabilityLevel - The durability level of the node type. Learn about [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // DurabilityLevel - The durability level of the node type. Learn about [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - Bronze - No privileges. This is the default. // - Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. // - Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled only on full node VM SKUs like D15_V2, G5 etc. diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go index bf067d540602..5ffa8e065445 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/clusters.go @@ -83,25 +83,25 @@ func (client ClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupNa {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentUpgradeDomainDeltaUnhealthyNodes", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ClusterProperties.UpgradeDescription.DeltaHealthPolicy.MaxPercentDeltaUnhealthyApplications", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}, diff --git a/services/servicefabric/mgmt/2019-03-01/servicefabric/models.go b/services/servicefabric/mgmt/2019-03-01/servicefabric/models.go index 8c5890118618..6437e188ad7c 100644 --- a/services/servicefabric/mgmt/2019-03-01/servicefabric/models.go +++ b/services/servicefabric/mgmt/2019-03-01/servicefabric/models.go @@ -1712,7 +1712,7 @@ type ClusterProperties struct { NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the cluster resource. Possible values include: 'Updating', 'Succeeded', 'Failed', 'Canceled' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // - Silver - Run the System services with a target replica set count of 5. @@ -1756,7 +1756,7 @@ type ClusterPropertiesUpdateParameters struct { FabricSettings *[]SettingsSectionDescription `json:"fabricSettings,omitempty"` // NodeTypes - The list of node types in the cluster. This will overwrite the existing list. NodeTypes *[]NodeTypeDescription `json:"nodeTypes,omitempty"` - // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // ReliabilityLevel - The reliability level sets the replica set size of system services. Learn about [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. // - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. // - Silver - Run the System services with a target replica set count of 5. @@ -2055,7 +2055,7 @@ type NodeTypeDescription struct { ClientConnectionEndpointPort *int32 `json:"clientConnectionEndpointPort,omitempty"` // HTTPGatewayEndpointPort - The HTTP cluster management endpoint port. HTTPGatewayEndpointPort *int32 `json:"httpGatewayEndpointPort,omitempty"` - // DurabilityLevel - The durability level of the node type. Learn about [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + // DurabilityLevel - The durability level of the node type. Learn about [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). // - Bronze - No privileges. This is the default. // - Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. // - Gold - The infrastructure jobs can be paused for a duration of 2 hours per UD. Gold durability can be enabled only on full node VM skus like D15_V2, G5 etc. diff --git a/services/signalr/mgmt/2018-10-01/signalr/models.go b/services/signalr/mgmt/2018-10-01/signalr/models.go index a500056701ec..2a9d96b3418c 100644 --- a/services/signalr/mgmt/2018-10-01/signalr/models.go +++ b/services/signalr/mgmt/2018-10-01/signalr/models.go @@ -251,7 +251,7 @@ type Feature struct { // - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use. // - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs' Flag FeatureFlags `json:"flag,omitempty"` - // Value - Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. + // Value - Value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/azure/azure-signalr/ for allowed values. Value *string `json:"value,omitempty"` // Properties - Optional properties related to this feature. Properties map[string]*string `json:"properties"` diff --git a/services/storage/datalake/2018-11-09/storagedatalake/filesystem.go b/services/storage/datalake/2018-11-09/storagedatalake/filesystem.go index ccd1cc128156..d561affb0a11 100644 --- a/services/storage/datalake/2018-11-09/storagedatalake/filesystem.go +++ b/services/storage/datalake/2018-11-09/storagedatalake/filesystem.go @@ -70,7 +70,7 @@ func (client FilesystemClient) Create(ctx context.Context, filesystem string, xM Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "Create", err.Error()) } @@ -197,7 +197,7 @@ func (client FilesystemClient) Delete(ctx context.Context, filesystem string, if Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "Delete", err.Error()) } @@ -317,7 +317,7 @@ func (client FilesystemClient) GetProperties(ctx context.Context, filesystem str Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "GetProperties", err.Error()) } @@ -427,13 +427,13 @@ func (client FilesystemClient) List(ctx context.Context, prefix string, continua if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: xMsClientRequestID, Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false, Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "List", err.Error()) } @@ -563,7 +563,7 @@ func (client FilesystemClient) SetProperties(ctx context.Context, filesystem str Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "SetProperties", err.Error()) } diff --git a/services/storage/datalake/2018-11-09/storagedatalake/path.go b/services/storage/datalake/2018-11-09/storagedatalake/path.go index e6a99c80430a..4e654efb9530 100644 --- a/services/storage/datalake/2018-11-09/storagedatalake/path.go +++ b/services/storage/datalake/2018-11-09/storagedatalake/path.go @@ -139,7 +139,7 @@ func (client PathClient) Create(ctx context.Context, filesystem string, pathPara Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Create", err.Error()) } @@ -371,7 +371,7 @@ func (client PathClient) Delete(ctx context.Context, filesystem string, pathPara Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Delete", err.Error()) } @@ -534,7 +534,7 @@ func (client PathClient) GetProperties(ctx context.Context, filesystem string, p Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "GetProperties", err.Error()) } @@ -704,7 +704,7 @@ func (client PathClient) Lease(ctx context.Context, xMsLeaseAction PathLeaseActi Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Lease", err.Error()) } @@ -857,7 +857,7 @@ func (client PathClient) List(ctx context.Context, recursive bool, filesystem st if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: filesystem, Constraints: []validation.Constraint{{Target: "filesystem", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "filesystem", Name: validation.MinLength, Rule: 3, Chain: nil}}}, @@ -866,7 +866,7 @@ func (client PathClient) List(ctx context.Context, recursive bool, filesystem st Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "List", err.Error()) } @@ -1015,7 +1015,7 @@ func (client PathClient) Read(ctx context.Context, filesystem string, pathParame Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Read", err.Error()) } @@ -1244,7 +1244,7 @@ func (client PathClient) Update(ctx context.Context, action PathUpdateAction, fi if err := validation.Validate([]validation.Validation{ {TargetValue: contentLength, Constraints: []validation.Constraint{{Target: "contentLength", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "contentLength", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "contentLength", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: xMsLeaseID, Constraints: []validation.Constraint{{Target: "xMsLeaseID", Name: validation.Empty, Rule: false, Chain: []validation.Constraint{{Target: "xMsLeaseID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, @@ -1256,7 +1256,7 @@ func (client PathClient) Update(ctx context.Context, action PathUpdateAction, fi Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Update", err.Error()) } diff --git a/services/storage/datalake/2019-10-31/storagedatalake/filesystem.go b/services/storage/datalake/2019-10-31/storagedatalake/filesystem.go index ccd1cc128156..d561affb0a11 100644 --- a/services/storage/datalake/2019-10-31/storagedatalake/filesystem.go +++ b/services/storage/datalake/2019-10-31/storagedatalake/filesystem.go @@ -70,7 +70,7 @@ func (client FilesystemClient) Create(ctx context.Context, filesystem string, xM Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "Create", err.Error()) } @@ -197,7 +197,7 @@ func (client FilesystemClient) Delete(ctx context.Context, filesystem string, if Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "Delete", err.Error()) } @@ -317,7 +317,7 @@ func (client FilesystemClient) GetProperties(ctx context.Context, filesystem str Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "GetProperties", err.Error()) } @@ -427,13 +427,13 @@ func (client FilesystemClient) List(ctx context.Context, prefix string, continua if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: xMsClientRequestID, Constraints: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Empty, Rule: false, Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "List", err.Error()) } @@ -563,7 +563,7 @@ func (client FilesystemClient) SetProperties(ctx context.Context, filesystem str Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.FilesystemClient", "SetProperties", err.Error()) } diff --git a/services/storage/datalake/2019-10-31/storagedatalake/path.go b/services/storage/datalake/2019-10-31/storagedatalake/path.go index bdda54bf03eb..1a6a996f4273 100644 --- a/services/storage/datalake/2019-10-31/storagedatalake/path.go +++ b/services/storage/datalake/2019-10-31/storagedatalake/path.go @@ -139,7 +139,7 @@ func (client PathClient) Create(ctx context.Context, filesystem string, pathPara Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Create", err.Error()) } @@ -371,7 +371,7 @@ func (client PathClient) Delete(ctx context.Context, filesystem string, pathPara Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Delete", err.Error()) } @@ -536,7 +536,7 @@ func (client PathClient) GetProperties(ctx context.Context, filesystem string, p Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "GetProperties", err.Error()) } @@ -709,7 +709,7 @@ func (client PathClient) Lease(ctx context.Context, xMsLeaseAction PathLeaseActi Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Lease", err.Error()) } @@ -862,7 +862,7 @@ func (client PathClient) List(ctx context.Context, recursive bool, filesystem st if err := validation.Validate([]validation.Validation{ {TargetValue: maxResults, Constraints: []validation.Constraint{{Target: "maxResults", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "maxResults", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}, {TargetValue: filesystem, Constraints: []validation.Constraint{{Target: "filesystem", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "filesystem", Name: validation.MinLength, Rule: 3, Chain: nil}}}, @@ -871,7 +871,7 @@ func (client PathClient) List(ctx context.Context, recursive bool, filesystem st Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "List", err.Error()) } @@ -1020,7 +1020,7 @@ func (client PathClient) Read(ctx context.Context, filesystem string, pathParame Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Read", err.Error()) } @@ -1249,7 +1249,7 @@ func (client PathClient) Update(ctx context.Context, action PathUpdateAction, fi if err := validation.Validate([]validation.Validation{ {TargetValue: contentLength, Constraints: []validation.Constraint{{Target: "contentLength", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "contentLength", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}, + Chain: []validation.Constraint{{Target: "contentLength", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}}}, {TargetValue: xMsLeaseID, Constraints: []validation.Constraint{{Target: "xMsLeaseID", Name: validation.Empty, Rule: false, Chain: []validation.Constraint{{Target: "xMsLeaseID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, @@ -1261,7 +1261,7 @@ func (client PathClient) Update(ctx context.Context, action PathUpdateAction, fi Chain: []validation.Constraint{{Target: "xMsClientRequestID", Name: validation.Pattern, Rule: `^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$`, Chain: nil}}}}}, {TargetValue: timeout, Constraints: []validation.Constraint{{Target: "timeout", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "timeout", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}}}}); err != nil { return result, validation.NewError("storagedatalake.PathClient", "Update", err.Error()) } diff --git a/services/storage/mgmt/2018-07-01/storage/blobservices.go b/services/storage/mgmt/2018-07-01/storage/blobservices.go index 8a93b29bb086..446938050445 100644 --- a/services/storage/mgmt/2018-07-01/storage/blobservices.go +++ b/services/storage/mgmt/2018-07-01/storage/blobservices.go @@ -170,7 +170,7 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/storage/mgmt/2018-11-01/storage/blobservices.go b/services/storage/mgmt/2018-11-01/storage/blobservices.go index ce2c08700a84..6b34c3d85c49 100644 --- a/services/storage/mgmt/2018-11-01/storage/blobservices.go +++ b/services/storage/mgmt/2018-11-01/storage/blobservices.go @@ -170,7 +170,7 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/storage/mgmt/2019-04-01/storage/blobservices.go b/services/storage/mgmt/2019-04-01/storage/blobservices.go index e9eb9cb0d942..5f6e86ca6bef 100644 --- a/services/storage/mgmt/2019-04-01/storage/blobservices.go +++ b/services/storage/mgmt/2019-04-01/storage/blobservices.go @@ -262,7 +262,7 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}}}}); err != nil { diff --git a/services/storage/mgmt/2019-04-01/storage/fileshares.go b/services/storage/mgmt/2019-04-01/storage/fileshares.go index 560e3a1033af..572a717cfbd8 100644 --- a/services/storage/mgmt/2019-04-01/storage/fileshares.go +++ b/services/storage/mgmt/2019-04-01/storage/fileshares.go @@ -78,7 +78,7 @@ func (client FileSharesClient) Create(ctx context.Context, resourceGroupName str Constraints: []validation.Constraint{{Target: "fileShare.FileShareProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(5120), Chain: nil}, - {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}, {TargetValue: client.SubscriptionID, diff --git a/services/storage/mgmt/2019-06-01/storage/blobservices.go b/services/storage/mgmt/2019-06-01/storage/blobservices.go index 8f29d93d078e..955db0b72319 100644 --- a/services/storage/mgmt/2019-06-01/storage/blobservices.go +++ b/services/storage/mgmt/2019-06-01/storage/blobservices.go @@ -262,15 +262,9 @@ func (client BlobServicesClient) SetServiceProperties(ctx context.Context, resou Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.BlobServicePropertiesProperties.DeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, - {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.BlobServicePropertiesProperties.ContainerDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, - }}, - }}, }}}}}); err != nil { return result, validation.NewError("storage.BlobServicesClient", "SetServiceProperties", err.Error()) } @@ -310,6 +304,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex "api-version": APIVersion, } + parameters.Sku = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/storage/mgmt/2019-06-01/storage/fileservices.go b/services/storage/mgmt/2019-06-01/storage/fileservices.go index ff5cf18860cb..cb5af6391b07 100644 --- a/services/storage/mgmt/2019-06-01/storage/fileservices.go +++ b/services/storage/mgmt/2019-06-01/storage/fileservices.go @@ -262,7 +262,7 @@ func (client FileServicesClient) SetServiceProperties(ctx context.Context, resou Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMaximum, Rule: int64(365), Chain: nil}, - {Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.FileServicePropertiesProperties.ShareDeleteRetentionPolicy.Days", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, }}}}}); err != nil { @@ -304,6 +304,7 @@ func (client FileServicesClient) SetServicePropertiesPreparer(ctx context.Contex "api-version": APIVersion, } + parameters.Sku = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/storage/mgmt/2019-06-01/storage/fileshares.go b/services/storage/mgmt/2019-06-01/storage/fileshares.go index eb5ca77d05a2..ba3a157d17ac 100644 --- a/services/storage/mgmt/2019-06-01/storage/fileshares.go +++ b/services/storage/mgmt/2019-06-01/storage/fileshares.go @@ -77,8 +77,8 @@ func (client FileSharesClient) Create(ctx context.Context, resourceGroupName str {TargetValue: fileShare, Constraints: []validation.Constraint{{Target: "fileShare.FileShareProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(5120), Chain: nil}, - {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + Chain: []validation.Constraint{{Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMaximum, Rule: int64(100000), Chain: nil}, + {Target: "fileShare.FileShareProperties.ShareQuota", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}, {TargetValue: client.SubscriptionID, diff --git a/services/storage/mgmt/2019-06-01/storage/models.go b/services/storage/mgmt/2019-06-01/storage/models.go index c83dfc8724a5..664c96e0751d 100644 --- a/services/storage/mgmt/2019-06-01/storage/models.go +++ b/services/storage/mgmt/2019-06-01/storage/models.go @@ -481,6 +481,21 @@ func PossibleReasonCodeValues() []ReasonCode { return []ReasonCode{NotAvailableForSubscription, QuotaID} } +// RoutingChoice enumerates the values for routing choice. +type RoutingChoice string + +const ( + // InternetRouting ... + InternetRouting RoutingChoice = "InternetRouting" + // MicrosoftRouting ... + MicrosoftRouting RoutingChoice = "MicrosoftRouting" +) + +// PossibleRoutingChoiceValues returns an array of possible values for the RoutingChoice const type. +func PossibleRoutingChoiceValues() []RoutingChoice { + return []RoutingChoice{InternetRouting, MicrosoftRouting} +} + // Services enumerates the values for services. type Services string @@ -877,6 +892,19 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { return nil } +// AccountInternetEndpoints the URIs that are used to perform a retrieval of a public blob, file, web or +// dfs object via a internet routing endpoint. +type AccountInternetEndpoints struct { + // Blob - READ-ONLY; Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + // File - READ-ONLY; Gets the file endpoint. + File *string `json:"file,omitempty"` + // Web - READ-ONLY; Gets the web endpoint. + Web *string `json:"web,omitempty"` + // Dfs - READ-ONLY; Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` +} + // AccountKey an access key for the storage account. type AccountKey struct { // KeyName - READ-ONLY; Name of the key. @@ -1040,6 +1068,23 @@ func NewAccountListResultPage(getNextPage func(context.Context, AccountListResul return AccountListResultPage{fn: getNextPage} } +// AccountMicrosoftEndpoints the URIs that are used to perform a retrieval of a public blob, queue, table, +// web or dfs object via a microsoft routing endpoint. +type AccountMicrosoftEndpoints struct { + // Blob - READ-ONLY; Gets the blob endpoint. + Blob *string `json:"blob,omitempty"` + // Queue - READ-ONLY; Gets the queue endpoint. + Queue *string `json:"queue,omitempty"` + // Table - READ-ONLY; Gets the table endpoint. + Table *string `json:"table,omitempty"` + // File - READ-ONLY; Gets the file endpoint. + File *string `json:"file,omitempty"` + // Web - READ-ONLY; Gets the web endpoint. + Web *string `json:"web,omitempty"` + // Dfs - READ-ONLY; Gets the dfs endpoint. + Dfs *string `json:"dfs,omitempty"` +} + // AccountProperties properties of the storage account. type AccountProperties struct { // ProvisioningState - READ-ONLY; Gets the status of the storage account at the time the operation was called. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateResolvingDNS', 'ProvisioningStateSucceeded' @@ -1082,6 +1127,8 @@ type AccountProperties struct { LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` // PrivateEndpointConnections - READ-ONLY; List of private endpoint connection associated with the specified storage account PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` } // AccountPropertiesCreateParameters the parameters used to create the storage account. @@ -1102,6 +1149,8 @@ type AccountPropertiesCreateParameters struct { IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` + // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` } // AccountPropertiesUpdateParameters the parameters used when updating a storage account. @@ -1120,6 +1169,8 @@ type AccountPropertiesUpdateParameters struct { NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // LargeFileSharesState - Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. Possible values include: 'Disabled', 'Enabled' LargeFileSharesState LargeFileSharesState `json:"largeFileSharesState,omitempty"` + // RoutingPreference - Maintains information about the network routing choice opted by the user for data transfer + RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"` } // AccountRegenerateKeyParameters the parameters used to regenerate the storage account key. @@ -1428,6 +1479,8 @@ type BlobServiceProperties struct { autorest.Response `json:"-"` // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. *BlobServicePropertiesProperties `json:"properties,omitempty"` + // Sku - READ-ONLY; Sku name and tier. + Sku *Sku `json:"sku,omitempty"` // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource @@ -1463,6 +1516,15 @@ func (bsp *BlobServiceProperties) UnmarshalJSON(body []byte) error { } bsp.BlobServicePropertiesProperties = &blobServiceProperties } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + bsp.Sku = &sku + } case "id": if v != nil { var ID string @@ -1508,8 +1570,6 @@ type BlobServicePropertiesProperties struct { AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` // ChangeFeed - The blob service properties for change feed events. ChangeFeed *ChangeFeed `json:"changeFeed,omitempty"` - // ContainerDeleteRetentionPolicy - The blob service properties for container soft delete. - ContainerDeleteRetentionPolicy *DeleteRetentionPolicy `json:"containerDeleteRetentionPolicy,omitempty"` } // ChangeFeed the blob service properties for change feed events. @@ -1622,11 +1682,11 @@ type DateAfterModification struct { DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` } -// DeleteRetentionPolicy the blob service properties for soft delete. +// DeleteRetentionPolicy the service properties for soft delete. type DeleteRetentionPolicy struct { - // Enabled - Indicates whether DeleteRetentionPolicy is enabled for the Blob service. + // Enabled - Indicates whether DeleteRetentionPolicy is enabled. Enabled *bool `json:"enabled,omitempty"` - // Days - Indicates the number of days that the deleted blob should be retained. The minimum specified value can be 1 and the maximum value can be 365. + // Days - Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365. Days *int32 `json:"days,omitempty"` } @@ -1683,6 +1743,10 @@ type Endpoints struct { Web *string `json:"web,omitempty"` // Dfs - READ-ONLY; Gets the dfs endpoint. Dfs *string `json:"dfs,omitempty"` + // MicrosoftEndpoints - Gets the microsoft routing storage endpoints. + MicrosoftEndpoints *AccountMicrosoftEndpoints `json:"microsoftEndpoints,omitempty"` + // InternetEndpoints - Gets the internet routing storage endpoints + InternetEndpoints *AccountInternetEndpoints `json:"internetEndpoints,omitempty"` } // ErrorResponse an error response from the storage resource provider. @@ -1705,6 +1769,8 @@ type FileServiceProperties struct { autorest.Response `json:"-"` // FileServicePropertiesProperties - The properties of File services in storage account. *FileServicePropertiesProperties `json:"properties,omitempty"` + // Sku - READ-ONLY; Sku name and tier. + Sku *Sku `json:"sku,omitempty"` // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the resource @@ -1740,6 +1806,15 @@ func (fsp *FileServiceProperties) UnmarshalJSON(body []byte) error { } fsp.FileServicePropertiesProperties = &fileServiceProperties } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + fsp.Sku = &sku + } case "id": if v != nil { var ID string @@ -2101,7 +2176,7 @@ type FileShareProperties struct { LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` // Metadata - A name-value pair to associate with the share as metadata. Metadata map[string]*string `json:"metadata"` - // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). + // ShareQuota - The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. ShareQuota *int32 `json:"shareQuota,omitempty"` } @@ -3097,6 +3172,17 @@ type Restriction struct { ReasonCode ReasonCode `json:"reasonCode,omitempty"` } +// RoutingPreference routing preference defines the type of network, either microsoft or internet routing +// to be used to deliver the user data, the default option is microsoft routing +type RoutingPreference struct { + // RoutingChoice - Routing Choice defines the kind of network routing opted by the user. Possible values include: 'MicrosoftRouting', 'InternetRouting' + RoutingChoice RoutingChoice `json:"routingChoice,omitempty"` + // PublishMicrosoftEndpoints - A boolean flag which indicates whether microsoft routing storage endpoints are to be published + PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty"` + // PublishInternetEndpoints - A boolean flag which indicates whether internet routing storage endpoints are to be published + PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty"` +} + // ServiceSasParameters the parameters to list service SAS credentials of a specific resource. type ServiceSasParameters struct { // CanonicalizedResource - The canonical path to the signed resource. @@ -3145,9 +3231,26 @@ type ServiceSpecification struct { // Sku the SKU of the storage account. type Sku struct { - // Name - Gets or sets the SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' + // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' + Name SkuName `json:"name,omitempty"` + // Tier - Possible values include: 'Standard', 'Premium' + Tier SkuTier `json:"tier,omitempty"` +} + +// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs, +// change notification, etc. +type SKUCapability struct { + // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + Name *string `json:"name,omitempty"` + // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. + Value *string `json:"value,omitempty"` +} + +// SkuInformation storage SKU and its properties +type SkuInformation struct { + // Name - Possible values include: 'StandardLRS', 'StandardGRS', 'StandardRAGRS', 'StandardZRS', 'PremiumLRS', 'PremiumZRS', 'StandardGZRS', 'StandardRAGZRS' Name SkuName `json:"name,omitempty"` - // Tier - READ-ONLY; Gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' + // Tier - Possible values include: 'Standard', 'Premium' Tier SkuTier `json:"tier,omitempty"` // ResourceType - READ-ONLY; The type of the resource, usually it is 'storageAccounts'. ResourceType *string `json:"resourceType,omitempty"` @@ -3161,20 +3264,11 @@ type Sku struct { Restrictions *[]Restriction `json:"restrictions,omitempty"` } -// SKUCapability the capability information in the specified SKU, including file encryption, network ACLs, -// change notification, etc. -type SKUCapability struct { - // Name - READ-ONLY; The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. - Name *string `json:"name,omitempty"` - // Value - READ-ONLY; A string value to indicate states of given capability. Possibly 'true' or 'false'. - Value *string `json:"value,omitempty"` -} - // SkuListResult the response from the List Storage SKUs operation. type SkuListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; Get the list result of storage SKUs and their properties. - Value *[]Sku `json:"value,omitempty"` + Value *[]SkuInformation `json:"value,omitempty"` } // TagProperty a tag of the LegalHold of a blob container. diff --git a/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go b/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go index 9b682f0f21c1..f57f8dc33c66 100644 --- a/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2018-04-02/storagesync/serverendpoints.go @@ -70,7 +70,7 @@ func (client ServerEndpointsClient) Create(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("storagesync.ServerEndpointsClient", "Create", err.Error()) diff --git a/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go b/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go index dc92a31318d5..7a305bf82f2a 100644 --- a/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2018-07-01/storagesync/serverendpoints.go @@ -70,11 +70,11 @@ func (client ServerEndpointsClient) Create(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, - {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("storagesync.ServerEndpointsClient", "Create", err.Error()) diff --git a/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go b/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go index 3213b65401a6..d233ff14307c 100644 --- a/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2018-10-01/storagesync/serverendpoints.go @@ -70,11 +70,11 @@ func (client ServerEndpointsClient) Create(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, - {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("storagesync.ServerEndpointsClient", "Create", err.Error()) diff --git a/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go b/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go index 3ac431116422..c19233568da0 100644 --- a/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go +++ b/services/storagesync/mgmt/2019-02-01/storagesync/serverendpoints.go @@ -70,11 +70,11 @@ func (client ServerEndpointsClient) Create(ctx context.Context, resourceGroupNam Constraints: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ServerEndpointCreateParametersProperties.VolumeFreeSpacePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMaximum, Rule: int64(2147483647), Chain: nil}, - {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "parameters.ServerEndpointCreateParametersProperties.TierFilesOlderThanDays", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("storagesync.ServerEndpointsClient", "Create", err.Error()) diff --git a/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go b/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go index bf69a96b4109..ecdf757ea58c 100644 --- a/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go +++ b/services/storsimple1200series/mgmt/2016-10-01/storsimple/backupschedulegroups.go @@ -65,11 +65,11 @@ func (client BackupScheduleGroupsClient) CreateOrUpdate(ctx context.Context, dev Chain: []validation.Constraint{{Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Hour", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Hour", Name: validation.InclusiveMaximum, Rule: int64(23), Chain: nil}, - {Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Hour", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Hour", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, {Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Minute", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Minute", Name: validation.InclusiveMaximum, Rule: int64(59), Chain: nil}, - {Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Minute", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "scheduleGroup.BackupScheduleGroupProperties.StartTime.Minute", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, }}}}, diff --git a/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go b/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go index aa2bbab5f91e..8f299e179a37 100644 --- a/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go +++ b/services/timeseriesinsights/mgmt/2017-11-15/timeseriesinsights/environments.go @@ -66,7 +66,7 @@ func (client EnvironmentsClient) CreateOrUpdate(ctx context.Context, resourceGro Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}, {Target: "parameters.EnvironmentCreationProperties", Name: validation.Null, Rule: true, diff --git a/services/web/mgmt/2016-09-01/web/apps.go b/services/web/mgmt/2016-09-01/web/apps.go index 2727930b6e71..8f96478f1e83 100644 --- a/services/web/mgmt/2016-09-01/web/apps.go +++ b/services/web/mgmt/2016-09-01/web/apps.go @@ -3419,8 +3419,8 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Re // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app to delete. // deleteMetrics - if true, web app metrics are also deleted. -// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want -// to delete the empty App Service plan. By default, the empty App Service plan is not deleted. +// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App +// Service plan is deleted. func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") @@ -28103,7 +28103,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourc Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, + {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil}, }}, }}, }}, @@ -28209,7 +28209,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, res Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, + {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil}, }}, }}, }}, diff --git a/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go b/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go index de62d4274c35..dff37898d045 100644 --- a/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go +++ b/services/web/mgmt/2016-09-01/web/appservicecertificateorders.go @@ -66,7 +66,7 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppServiceCertificateOrdersClient", "CreateOrUpdate", err.Error()) @@ -1722,7 +1722,7 @@ func (client AppServiceCertificateOrdersClient) ValidatePurchaseInformation(ctx Constraints: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppServiceCertificateOrdersClient", "ValidatePurchaseInformation", err.Error()) diff --git a/services/web/mgmt/2016-09-01/web/client.go b/services/web/mgmt/2016-09-01/web/client.go index f0b671a54622..aa338157d6a6 100644 --- a/services/web/mgmt/2016-09-01/web/client.go +++ b/services/web/mgmt/2016-09-01/web/client.go @@ -1145,7 +1145,7 @@ func (client BaseClient) Validate(ctx context.Context, resourceGroupName string, {Target: "validateRequest.Location", Name: validation.Null, Rule: true, Chain: nil}, {Target: "validateRequest.ValidateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("web.BaseClient", "Validate", err.Error()) } diff --git a/services/web/mgmt/2018-02-01/web/apps.go b/services/web/mgmt/2018-02-01/web/apps.go index 8f6ca74fe918..1baca4d70735 100644 --- a/services/web/mgmt/2018-02-01/web/apps.go +++ b/services/web/mgmt/2018-02-01/web/apps.go @@ -1539,7 +1539,7 @@ func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName s }}, {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, @@ -1641,7 +1641,7 @@ func (client AppsClient) CreateOrUpdateConfiguration(ctx context.Context, resour }}, {Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfiguration", err.Error()) @@ -1742,7 +1742,7 @@ func (client AppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, re }}, {Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfigurationSlot", err.Error()) @@ -3142,7 +3142,7 @@ func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupNa }}, {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, @@ -3963,8 +3963,8 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Re // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app to delete. // deleteMetrics - if true, web app metrics are also deleted. -// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want -// to delete the empty App Service plan. By default, the empty App Service plan is not deleted. +// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App +// Service plan is deleted. func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") @@ -32608,7 +32608,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourc Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, + {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil}, }}, }}, }}, @@ -32714,7 +32714,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, res Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, + {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil}, }}, }}, }}, diff --git a/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go b/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go index 59cb8291e90d..8af6a8d62e88 100644 --- a/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go +++ b/services/web/mgmt/2018-02-01/web/appservicecertificateorders.go @@ -66,7 +66,7 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppServiceCertificateOrdersClient", "CreateOrUpdate", err.Error()) @@ -1722,7 +1722,7 @@ func (client AppServiceCertificateOrdersClient) ValidatePurchaseInformation(ctx Constraints: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppServiceCertificateOrdersClient", "ValidatePurchaseInformation", err.Error()) diff --git a/services/web/mgmt/2018-02-01/web/client.go b/services/web/mgmt/2018-02-01/web/client.go index f78f9c228a0a..01215bd8bb60 100644 --- a/services/web/mgmt/2018-02-01/web/client.go +++ b/services/web/mgmt/2018-02-01/web/client.go @@ -1274,7 +1274,7 @@ func (client BaseClient) Validate(ctx context.Context, resourceGroupName string, {Target: "validateRequest.Location", Name: validation.Null, Rule: true, Chain: nil}, {Target: "validateRequest.ValidateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("web.BaseClient", "Validate", err.Error()) } diff --git a/services/web/mgmt/2019-08-01/web/apps.go b/services/web/mgmt/2019-08-01/web/apps.go index 641575ec3c1b..73392ff1c4d6 100644 --- a/services/web/mgmt/2019-08-01/web/apps.go +++ b/services/web/mgmt/2019-08-01/web/apps.go @@ -816,7 +816,7 @@ func (client AppsClient) CopyProductionSlot(ctx context.Context, resourceGroupNa }}, {Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppsClient", "CopyProductionSlot", err.Error()) @@ -917,7 +917,7 @@ func (client AppsClient) CopySlotSlot(ctx context.Context, resourceGroupName str }}, {Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppsClient", "CopySlotSlot", err.Error()) @@ -1744,7 +1744,7 @@ func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName s }}, {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, @@ -1846,7 +1846,7 @@ func (client AppsClient) CreateOrUpdateConfiguration(ctx context.Context, resour }}, {Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfiguration", err.Error()) @@ -1947,7 +1947,7 @@ func (client AppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, re }}, {Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfigurationSlot", err.Error()) @@ -2976,7 +2976,7 @@ func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupNa }}, {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, @@ -3799,8 +3799,8 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Re // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app to delete. // deleteMetrics - if true, web app metrics are also deleted. -// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want -// to delete the empty App Service plan. By default, the empty App Service plan is not deleted. +// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App +// Service plan is deleted. func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") @@ -30952,7 +30952,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourc Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, + {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil}, }}, }}, }}, @@ -31058,7 +31058,7 @@ func (client AppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, res Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil}, - {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: 25, Chain: nil}, + {Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil}, }}, }}, }}, diff --git a/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go b/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go index 1c93771c1c02..0d457aba40ff 100644 --- a/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go +++ b/services/web/mgmt/2019-08-01/web/appservicecertificateorders.go @@ -66,7 +66,7 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdate(ctx context.Conte Constraints: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "certificateDistinguishedName.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppServiceCertificateOrdersClient", "CreateOrUpdate", err.Error()) @@ -1722,7 +1722,7 @@ func (client AppServiceCertificateOrdersClient) ValidatePurchaseInformation(ctx Constraints: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "appServiceCertificateOrder.AppServiceCertificateOrderProperties.ValidityInYears", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewError("web.AppServiceCertificateOrdersClient", "ValidatePurchaseInformation", err.Error()) diff --git a/services/web/mgmt/2019-08-01/web/client.go b/services/web/mgmt/2019-08-01/web/client.go index d00bd9328522..7109055e5dff 100644 --- a/services/web/mgmt/2019-08-01/web/client.go +++ b/services/web/mgmt/2019-08-01/web/client.go @@ -1274,7 +1274,7 @@ func (client BaseClient) Validate(ctx context.Context, resourceGroupName string, {Target: "validateRequest.Location", Name: validation.Null, Rule: true, Chain: nil}, {Target: "validateRequest.ValidateProperties", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "validateRequest.ValidateProperties.Capacity", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("web.BaseClient", "Validate", err.Error()) } diff --git a/storage/blob.go b/storage/blob.go index 1d2248625b33..0b02e52bd7ae 100644 --- a/storage/blob.go +++ b/storage/blob.go @@ -566,7 +566,7 @@ type DeleteBlobOptions struct { } // Delete deletes the given blob from the specified container. -// If the blob does not exists at the time of the Delete Blob operation, it +// If the blob does not exist at the time of the Delete Blob operation, it // returns error. // See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Blob func (b *Blob) Delete(options *DeleteBlobOptions) error { diff --git a/storage/directory.go b/storage/directory.go index 2e805e7dff37..6c0c6caf7d3e 100644 --- a/storage/directory.go +++ b/storage/directory.go @@ -94,7 +94,7 @@ func (d *Directory) Create(options *FileRequestOptions) error { } // CreateIfNotExists creates this directory under the associated share if the -// directory does not exists. Returns true if the directory is newly created or +// directory does not exist. Returns true if the directory is newly created or // false if the directory already exists. // // See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Create-Directory diff --git a/version/version.go b/version/version.go index 073281bb853f..82607d02f11c 100644 --- a/version/version.go +++ b/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v36.2.0" +const Number = "v37.0.0"